Ruby 2.7.5 PKCS7 decrypt without a certificate

Viewed 31

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).

0 Answers
Related