JSS 3.1

org.mozilla.jss.pkix.cms
Class SignerIdentifier

java.lang.Object
  |
  +--org.mozilla.jss.pkix.cms.SignerIdentifier

public class SignerIdentifier
extends java.lang.Object
implements ASN1Value

CMS SignerIdentifier:

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


Inner 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
           
private  IssuerAndSerialNumber issuerAndSerialNumber
           
static SignerIdentifier.Type SUBJECT_KEY_IDENTIFIER
           
private  OCTET_STRING subjectKeyIdentifier
           
private static SignerIdentifier.Template templateInstance
           
private  SignerIdentifier.Type type
           
 
Constructor Summary
private SignerIdentifier()
           
  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)
           
 void encode(Tag implicitTag, java.io.OutputStream ostream)
           
 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()
           
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, registerNatives, 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

type

private SignerIdentifier.Type type

issuerAndSerialNumber

private IssuerAndSerialNumber issuerAndSerialNumber

subjectKeyIdentifier

private OCTET_STRING subjectKeyIdentifier

templateInstance

private static SignerIdentifier.Template templateInstance
Constructor Detail

SignerIdentifier

private SignerIdentifier()

SignerIdentifier

public SignerIdentifier(SignerIdentifier.Type type,
                        IssuerAndSerialNumber issuerAndSerialNumber,
                        OCTET_STRING subjectKeyIdentifier)
Method Detail

getType

public SignerIdentifier.Type getType()
Returns the type of SignerIdentifier:

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()
Specified by:
getTag in interface ASN1Value

encode

public void encode(java.io.OutputStream ostream)
            throws java.io.IOException
Specified by:
encode in interface ASN1Value

encode

public void encode(Tag implicitTag,
                   java.io.OutputStream ostream)
            throws java.io.IOException
Specified by:
encode in interface ASN1Value

getTemplate

public static SignerIdentifier.Template getTemplate()

JSS 3.1