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 classA Template for decoding a SignerIdentifier.static classThe type of SignerIdentifier. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic SignerIdentifier.Typeprivate IssuerAndSerialNumberstatic SignerIdentifier.Typeprivate OCTET_STRINGprivate static SignerIdentifier.Templateprivate SignerIdentifier.Type -
Constructor Summary
ConstructorsConstructorDescriptionSignerIdentifier(SignerIdentifier.Type type, IssuerAndSerialNumber issuerAndSerialNumber, OCTET_STRING subjectKeyIdentifier) -
Method Summary
Modifier and TypeMethodDescriptionstatic SignerIdentifierCreates a new SignerIdentifier with the given IssuerAndSerialNumber field.static SignerIdentifierCreates a new SignerIdentifier with the given SubjectKeyIdentifier 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 == 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.TemplategetType()Returns the type of SignerIdentifier:ISSUER_AND_SERIALNUMBERSUBJECT_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_SERIALNUMBERSUBJECT_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: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.
-
getTemplate
-