Class CMSSignedGenerator
java.lang.Object
org.bouncycastle.cms.CMSSignedGenerator
- Direct Known Subclasses:
CMSSignedDataGenerator, CMSSignedDataStreamGenerator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Listprotected Listprotected Liststatic final StringDefault type for the signed data.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected DigestAlgorithmIdentifierFinderprotected Mapstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected List -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedbase constructorprotectedCMSSignedGenerator(DigestAlgorithmIdentifierFinder digestAlgIdFinder) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd the attribute certificates in attrStore to the certificate set to be included with the generated SignedData message.voidaddAttributeCertificates(org.bouncycastle.util.Store attrStore) Add the attribute certificates in attrStore to the certificate set to be included with the generated SignedData message.voidaddCertificate(X509CertificateHolder certificate) Add a certificate to the certificate set to be included with the generated SignedData message.voidaddCertificates(org.bouncycastle.util.Store certStore) Add the certificates in certStore to the certificate set to be included with the generated SignedData message.voidaddCRL(X509CRLHolder crl) Add a CRL to the CRL set to be included with the generated SignedData message.voidaddCRLs(org.bouncycastle.util.Store crlStore) Add the CRLs in crlStore to the CRL set to be included with the generated SignedData message.voidaddOtherRevocationInfo(org.bouncycastle.asn1.ASN1ObjectIdentifier otherRevocationInfoFormat, org.bouncycastle.asn1.ASN1Encodable otherRevocationInfo) Add a single instance of otherRevocationData to the CRL set to be included with the generated SignedData message.voidaddOtherRevocationInfo(org.bouncycastle.asn1.ASN1ObjectIdentifier otherRevocationInfoFormat, org.bouncycastle.util.Store otherRevocationInfos) Add a Store of otherRevocationData to the CRL set to be included with the generated SignedData message.voidAdd a generator for a particular signer to this CMS SignedData generator.voidaddSigners(SignerInformationStore signerStore) Add a store of pre-calculated signers to the generator.protected MapgetBaseParameters(org.bouncycastle.asn1.ASN1ObjectIdentifier contentType, org.bouncycastle.asn1.x509.AlgorithmIdentifier digAlgId, byte[] hash) Return a map of oids and byte arrays representing the digests calculated on the content during the last generate.
-
Field Details
-
DATA
Default type for the signed data. -
DIGEST_SHA1
-
DIGEST_SHA224
-
DIGEST_SHA256
-
DIGEST_SHA384
-
DIGEST_SHA512
-
DIGEST_MD5
-
DIGEST_GOST3411
-
DIGEST_RIPEMD128
-
DIGEST_RIPEMD160
-
DIGEST_RIPEMD256
-
ENCRYPTION_RSA
-
ENCRYPTION_DSA
-
ENCRYPTION_ECDSA
-
ENCRYPTION_RSA_PSS
-
ENCRYPTION_GOST3410
-
ENCRYPTION_ECGOST3410
-
ENCRYPTION_ECGOST3410_2012_256
-
ENCRYPTION_ECGOST3410_2012_512
-
certs
-
crls
-
_signers
-
signerGens
-
digests
-
digestAlgIdFinder
-
-
Constructor Details
-
CMSSignedGenerator
protected CMSSignedGenerator()base constructor -
CMSSignedGenerator
-
-
Method Details
-
getBaseParameters
protected Map getBaseParameters(org.bouncycastle.asn1.ASN1ObjectIdentifier contentType, org.bouncycastle.asn1.x509.AlgorithmIdentifier digAlgId, byte[] hash) -
addCertificate
Add a certificate to the certificate set to be included with the generated SignedData message.- Parameters:
certificate- the certificate to be included.- Throws:
CMSException- if the certificate cannot be encoded for adding.
-
addCertificates
Add the certificates in certStore to the certificate set to be included with the generated SignedData message.- Parameters:
certStore- the store containing the certificates to be included.- Throws:
CMSException- if the certificates cannot be encoded for adding.
-
addCRL
Add a CRL to the CRL set to be included with the generated SignedData message.- Parameters:
crl- the CRL to be included.
-
addCRLs
Add the CRLs in crlStore to the CRL set to be included with the generated SignedData message.- Parameters:
crlStore- the store containing the CRLs to be included.- Throws:
CMSException- if the CRLs cannot be encoded for adding.
-
addAttributeCertificate
Add the attribute certificates in attrStore to the certificate set to be included with the generated SignedData message.- Parameters:
attrCert- the store containing the certificates to be included.- Throws:
CMSException- if the attribute certificate cannot be encoded for adding.
-
addAttributeCertificates
Add the attribute certificates in attrStore to the certificate set to be included with the generated SignedData message.- Parameters:
attrStore- the store containing the certificates to be included.- Throws:
CMSException- if the attribute certificate cannot be encoded for adding.
-
addOtherRevocationInfo
public void addOtherRevocationInfo(org.bouncycastle.asn1.ASN1ObjectIdentifier otherRevocationInfoFormat, org.bouncycastle.asn1.ASN1Encodable otherRevocationInfo) Add a single instance of otherRevocationData to the CRL set to be included with the generated SignedData message.- Parameters:
otherRevocationInfoFormat- the OID specifying the format of the otherRevocationInfo data.otherRevocationInfo- the otherRevocationInfo ASN.1 structure.
-
addOtherRevocationInfo
public void addOtherRevocationInfo(org.bouncycastle.asn1.ASN1ObjectIdentifier otherRevocationInfoFormat, org.bouncycastle.util.Store otherRevocationInfos) Add a Store of otherRevocationData to the CRL set to be included with the generated SignedData message.- Parameters:
otherRevocationInfoFormat- the OID specifying the format of the otherRevocationInfo data.otherRevocationInfos- a Store of otherRevocationInfo data to add.
-
addSigners
Add a store of pre-calculated signers to the generator.- Parameters:
signerStore- store of signers
-
addSignerInfoGenerator
Add a generator for a particular signer to this CMS SignedData generator.- Parameters:
infoGen- the generator representing the particular signer.
-
getGeneratedDigests
Return a map of oids and byte arrays representing the digests calculated on the content during the last generate.- Returns:
- a map of oids (as String objects) and byte[] representing digests.
-