IBM Support

IJ19669: A NULLPOINTEREXCEPTION OCCURS WHEN READING AN EMPTY PKCS12 KEYSTORE USING JAVA 8

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • Error Message: N/A
    .
    Stack Trace: Exception in thread "main"
    java.lang.NullPointerException
            at
    com.ibm.security.pkcs12.AuthenticatedSafe.getContentInfos(Authen
    ticatedSafe.java:240)
            at
    com.ibm.security.pkcs12.BasicPFX.getPFXContents(BasicPFX.java:22
    84)
            at
    com.ibm.security.pkcs12.BasicPFX.getBags(BasicPFX.java:2082)
            at
    com.ibm.security.pkcs12.BasicPFX.getTypedBags(BasicPFX.java:1943
    )
            at
    com.ibm.security.pkcs12.BasicPFX.getAllPrivateKeyEntryAliases(Ba
    sicPFX.java:712)
            at
    com.ibm.security.pkcs12.PFX.getAllPrivateKeyEntryAliases(PFX.jav
    a:609)
            at
    com.ibm.crypto.provider.PKCS12KeyStoreOracle.engineLoad(Unknown
    Source)
            at java.security.KeyStore.load(KeyStore.java:1456)
            at com.abcde.pkcs12.Pkcs12.loadKeyStore(Pkcs12.java:59)
            at
    com.abcde.pkcs12.Pkcs12.createEmptyKeyStoreAndReadItAgain(Pkcs12
    .java:25)
            at com.abcde.pkcs12.Pkcs12.main(Pkcs12.java:17)
    .
    

Local fix

Problem summary

  • A NullPointerException occurs when reading an empty PKCS12
    keystore using Java 8.
    

Problem conclusion

  • The PKCS classes com.ibm.security.pkcs12.BasicPFX and
    com.ibm.security.pkcs12.AuthenticatedSafe were both missing
    logic which checks for the possibility that there might be no
    content within a PKCS12 keystore being read.
    That missing logic has been added.
    The associated PKCS Git Issue is    #19.
    The associated RTC PR is            142372
    The associated APAR is              IJ19292
    The affected jar is                ibmpkcs.jar
    The build level of ibmpkcs.jar is: 20190917-127
    JVMs affected:   Java 8.0
    This fix has been delivered for:  80sr6
    .
    This APAR will be fixed in the following Java Releases:
       8    SR6       (8.0.6.0)
    .
    Contact your IBM Product's Service Team for these Service
    Refreshes and Fix Packs.
    For those running stand-alone, information about the available
    Service Refreshes and Fix Packs can be found at:
               https://www.ibm.com/developerworks/java/jdk/
    

Temporary fix

Comments

APAR Information

  • APAR number

    IJ19669

  • Reported component name

    SECURITY

  • Reported component ID

    620700125

  • Reported release

    270

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2019-09-18

  • Closed date

    2019-09-20

  • Last modified date

    2019-09-20

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    SECURITY

  • Fixed component ID

    620700125

Applicable component levels

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSNVBF","label":"Runtimes for Java Technology"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"270","Edition":"","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
07 December 2020