Package org.mozilla.jss.pkix.crmf
Class ProofOfPossession
java.lang.Object
org.mozilla.jss.pkix.crmf.ProofOfPossession
- All Implemented Interfaces:
ASN1Value
CRMF ProofOfPossession:
ProofOfPossession ::= CHOICE {
raVerified [0] NULL,
signature [1] POPOSigningKey,
keyEncipherment [2] POPOPrivKey,
keyAgreement [3] POPOPrivKey }
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA Template for decoding a ProofOfPossession.static classThe type of ProofOfPossesion. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic ProofOfPossession.Typestatic ProofOfPossession.Typeprivate POPOPrivKeyprivate POPOPrivKeystatic ProofOfPossession.Typeprivate POPOSigningKeystatic ProofOfPossession.Typeprivate ProofOfPossession.Type -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateprivateProofOfPossession(ProofOfPossession.Type type, POPOSigningKey signature, POPOPrivKey keyEncipherment, POPOPrivKey keyAgreement) -
Method Summary
Modifier and TypeMethodDescriptionstatic ProofOfPossessioncreateKeyAgreement(POPOPrivKey keyAgreement) Creates a new ProofOfPossesion with the given keyAgreement field.static ProofOfPossessioncreateKeyEncipherment(POPOPrivKey keyEncipherment) Creates a new ProofOfPossesion with the given keyEncipherment field.static ProofOfPossessionCreates a new ProofOfPossesion with an raVerified field.static ProofOfPossessioncreateSignature(POPOSigningKey signature) Creates a new ProofOfPossesion with the given signature field.voidencode(OutputStream ostream) Write this value's DER encoding to an output stream using its own base tag.voidencode(Tag implicitTag, OutputStream ostream) Write this value's DER encoding to an output stream using an implicit tag.If type == KEY_AGREEMENT, returns the keyAgreement field.If type == KEY_ENCIPHERMENT, returns the keyEncipherment field.If type == SIGNATURE, returns the signature field.getTag()Returns the base tag for this type, not counting any tags that may be imposed on it by its context.getType()Returns the type of ProofOfPossesion:RA_VERIFIEDSIGNATUREKEY_ENCIPHERMENTKEY_AGREEMENT
-
Field Details
-
RA_VERIFIED
-
SIGNATURE
-
KEY_ENCIPHERMENT
-
KEY_AGREEMENT
-
type
-
signature
-
keyEncipherment
-
keyAgreement
-
-
Constructor Details
-
ProofOfPossession
private ProofOfPossession() -
ProofOfPossession
private ProofOfPossession(ProofOfPossession.Type type, POPOSigningKey signature, POPOPrivKey keyEncipherment, POPOPrivKey keyAgreement)
-
-
Method Details
-
getType
Returns the type of ProofOfPossesion:RA_VERIFIEDSIGNATUREKEY_ENCIPHERMENTKEY_AGREEMENT
-
getSignature
If type == SIGNATURE, returns the signature field. Otherwise, returns null. -
getKeyEncipherment
If type == KEY_ENCIPHERMENT, returns the keyEncipherment field. Otherwise, returns null. -
getKeyAgreement
If type == KEY_AGREEMENT, returns the keyAgreement field. Otherwise, returns null. -
createRaVerified
Creates a new ProofOfPossesion with an raVerified field. -
createSignature
Creates a new ProofOfPossesion with the given signature field. -
createKeyEncipherment
Creates a new ProofOfPossesion with the given keyEncipherment field. -
createKeyAgreement
Creates a new ProofOfPossesion with the given keyAgreement field. -
getTag
Description copied from interface:ASN1ValueReturns the base tag for this type, not counting any tags that may be imposed on it by its context. -
encode
Description copied from interface:ASN1ValueWrite this value's DER encoding to an output stream using its own base tag.- Specified by:
encodein interfaceASN1Value- Parameters:
ostream- Output stream.- Throws:
IOException- If an error occurred.
-
encode
Description copied from interface:ASN1ValueWrite this value's DER encoding to an output stream using an implicit tag.- Specified by:
encodein interfaceASN1Value- Parameters:
implicitTag- Implicit tag.ostream- Output stream.- Throws:
IOException- If an error occurred.
-