Package org.mozilla.jss.pkix.cms
Class SignerIdentifier
- java.lang.Object
-
- org.mozilla.jss.pkix.cms.SignerIdentifier
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SignerIdentifier.Template
A Template for decoding a SignerIdentifier.static class
SignerIdentifier.Type
The type of SignerIdentifier.
-
Field Summary
Fields Modifier and Type Field Description static SignerIdentifier.Type
ISSUER_AND_SERIALNUMBER
static SignerIdentifier.Type
SUBJECT_KEY_IDENTIFIER
-
Constructor Summary
Constructors Constructor Description SignerIdentifier(SignerIdentifier.Type type, IssuerAndSerialNumber issuerAndSerialNumber, OCTET_STRING subjectKeyIdentifier)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SignerIdentifier
createIssuerAndSerialNumber(IssuerAndSerialNumber ias)
Creates a new SignerIdentifier with the given IssuerAndSerialNumber field.static SignerIdentifier
createSubjectKeyIdentifier(OCTET_STRING ski)
Creates a new SignerIdentifier with the given SubjectKeyIdentifier field.void
encode(java.io.OutputStream ostream)
Write this value's DER encoding to an output stream using its own base tag.void
encode(Tag implicitTag, java.io.OutputStream ostream)
Write this value's DER encoding to an output stream using an implicit tag.IssuerAndSerialNumber
getIssuerAndSerialNumber()
If type == ISSUER_AND_SERIALNUMBER, returns the IssuerAndSerialNumber field.OCTET_STRING
getSubjectKeyIdentifier()
If type == SUBJECT_KEY_IDENTIFIER, returns the SubjectKeyIdentifier field.Tag
getTag()
Returns the base tag for this type, not counting any tags that may be imposed on it by its context.static SignerIdentifier.Template
getTemplate()
SignerIdentifier.Type
getType()
Returns the type of SignerIdentifier:ISSUER_AND_SERIALNUMBER
SUBJECT_KEY_IDENTIFIER
-
-
-
Field Detail
-
ISSUER_AND_SERIALNUMBER
public static SignerIdentifier.Type ISSUER_AND_SERIALNUMBER
-
SUBJECT_KEY_IDENTIFIER
public static SignerIdentifier.Type SUBJECT_KEY_IDENTIFIER
-
-
Constructor Detail
-
SignerIdentifier
public SignerIdentifier(SignerIdentifier.Type type, IssuerAndSerialNumber issuerAndSerialNumber, OCTET_STRING subjectKeyIdentifier)
-
-
Method Detail
-
getType
public SignerIdentifier.Type getType()
Returns the type of SignerIdentifier:ISSUER_AND_SERIALNUMBER
SUBJECT_KEY_IDENTIFIER
-
getIssuerAndSerialNumber
public IssuerAndSerialNumber getIssuerAndSerialNumber()
If type == ISSUER_AND_SERIALNUMBER, returns the IssuerAndSerialNumber field. Otherwise, returns null.
-
getSubjectKeyIdentifier
public OCTET_STRING getSubjectKeyIdentifier()
If type == SUBJECT_KEY_IDENTIFIER, returns the SubjectKeyIdentifier field. Otherwise, returns null.
-
createIssuerAndSerialNumber
public static SignerIdentifier createIssuerAndSerialNumber(IssuerAndSerialNumber ias)
Creates a new SignerIdentifier with the given IssuerAndSerialNumber field.
-
createSubjectKeyIdentifier
public static SignerIdentifier createSubjectKeyIdentifier(OCTET_STRING ski)
Creates a new SignerIdentifier with the given SubjectKeyIdentifier field.
-
getTag
public Tag 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
public void encode(java.io.OutputStream ostream) throws java.io.IOException
Description copied from interface:ASN1Value
Write this value's DER encoding to an output stream using its own base tag.
-
encode
public void encode(Tag implicitTag, java.io.OutputStream ostream) throws java.io.IOException
Description copied from interface:ASN1Value
Write this value's DER encoding to an output stream using an implicit tag.
-
getTemplate
public static SignerIdentifier.Template getTemplate()
-
-