Ruby 2.7.5 PKCS7没有证书
从Ruby 2.7.5开始,OpenSSL :: PKCS7#verifififififififififififify
方法需要证书。没有证书时,我们如何期望解密数据?
这是此方法的基础源的变化,比较 2.7.4 to 2.7.5 :
/* 2.7.4 */
x509 = NIL_P(cert) ? NULL : GetX509CertPtr(cert); /* NO NEED TO DUP */
/* 2.7.5 */
x509 = GetX509CertPtr(cert); /* NO NEED TO DUP */
的确,为此arg提供nil
在2.7.4中工作,但在2.7.5中,它会产生错误错误的参数类型nil(预期openssl/x509)。
Starting in ruby 2.7.5, the OpenSSL::PKCS7#verify
method requires a cert. How are we expected to decrypt data when there is no cert?
Here's the change in the underlying source for this method, comparing 2.7.4 to 2.7.5:
/* 2.7.4 */
x509 = NIL_P(cert) ? NULL : GetX509CertPtr(cert); /* NO NEED TO DUP */
/* 2.7.5 */
x509 = GetX509CertPtr(cert); /* NO NEED TO DUP */
Indeed, supplying nil
for this arg works in 2.7.4, but in 2.7.5, it produces the error wrong argument type nil (expected OpenSSL/X509).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论