You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2019/07/23 00:46:52 UTC

[GitHub] [commons-crypto] vanzin commented on a change in pull request #94: Crypto 137 windows compile

vanzin commented on a change in pull request #94: Crypto 137 windows compile
URL: https://github.com/apache/commons-crypto/pull/94#discussion_r306087562
 
 

 ##########
 File path: src/main/native/org/apache/commons/crypto/org_apache_commons_crypto.h
 ##########
 @@ -187,6 +187,24 @@ static FARPROC WINAPI do_dlsym(JNIEnv *env, HMODULE handle, LPCSTR symbol) {
   }
   return func_ptr;
 }
+
+static FARPROC WINAPI do_version_dlsym(JNIEnv *env, HMODULE handle) {
+  FARPROC func_ptr = NULL;
+  if (!env || !handle) {
+    THROW(env, "java/lang/InternalError", NULL);
+      return NULL;
+  }
+  func_ptr = GetProcAddress(handle, "OpenSSL_version_num");
+  if (func_ptr == NULL) {
+    func_ptr = GetProcAddress(handle, "SSLeay");
+  }
+  return func_ptr;
+}
+/* A macro to dlsym the appropriate OpenSSL version number function. */
 
 Review comment:
   Add empty line before.

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


With regards,
Apache Git Services