Package org.bouncycastle.tsp
Class TimeStampRequestGenerator
- java.lang.Object
-
- org.bouncycastle.tsp.TimeStampRequestGenerator
-
public class TimeStampRequestGenerator extends java.lang.ObjectGenerator for RFC 3161 Time Stamp Request objects.
-
-
Constructor Summary
Constructors Constructor Description TimeStampRequestGenerator()TimeStampRequestGenerator(DigestAlgorithmIdentifierFinder digestAlgFinder)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddExtension(java.lang.String OID, boolean critical, byte[] value)Deprecated.use method taking ASN1ObjectIdentifiervoidaddExtension(java.lang.String OID, boolean critical, org.bouncycastle.asn1.ASN1Encodable value)Deprecated.use method taking ASN1ObjectIdentifiervoidaddExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid, boolean isCritical, byte[] value)add a given extension field for the standard extensions tag The value parameter becomes the contents of the octet string associated with the extension.voidaddExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid, boolean isCritical, org.bouncycastle.asn1.ASN1Encodable value)add a given extension field for the standard extensions tag (tag 3)TimeStampRequestgenerate(java.lang.String digestAlgorithm, byte[] digest)Deprecated.use method taking ANS1ObjectIdentifier or AlgorithmIdentifierTimeStampRequestgenerate(java.lang.String digestAlgorithmOID, byte[] digest, java.math.BigInteger nonce)Deprecated.use method taking ANS1ObjectIdentifier or AlgorithmIdentifierTimeStampRequestgenerate(org.bouncycastle.asn1.ASN1ObjectIdentifier digestAlgorithm, byte[] digest)Generate a request for the given digest and algorithm OID.TimeStampRequestgenerate(org.bouncycastle.asn1.ASN1ObjectIdentifier digestAlgorithm, byte[] digest, java.math.BigInteger nonce)Generate a request for the given digest and algorithm OID, including a nonce.TimeStampRequestgenerate(org.bouncycastle.asn1.x509.AlgorithmIdentifier digestAlgorithmID, byte[] digest)Generate a request for the given digest and algorithm identifier.TimeStampRequestgenerate(org.bouncycastle.asn1.x509.AlgorithmIdentifier digestAlgorithmID, byte[] digest, java.math.BigInteger nonce)Generate a request for the given digest and algorithm identifier, including a nonce.voidsetCertReq(boolean certReq)Set the certReq field requesting the TSA to include its certificate(s) in the response.voidsetCertReq(org.bouncycastle.asn1.ASN1Boolean certReq)Set the certReq field requesting the TSA to include its certificate(s) in the response.voidsetReqPolicy(java.lang.String reqPolicy)Deprecated.use method taking ASN1ObjectIdentifiervoidsetReqPolicy(org.bouncycastle.asn1.ASN1ObjectIdentifier reqPolicy)Set the OID of the TSA policy the request asks the token to be issued under.
-
-
-
Constructor Detail
-
TimeStampRequestGenerator
public TimeStampRequestGenerator()
-
TimeStampRequestGenerator
public TimeStampRequestGenerator(DigestAlgorithmIdentifierFinder digestAlgFinder)
-
-
Method Detail
-
setReqPolicy
public void setReqPolicy(org.bouncycastle.asn1.ASN1ObjectIdentifier reqPolicy)
Set the OID of the TSA policy the request asks the token to be issued under.- Parameters:
reqPolicy- the policy OID to request.
-
setReqPolicy
public void setReqPolicy(java.lang.String reqPolicy)
Deprecated.use method taking ASN1ObjectIdentifier- Parameters:
reqPolicy-
-
setCertReq
public void setCertReq(org.bouncycastle.asn1.ASN1Boolean certReq)
Set the certReq field requesting the TSA to include its certificate(s) in the response.- Parameters:
certReq- true to ask the TSA to return its certificate(s), false otherwise.
-
setCertReq
public void setCertReq(boolean certReq)
Set the certReq field requesting the TSA to include its certificate(s) in the response.- Parameters:
certReq- true to ask the TSA to return its certificate(s), false otherwise.
-
addExtension
public void addExtension(java.lang.String OID, boolean critical, org.bouncycastle.asn1.ASN1Encodable value) throws java.io.IOExceptionDeprecated.use method taking ASN1ObjectIdentifieradd a given extension field for the standard extensions tag (tag 3)- Throws:
java.io.IOException
-
addExtension
public void addExtension(java.lang.String OID, boolean critical, byte[] value)Deprecated.use method taking ASN1ObjectIdentifieradd a given extension field for the standard extensions tag The value parameter becomes the contents of the octet string associated with the extension.
-
addExtension
public void addExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid, boolean isCritical, org.bouncycastle.asn1.ASN1Encodable value) throws TSPIOExceptionadd a given extension field for the standard extensions tag (tag 3)- Throws:
TSPIOException
-
addExtension
public void addExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid, boolean isCritical, byte[] value)add a given extension field for the standard extensions tag The value parameter becomes the contents of the octet string associated with the extension.
-
generate
public TimeStampRequest generate(java.lang.String digestAlgorithm, byte[] digest)
Deprecated.use method taking ANS1ObjectIdentifier or AlgorithmIdentifier
-
generate
public TimeStampRequest generate(java.lang.String digestAlgorithmOID, byte[] digest, java.math.BigInteger nonce)
Deprecated.use method taking ANS1ObjectIdentifier or AlgorithmIdentifier
-
generate
public TimeStampRequest generate(org.bouncycastle.asn1.ASN1ObjectIdentifier digestAlgorithm, byte[] digest)
Generate a request for the given digest and algorithm OID.- Parameters:
digestAlgorithm- the OID of the algorithm used to produce the digest.digest- the message imprint digest to be stamped.- Returns:
- a TimeStampRequest.
-
generate
public TimeStampRequest generate(org.bouncycastle.asn1.ASN1ObjectIdentifier digestAlgorithm, byte[] digest, java.math.BigInteger nonce)
Generate a request for the given digest and algorithm OID, including a nonce.- Parameters:
digestAlgorithm- the OID of the algorithm used to produce the digest.digest- the message imprint digest to be stamped.nonce- a nonce to include in the request, allowing the response to be matched to it.- Returns:
- a TimeStampRequest.
-
generate
public TimeStampRequest generate(org.bouncycastle.asn1.x509.AlgorithmIdentifier digestAlgorithmID, byte[] digest)
Generate a request for the given digest and algorithm identifier.- Parameters:
digestAlgorithmID- the identifier of the algorithm used to produce the digest.digest- the message imprint digest to be stamped.- Returns:
- a TimeStampRequest.
-
generate
public TimeStampRequest generate(org.bouncycastle.asn1.x509.AlgorithmIdentifier digestAlgorithmID, byte[] digest, java.math.BigInteger nonce)
Generate a request for the given digest and algorithm identifier, including a nonce.- Parameters:
digestAlgorithmID- the identifier of the algorithm used to produce the digest.digest- the message imprint digest to be stamped.nonce- a nonce to include in the request, allowing the response to be matched to it.- Returns:
- a TimeStampRequest.
-
-