#1138434 cpp-httplib: FTBFS with openssl 4.0

Package:
cpp-httplib
Source:
cpp-httplib
Submitter:
Sebastian Andrzej Siewior
Date:
2026-06-15 17:49:02 UTC
Severity:
normal
Tags:
#1138434#5
Date:
2026-05-30 16:14:03 UTC
From:
To:
OpenSSL 4.0 is in experimental. This package fails to build against it:

| httplib.cc: In function ‘stack_st_X509_NAME* httplib::tls::impl::create_client_ca_list_from_pem(const char*)’:
| httplib.cc:12568:44: error: invalid conversion from ‘const X509_NAME*’ {aka ‘const X509_name_st*’} to ‘X509_NAME*’ {aka ‘X509_name_st*’} [-fpermissive]
| 12568 |     X509_NAME *name = X509_get_subject_name(cert);
|       |                       ~~~~~~~~~~~~~~~~~~~~~^~~~~~
|       |                                            |
|       |                                            const X509_NAME* {aka const X509_name_st*}
| httplib.cc: In function ‘stack_st_X509_NAME* httplib::tls::impl::extract_client_ca_list_from_store(X509_STORE*)’:
| httplib.cc:12587:38: warning: ‘stack_st_X509_OBJECT* X509_STORE_get0_objects(const X509_STORE*)’ is deprecated: Since OpenSSL 4.0;Use X509_STORE_get1_objects [-Wdeprecated-declarations]
| 12587 |   auto objs = X509_STORE_get0_objects(store);
|       |               ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
| /usr/include/openssl/x509_vfy.h:527:24: note: declared here
|   527 | STACK_OF(X509_OBJECT) *X509_STORE_get0_objects(const X509_STORE *xs);
|       |                        ^~~~~~~~~~~~~~~~~~~~~~~
| httplib.cc: In function ‘std::string httplib::tls::get_cert_subject_cn(cert_t)’:
| httplib.cc:13149:32: warning: ‘int X509_NAME_get_text_by_NID(const X509_NAME*, int, char*, int)’ is deprecated: Since OpenSSL 4.0 [-Wdeprecated-declarations]
| 13149 |       X509_NAME_get_text_by_NID(subject_name, NID_commonName, buf, sizeof(buf));
|       |       ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| /usr/include/openssl/x509.h:1041:27: note: declared here
|  1041 | OSSL_DEPRECATEDIN_4_0 int X509_NAME_get_text_by_NID(const X509_NAME *name,
|       |                           ^~~~~~~~~~~~~~~~~~~~~~~~~
| httplib.cc: In function ‘size_t httplib::tls::get_ca_certs(ctx_t, std::vector<void*>&)’:
| httplib.cc:13356:38: warning: ‘stack_st_X509_OBJECT* X509_STORE_get0_objects(const X509_STORE*)’ is deprecated: Since OpenSSL 4.0;Use X509_STORE_get1_objects [-Wdeprecated-declarations]
| 13356 |   auto objs = X509_STORE_get0_objects(store);
|       |               ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
| /usr/include/openssl/x509_vfy.h:527:24: note: declared here
|   527 | STACK_OF(X509_OBJECT) *X509_STORE_get0_objects(const X509_STORE *xs);
|       |                        ^~~~~~~~~~~~~~~~~~~~~~~
| httplib.cc: In function ‘std::vector<std::__cxx11::basic_string<char> > httplib::tls::get_ca_names(ctx_t)’:
| httplib.cc:13383:38: warning: ‘stack_st_X509_OBJECT* X509_STORE_get0_objects(const X509_STORE*)’ is deprecated: Since OpenSSL 4.0;Use X509_STORE_get1_objects [-Wdeprecated-declarations]
| 13383 |   auto objs = X509_STORE_get0_objects(store);
|       |               ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
| /usr/include/openssl/x509_vfy.h:527:24: note: declared here
|   527 | STACK_OF(X509_OBJECT) *X509_STORE_get0_objects(const X509_STORE *xs);
|       |                        ^~~~~~~~~~~~~~~~~~~~~~~
| httplib.cc: In member function ‘bool httplib::SSLClient::verify_host_with_common_name(X509*) const’:
| httplib.cc:13738:46: warning: ‘int X509_NAME_get_text_by_NID(const X509_NAME*, int, char*, int)’ is deprecated: Since OpenSSL 4.0 [-Wdeprecated-declarations]
| 13738 |     auto name_len = X509_NAME_get_text_by_NID(subject_name, NID_commonName,
|       |                     ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 13739 |                                               name, sizeof(name));
|       |                                               ~~~~~~~~~~~~~~~~~~~
| /usr/include/openssl/x509.h:1041:27: note: declared here
|  1041 | OSSL_DEPRECATEDIN_4_0 int X509_NAME_get_text_by_NID(const X509_NAME *name,
|       |                           ^~~~~~~~~~~~~~~~~~~~~~~~~
| ninja: build stopped: subcommand failed.
| dh_auto_build: error: cd obj-x86_64-linux-gnu && LC_ALL=C.UTF-8 ninja -j1 -v returned exit code 1
| make: *** [debian/rules:7: binary] Error 25
| dpkg-buildpackage: error debian/rules binary subprocess failed with exit status 2

Full buildlog
https://breakpoint.cc/openssl-rebuild/logs-4/attempted/cpp-httplib_0.41.0+ds-3_amd64-2026-04-19T13:53:05Z

Sebastian

#1138434#12
Date:
2026-06-15 17:46:44 UTC
From:
To:
The upstream commit https://github.com/yhirose/cpp-
httplib/commit/02d38251495ed7795305ad5bf34b3e20b9b52156 fixes the
build issue.