000022619 - RSA BSAFE Cert-J MemoryDB constructor exception

Document created by RSA Customer Support Employee on Jun 16, 2016Last modified by RSA Customer Support Employee on Apr 21, 2017
Version 2Show Document
  • View in full screen mode

Article Content

Article Number000022619
Applies ToRSA BSAFE Cert-J 2.0.1
IssueRSA BSAFE Cert-J MemoryDB constructor exception
The following valid MemoryDB contructor will throw an InvalidParameterException:

MemoryDB mdb = new MemoryDB("DB", new Vector(), new Vector(), new Vector(), new Vector());
CauseThe class constructor has invalid logic for checking the input parameters
ResolutionThis can be fixed by modifying MemoryDB.java in the $CERTJ/provider/db directory.  Change the beginning of the constructor to look like this:
if ( !((privateKeys != null) && (publicKeys != null) && (privateKeys.size () == publicKeys.size ())) )    
     throw new InvalidParameterException
       ("MemoryDB.MemoryDB: "
        + "privateKeys and publicKeys should have the same number "
        + "of elements.");

To incorporate this into certj.jar, unjar the file and replace the MemoryDB*.class files with those compiled after the change above.
Legacy Article IDa7080

Attachments

    Outcomes