Skip to content

Use const X509 pointers for OpenSSL 4 compatibility - #424

Open
678098 wants to merge 1 commit into
bloomberg:mainfrom
678098:261030_darwin_build
Open

678098 wants to merge 1 commit into
bloomberg:mainfrom
678098:261030_darwin_build

Conversation

@678098

@678098 678098 commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

OpenSSL 4 returns const pointers from X509_get_subject_name, X509_get_issuer_name, X509_NAME_get_entry, X509_NAME_ENTRY_get_data and X509_get_ext, and makes ASN1_STRING opaque. Make parseDistinguishedName and getExtension take and return const pointers, and read entry values through ASN1_STRING_get0_data and ASN1_STRING_length. These functions exist since OpenSSL 1.1.0, so older versions are unaffected.

…ility

OpenSSL 4 returns const pointers from X509_get_subject_name,
X509_get_issuer_name, X509_NAME_get_entry, X509_NAME_ENTRY_get_data and
X509_get_ext, and makes ASN1_STRING opaque. Make parseDistinguishedName
and getExtension take and return const pointers, and read entry values
through ASN1_STRING_get0_data and ASN1_STRING_length. These functions
exist since OpenSSL 1.1.0, so older versions are unaffected.

Signed-off-by: Evgeny Malygin <emalygin@bloomberg.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant