Does this issue affect the google-cloud-cpp project?
Yes. This is a build issue in the google-cloud-cpp client library itself.
What component of google-cloud-cpp is this related to?
This is related to the OpenSSL code in google/cloud/internal/openssl, specifically parse_service_account_p12_file.cc.
Describe the bug A clear and concise description of what the bug is.
google-cloud-cpp 3.10.0 fails to build with OpenSSL 4.x.
It appears that X509_get_subject_name() returns const X509_NAME * with OpenSSL 4.x, while the current code assigns the result to X509_NAME *.
The build fails with the following error:
/tmp/google-cloud-cpp-3.10.0/google/cloud/internal/openssl/parse_service_account_p12_file.cc:88:14: error:
cannot initialize a variable of type 'X509_NAME *' (aka 'X509_name_st *')
with an rvalue of type 'const X509_NAME *' (aka 'const X509_name_st *')
88 | X509_NAME* name = X509_get_subject_name(cert.get());
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
To Reproduce Steps to reproduce the behavior:
Install OpenSSL 4.x with Homebrew.
Configure google-cloud-cpp 3.10.0 to use OpenSSL 4.x.
cmake -S . -B build \
-DBUILD_TESTING=OFF \
-DOPENSSL_ROOT_DIR="$(brew --prefix openssl@4)"
Build google-cloud-cpp.
The build fails while compiling google/cloud/internal/openssl/parse_service_account_p12_file.cc.
Expected behavior A clear and concise description of what you expected to
happen.
google-cloud-cpp should build successfully with OpenSSL 4.x, or the supported OpenSSL versions should exclude OpenSSL 4.x.
Operating system:
macOS 26.7
What compiler and version are you using?
Apple clang version 21.0.0 (clang-2100.3.34.2)
What version of google-cloud-cpp are you using?
google-cloud-cpp 3.10.0
Additional context
This issue was originally discovered in the Apache Arrow CI build.
OpenSSL was installed using Homebrew:
$ /opt/homebrew/opt/openssl@4/bin/openssl version
OpenSSL 4.0.2 25 Aug 2026 (Library: OpenSSL 4.0.2 25 Aug 2026)
Does this issue affect the google-cloud-cpp project?
Yes. This is a build issue in the google-cloud-cpp client library itself.
What component of
google-cloud-cppis this related to?This is related to the OpenSSL code in google/cloud/internal/openssl, specifically
parse_service_account_p12_file.cc.Describe the bug A clear and concise description of what the bug is.
google-cloud-cpp3.10.0 fails to build with OpenSSL 4.x.It appears that
X509_get_subject_name()returns const X509_NAME * with OpenSSL 4.x, while the current code assigns the result toX509_NAME *.The build fails with the following error:
To Reproduce Steps to reproduce the behavior:
Install OpenSSL 4.x with Homebrew.
Configure google-cloud-cpp 3.10.0 to use OpenSSL 4.x.
Build google-cloud-cpp.
The build fails while compiling
google/cloud/internal/openssl/parse_service_account_p12_file.cc.Expected behavior A clear and concise description of what you expected to
happen.
google-cloud-cpp should build successfully with OpenSSL 4.x, or the supported OpenSSL versions should exclude OpenSSL 4.x.
Operating system:
macOS 26.7
What compiler and version are you using?
Apple clang version 21.0.0 (clang-2100.3.34.2)
What version of
google-cloud-cppare you using?google-cloud-cpp 3.10.0
Additional context
This issue was originally discovered in the Apache Arrow CI build.
OpenSSL was installed using Homebrew: