Top Description Fields Constructors Methods
org.bouncycastle.asn1.cms

public Class SignerInfo

extends ASN1Object
Class Inheritance
Imports
java.util.Enumeration, org.bouncycastle.asn1.ASN1EncodableVector, .ASN1Integer, .ASN1Object, .ASN1OctetString, .ASN1Primitive, .ASN1Sequence, .ASN1Set, .ASN1TaggedObject, .DEROctetString, .DERSequence, .DERTaggedObject, org.bouncycastle.asn1.x509.AlgorithmIdentifier

RFC 5652: Signature container per Signer, see SignerIdentifier.
PKCS#7:

SignerInfo ::= SEQUENCE {
    version                   Version,
    sid                       SignerIdentifier,
    digestAlgorithm           DigestAlgorithmIdentifier,
    authenticatedAttributes   [0] IMPLICIT Attributes OPTIONAL,
    digestEncryptionAlgorithm DigestEncryptionAlgorithmIdentifier,
    encryptedDigest           EncryptedDigest,
    unauthenticatedAttributes [1] IMPLICIT Attributes OPTIONAL
}

EncryptedDigest ::= OCTET STRING

DigestAlgorithmIdentifier ::= AlgorithmIdentifier

DigestEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier

-----------------------------------------

RFC 5652:

SignerInfo ::= SEQUENCE {
    version            CMSVersion,
    sid                SignerIdentifier,
    digestAlgorithm    DigestAlgorithmIdentifier,
    signedAttrs        [0] IMPLICIT SignedAttributes OPTIONAL,
    signatureAlgorithm SignatureAlgorithmIdentifier,
    signature          SignatureValue,
    unsignedAttrs      [1] IMPLICIT UnsignedAttributes OPTIONAL
}

-- SignerIdentifier referenced certificates are at containing
-- SignedData certificates element.

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

-- See Attributes for generalized SET OF Attribute

SignedAttributes   ::= SET SIZE (1..MAX) OF Attribute
UnsignedAttributes ::= SET SIZE (1..MAX) OF Attribute

Attribute ::= SEQUENCE {
    attrType   OBJECT IDENTIFIER,
    attrValues SET OF AttributeValue }

AttributeValue ::= ANY

SignatureValue ::= OCTET STRING

Field Summary

Modifier and TypeField and Description
private ASN1Set
private AlgorithmIdentifier
private AlgorithmIdentifier
private ASN1OctetString
private SignerIdentifier
private ASN1Set
private ASN1Integer

Constructor Summary

AccessConstructor and Description
public
SignerInfo(SignerIdentifier sid, AlgorithmIdentifier
CMS knows as 'digestAlgorithm'
digAlgorithm
,
ASN1Set
CMS knows as 'signedAttrs'
authenticatedAttributes
,
AlgorithmIdentifier
CMS knows as 'signatureAlgorithm'
digEncryptionAlgorithm
,
ASN1OctetString
CMS knows as 'signature'
encryptedDigest
,
ASN1Set
CMS knows as 'unsignedAttrs'
unauthenticatedAttributes
)

public
SignerInfo(SignerIdentifier sid, AlgorithmIdentifier
CMS knows as 'digestAlgorithm'
digAlgorithm
,
Attributes
CMS knows as 'signedAttrs'
authenticatedAttributes
,
AlgorithmIdentifier
CMS knows as 'signatureAlgorithm'
digEncryptionAlgorithm
,
ASN1OctetString
CMS knows as 'signature'
encryptedDigest
,
Attributes
CMS knows as 'unsignedAttrs'
unauthenticatedAttributes
)

private

Method Summary

Modifier and TypeMethod and Description
public ASN1Set
public AlgorithmIdentifier
public AlgorithmIdentifier
public ASN1OctetString
public static SignerInfo
getInstance(Object
the object we want converted.
o
)

Return a SignerInfo object from the given input

Accepted inputs:

public SignerIdentifier
public ASN1Set
public ASN1Integer
public ASN1Primitive
toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Produce an object suitable for an ASN1OutputStream.
Inherited from org.bouncycastle.asn1.ASN1Object:
encodeToencodeToequalsgetEncodedgetEncodedhasEncodedTagValuehashCode

Field Detail

authenticatedAttributesback to summary
private ASN1Set authenticatedAttributes
digAlgorithmback to summary
private AlgorithmIdentifier digAlgorithm
digEncryptionAlgorithmback to summary
private AlgorithmIdentifier digEncryptionAlgorithm
encryptedDigestback to summary
private ASN1OctetString encryptedDigest
sidback to summary
private SignerIdentifier sid
unauthenticatedAttributesback to summary
private ASN1Set unauthenticatedAttributes
versionback to summary
private ASN1Integer version

Constructor Detail

SignerInfoback to summary
public SignerInfo(SignerIdentifier sid, AlgorithmIdentifier digAlgorithm, ASN1Set authenticatedAttributes, AlgorithmIdentifier digEncryptionAlgorithm, ASN1OctetString encryptedDigest, ASN1Set unauthenticatedAttributes)
Parameters
digAlgorithm:AlgorithmIdentifier

CMS knows as 'digestAlgorithm'

authenticatedAttributes:ASN1Set

CMS knows as 'signedAttrs'

digEncryptionAlgorithm:AlgorithmIdentifier

CMS knows as 'signatureAlgorithm'

encryptedDigest:ASN1OctetString

CMS knows as 'signature'

unauthenticatedAttributes:ASN1Set

CMS knows as 'unsignedAttrs'

SignerInfoback to summary
public SignerInfo(SignerIdentifier sid, AlgorithmIdentifier digAlgorithm, Attributes authenticatedAttributes, AlgorithmIdentifier digEncryptionAlgorithm, ASN1OctetString encryptedDigest, Attributes unauthenticatedAttributes)
Parameters
digAlgorithm:AlgorithmIdentifier

CMS knows as 'digestAlgorithm'

authenticatedAttributes:Attributes

CMS knows as 'signedAttrs'

digEncryptionAlgorithm:AlgorithmIdentifier

CMS knows as 'signatureAlgorithm'

encryptedDigest:ASN1OctetString

CMS knows as 'signature'

unauthenticatedAttributes:Attributes

CMS knows as 'unsignedAttrs'

SignerInfoback to summary
private SignerInfo(ASN1Sequence seq)

Method Detail

getAuthenticatedAttributesback to summary
public ASN1Set getAuthenticatedAttributes()
getDigestAlgorithmback to summary
public AlgorithmIdentifier getDigestAlgorithm()
getDigestEncryptionAlgorithmback to summary
public AlgorithmIdentifier getDigestEncryptionAlgorithm()
getEncryptedDigestback to summary
public ASN1OctetString getEncryptedDigest()
getInstanceback to summary
public static SignerInfo getInstance(Object o) throws IllegalArgumentException

Return a SignerInfo object from the given input

Accepted inputs:

Parameters
o:Object

the object we want converted.

Exceptions
IllegalArgumentException:
if the object cannot be converted.
getSIDback to summary
public SignerIdentifier getSID()
getUnauthenticatedAttributesback to summary
public ASN1Set getUnauthenticatedAttributes()
getVersionback to summary
public ASN1Integer getVersion()
toASN1Primitiveback to summary
public ASN1Primitive toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Produce an object suitable for an ASN1OutputStream.

Returns:ASN1Primitive

Doc from org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

a primitive representation of this object.