final ESSCertID essCertid = new ESSCertID(certHashSha1, issuerSerial);
final ESSCertIDv2 essCertidV2 = new ESSCertIDv2(certHashSha256, issuerSerial);
signerInfoGenBuilder.setSignedAttributeGenerator(new CMSAttributeTableGenerator()
{
public AttributeTable getAttributes(Map parameters)
throws CMSAttributeTableGenerationException
{
CMSAttributeTableGenerator attrGen = new DefaultSignedAttributeTableGenerator();
AttributeTable table = attrGen.getAttributes(parameters);
table = table.add(PKCSObjectIdentifiers.id_aa_signingCertificate, new SigningCertificate(essCertid));
table = table.add(PKCSObjectIdentifiers.id_aa_signingCertificateV2, new SigningCertificateV2(essCertidV2));
return table;
}
});
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private int | |
| private int | |
| private List | |
| private List | |
| private List | |
| private Locale | |
| pack-priv boolean | |
| private Map | |
| public static final int | R_HUNDREDTHS_OF_SECONDS
Create time-stamps with a resolution of 1 hundredth of a second. |
| public static final int | R_MICROSECONDS
Deprecated
use R_HUNDREDTHS_OF_SECONDS - this field will be deleted!!
|
| public static final int | R_MILLISECONDS
Create time-stamps with a resolution of 1 millisecond. |
| public static final int | R_SECONDS
Create time-stamps with a resolution of 1 second (the default). |
| public static final int | R_TENTHS_OF_SECONDS
Create time-stamps with a resolution of 1 tenth of a second. |
| private int | |
| private SignerInfoGenerator | |
| pack-priv GeneralName | |
| private ASN1ObjectIdentifier |
| Access | Constructor and Description |
|---|---|
| public | TimeStampTokenGenerator(final SignerInfoGenerator
the generator for the signer we are using. signerInfoGen, DigestCalculator calculator for to use for digest of certificate. digestCalculator, ASN1ObjectIdentifier tasPolicy to send. tsaPolicy)Basic Constructor - set up a calculator based on signerInfoGen with a ESSCertID calculated from the signer's associated certificate using the sha1DigestCalculator. |
| public | TimeStampTokenGenerator(final SignerInfoGenerator
the generator for the signer we are using. signerInfoGen, DigestCalculator calculator for to use for digest of certificate. digestCalculator, ASN1ObjectIdentifier tasPolicy to send. tsaPolicy, boolean should issuerSerial be included in the ESSCertIDs, true if yes, by default false. isIssuerSerialIncluded)Basic Constructor - set up a calculator based on signerInfoGen with a ESSCertID calculated from the signer's associated certificate using the sha1DigestCalculator. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | addCertificates(Store<T>
a Store containing X509CertificateHolder objects certStore)Add the store of X509 Certificates to the generator. |
| public void | |
| public void | addOtherRevocationInfo(ASN1ObjectIdentifier
the OID specifying the format of the otherRevocationInfo data. otherRevocationInfoFormat, Store<T> a Store of otherRevocationInfo data to add. otherRevocationInfos)Add a Store of otherRevocationData to the CRL set to be included with the generated TimeStampToken. |
| private ASN1GeneralizedTime | |
| public TimeStampToken | Returns: a TimeStampTokenthe originating request. request, BigInteger serial number for the TimeStampToken serialNumber, Date token generation time. genTime)Generate a TimeStampToken for the passed in request and serialNumber marking it with the passed in genTime. |
| public TimeStampToken | Returns: a TimeStampTokenthe originating request. request, BigInteger serial number for the TimeStampToken serialNumber, Date token generation time. genTime, Extensions extra extensions to be added to the response token. additionalExtensions)Generate a TimeStampToken for the passed in request and serialNumber marking it with the passed in genTime. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setResolution(int
resolution of timestamps to be produced. resolution)Set the resolution of the time stamp - R_SECONDS (the default), R_TENTH_OF_SECONDS, R_MICROSECONDS, R_MILLISECONDS |
| public void |
| accuracyMicros | back to summary |
|---|---|
| private int accuracyMicros | |
| accuracyMillis | back to summary |
|---|---|
| private int accuracyMillis | |
| accuracySeconds | back to summary |
|---|---|
| private int accuracySeconds | |
| attrCerts | back to summary |
|---|---|
| private List<E> attrCerts | |
| certs | back to summary |
|---|---|
| private List<E> certs | |
| crls | back to summary |
|---|---|
| private List<E> crls | |
| locale | back to summary |
|---|---|
| private Locale locale | |
| ordering | back to summary |
|---|---|
| pack-priv boolean ordering | |
| otherRevoc | back to summary |
|---|---|
| private Map<K, V> otherRevoc | |
| R_HUNDREDTHS_OF_SECONDS | back to summary |
|---|---|
| public static final int R_HUNDREDTHS_OF_SECONDS Create time-stamps with a resolution of 1 hundredth of a second. | |
| R_MICROSECONDS | back to summary |
|---|---|
| public static final int R_MICROSECONDS
Deprecated use R_HUNDREDTHS_OF_SECONDS - this field will be deleted!! | |
| R_MILLISECONDS | back to summary |
|---|---|
| public static final int R_MILLISECONDS Create time-stamps with a resolution of 1 millisecond. | |
| R_SECONDS | back to summary |
|---|---|
| public static final int R_SECONDS Create time-stamps with a resolution of 1 second (the default). | |
| R_TENTHS_OF_SECONDS | back to summary |
|---|---|
| public static final int R_TENTHS_OF_SECONDS Create time-stamps with a resolution of 1 tenth of a second. | |
| resolution | back to summary |
|---|---|
| private int resolution | |
| signerInfoGen | back to summary |
|---|---|
| private SignerInfoGenerator signerInfoGen | |
| tsa | back to summary |
|---|---|
| pack-priv GeneralName tsa | |
| tsaPolicyOID | back to summary |
|---|---|
| private ASN1ObjectIdentifier tsaPolicyOID | |
| TimeStampTokenGenerator | back to summary |
|---|---|
| public TimeStampTokenGenerator(final SignerInfoGenerator signerInfoGen, DigestCalculator digestCalculator, ASN1ObjectIdentifier tsaPolicy) throws IllegalArgumentException, TSPException Basic Constructor - set up a calculator based on signerInfoGen with a ESSCertID calculated from the signer's associated certificate using the sha1DigestCalculator. If alternate values are required for id-aa-signingCertificate they should be added to the signerInfoGen object before it is passed in, otherwise a standard digest based value will be added.
| |
| TimeStampTokenGenerator | back to summary |
|---|---|
| public TimeStampTokenGenerator(final SignerInfoGenerator signerInfoGen, DigestCalculator digestCalculator, ASN1ObjectIdentifier tsaPolicy, boolean isIssuerSerialIncluded) throws IllegalArgumentException, TSPException Basic Constructor - set up a calculator based on signerInfoGen with a ESSCertID calculated from the signer's associated certificate using the sha1DigestCalculator. If alternate values are required for id-aa-signingCertificate they should be added to the signerInfoGen object before it is passed in, otherwise a standard digest based value will be added.
| |
| addAttributeCertificates | back to summary |
|---|---|
public void addAttributeCertificates(Store<T> attrStore)
| |
| addCertificates | back to summary |
|---|---|
| public void addCertificates(Store<T> certStore) Add the store of X509 Certificates to the generator.
| |
| addCRLs | back to summary |
|---|---|
public void addCRLs(Store<T> crlStore)
| |
| addOtherRevocationInfo | back to summary |
|---|---|
| public void addOtherRevocationInfo(ASN1ObjectIdentifier otherRevocationInfoFormat, Store<T> otherRevocationInfos) Add a Store of otherRevocationData to the CRL set to be included with the generated TimeStampToken.
| |
| createGeneralizedTime | back to summary |
|---|---|
| private ASN1GeneralizedTime createGeneralizedTime(Date time) throws TSPException | |
| generate | back to summary |
|---|---|
| public TimeStampToken generate(TimeStampRequest request, BigInteger serialNumber, Date genTime) throws TSPException Generate a TimeStampToken for the passed in request and serialNumber marking it with the passed in genTime.
| |
| generate | back to summary |
|---|---|
| public TimeStampToken generate(TimeStampRequest request, BigInteger serialNumber, Date genTime, Extensions additionalExtensions) throws TSPException Generate a TimeStampToken for the passed in request and serialNumber marking it with the passed in genTime.
| |
| setAccuracyMicros | back to summary |
|---|---|
| public void setAccuracyMicros(int accuracyMicros) | |
| setAccuracyMillis | back to summary |
|---|---|
| public void setAccuracyMillis(int accuracyMillis) | |
| setAccuracySeconds | back to summary |
|---|---|
| public void setAccuracySeconds(int accuracySeconds) | |
| setLocale | back to summary |
|---|---|
| public void setLocale(Locale locale) Set a Locale for time creation - you may need to use this if the default locale doesn't use a Gregorian calender so that the GeneralizedTime produced is compatible with other ASN.1 implementations.
| |
| setOrdering | back to summary |
|---|---|
| public void setOrdering(boolean ordering) | |
| setResolution | back to summary |
|---|---|
| public void setResolution(int resolution) Set the resolution of the time stamp - R_SECONDS (the default), R_TENTH_OF_SECONDS, R_MICROSECONDS, R_MILLISECONDS
| |
| setTSA | back to summary |
|---|---|
| public void setTSA(GeneralName tsa) | |