|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.rsa.certj.crmf.Control | +--com.rsa.certj.crmf.ProtocolEncryptionKey
This class holds, encodes, and decodes the Protocol Encryption Key Control. If presented, the Protocol Encryption Key control specifies a key the CA is to use in encrypting a response to CertReqMessages. This control can be used when a CA has information to send to the subscriber that needs to be encrypted. Such information includes a private key generated by the CA for use by the subscriber.
protocolEncrKey ::= SubjectPublicKeyInfo SubjectPublicKeyInfo ::= SEQUENCE { algorithmID AlgorithmIdentifier, subjectPublicKey BIT STRING } |
See Also
Fields inherited from class com.rsa.certj.crmf.Control |
AUTHENTICATOR, NON_STANDARD, OLD_CERT_ID, PKI_ARCHIVE_OPTIONS, PKI_PUBLICATION_INFO, PROTOCOL_ENCR_KEY, REG_TOKEN |
Constructor Summary |
|
ProtocolEncryptionKey()
Constructs an empty |
Method Summary |
|
clone()
Overrides the default |
|
boolean |
equals(Object obj)
Returns true if this object and obj contain the same ProtocolEncryptionKey, returns false otherwise. |
com.rsa.jsafe.JSAFE_PublicKey |
getSubjectPublicKey()
Gets the public key out of the certificate template. |
byte[] |
getSubjectPublicKeyBER()
Gets the public key BER out of the certificate template. |
void |
setSubjectPublicKey(byte[] publicKeyBER,
int offset)
Sets the subject public key in this control to be the public key represented by the BER encoding publicKeyBER. |
void |
setSubjectPublicKey(com.rsa.jsafe.JSAFE_PublicKey publicKey)
Sets the subject public key in this control to be publicKey. |
Methods inherited from class com.rsa.certj.crmf.Control |
compareOID, derEncodeControlLen, getControlType, getControlTypeString, getDEREncoding, getDERLen, getInstance, getInstance, getNextBEROffset, getOID, isControlType, setEnvironment |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ProtocolEncryptionKey()
ProtocolEncryptionKey
object.Method Detail |
public void setSubjectPublicKey(com.rsa.jsafe.JSAFE_PublicKey publicKey) throws CRMFException
Parameters
publicKey | A JSAFE_PublicKey object that contains the public key |
Throws
CRMFException
- If the public key object is not validpublic void setSubjectPublicKey(byte[] publicKeyBER, int offset) throws CRMFException
SubjectPublicKeyInfo ::= SEQUENCE { algorithmID AlgorithmIdentifier, subjectPublicKey BIT STRING } |
Parameters
publicKeyBER | The BER encoding of a public key | ||
offset | The offset into publicKeyBER where the encoding begins |
Throws
CRMFException
- If the public key BER is not a valid
public keypublic com.rsa.jsafe.JSAFE_PublicKey getSubjectPublicKey() throws CRMFException
Returns
Throws
CRMFException
- If there is ASN.1 errorpublic byte[] getSubjectPublicKeyBER()
Returns
byte
array that contains the public key BERpublic Object clone() throws CloneNotSupportedException
clone
method
to get a deeper clone.
Overrides
clone
in class Control
Returns
Throws
CloneNotSupportedException
- If the cloning operation
is not successful.public boolean equals(Object obj)
Overrides
equals
in class Control
Parameters
obj | The instance of ProtocolEncryptionKey object |
Returns
boolean
that indicates whether
these objects are equal.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |