[GitHub] vanzin commented on a change in pull request #91: run time support is added for openssl 1.0 and 1.1 for UNIX

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] vanzin commented on a change in pull request #91: run time support is added for openssl 1.0 and 1.1 for UNIX

GitBox
vanzin commented on a change in pull request #91: run time support is added for openssl 1.0 and 1.1 for UNIX
URL: https://github.com/apache/commons-crypto/pull/91#discussion_r255248729
 
 

 ##########
 File path: src/main/native/org/apache/commons/crypto/OpenSslInfoNative.c
 ##########
 @@ -75,38 +84,61 @@ static int load_library(JNIEnv *env)
 {
     char msg[100];
 #ifdef UNIX
-  openssl = dlopen(COMMONS_CRYPTO_OPENSSL_LIBRARY, RTLD_LAZY | RTLD_GLOBAL);
+    openssl_new = dlopen(COMMONS_CRYPTO_OPENSSL_LIBRARY_1, RTLD_LAZY | RTLD_GLOBAL);
 
 Review comment:
   Why restrict this to Unix, and why require specific file names for each version?
   
   If you dynamically check the version number, e.g. by checking for the existence of `OpenSSL_version_num` (1.1 only), you can also help Windows users who have 1.1, and also MacOS users, which in your current patch would be restricted to 1.0 (and I'm pretty sure newer MacOS versions have 1.1).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]