Uploaded image for project: 'EJBCA'
  1. EJBCA
  2. ECA-7620

PKCS11CATokenTest and KeyToolsTest fails on old Jenkins with "EC parameters error" on JDK7

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:
      OpenJDK 7
      EJBCA 6.2.6.x, 6.5.x, 6.10.x, 6.15.x

      Description

      These tests are failing with a stack trace:

      java.security.ProviderException: java.security.InvalidKeyException: EC parameters error
      	at sun.security.pkcs11.P11Key$P11ECPublicKey.getEncodedInternal(P11Key.java:1024)
      	at sun.security.pkcs11.P11Key.getEncoded(P11Key.java:131)
      	at org.cesecore.util.CertTools.genSelfCertForPurpose(CertTools.java:1943)
      	at org.cesecore.util.CertTools.genSelfCertForPurpose(CertTools.java:1875)
      	at org.cesecore.util.CertTools.genSelfCertForPurpose(CertTools.java:1854)
      	at org.cesecore.util.CertTools.genSelfCert(CertTools.java:1815)
      	at org.cesecore.util.CertTools.genSelfCert(CertTools.java:1823)
      	at org.cesecore.util.CertTools.genSelfCert(CertTools.java:1798)
      	at org.cesecore.keys.util.KeyToolsTest.__CLR4_2_1h4b0mz3fga(KeyToolsTest.java:300)
      	at org.cesecore.keys.util.KeyToolsTest.testGenKeysECDSANist(KeyToolsTest.java:294)
      Caused by: java.security.InvalidKeyException: EC parameters error
      	at sun.security.ec.ECParameters.getAlgorithmParameters(ECParameters.java:284)
      	at sun.security.ec.ECPublicKeyImpl.<init>(ECPublicKeyImpl.java:59)
      	at sun.security.pkcs11.P11Key$P11ECPublicKey.getEncodedInternal(P11Key.java:1021)
      Caused by: java.security.NoSuchProviderException: no such provider: SunEC
      	at sun.security.jca.GetInstance.getService(GetInstance.java:83)
      	at sun.security.jca.GetInstance.getInstance(GetInstance.java:206)
      	at java.security.Security.getImpl(Security.java:697)
      	at java.security.AlgorithmParameters.getInstance(AlgorithmParameters.java:199)
      	at sun.security.ec.ECParameters.getAlgorithmParameters(ECParameters.java:279)
      

      This appears to happen on JDK7 only, so it only affects the 6.15.x branch.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            samuel Samuel Lidén Borell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Time Tracking

                Estimated:
                Original Estimate - 3 days
                3d
                Remaining:
                Time Spent - 30 minutes Remaining Estimate - 2 days, 7 hours, 30 minutes
                2d 7h 30m
                Logged:
                Time Spent - 30 minutes Remaining Estimate - 2 days, 7 hours, 30 minutes
                30m