Package org.mozilla.jss.pkix.cms
Class SignerIdentifier
java.lang.Object
org.mozilla.jss.pkix.cms.SignerIdentifier
- All Implemented Interfaces:
ASN1Value
CMS SignerIdentifier:
SignerIdentifier ::= CHOICE { issuerAndSerialNumber IssuerAndSerialNumber, subjectKeyIdentifier [0] SubjectKeyIdentifier }
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A Template for decoding a SignerIdentifier.static class
The type of SignerIdentifier. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic SignerIdentifier.Type
private IssuerAndSerialNumber
static SignerIdentifier.Type
private OCTET_STRING
private static SignerIdentifier.Template
private SignerIdentifier.Type
-
Constructor Summary
ConstructorsConstructorDescriptionSignerIdentifier
(SignerIdentifier.Type type, IssuerAndSerialNumber issuerAndSerialNumber, OCTET_STRING subjectKeyIdentifier) -
Method Summary
Modifier and TypeMethodDescriptionstatic SignerIdentifier
Creates a new SignerIdentifier with the given IssuerAndSerialNumber field.static SignerIdentifier
Creates a new SignerIdentifier with the given SubjectKeyIdentifier 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 == ISSUER_AND_SERIALNUMBER, returns the IssuerAndSerialNumber field.If type == SUBJECT_KEY_IDENTIFIER, returns the SubjectKeyIdentifier field.getTag()
Returns the base tag for this type, not counting any tags that may be imposed on it by its context.static SignerIdentifier.Template
getType()
Returns the type of SignerIdentifier:ISSUER_AND_SERIALNUMBER
SUBJECT_KEY_IDENTIFIER
-
Field Details
-
ISSUER_AND_SERIALNUMBER
-
SUBJECT_KEY_IDENTIFIER
-
type
-
issuerAndSerialNumber
-
subjectKeyIdentifier
-
templateInstance
-
-
Constructor Details
-
SignerIdentifier
public SignerIdentifier(SignerIdentifier.Type type, IssuerAndSerialNumber issuerAndSerialNumber, OCTET_STRING subjectKeyIdentifier)
-
-
Method Details
-
getType
Returns the type of SignerIdentifier:ISSUER_AND_SERIALNUMBER
SUBJECT_KEY_IDENTIFIER
-
getIssuerAndSerialNumber
If type == ISSUER_AND_SERIALNUMBER, returns the IssuerAndSerialNumber field. Otherwise, returns null. -
getSubjectKeyIdentifier
If type == SUBJECT_KEY_IDENTIFIER, returns the SubjectKeyIdentifier field. Otherwise, returns null. -
createIssuerAndSerialNumber
Creates a new SignerIdentifier with the given IssuerAndSerialNumber field. -
createSubjectKeyIdentifier
Creates a new SignerIdentifier with the given SubjectKeyIdentifier 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.
-
getTemplate
-