Bug#1012104: jruby-openssl: FTBFS with OpenJDK 17 due to an illegal reflective access during the tests

Emmanuel Bourg ebourg at apache.org
Mon May 30 09:41:46 BST 2022


Source: jruby-openssl
Version: 0.9.21-3
Severity: important
Tags: ftbfs sid bookworm
User: debian-java at lists.debian.org
Usertags: default-java17

jruby-openssl fails to build with OpenJDK 17, the tests make illegal
reflective accesses into various modules:


  [INFO] -------------------------------------------------------
  [INFO]  T E S T S
  [INFO] -------------------------------------------------------
  [INFO] Running org.jruby.ext.openssl.SecurityHelperTest
  allowsToSetSecurityProvider() skipped due: java.lang.IllegalAccessException: class org.jruby.ext.openssl.SecurityHelperTest cannot access class sun.security.provider.Sun (in module java.base) because module
  java.base does not export sun.security.provider to unnamed module @4cfaf581
  [ERROR] Tests run: 38, Failures: 0, Errors: 12, Skipped: 0, Time elapsed: 0.242 s <<< FAILURE! - in org.jruby.ext.openssl.SecurityHelperTest
  [ERROR] testCertificateFactoryProviderStaysConstant(org.jruby.ext.openssl.SecurityHelperTest)  Time elapsed: 0.008 s  <<< ERROR!
  java.lang.reflect.InaccessibleObjectException: Unable to make protected java.security.cert.CertificateFactory(java.security.cert.CertificateFactorySpi,java.security.Provider,java.lang.String) accessible: mod
  ule java.base does not "opens java.security.cert" to unnamed module @4cfaf581
          at org.jruby.ext.openssl.SecurityHelperTest.testCertificateFactoryProviderStaysConstant(SecurityHelperTest.java:448)
  
  [ERROR] injectCipherImpl(org.jruby.ext.openssl.SecurityHelperTest)  Time elapsed: 0.001 s  <<< ERROR!
  java.security.NoSuchAlgorithmException: Cannot find any provider supporting fake
          at org.jruby.ext.openssl.SecurityHelperTest.injectCipherImpl(SecurityHelperTest.java:52)
  
  [ERROR] testGetKeyPairGenerator(org.jruby.ext.openssl.SecurityHelperTest)  Time elapsed: 0.004 s  <<< ERROR!
  java.lang.reflect.InaccessibleObjectException: Unable to make field java.security.Provider java.security.KeyPairGenerator.provider accessible: module java.base does not "opens java.security" to unnamed modul
  e @4cfaf581
          at org.jruby.ext.openssl.SecurityHelperTest.testGetKeyPairGenerator(SecurityHelperTest.java:147)
  
  [ERROR] injectSignatureImpl(org.jruby.ext.openssl.SecurityHelperTest)  Time elapsed: 0.001 s  <<< ERROR!
  java.lang.reflect.InaccessibleObjectException: Unable to make field java.security.Provider java.security.Signature.provider accessible: module java.base does not "opens java.security" to unnamed module @4cfa
  f581
          at org.jruby.ext.openssl.SecurityHelperTest.injectSignatureImpl(SecurityHelperTest.java:62)
  
  [ERROR] testGetMessageDigest(org.jruby.ext.openssl.SecurityHelperTest)  Time elapsed: 0.001 s  <<< ERROR!
  java.lang.reflect.InaccessibleObjectException: Unable to make field private java.security.Provider java.security.MessageDigest.provider accessible: module java.base does not "opens java.security" to unnamed
  module @4cfaf581
          at org.jruby.ext.openssl.SecurityHelperTest.testGetMessageDigest(SecurityHelperTest.java:215)
  
  [ERROR] testGetKeyFactory(org.jruby.ext.openssl.SecurityHelperTest)  Time elapsed: 0.001 s  <<< ERROR!
  java.lang.reflect.InaccessibleObjectException: Unable to make protected java.security.KeyFactory(java.security.KeyFactorySpi,java.security.Provider,java.lang.String) accessible: module java.base does not "op
  ens java.security" to unnamed module @4cfaf581
          at org.jruby.ext.openssl.SecurityHelperTest.testGetKeyFactory(SecurityHelperTest.java:114)
  
  [ERROR] testGetKeyGenerator(org.jruby.ext.openssl.SecurityHelperTest)  Time elapsed: 0.001 s  <<< ERROR!
  java.lang.reflect.InaccessibleObjectException: Unable to make protected javax.crypto.KeyGenerator(javax.crypto.KeyGeneratorSpi,java.security.Provider,java.lang.String) accessible: module java.base does not "
  opens javax.crypto" to unnamed module @4cfaf581
          at org.jruby.ext.openssl.SecurityHelperTest.testGetKeyGenerator(SecurityHelperTest.java:411)
  
  [ERROR] testGetMac(org.jruby.ext.openssl.SecurityHelperTest)  Time elapsed: 0.002 s  <<< ERROR!
  java.lang.reflect.InaccessibleObjectException: Unable to make protected javax.crypto.Mac(javax.crypto.MacSpi,java.security.Provider,java.lang.String) accessible: module java.base does not "opens javax.crypto
  " to unnamed module @4cfaf581
          at org.jruby.ext.openssl.SecurityHelperTest.testGetMac(SecurityHelperTest.java:377)
  
  [ERROR] testGetCertificateFactory(org.jruby.ext.openssl.SecurityHelperTest)  Time elapsed: 0.001 s  <<< ERROR!
  java.lang.reflect.InaccessibleObjectException: Unable to make protected java.security.cert.CertificateFactory(java.security.cert.CertificateFactorySpi,java.security.Provider,java.lang.String) accessible: mod
  ule java.base does not "opens java.security.cert" to unnamed module @4cfaf581
          at org.jruby.ext.openssl.SecurityHelperTest.testGetCertificateFactory(SecurityHelperTest.java:283)
  
  [ERROR] testGetSecretKeyFactory(org.jruby.ext.openssl.SecurityHelperTest)  Time elapsed: 0 s  <<< ERROR!
  java.lang.reflect.InaccessibleObjectException: Unable to make protected javax.crypto.SecretKeyFactory(javax.crypto.SecretKeyFactorySpi,java.security.Provider,java.lang.String) accessible: module java.base do
  es not "opens javax.crypto" to unnamed module @4cfaf581
          at org.jruby.ext.openssl.SecurityHelperTest.testGetSecretKeyFactory(SecurityHelperTest.java:343)
  
  [ERROR] testGetSecureRandom(org.jruby.ext.openssl.SecurityHelperTest)  Time elapsed: 0.012 s  <<< ERROR!
  java.lang.reflect.InaccessibleObjectException: Unable to make private java.security.SecureRandom(java.security.SecureRandomSpi,java.security.Provider,java.lang.String) accessible: module java.base does not "
  opens java.security" to unnamed module @4cfaf581
          at org.jruby.ext.openssl.SecurityHelperTest.testGetSecureRandom(SecurityHelperTest.java:314)
  
  [ERROR] testGetSignature(org.jruby.ext.openssl.SecurityHelperTest)  Time elapsed: 0.001 s  <<< ERROR!
  java.lang.reflect.InaccessibleObjectException: Unable to make private java.security.Signature$Delegate(java.security.SignatureSpi,java.lang.String) accessible: module java.base does not "opens java.security" to unnamed module @4cfaf581
          at org.jruby.ext.openssl.SecurityHelperTest.testGetSignature(SecurityHelperTest.java:250)
  
  [INFO] Running org.jruby.ext.openssl.CipherTest
  running ...
  running ...
  [INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.05 s - in org.jruby.ext.openssl.CipherTest
  [INFO]
  [INFO] Results:
  [INFO]
  [ERROR] Errors:
  [ERROR]   SecurityHelperTest.injectCipherImpl:52 » NoSuchAlgorithm Cannot find any provi...
  [ERROR]   SecurityHelperTest.injectSignatureImpl:62 » InaccessibleObject Unable to make ...
  [ERROR]   SecurityHelperTest.testCertificateFactoryProviderStaysConstant:448 » InaccessibleObject
  [ERROR]   SecurityHelperTest.testGetCertificateFactory:283 » InaccessibleObject Unable t...
  [ERROR]   SecurityHelperTest.testGetKeyFactory:114 » InaccessibleObject Unable to make p...
  [ERROR]   SecurityHelperTest.testGetKeyGenerator:411 » InaccessibleObject Unable to make...
  [ERROR]   SecurityHelperTest.testGetKeyPairGenerator:147 » InaccessibleObject Unable to ...
  [ERROR]   SecurityHelperTest.testGetMac:377 » InaccessibleObject Unable to make protecte...
  [ERROR]   SecurityHelperTest.testGetMessageDigest:215 » InaccessibleObject Unable to mak...
  [ERROR]   SecurityHelperTest.testGetSecretKeyFactory:343 » InaccessibleObject Unable to ...
  [ERROR]   SecurityHelperTest.testGetSecureRandom:314 » InaccessibleObject Unable to make...
  [ERROR]   SecurityHelperTest.testGetSignature:250 » InaccessibleObject Unable to make pr...
  [INFO]
  [ERROR] Tests run: 44, Failures: 0, Errors: 12, Skipped: 0
  [INFO]
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------


More information about the pkg-java-maintainers mailing list