[PATCH] OpenSSL: Replace deprecated ASN1_STRING_data() in OCSP check

Xiangfei Ding xfding at google.com
Fri Nov 27 02:37:06 PST 2026


Use ASN1_STRING_get0_data() instead of deprecated ASN1_STRING_data()
when extracting the BasicOCSPResponse bytes in check_ocsp_resp().

Signed-off-by: Xiangfei Ding <xfding at google.com>
---
 src/crypto/tls_openssl_ocsp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/crypto/tls_openssl_ocsp.c b/src/crypto/tls_openssl_ocsp.c
index 7780b71fd..d6eb68373 100644
--- a/src/crypto/tls_openssl_ocsp.c
+++ b/src/crypto/tls_openssl_ocsp.c
@@ -540,7 +540,7 @@ enum ocsp_result check_ocsp_resp(SSL_CTX *ssl_ctx, SSL *ssl, X509 *cert,
 		return OCSP_INVALID;
 	}
 
-	basic_data = ASN1_STRING_data(bytes->response);
+	basic_data = ASN1_STRING_get0_data(bytes->response);
 	basic_len = ASN1_STRING_length(bytes->response);
 	wpa_hexdump(MSG_DEBUG, "OpenSSL: BasicOCSPResponse",
 		    basic_data, basic_len);
-- 
2.56.1.839.g22a8290db9-goog




More information about the Hostap mailing list