Uploaded image for project: 'Commons Crypto'
  1. Commons Crypto
  2. CRYPTO-142

Native library does not load if ENGINE_load_rdrand is not available

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 1.0.0
    • None
    • Native
    • None

    Description

      Found this when running tests on Travis:

      java.security.GeneralSecurityException: CryptoRandom: [org.apache.commons.crypto.random.OpenSslCryptoRandom] failed with java.lang.reflect.InvocationTargetException
      
      	at org.apache.commons.crypto.random.OpenSslCryptoRandomTest.getCryptoRandom(OpenSslCryptoRandomTest.java:37)
      
      Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
      
      	at org.apache.commons.crypto.random.OpenSslCryptoRandomTest.getCryptoRandom(OpenSslCryptoRandomTest.java:37)
      
      Caused by: java.lang.reflect.InvocationTargetException
      
      	at org.apache.commons.crypto.random.OpenSslCryptoRandomTest.getCryptoRandom(OpenSslCryptoRandomTest.java:37)
      
      Caused by: java.security.GeneralSecurityException: Native library could not be initialised
      
      	at org.apache.commons.crypto.random.OpenSslCryptoRandomTest.getCryptoRandom(OpenSslCryptoRandomTest.java:37)
      
      Caused by: java.lang.UnsatisfiedLinkError: ENGINE_load_rdrand
      

      It seems that the OpenSSL library available on the build machine does not have that function. It would be nice to allow the rest of the native code (e.g. the ciphers) to still work in that situation.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              vanzin Marcelo Masiero Vanzin
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: