You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2016/07/09 18:38:32 UTC

commons-crypto git commit: Better fix for LoadLibrary parameter on Windows

Repository: commons-crypto
Updated Branches:
  refs/heads/master 5a4c8059f -> e8fd891f3


Better fix for LoadLibrary parameter on Windows

Project: http://git-wip-us.apache.org/repos/asf/commons-crypto/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-crypto/commit/e8fd891f
Tree: http://git-wip-us.apache.org/repos/asf/commons-crypto/tree/e8fd891f
Diff: http://git-wip-us.apache.org/repos/asf/commons-crypto/diff/e8fd891f

Branch: refs/heads/master
Commit: e8fd891f329b97a89e0ded65386677d446ed1286
Parents: 5a4c805
Author: Sebb <se...@apache.org>
Authored: Sat Jul 9 19:38:29 2016 +0100
Committer: Sebb <se...@apache.org>
Committed: Sat Jul 9 19:38:29 2016 +0100

----------------------------------------------------------------------
 lib/include/config.h                                               | 2 +-
 src/main/native/org/apache/commons/crypto/cipher/OpenSslNative.c   | 2 +-
 .../org/apache/commons/crypto/random/OpenSslCryptoRandomNative.c   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/e8fd891f/lib/include/config.h
----------------------------------------------------------------------
diff --git a/lib/include/config.h b/lib/include/config.h
index 93d90ef..8b4c1d4 100755
--- a/lib/include/config.h
+++ b/lib/include/config.h
@@ -20,7 +20,7 @@
 #define __CONFIG_H
 
 #if defined(WINDOWS)
-    #define COMMONS_CRYPTO_OPENSSL_LIBRARY L"libcrypto.dll"
+    #define COMMONS_CRYPTO_OPENSSL_LIBRARY "libcrypto.dll"
 #elif defined(MAC_OS)
     #define COMMONS_CRYPTO_OPENSSL_LIBRARY "libcrypto.dylib"
 #else

http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/e8fd891f/src/main/native/org/apache/commons/crypto/cipher/OpenSslNative.c
----------------------------------------------------------------------
diff --git a/src/main/native/org/apache/commons/crypto/cipher/OpenSslNative.c b/src/main/native/org/apache/commons/crypto/cipher/OpenSslNative.c
index 5d90c06..bae10cd 100644
--- a/src/main/native/org/apache/commons/crypto/cipher/OpenSslNative.c
+++ b/src/main/native/org/apache/commons/crypto/cipher/OpenSslNative.c
@@ -125,7 +125,7 @@ JNIEXPORT void JNICALL Java_org_apache_commons_crypto_cipher_OpenSslNative_initI
 #endif
 
 #ifdef WINDOWS
-  HMODULE openssl = LoadLibrary(COMMONS_CRYPTO_OPENSSL_LIBRARY);
+  HMODULE openssl = LoadLibrary(TEXT(COMMONS_CRYPTO_OPENSSL_LIBRARY));
 #endif
 
   if (!openssl) {

http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/e8fd891f/src/main/native/org/apache/commons/crypto/random/OpenSslCryptoRandomNative.c
----------------------------------------------------------------------
diff --git a/src/main/native/org/apache/commons/crypto/random/OpenSslCryptoRandomNative.c b/src/main/native/org/apache/commons/crypto/random/OpenSslCryptoRandomNative.c
index a6f0b72..20b9d7a 100644
--- a/src/main/native/org/apache/commons/crypto/random/OpenSslCryptoRandomNative.c
+++ b/src/main/native/org/apache/commons/crypto/random/OpenSslCryptoRandomNative.c
@@ -100,7 +100,7 @@ JNIEXPORT void JNICALL Java_org_apache_commons_crypto_random_OpenSslCryptoRandom
 #endif
 
 #ifdef WINDOWS
-  HMODULE openssl = LoadLibrary(COMMONS_CRYPTO_OPENSSL_LIBRARY);
+  HMODULE openssl = LoadLibrary(TEXT(COMMONS_CRYPTO_OPENSSL_LIBRARY));
 #endif
 
   if (!openssl) {