aws / aws-lc

AWS-LC is a general-purpose cryptographic library maintained by the AWS Cryptography team for AWS and their customers. It іs based on code from the Google BoringSSL project and the OpenSSL project.
Other
398 stars 118 forks source link

Check at runtime that the tool is loading the same libcrypto it was built with #1716

Closed andrewhop closed 2 months ago

andrewhop commented 4 months ago

Description of changes:

The tool CMakeList was already checking /lib and /lib64 for the different versions of OpenSSH. However, at runtime we set the LD_LIBRARY_PATH to only /lib which doesn't have the OpenSSL 3+ artifacts. The benchmark tool was then finding the system install of OpenSSL which happened to be 3.something and close enough to work. This change is inspired by a similar mechanism OpenSSL's own tool uses to check build/runtime dependencies.

Callouts

This uses SSLeay which seems to be the best common way to check at runtime all the library versions we test against.

Testing:

Tested locally changing the expected version and observing the tool fail.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

codecov-commenter commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 78.35%. Comparing base (51890da) to head (73d3e2b).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1716 +/- ## ========================================== + Coverage 78.34% 78.35% +0.01% ========================================== Files 581 581 Lines 97312 97313 +1 Branches 13949 13951 +2 ========================================== + Hits 76238 76251 +13 + Misses 20453 20442 -11 + Partials 621 620 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.