Discuss this help topic in SecureBlackbox Forum
Validate timestamp over data
This article explains how to validate an RFC5544-compliant timestamp made over a piece of arbitrary, unsigned data. If you are looking for information about validating timestamped digital signatures (CMS or CAdES), please consider this article instead.
SecureBlackbox offers TElMessageTimestampVerifier component (SBMessages class) for validating RFC5544-based timestamped messages. To perform validation:
TElMessageTimestampVerifier verifier = new TElMessageTimestampVerifier();
int res = verifier.Verify(timestampedMessageStream, extractedContentStream); // for enveloping messages; the content will be extracted to extractedContentStream
int res = verifier.VerifyDetached(timestampedMessageStream, contentStream); // for detached messages; provide the content in contentStream
Always check the return value of the Verify() methods.
The return value of 0 indicates success; any non-zero value reports a failure, and indicates the corresponding error code.