Skip to content

Use accessor for getting an ASN1_STRING's length#483

Merged
millert merged 1 commit intosudo-project:mainfrom
botovq:opaque-asn1-string
Nov 22, 2025
Merged

Use accessor for getting an ASN1_STRING's length#483
millert merged 1 commit intosudo-project:mainfrom
botovq:opaque-asn1-string

Conversation

@botovq
Copy link
Copy Markdown
Contributor

@botovq botovq commented Nov 22, 2025

OpensSSL 4 has plans to make ASN1_STRING opaque. hostcheck.c's code mostly treats it as opaque, but accesses two lengths. This is API added in OpenSSL 0.9.0, so I'm not sure we need a configure check.

WolfSSL only recently const corrected ASN1_STRING_length(), so maybe there will be a need to cast away const.

OpensSSL 4 has plans to make ASN1_STRING opaque [1]. hostcheck.c's code
mostly treats it as opaque, but accesses two lengths. This is API added
in OpenSSL 0.9.0, so I'm not sure we need a configure check.

WolfSSL only recently const corrected ASN1_STRING_length(), so maybe
there will be a need to cast away const.

[1]: openssl/openssl#29117
Copy link
Copy Markdown
Collaborator

@millert millert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I don't think the last of const in the wolfssl ASN1_STRING_length will be an issue, but it is easy to add the cast later if needed.

@millert millert merged commit f97a34b into sudo-project:main Nov 22, 2025
@botovq botovq deleted the opaque-asn1-string branch November 22, 2025 16:24
botovq added a commit to botovq/ports that referenced this pull request Dec 4, 2025
botovq added a commit to botovq/ports-opaque-strings that referenced this pull request Jan 23, 2026
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.

2 participants