You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Catalin Alexandru Zamfir (JIRA)" <ji...@apache.org> on 2018/03/20 11:28:00 UTC

[jira] [Commented] (CRYPTO-138) failed to run on openssl 1.1.0g

    [ https://issues.apache.org/jira/browse/CRYPTO-138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16406171#comment-16406171 ] 

Catalin Alexandru Zamfir commented on CRYPTO-138:
-------------------------------------------------

I'm building Hadoop 3.x from source and after resolving all other issues, I'm left with the openssl detection issue, similar to this EVP_CIPHER_CTX_cleanup issue here. I'm in a container environment, downloading and installing the latest 1.1.x version of Open SSL on the image. I've even tried the one from Debian repositories.
{code:java}
// code placeholder
root@8c88a2e6d99b:/# /opt/hadoop/bin/hadoop checknative -a
2018-03-20 11:22:41,930 INFO bzip2.Bzip2Factory: Successfully loaded & initialized native-bzip2 library system-native
2018-03-20 11:22:41,933 INFO zlib.ZlibFactory: Successfully loaded & initialized native-zlib library
Native library checking:
hadoop: true /opt/hadoop/lib/native/libhadoop.so.1.0.0
zlib: true /lib/x86_64-linux-gnu/libz.so.1
zstd : true /usr/local/lib/libzstd.so.1
snappy: true /usr/lib/x86_64-linux-gnu/libsnappy.so.1
lz4: true revision:10301
bzip2: true /lib/x86_64-linux-gnu/libbz2.so.1
openssl: false EVP_CIPHER_CTX_cleanup
ISA-L: true /usr/lib/libisal.so.2

root@8c88a2e6d99b:/# ls -lha /usr/lib/x86_64-linux-gnu/libcrypt*
-rw-r--r-- 1 root root 55K Jan 14 10:39 /usr/lib/x86_64-linux-gnu/libcrypt.a
lrwxrwxrwx 1 root root 35 Jan 14 10:39 /usr/lib/x86_64-linux-gnu/libcrypt.so -> /lib/x86_64-linux-gnu/libcrypt.so.1
-rw-r--r-- 1 root root 4.6M Nov 2 11:29 /usr/lib/x86_64-linux-gnu/libcrypto.a
lrwxrwxrwx 1 root root 16 Nov 2 11:29 /usr/lib/x86_64-linux-gnu/libcrypto.so -> libcrypto.so.1.1
-rw-r--r-- 1 root root 2.4M Dec 13 22:09 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.2
-rw-r--r-- 1 root root 2.6M Nov 2 11:29 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
{code}
Ideas/suggestions welcomed.

> failed to run on openssl 1.1.0g
> -------------------------------
>
>                 Key: CRYPTO-138
>                 URL: https://issues.apache.org/jira/browse/CRYPTO-138
>             Project: Commons Crypto
>          Issue Type: Bug
>          Components: Cipher
>    Affects Versions: 1.0.0
>         Environment: uname -a
> Linux linux.fritz.box 4.14.14-300.fc27.x86_64 #1 SMP Fri Jan 19 13:19:54 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
> openssl version 
> OpenSSL 1.1.0g-fips  2 Nov 2017
> java -version
> openjdk version "1.8.0_161"
> OpenJDK Runtime Environment (build 1.8.0_161-b14)
> OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode)
> ---
>            Reporter: kim
>            Priority: Major
>
> running sample code from :
> [https://commons.apache.org/proper/commons-crypto/xref-test/org/apache/commons/crypto/examples/CipherByteArrayExample.html]
> failed with this error message:
>  
> Caused by: java.security.GeneralSecurityException: CryptoCipher \{org.apache.commons.crypto.cipher.OpenSslCipher} is not available or transformation AES/CBC/PKCS5Padding is not supported.
>     at org.apache.commons.crypto.cipher.CryptoCipherFactory.getCryptoCipher(CryptoCipherFactory.java:176)
>     at org.apache.commons.crypto.utils.Utils.getCipherInstance(Utils.java:128)
>     ... 10 more
> Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>     at org.apache.commons.crypto.utils.ReflectionUtils.newInstance(ReflectionUtils.java:90)
>     at org.apache.commons.crypto.cipher.CryptoCipherFactory.getCryptoCipher(CryptoCipherFactory.java:160)
>     ... 11 more
> Caused by: java.lang.reflect.InvocationTargetException
>     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>     at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
>     at org.apache.commons.crypto.utils.ReflectionUtils.newInstance(ReflectionUtils.java:88)
>     ... 12 more
> Caused by: java.lang.RuntimeException: java.lang.UnsatisfiedLinkError: EVP_CIPHER_CTX_cleanup
>     at org.apache.commons.crypto.cipher.OpenSslCipher.<init>(OpenSslCipher.java:59)
>     ... 17 more
> Caused by: java.lang.UnsatisfiedLinkError: EVP_CIPHER_CTX_cleanup
>     at org.apache.commons.crypto.cipher.OpenSslNative.initIDs(Native Method)
>     at org.apache.commons.crypto.cipher.OpenSsl.<clinit>(OpenSsl.java:95)
>     at org.apache.commons.crypto.cipher.OpenSslCipher.<init>(OpenSslCipher.java:57)
>     ... 17 more
> Process finished with exit code 1
>  
> ---
>  
> i guess it has something to do with changes of openssl from 1.0 -> 1.1
> https://stackoverflow.com/questions/26345175/correct-way-to-free-allocate-the-context-in-the-openssl
>  
>  
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)