public class SignerInformation
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected org.bouncycastle.asn1.x509.AlgorithmIdentifier |
digestAlgorithm |
protected org.bouncycastle.asn1.x509.AlgorithmIdentifier |
encryptionAlgorithm |
protected org.bouncycastle.asn1.cms.SignerInfo |
info |
protected org.bouncycastle.asn1.ASN1Set |
signedAttributeSet |
protected org.bouncycastle.asn1.ASN1Set |
unsignedAttributeSet |
Modifier | Constructor and Description |
---|---|
protected |
SignerInformation(SignerInformation baseInfo)
Protected constructor.
|
Modifier and Type | Method and Description |
---|---|
static SignerInformation |
addCounterSigners(SignerInformation signerInformation,
SignerInformationStore counterSigners)
Return a signer information object with passed in SignerInformationStore representing counter
signatures attached as an unsigned attribute.
|
byte[] |
getContentDigest()
return the content digest that was calculated during verification.
|
org.bouncycastle.asn1.ASN1ObjectIdentifier |
getContentType() |
SignerInformationStore |
getCounterSignatures()
Return a SignerInformationStore containing the counter signatures attached to this
signer.
|
java.lang.String |
getDigestAlgOID()
return the object identifier for the signature.
|
org.bouncycastle.asn1.x509.AlgorithmIdentifier |
getDigestAlgorithmID() |
byte[] |
getDigestAlgParams()
return the signature parameters, or null if there aren't any.
|
byte[] |
getEncodedSignedAttributes()
return the DER encoding of the signed attributes.
|
java.lang.String |
getEncryptionAlgOID()
return the object identifier for the signature.
|
byte[] |
getEncryptionAlgParams()
return the signature/encryption algorithm parameters, or null if
there aren't any.
|
SignerId |
getSID() |
byte[] |
getSignature()
return the encoded signature
|
org.bouncycastle.asn1.cms.AttributeTable |
getSignedAttributes()
return a table of the signed attributes - indexed by
the OID of the attribute.
|
org.bouncycastle.asn1.cms.AttributeTable |
getUnsignedAttributes()
return a table of the unsigned attributes indexed by
the OID of the attribute.
|
int |
getVersion()
return the version number for this objects underlying SignerInfo structure.
|
boolean |
isCounterSignature() |
static SignerInformation |
replaceUnsignedAttributes(SignerInformation signerInformation,
org.bouncycastle.asn1.cms.AttributeTable unsignedAttributes)
Return a signer information object with the passed in unsigned
attributes replacing the ones that are current associated with
the object passed in.
|
org.bouncycastle.asn1.cms.SignerInfo |
toASN1Structure()
Return the underlying ASN.1 object defining this SignerInformation object.
|
boolean |
verify(SignerInformationVerifier verifier)
Verify that the given verifier can successfully verify the signature on
this SignerInformation object.
|
protected final org.bouncycastle.asn1.cms.SignerInfo info
protected final org.bouncycastle.asn1.x509.AlgorithmIdentifier digestAlgorithm
protected final org.bouncycastle.asn1.x509.AlgorithmIdentifier encryptionAlgorithm
protected final org.bouncycastle.asn1.ASN1Set signedAttributeSet
protected final org.bouncycastle.asn1.ASN1Set unsignedAttributeSet
protected SignerInformation(SignerInformation baseInfo)
baseInfo
- the SignerInformation to base this one on.public boolean isCounterSignature()
public org.bouncycastle.asn1.ASN1ObjectIdentifier getContentType()
public SignerId getSID()
public int getVersion()
public org.bouncycastle.asn1.x509.AlgorithmIdentifier getDigestAlgorithmID()
public java.lang.String getDigestAlgOID()
public byte[] getDigestAlgParams()
public byte[] getContentDigest()
public java.lang.String getEncryptionAlgOID()
public byte[] getEncryptionAlgParams()
public org.bouncycastle.asn1.cms.AttributeTable getSignedAttributes()
public org.bouncycastle.asn1.cms.AttributeTable getUnsignedAttributes()
public byte[] getSignature()
public SignerInformationStore getCounterSignatures()
public byte[] getEncodedSignedAttributes() throws java.io.IOException
java.io.IOException
- if an encoding error occurs.public boolean verify(SignerInformationVerifier verifier) throws CMSException
verifier
- a suitably configured SignerInformationVerifier.CMSVerifierCertificateNotValidException
- if the provider has an associated certificate and the certificate is not valid at the time given as the SignerInfo's signing time.CMSException
- if the verifier is unable to create a ContentVerifiers or DigestCalculators.public org.bouncycastle.asn1.cms.SignerInfo toASN1Structure()
public static SignerInformation replaceUnsignedAttributes(SignerInformation signerInformation, org.bouncycastle.asn1.cms.AttributeTable unsignedAttributes)
signerInformation
- the signerInfo to be used as the basis.unsignedAttributes
- the unsigned attributes to add.public static SignerInformation addCounterSigners(SignerInformation signerInformation, SignerInformationStore counterSigners)
signerInformation
- the signerInfo to be used as the basis.counterSigners
- signer info objects carrying counter signature.