Class PKCS12KeyInfo

java.lang.Object
org.mozilla.jss.netscape.security.pkcs.PKCS12KeyInfo

public class PKCS12KeyInfo extends Object
This object is used for carrying key info around. It does not handle raw key material (but it used to). FIXME: A clear refactoring opportunity exists. The 'privateKey' field (and associated constructor) is only used during export, and the 'epkiBytes' field (and associated constructor) is only used during import. Therefore this should be two different types.
  • Field Details

    • privateKey

      private PrivateKey privateKey
    • epkiBytes

      private byte[] epkiBytes
    • id

      private byte[] id
    • friendlyName

      private String friendlyName
  • Constructor Details

    • PKCS12KeyInfo

      public PKCS12KeyInfo()
    • PKCS12KeyInfo

      public PKCS12KeyInfo(PrivateKey k)
      Construct with a PrivateKey. This constructor is used for moving the PrivateKey handle around during export.
    • PKCS12KeyInfo

      public PKCS12KeyInfo(byte[] epkiBytes)
      Construct with a (serialised) EncrypedPrivateKeyInfo. This constructor is used for moving the EPKI data around during import.
  • Method Details

    • getPrivateKey

      public PrivateKey getPrivateKey()
    • getEncryptedPrivateKeyInfoBytes

      public byte[] getEncryptedPrivateKeyInfoBytes()
    • getID

      public byte[] getID()
    • setID

      public void setID(byte[] id)
    • getFriendlyName

      public String getFriendlyName()
    • setFriendlyName

      public void setFriendlyName(String friendlyName)