Skip to content

Commit bba9e94

Browse files
committed
Fix 69939 EVP_PKEY_is_a() crashes with NULL key on OpenSSL 3.0.x
https://bz.apache.org/bugzilla/show_bug.cgi?id=69939
1 parent b803b0f commit bba9e94

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

native/src/sslutils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ EVP_PKEY *SSL_dh_GetParamFromFile(const char *file)
190190
return NULL;
191191
evp = PEM_read_bio_Parameters_ex(bio, NULL, NULL, NULL);
192192
BIO_free(bio);
193-
if (!EVP_PKEY_is_a(evp, "DH")) {
193+
if (evp && !EVP_PKEY_is_a(evp, "DH")) {
194194
EVP_PKEY_free(evp);
195195
return NULL;
196196
}

xdocs/miscellaneous/changelog.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@
6262
Improve performance for the rare case of handling large OCSP responses.
6363
(markt)
6464
</scode>
65+
<fix>
66+
<bug>69939</bug>: Fix the cause of a crash with OpenSSL 3.0.x when a
67+
certificate PEM file does not contain explicit DH parameters. (markt)
68+
</fix>
6569
</changelog>
6670
</section>
6771
<section name="2.0.12" rtext="2026-01-12">

0 commit comments

Comments
 (0)