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 class
A Template for decoding a ProofOfPossession.static class
The type of ProofOfPossesion. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic ProofOfPossession.Type
static ProofOfPossession.Type
private POPOPrivKey
private POPOPrivKey
static ProofOfPossession.Type
private POPOSigningKey
static ProofOfPossession.Type
private ProofOfPossession.Type
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
private
ProofOfPossession
(ProofOfPossession.Type type, POPOSigningKey signature, POPOPrivKey keyEncipherment, POPOPrivKey keyAgreement) -
Method Summary
Modifier and TypeMethodDescriptionstatic ProofOfPossession
createKeyAgreement
(POPOPrivKey keyAgreement) Creates a new ProofOfPossesion with the given keyAgreement field.static ProofOfPossession
createKeyEncipherment
(POPOPrivKey keyEncipherment) Creates a new ProofOfPossesion with the given keyEncipherment field.static ProofOfPossession
Creates a new ProofOfPossesion with an raVerified field.static ProofOfPossession
createSignature
(POPOSigningKey signature) Creates a new ProofOfPossesion with the given signature field.void
encode
(OutputStream ostream) Write this value's DER encoding to an output stream using its own base tag.void
encode
(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_VERIFIED
SIGNATURE
KEY_ENCIPHERMENT
KEY_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_VERIFIED
SIGNATURE
KEY_ENCIPHERMENT
KEY_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:ASN1Value
Returns the base tag for this type, not counting any tags that may be imposed on it by its context. -
encode
Description copied from interface:ASN1Value
Write this value's DER encoding to an output stream using its own base tag.- Specified by:
encode
in interfaceASN1Value
- Parameters:
ostream
- Output stream.- Throws:
IOException
- If an error occurred.
-
encode
Description copied from interface:ASN1Value
Write this value's DER encoding to an output stream using an implicit tag.- Specified by:
encode
in interfaceASN1Value
- Parameters:
implicitTag
- Implicit tag.ostream
- Output stream.- Throws:
IOException
- If an error occurred.
-