Package org.bouncycastle.tsp
Class TSPUtil
java.lang.Object
org.bouncycastle.tsp.TSPUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CollectiongetSignatureTimestamps(SignerInformation signerInfo, DigestCalculatorProvider digCalcProvider) Fetches the signature time-stamp attributes from a SignerInformation object.static voidValidate the passed in certificate as being of the correct type to be used for time stamping.
-
Constructor Details
-
TSPUtil
public TSPUtil()
-
-
Method Details
-
getSignatureTimestamps
public static Collection getSignatureTimestamps(SignerInformation signerInfo, DigestCalculatorProvider digCalcProvider) throws TSPValidationException Fetches the signature time-stamp attributes from a SignerInformation object. Checks that the MessageImprint for each time-stamp matches the signature field. (see RFC 3161 Appendix A).- Parameters:
signerInfo- a SignerInformation to search for time-stampsdigCalcProvider- provider for digest calculators- Returns:
- a collection of TimeStampToken objects
- Throws:
TSPValidationException
-
validateCertificate
Validate the passed in certificate as being of the correct type to be used for time stamping. To be valid it must have an ExtendedKeyUsage extension which has a key purpose identifier of id-kp-timeStamping.- Parameters:
cert- the certificate of interest.- Throws:
TSPValidationException- if the certificate fails on one of the check points.
-