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

BC class conflict in some occasions: X509CertificateObject cannot be cast to org.bouncycastle.jce.interfaces.PKCS12BagAttributeCarrier

    Details

    • Issue discovered during:
      Ad Hoc
    • Sprint:
      EJBCA Sprint 18

      Description

      I tried to issue a cert from the RA web and saw the following error message in the log

      2:33:32,587 ERROR [org.cesecore.keys.util.KeyTools] (default task-42) ClassCastException setting BagAttributes, can not set friendly name: : java.lang.ClassCastException: org.bouncycastle.jcajce.provider.asymmetric.x509.X509CertificateObject cannot be cast to org.bouncycastle.jce.interfaces.PKCS12BagAttributeCarrier

      Should be investigated and fixed. Issuance was OK so it's not critical.

       

      The relevant part of the stacktrace is:

       

      10:25:02,478 ERROR [org.cesecore.keys.util.KeyTools] (default task-5) ClassCastException setting BagAttributes, can not set friendly name: : java.lang.ClassCastException: org.bouncycastle.jcajce.provider.asymmetric.x509.X509CertificateObject cannot be cast to org.bouncycastle.jce.interfaces.PKCS12BagAttributeCarrier
      at org.cesecore.keys.util.KeyTools.createP12(KeyTools.java:574)
      at org.ejbca.core.ejb.ra.KeyStoreCreateSessionBean.generateOrKeyRecoverToken(KeyStoreCreateSessionBean.java:330)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              hsunmark Henrik Sunmark
              Reporter:
              alex.gregory@primekey.com Alex Gregory
              Verified by:
              Mike Agrenius Kushner
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 4 days Original Estimate - 4 days
                  4d
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week, 1 day
                  1w 1d