public class CMSSignedGenerator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.List |
_certs |
protected java.util.List |
_crls |
protected java.util.Map |
_digests |
protected java.util.List |
_signers |
static java.lang.String |
DATA
Default type for the signed data.
|
static java.lang.String |
DIGEST_GOST3411 |
static java.lang.String |
DIGEST_GOST3411_2012_256 |
static java.lang.String |
DIGEST_GOST3411_2012_512 |
static java.lang.String |
DIGEST_GOST3411G |
static java.lang.String |
DIGEST_KZ_GOST_34_11_95 |
static java.lang.String |
DIGEST_KZ_GOST_34_11_95_TEST |
static java.lang.String |
DIGEST_MD5 |
static java.lang.String |
DIGEST_SHA1 |
private static java.util.Map |
EC_ALGORITHMS |
static java.lang.String |
ENCRYPTION_DSA |
static java.lang.String |
ENCRYPTION_ECDSA |
private static java.lang.String |
ENCRYPTION_ECDSA_WITH_SHA1 |
private static java.lang.String |
ENCRYPTION_ECDSA_WITH_SHA224 |
private static java.lang.String |
ENCRYPTION_ECDSA_WITH_SHA256 |
private static java.lang.String |
ENCRYPTION_ECDSA_WITH_SHA384 |
private static java.lang.String |
ENCRYPTION_ECDSA_WITH_SHA512 |
static java.lang.String |
ENCRYPTION_ECGOST3410 |
static java.lang.String |
ENCRYPTION_GOST3410 |
static java.lang.String |
ENCRYPTION_GOST3410_2012 |
static java.lang.String |
ENCRYPTION_GOST3410_2012_2 |
static java.lang.String |
ENCRYPTION_KZ_GOST_34_310_SIGNATURE |
static java.lang.String |
ENCRYPTION_RECGOST3410 |
static java.lang.String |
ENCRYPTION_RSA |
static java.lang.String |
ENCRYPTION_RSA_PSS |
private static java.util.Set |
NO_PARAMS |
Modifier | Constructor and Description |
---|---|
protected |
CMSSignedGenerator() |
Modifier and Type | Method and Description |
---|---|
void |
addAttributeCertificates(X509Store store)
Add the attribute certificates contained in the passed in store to the
generator.
|
void |
addCertificatesAndCRLs(java.security.cert.CertStore certStore)
add the certificates and CRLs contained in the given CertStore
to the pool that will be included in the encoded signature block.
|
void |
addSigners(SignerInformationStore signerStore)
Add a store of precalculated signers to the generator.
|
protected ASN1Set |
getAttributeSet(AttributeTable attr) |
protected java.util.Map |
getBaseParameters(DERObjectIdentifier contentType,
AlgorithmIdentifier digAlgId,
byte[] hash) |
protected AlgorithmIdentifier |
getEncAlgorithmIdentifier(java.lang.String encOid) |
protected java.lang.String |
getEncOID(java.security.PrivateKey key,
java.lang.String digestOID) |
java.util.Map |
getGeneratedDigests()
Return a map of oids and byte arrays representing the digests calculated on the content during
the last generate.
|
public static final java.lang.String DATA
public static final java.lang.String DIGEST_SHA1
public static final java.lang.String DIGEST_MD5
public static final java.lang.String DIGEST_GOST3411
public static final java.lang.String DIGEST_GOST3411G
public static final java.lang.String DIGEST_GOST3411_2012_512
public static final java.lang.String DIGEST_GOST3411_2012_256
public static final java.lang.String DIGEST_KZ_GOST_34_11_95
public static final java.lang.String DIGEST_KZ_GOST_34_11_95_TEST
public static final java.lang.String ENCRYPTION_RSA
public static final java.lang.String ENCRYPTION_DSA
public static final java.lang.String ENCRYPTION_ECDSA
public static final java.lang.String ENCRYPTION_RSA_PSS
public static final java.lang.String ENCRYPTION_GOST3410
public static final java.lang.String ENCRYPTION_RECGOST3410
public static final java.lang.String ENCRYPTION_ECGOST3410
public static final java.lang.String ENCRYPTION_GOST3410_2012
public static final java.lang.String ENCRYPTION_GOST3410_2012_2
public static final java.lang.String ENCRYPTION_KZ_GOST_34_310_SIGNATURE
private static final java.lang.String ENCRYPTION_ECDSA_WITH_SHA1
private static final java.lang.String ENCRYPTION_ECDSA_WITH_SHA224
private static final java.lang.String ENCRYPTION_ECDSA_WITH_SHA256
private static final java.lang.String ENCRYPTION_ECDSA_WITH_SHA384
private static final java.lang.String ENCRYPTION_ECDSA_WITH_SHA512
private static final java.util.Set NO_PARAMS
private static final java.util.Map EC_ALGORITHMS
protected java.util.List _certs
protected java.util.List _crls
protected java.util.List _signers
protected java.util.Map _digests
protected java.lang.String getEncOID(java.security.PrivateKey key, java.lang.String digestOID)
protected AlgorithmIdentifier getEncAlgorithmIdentifier(java.lang.String encOid)
protected java.util.Map getBaseParameters(DERObjectIdentifier contentType, AlgorithmIdentifier digAlgId, byte[] hash)
protected ASN1Set getAttributeSet(AttributeTable attr)
public void addCertificatesAndCRLs(java.security.cert.CertStore certStore) throws java.security.cert.CertStoreException, CMSException
Note: this assumes the CertStore will support null in the get methods.
certStore
- CertStore containing the public key certificates and CRLsjava.security.cert.CertStoreException
- if an issue occurs processing the CertStoreCMSException
- if an issue occurse transforming data from the CertStore into the messagepublic void addAttributeCertificates(X509Store store) throws CMSException
store
- a store of Version 2 attribute certificatesCMSException
- if an error occurse processing the store.public void addSigners(SignerInformationStore signerStore)
signerStore
- store of signerspublic java.util.Map getGeneratedDigests()
Copyright © 1998-2014 Gamma Technologies. All Rights Reserved.