Package org.bouncycastle.asn1.cms
Class SignerInfo
java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.cms.SignerInfo
- All Implemented Interfaces:
org.bouncycastle.asn1.ASN1Encodable
,org.bouncycastle.util.Encodable
public class SignerInfo
extends org.bouncycastle.asn1.ASN1Object
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 { issuerAndSerialNumberIssuerAndSerialNumber
, subjectKeyIdentifier [0] SubjectKeyIdentifier } -- SeeAttributes
for generalized SET OFAttribute
SignedAttributes ::= SET SIZE (1..MAX) OF Attribute UnsignedAttributes ::= SET SIZE (1..MAX) OF AttributeAttribute
::= SEQUENCE { attrType OBJECT IDENTIFIER, attrValues SET OF AttributeValue } AttributeValue ::= ANY SignatureValue ::= OCTET STRING
-
Constructor Summary
ConstructorDescriptionSignerInfo
(SignerIdentifier sid, org.bouncycastle.asn1.x509.AlgorithmIdentifier digAlgorithm, org.bouncycastle.asn1.ASN1Set authenticatedAttributes, org.bouncycastle.asn1.x509.AlgorithmIdentifier digEncryptionAlgorithm, org.bouncycastle.asn1.ASN1OctetString encryptedDigest, org.bouncycastle.asn1.ASN1Set unauthenticatedAttributes) SignerInfo
(SignerIdentifier sid, org.bouncycastle.asn1.x509.AlgorithmIdentifier digAlgorithm, Attributes authenticatedAttributes, org.bouncycastle.asn1.x509.AlgorithmIdentifier digEncryptionAlgorithm, org.bouncycastle.asn1.ASN1OctetString encryptedDigest, Attributes unauthenticatedAttributes) -
Method Summary
Modifier and TypeMethodDescriptionorg.bouncycastle.asn1.ASN1Set
org.bouncycastle.asn1.x509.AlgorithmIdentifier
org.bouncycastle.asn1.x509.AlgorithmIdentifier
org.bouncycastle.asn1.ASN1OctetString
static SignerInfo
Return a SignerInfo object from the given inputgetSID()
org.bouncycastle.asn1.ASN1Set
org.bouncycastle.asn1.ASN1Integer
org.bouncycastle.asn1.ASN1Primitive
Produce an object suitable for an ASN1OutputStream.Methods inherited from class org.bouncycastle.asn1.ASN1Object
encodeTo, encodeTo, equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode
-
Constructor Details
-
SignerInfo
public SignerInfo(SignerIdentifier sid, org.bouncycastle.asn1.x509.AlgorithmIdentifier digAlgorithm, org.bouncycastle.asn1.ASN1Set authenticatedAttributes, org.bouncycastle.asn1.x509.AlgorithmIdentifier digEncryptionAlgorithm, org.bouncycastle.asn1.ASN1OctetString encryptedDigest, org.bouncycastle.asn1.ASN1Set unauthenticatedAttributes) - Parameters:
sid
-digAlgorithm
- CMS knows as 'digestAlgorithm'authenticatedAttributes
- CMS knows as 'signedAttrs'digEncryptionAlgorithm
- CMS knows as 'signatureAlgorithm'encryptedDigest
- CMS knows as 'signature'unauthenticatedAttributes
- CMS knows as 'unsignedAttrs'
-
SignerInfo
public SignerInfo(SignerIdentifier sid, org.bouncycastle.asn1.x509.AlgorithmIdentifier digAlgorithm, Attributes authenticatedAttributes, org.bouncycastle.asn1.x509.AlgorithmIdentifier digEncryptionAlgorithm, org.bouncycastle.asn1.ASN1OctetString encryptedDigest, Attributes unauthenticatedAttributes) - Parameters:
sid
-digAlgorithm
- CMS knows as 'digestAlgorithm'authenticatedAttributes
- CMS knows as 'signedAttrs'digEncryptionAlgorithm
- CMS knows as 'signatureAlgorithm'encryptedDigest
- CMS knows as 'signature'unauthenticatedAttributes
- CMS knows as 'unsignedAttrs'
-
-
Method Details
-
getInstance
Return a SignerInfo object from the given inputAccepted inputs:
- null → null
-
SignerInfo
object -
ASN1Sequence
input formats with SignerInfo structure inside
- Parameters:
o
- the object we want converted.- Throws:
IllegalArgumentException
- if the object cannot be converted.
-
getVersion
public org.bouncycastle.asn1.ASN1Integer getVersion() -
getSID
-
getAuthenticatedAttributes
public org.bouncycastle.asn1.ASN1Set getAuthenticatedAttributes() -
getDigestAlgorithm
public org.bouncycastle.asn1.x509.AlgorithmIdentifier getDigestAlgorithm() -
getEncryptedDigest
public org.bouncycastle.asn1.ASN1OctetString getEncryptedDigest() -
getDigestEncryptionAlgorithm
public org.bouncycastle.asn1.x509.AlgorithmIdentifier getDigestEncryptionAlgorithm() -
getUnauthenticatedAttributes
public org.bouncycastle.asn1.ASN1Set getUnauthenticatedAttributes() -
toASN1Primitive
public org.bouncycastle.asn1.ASN1Primitive toASN1Primitive()Produce an object suitable for an ASN1OutputStream.- Specified by:
toASN1Primitive
in interfaceorg.bouncycastle.asn1.ASN1Encodable
- Specified by:
toASN1Primitive
in classorg.bouncycastle.asn1.ASN1Object
-