Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ASIO no longer compiles when using the latest BoringSSL because ASIO accesses the extra_certs member directly in context::use_certificate_chain. To clear the certificate chain, OpenSSL 1.0.2 added a new API you can use: SSL_CTX_clear_chain_certs
extra_certs
context::use_certificate_chain
Here is a patch for context.ipp:
diff --git a/asio/include/asio/ssl/impl/context.ipp b/asio/include/asio/ssl/impl/context.ipp index 08705e7..77da84e 100644 --- a/asio/include/asio/ssl/impl/context.ipp +++ b/asio/include/asio/ssl/impl/context.ipp @@ -539,11 +539,15 @@ asio::error_code context::use_certificate_chain( return ec; } +#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) + ::SSL_CTX_clear_chain_certs(handle_); +#else if (handle_->extra_certs) { ::sk_X509_pop_free(handle_->extra_certs, X509_free); handle_->extra_certs = 0; } +#endif // (OPENSSL_VERSION_NUMBER >= 0x10002000L) while (X509* cacert = ::PEM_read_bio_X509(bio.p, 0, handle_->default_passwd_callback,
The text was updated successfully, but these errors were encountered:
Fixed in 6c70257.
Sorry, something went wrong.
No branches or pull requests
ASIO no longer compiles when using the latest BoringSSL because ASIO accesses the
extra_certs
member directly incontext::use_certificate_chain
. To clear the certificate chain, OpenSSL 1.0.2 added a new API you can use: SSL_CTX_clear_chain_certsHere is a patch for context.ipp:
The text was updated successfully, but these errors were encountered: