Skip to content

Commit

Permalink
Define HMODULE for Unix to simply conditional code
Browse files Browse the repository at this point in the history
More simplification
  • Loading branch information
sebbASF committed Nov 4, 2023
1 parent b9cc17c commit 9d8912f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
5 changes: 0 additions & 5 deletions src/main/native/org/apache/commons/crypto/OpenSslInfoNative.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,7 @@ static __dlsym_OpenSSL_version dlsym_OpenSSL_version;

static char dynamicLibraryPath[80]; // where was the crypto library found?

#ifdef UNIX
static void get_methods(JNIEnv *env, void *openssl)
#endif
#ifdef WINDOWS
static void get_methods(JNIEnv *env, HMODULE openssl)
#endif
{
LOAD_DYNAMIC_SYMBOL_FALLBACK(__dlsym_OpenSSL_version_num, dlsym_OpenSSL_version_num, env, openssl, "OpenSSL_version_num", "SSLeay");
LOAD_DYNAMIC_SYMBOL_FALLBACK(__dlsym_OpenSSL_version, dlsym_OpenSSL_version, env, openssl, "OpenSSL_version", "SSLeay_version");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,7 @@ static __dlsym_EVP_aes_192_gcm dlsym_EVP_aes_192_gcm;
static __dlsym_EVP_aes_128_gcm dlsym_EVP_aes_128_gcm;
#endif

#ifdef UNIX
static void loadAes(JNIEnv *env, void *openssl)
#endif

#ifdef WINDOWS
static void loadAes(JNIEnv *env, HMODULE openssl)
#endif
{
LOAD_DYNAMIC_SYMBOL(__dlsym_EVP_aes_256_ctr, dlsym_EVP_aes_256_ctr, \
env, openssl, "EVP_aes_256_ctr");
Expand Down

0 comments on commit 9d8912f

Please sign in to comment.