我正在尝试验证OpenSSL(v1.1.1a)中的时间戳令牌中的签名,仅针对签名证书,而不是完整链(带有标记-部分链)。
我在用
openssl ts -verify -partial_chain -in ~/Desktop/dgn/token-der.txt -token_in -digest bcbfcee484a9b243bafad6b8a43e0ddc1bf091837463e7c717495395eefbc2a6 -CAfile ~/Desktop/dgn/dgn-cert.txt
错误是:
Verification: FAILED Using configuration from C:/Program Files/Git/mingw64/ssl/openssl.cnf 13812:error:2107C080:PKCS7 routines:PKCS7_get0_signers:signer certificate not found:../openssl-1.1.1a/crypto/pkcs7/pk7_smime.c:421:
做这件事的正确方法是什么?
以下是问题的后续: Validate a timestamp token against a certificate (but not the whole certification chain) using OpenSSL .
旗帜 -untrusted 解决了这个问题:
-untrusted
openssl ts -verify -partial_chain -in ~/Desktop/dgn/token-der.txt -token_in -digest bcbfcee484a9b243bafad6b8a43e0ddc1bf091837463e7c717495395eefbc2a6 -CAfile ~/Desktop/dgn/dgn-cert.txt -untrusted ~/Desktop/dgn/dgn-cert.txt