public class CertifiedKeyPair extends java.lang.Object implements ASN1Type
CertifiedKeyPair ::= SEQUENCE {
certOrEncCert CertOrEncCert,
privateKey [0] EncryptedValue OPTIONAL,
publicationInfo [1] PKIPublicationInfo OPTIONAL
}
| Constructor and Description |
|---|
CertifiedKeyPair(ASN1Object obj)
Creates a
CertifiedKeyPair object from an
ASN1Object. |
CertifiedKeyPair(CertOrEncCert certOrEncCert)
Creates a new
CertifiedKeyPair object with the specified
component set. |
| Modifier and Type | Method and Description |
|---|---|
void |
decode(ASN1Object obj)
Decodes a CertifiedKeyPair structure from an
ASN1Object. |
CertOrEncCert |
getCertOrEncCert()
Returns the user's certificate in plain or encrypted form.
|
EncryptedValue |
getPrivateKey()
Returns the user's private key in encrypted form if it has been set,
otherwise
null is returned. |
PKIPublicationInfo |
getPublicationInfo()
Returns publication infromation for the user's certificate if it has been
set, otherwise
null is returned. |
void |
setPrivateKey(EncryptedValue privateKey)
Sets the user's private key in encrypted form.
|
void |
setPublicationInfo(PKIPublicationInfo publicationInfo)
Sets publication infromation for the user's certificate.
|
ASN1Object |
toASN1Object()
Encodes this
CertifiedKeyPair object as an
ASN1Object. |
java.lang.String |
toString()
Creates a text representation of the ASN.1 structure of this
CertifiedKeyPair object. |
public CertifiedKeyPair(CertOrEncCert certOrEncCert) throws java.lang.IllegalArgumentException
CertifiedKeyPair object with the specified
component set.certOrEncCert - the user's certificate in plain or encrypted formjava.lang.IllegalArgumentException - thrown if the parameter is nullpublic CertifiedKeyPair(ASN1Object obj) throws CodingException, java.lang.IllegalArgumentException
CertifiedKeyPair object from an
ASN1Object.
The ASN1Object must be an CertifiedKeyPair structure.
obj - the ASN.1 representation of a CertifiedKeyPair structureCodingException - thrown if an errors occurs while decoding the ANS1Objectjava.lang.IllegalArgumentException - thrown if the parameter is nullpublic void setPrivateKey(EncryptedValue privateKey)
privateKey - the privateKey componentpublic void setPublicationInfo(PKIPublicationInfo publicationInfo)
publicationInfo - the publicationInfo componentpublic CertOrEncCert getCertOrEncCert()
public EncryptedValue getPrivateKey()
null is returned.public PKIPublicationInfo getPublicationInfo()
null is returned.public void decode(ASN1Object obj) throws CodingException, java.lang.IllegalArgumentException
ASN1Object.decode in interface ASN1Typeobj - an ASN.1 representation of an CertifiedKeyPair structureCodingException - thrown if an errors occurs while decoding the ANS1Objectjava.lang.IllegalArgumentException - thrown if the parameter is nullpublic ASN1Object toASN1Object()
CertifiedKeyPair object as an
ASN1Object.toASN1Object in interface ASN1Typepublic java.lang.String toString()
CertifiedKeyPair object.toString in class java.lang.Object