Ruby 2.7.5 PKCS7没有证书

发布于 2025-02-01 13:01:09 字数 856 浏览 1 评论 0原文

从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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文