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

Null pointer exception when a certificate profile uses CA defined AIA values, but the CA has defined none

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: EJBCA 7.1.0
    • Component/s: None
    • Labels:
    • Sprint:
      EJBCA Team Bob - 2019 w13

      Description

      Configuration issue we ran into at a customer.

      The error message from the RA web when issuing a cert is "An error has occurred: null" and you have no idea what went wrong.

      The log says:

       ... 44 more
      Caused by: java.lang.NullPointerException
              at org.cesecore.certificates.certificate.certextensions.standard.AuthorityInformationAccess.getValue(AuthorityInformationAccess.java:84) [cesecore-common.jar:]
              at org.cesecore.certificates.certificate.certextensions.CertificateExtension.getValueEncoded(CertificateExtension.java:189) [cesecore-common.jar:]
              at org.cesecore.certificates.ca.X509CA.generateCertificate(X509CA.java:1180) [cesecore-common.jar:]
              at org.cesecore.certificates.ca.X509CA.generateCertificate(X509CA.java:865) [cesecore-common.jar:]
              at org.cesecore.certificates.certificate.CertificateCreateSessionBean.createCertificate(CertificateCreateSessionBean.java:457) [cesecore-ejb.jar:]
              at org.cesecore.certificates.certificate.CertificateCreateSessionBean.createCertificate(CertificateCreateSessionBean.java:215) [cesecore-ejb.jar:]
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_65]
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_65]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_65]
              at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_65]
              at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
              at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
              at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
              at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
              at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
              at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
              at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
      

      There should be a null check and an exception with a proper error message being thrown.

        Attachments

          Activity

            People

            • Assignee:
              bastianf Bastian Fredriksson
              Reporter:
              bastianf Bastian Fredriksson
              Verified by:
              Mike Agrenius Kushner, Samuel Lidén Borell
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 hour
                1h
                Remaining:
                Time Spent - 10 minutes Remaining Estimate - 50 minutes
                50m
                Logged:
                Time Spent - 10 minutes Remaining Estimate - 50 minutes
                10m