openbsd-ports/lang/ruby/2.7/patches/patch-ext_openssl_ossl_ocsp_c
2022-03-11 19:28:46 +00:00

17 lines
610 B
Plaintext

Fix build with opaque OCSP_BASICRESP in LibreSSL 3.5.
The bug this works around should be fixed since LibreSSL 2.4.2
as far as I can tell.
Index: ext/openssl/ossl_ocsp.c
--- ext/openssl/ossl_ocsp.c.orig
+++ ext/openssl/ossl_ocsp.c
@@ -1093,7 +1093,7 @@ ossl_ocspbres_verify(int argc, VALUE *argv, VALUE self
* exists in LibreSSL 2.1.10, 2.2.9, 2.3.6, 2.4.1.
*/
if (!(flg & (OCSP_NOCHAIN | OCSP_NOVERIFY)) &&
- sk_X509_num(x509s) && sk_X509_num(bs->certs)) {
+ sk_X509_num(x509s) && sk_X509_num(OCSP_resp_get0_certs(bs))) {
int i;
bs = ASN1_item_dup(ASN1_ITEM_rptr(OCSP_BASICRESP), bs);