【发布时间】:2019-01-29 16:01:24
【问题描述】:
我的时间戳提供程序最近从使用 rsaEncryption 对时间戳令牌进行签名更改为 rsassaPss (see the diff of the asn1parse here)。
在更改之前,我在 OpenSSL (v1.1.1a) 中使用了以下命令来验证时间戳记令牌:
$ openssl ts -verify -partial_chain -in token-rsaencryption.der -token_in \
> -digest bcbfcee484a9b243bafad6b8a43e0ddc1bf091837463e7c717495395eefbc2a6 \
> -CAfile cert.pem -untrusted cert.pem
Verification: OK
Using configuration from C:/Program Files/Git/mingw64/ssl/openssl.cnf
但是该命令不再起作用了。
$ openssl ts -verify -partial_chain -in token-rsassapss.der -token_in \
> -digest 00017f0b41ce9649602a0218cd02ed0b0a3d93130329451cc782b7dfda79ce71 \
> -CAfile cert.pem -untrusted cert.pem
Verification: FAILED
Using configuration from C:/Program Files/Git/mingw64/ssl/openssl.cnf
14548:error:0407008A:rsa routines:RSA_padding_check_PKCS1_type_1:invalid padding:../openssl-1.1.1a/crypto/rsa/rsa_pk1.c:67:
14548:error:04067072:rsa routines:rsa_ossl_public_decrypt:padding check failed:../openssl-1.1.1a/crypto/rsa/rsa_ossl.c:582:
14548:error:21071069:PKCS7 routines:PKCS7_signatureVerify:signature failure:../openssl-1.1.1a/crypto/pkcs7/pk7_doit.c:1037:
14548:error:2F06A06D:time stamp routines:TS_RESP_verify_signature:signature failure:../openssl-1.1.1a/crypto/ts/ts_rsp_verify.c:143:
这可能是因为 RSASSA-PSS is not supported in timestamp verification using OpenSSL yet。
还有其他选项可以使用 rsassaPss 验证 RFC3161 令牌吗?
如果您想查看文件,时间戳令牌(rsaEncryption 和 rsassaPss)和签名证书are in this zip。
【问题讨论】:
标签: encryption openssl cryptography bouncycastle rfc3161