]> git.kaiwu.me - haproxy.git/commit
BUILD: ssl: use ASN1_STRING accessors for OpenSSL 4.0 compatibility
authorWilliam Lallemand <wlallemand@haproxy.com>
Wed, 11 Mar 2026 09:53:00 +0000 (10:53 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Wed, 11 Mar 2026 15:59:54 +0000 (16:59 +0100)
commite82f03dd88249f3357aeaef7ed49c8a5c3a267e5
treeb566a69d41fde026eecd30ae8e397bb3ef2b6fc7
parent6d14fd0b29cf46de9cb0822ade1e474ea606ce08
BUILD: ssl: use ASN1_STRING accessors for OpenSSL 4.0 compatibility

In OpenSSL 4.0, the ASN1_STRING struct was made opaque and direct access
to its members (->data, ->length, ->type) no longer compiles. Replace
these accesses in ssl_sock_get_serial(), ssl_sock_get_time(), and
asn1_generalizedtime_to_epoch() with the proper accessor functions
ASN1_STRING_get0_data(), ASN1_STRING_length(), and ASN1_STRING_type().

The old direct access is preserved under USE_OPENSSL_WOLFSSL since
WolfSSL does not provide these accessor functions.

Original patch from Alexandr Nedvedicky <sashan@openssl.org>:
https://www.mail-archive.com/haproxy@formilux.org/msg46696.html
src/ssl_utils.c