Is it intentional that after the expiration of a certificate which issued a timestamp, TimeStampResp.verify still returns that the timestamp is valid? (Please note that I'm not criticizing this — I actually am very happy to see this is true, at least in my testing — but want to verify that it's a behavior that we can rely on as we build out timestamp verification in one of our applications.)
The longer version: I'm currently using PKI.js in a Node application to create timestamps and to verify their validity. In all my development and testing, I hadn't encountered a situation yet where the timestamp authority's leaf cert had expired after it had created a timestamp, so I spent yesterday ginning up a timestamp-authority server with a short-duration leaf certificate, and then after the certs expired today, used both OpenSSL and PKI.js to see what the response was when verifying the timestamps. OpenSSL returned that the timestamps were no longer valid, because of issuing-cert expiration:
$ openssl ts -verify -data data.txt -in response.tsr -CAfile certchain.pem -partial_chain
Verification: FAILED
80F00FF001000000:error:17800064:time stamp routines:ts_verify_cert:certificate verify error:crypto/ts/ts_rsp_verify.c:190:Verify error:certificate has expired
But PKI.js returned that the timestamp was valid:
const verificationResult = await tspResp.verify({ signer: 0, data: dataAsBuffer }); // verificationResult: true
And again, note that I'm fine with this — I'm definitely on the side of the fence where the timestamp has irrefutable evidence of the date and time it was generated, and that so long as that's within the validity window of the issuing cert, then (for the purposes of my app and the process it supports) we can consider that timestamp to be fully-valid. But I want to make sure that this PKI.js behavior is intentional, and/or if it's not, whether there are specific options to TimeStampResp.verify that I would want to explicitly pass in to make sure that this is the behavior that we can expect.
And just editing to add: I now realize that OpenSSL has an option to behave this way as well, -no_check_time, such that:
$ openssl ts -verify -data data.txt -in response.tsr -CAfile certchain.pem -partial_chain -no_check_time
results in successful verification. That's the behavior I just want to make sure I know how to ensure with PKI.js!
Thanks for this awesome library!
Is it intentional that after the expiration of a certificate which issued a timestamp,
TimeStampResp.verifystill returns that the timestamp is valid? (Please note that I'm not criticizing this — I actually am very happy to see this is true, at least in my testing — but want to verify that it's a behavior that we can rely on as we build out timestamp verification in one of our applications.)The longer version: I'm currently using PKI.js in a Node application to create timestamps and to verify their validity. In all my development and testing, I hadn't encountered a situation yet where the timestamp authority's leaf cert had expired after it had created a timestamp, so I spent yesterday ginning up a
timestamp-authorityserver with a short-duration leaf certificate, and then after the certs expired today, used both OpenSSL and PKI.js to see what the response was when verifying the timestamps. OpenSSL returned that the timestamps were no longer valid, because of issuing-cert expiration:But PKI.js returned that the timestamp was valid:
And again, note that I'm fine with this — I'm definitely on the side of the fence where the timestamp has irrefutable evidence of the date and time it was generated, and that so long as that's within the validity window of the issuing cert, then (for the purposes of my app and the process it supports) we can consider that timestamp to be fully-valid. But I want to make sure that this PKI.js behavior is intentional, and/or if it's not, whether there are specific options to
TimeStampResp.verifythat I would want to explicitly pass in to make sure that this is the behavior that we can expect.And just editing to add: I now realize that OpenSSL has an option to behave this way as well,
-no_check_time, such that:results in successful verification. That's the behavior I just want to make sure I know how to ensure with PKI.js!
Thanks for this awesome library!