Uploaded image for project: 'SignServer'
  1. SignServer
  2. DSS-2229

NPE if V1_SIGNATURE_NAME not specified and certificate is not in token

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.6.0.Final
    • Component/s: APK Support
    • Labels:
      None
    • Issue discovered during:
      Customer
    • Sprint:
      SignServer-Sprint-130, SignServer-Sprint-131

      Description

      (Broken out of DSS-2222 as this is a separate issue)

      • Not specifying V1_SIGNATURE_NAME and not having a certificate in the token could cause a NPE as the fallback is to check for the DN of the certificate in the token and not in the certificate regardless of where it comes from: ApkSigner.createSignerConfig().
      09:31:29,928 ERROR [org.jboss.as.ejb3.invocation] (default task-10) WFLYEJB0034: EJB Invocation failed on component ProcessSessionBean for method<...>
      
      Caused by: java.lang.NullPointerException
      	at org.signserver.module.apk.common.ApkUtils.convertToValidSignatureName(ApkUtils.java:39) [SignServer-Module-Apk-Common-5.5.1.Alpha1-SNAPSHOT.jar:]
      	at org.signserver.module.apk.signer.ApkSigner.createSignerConfig(ApkSigner.java:831) [SignServer-Module-Apk-5.5.1.Alpha1-SNAPSHOT.jar:]
      	at org.signserver.module.apk.signer.ApkSigner.processData(ApkSigner.java:473) [SignServer-Module-Apk-5.5.1.Alpha1-SNAPSHOT.jar:]
      	at org.signserver.ejb.WorkerProcessImpl.handleProcessing(WorkerProcessImpl.java:556)
       

      One workaround: Specify V1_SIGNATURE_NAME=something or install the certificate to the token

      See patch with fix in DSS-2222:

      [^dss-2222-catch-illegalargumentexception_and_use-right-cert.patch]

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              nima.saboonchi@primekey.com Nima Saboonch
              Reporter:
              markus Markus Kilås
              Verified by:
              Marcus Lundblad
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1 hour Original Estimate - 1 hour
                  1h
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week, 14 minutes
                  1w 14m