Skip to content

Resolve OpenSSL 4.0 build issues - #13440

Open
jeredfloyd wants to merge 2 commits into
apache:masterfrom
jeredfloyd:master
Open

Resolve OpenSSL 4.0 build issues#13440
jeredfloyd wants to merge 2 commits into
apache:masterfrom
jeredfloyd:master

Conversation

@jeredfloyd

Copy link
Copy Markdown
Contributor

Fedora 45 updates to OpenSSL 4.0, which removes several long-deprecated capabilities and breaks ATS build. Specific issues fixed are lack of const tagging of pointers to immutable structures, and disallowed introspection of ASN1_STRING. Resolves #13427

@JosiahWI JosiahWI added the Build work related to build configuration or environment label Jul 28, 2026
@JosiahWI JosiahWI added this to the 10.2.0 milestone Jul 28, 2026
@JosiahWI JosiahWI modified the milestones: 10.2.0, 11.0.0 Jul 28, 2026
@JosiahWI

Copy link
Copy Markdown
Contributor

[approve ci]

@JosiahWI

JosiahWI commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

@jeredfloyd Could you run the clang-format CMake target?

@jeredfloyd

Copy link
Copy Markdown
Contributor Author

@JosiahWI oops; done

@JosiahWI

Copy link
Copy Markdown
Contributor

../src/tscore/X509HostnameValidator.cc:269:15: error: no matching function for call to 'X509_NAME_get_index_by_NID'
while ((i = X509_NAME_get_index_by_NID(name, NID_commonName, i)) >= 0) {
^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/openssl/x509.h:810:5: note: candidate function not viable: 1st argument ('const X509_NAME *' (aka 'const X509_name_st *')) would lose const qualifier
int X509_NAME_get_index_by_NID(X509_NAME *name, int nid, int lastpos);

Apparently, not all the X509 APIs in older OpenSSL versions take the name as pointer to const. Would it work to use auto or decltype to determine the type of the local variable, so that it automatically assumes the correct type for both APIs? (If this approach is used, there should be a comment explaining why this was done.) That's just one idea; I'm interested in how you recommend to fix it.

@jeredfloyd

Copy link
Copy Markdown
Contributor Author

Huh. I can't access the trafficserver CI logs; can you tell me what OS versions / OpenSSL versions are in use on the failing CentOS/Debian/FreeBSD/Ubuntu jobs?

I don't see why decltype wouldn't work, but I don't work much with C++ so I don't want to proffer a strong opinion here.

@JosiahWI

Copy link
Copy Markdown
Contributor

Ubuntu 20.04.6
FreeBSD 13.1

The Debian and CentOS failures were due to GitHub connectivity issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Build work related to build configuration or environment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

10.2.x branch cannot build on Fedora 45 due to ASN1_STRING opacity

2 participants