Skip to content

Commit e7b3303

Browse files
authored
Relax the OpenSSL runtime version check (#313)
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 <[email protected]>
1 parent 10a053f commit e7b3303

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
@@ -518,8 +518,8 @@ void MyFrontendAction::EndSourceFileAction() {
518518
<< " int minor = (version & 0x0FF00000) >> 20;" << std::endl
519519
<< " int patch = (version & 0x00000FF0) >> 4;" << std::endl
520520
<< std::endl
521-
<< " if ((major != ossl_OPENSSL_VERSION_MAJOR) || (minor != ossl_OPENSSL_VERSION_MINOR)) {" << std::endl
522-
<< " fprintf(stderr, \"Expecting to load OpenSSL version %d.%d.x but got %d.%d.%d\\n\"," << std::endl
521+
<< " if ((major != ossl_OPENSSL_VERSION_MAJOR) || (minor < ossl_OPENSSL_VERSION_MINOR)) {" << std::endl
522+
<< " fprintf(stderr, \"Expecting to load OpenSSL version at least %d.%d.x but got %d.%d.%d\\n\"," << std::endl
523523
<< " ossl_OPENSSL_VERSION_MAJOR," << std::endl
524524
<< " ossl_OPENSSL_VERSION_MINOR," << std::endl
525525
<< " major, minor, patch);" << std::endl

0 commit comments

Comments
 (0)