Skip to content

Commit c8bfe90

Browse files
committed
Relax the OpenSSL runtime version check
Allowing the runtime minor version to be higher than the one the code was compiled against. For instance, code was compiled with OpenSSL 3.0.x, but runtime has 3.2.x. Higher minor versions should be compatible with previous versions: https://openssl-library.org/policies/general/versioning-policy/ Signed-off-by: Jonh Wendell <jwendell@redhat.com>
1 parent f186af6 commit c8bfe90

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bssl-compat/prefixer/prefixer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,8 +520,8 @@ void MyFrontendAction::EndSourceFileAction() {
520520
<< " int minor = (version & 0x0FF00000) >> 20;" << std::endl
521521
<< " int patch = (version & 0x00000FF0) >> 4;" << std::endl
522522
<< std::endl
523-
<< " if ((major != ossl_OPENSSL_VERSION_MAJOR) || (minor != ossl_OPENSSL_VERSION_MINOR)) {" << std::endl
524-
<< " fprintf(stderr, \"Expecting to load OpenSSL version %d.%d.x but got %d.%d.%d\\n\"," << std::endl
523+
<< " if ((major != ossl_OPENSSL_VERSION_MAJOR) || (minor < ossl_OPENSSL_VERSION_MINOR)) {" << std::endl
524+
<< " fprintf(stderr, \"Expecting to load OpenSSL version at least %d.%d.x but got %d.%d.%d\\n\"," << std::endl
525525
<< " ossl_OPENSSL_VERSION_MAJOR," << std::endl
526526
<< " ossl_OPENSSL_VERSION_MINOR," << std::endl
527527
<< " major, minor, patch);" << std::endl

0 commit comments

Comments
 (0)