You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.




org.mozilla.jss.pkix.cms
Class SignerIdentifier

java.lang.Object
  extended by org.mozilla.jss.pkix.cms.SignerIdentifier
All Implemented Interfaces:
ASN1Value

public class SignerIdentifier
extends java.lang.Object
implements ASN1Value

CMS SignerIdentifier:

 SignerIdentifier ::= CHOICE {
      issuerAndSerialNumber IssuerAndSerialNumber,
      subjectKeyIdentifier [0] SubjectKeyIdentifier }
 


Nested Class Summary
static class SignerIdentifier.Template
          A Template for decoding a SignerIdentifier.
static class SignerIdentifier.Type
          The type of SignerIdentifier.
 
Field Summary
static SignerIdentifier.Type ISSUER_AND_SERIALNUMBER
           
static SignerIdentifier.Type SUBJECT_KEY_IDENTIFIER
           
 
Constructor Summary
SignerIdentifier(SignerIdentifier.Type type, IssuerAndSerialNumber issuerAndSerialNumber, OCTET_STRING subjectKeyIdentifier)
           
 
Method Summary
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.

Specified by:
getTag in interface ASN1Value

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.

Specified by:
encode in interface ASN1Value
Throws:
java.io.IOException

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.

Specified by:
encode in interface ASN1Value
Throws:
java.io.IOException

getTemplate

public static SignerIdentifier.Template getTemplate()