Skip to content

Conversation

@JakubHazik
Copy link

@JakubHazik JakubHazik commented Aug 22, 2025

Try resolve #2217
Transmit X509_STORE between SSLClient-s during redirect.
Make variable ca_cert_store_ reusable between multiple clients

@yhirose
Copy link
Owner

yhirose commented Aug 22, 2025

@JakubHazik thanks for the pull request. Could you take a look at the GitHub Actions workflow failures and compiler warnings? (You don't need to worry about the abidiff/adi check.)

void set_ca_cert_path(const std::string &ca_cert_file_path,
const std::string &ca_cert_dir_path = std::string());
void set_ca_cert_store(X509_STORE *ca_cert_store);
virtual void set_ca_cert_store(X509_STORE *ca_cert_store);
Copy link
Owner

Choose a reason for hiding this comment

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

Could you please remove virtual. It's not necessary.

inline void Client::set_ca_cert_store(X509_STORE *ca_cert_store) {
if (is_ssl_) {
static_cast<SSLClient &>(*cli_).set_ca_cert_store(ca_cert_store);
dynamic_cast<SSLClient &>(*cli_).set_ca_cert_store(ca_cert_store);
Copy link
Owner

Choose a reason for hiding this comment

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

Could you please revert it to static_cast?

inline long Client::get_openssl_verify_result() const {
if (is_ssl_) {
return static_cast<SSLClient &>(*cli_).get_openssl_verify_result();
return dynamic_cast<SSLClient &>(*cli_).get_openssl_verify_result();
Copy link
Owner

Choose a reason for hiding this comment

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

Could you please revert it to static_cast, too?


inline SSL_CTX *Client::ssl_context() const {
if (is_ssl_) { return static_cast<SSLClient &>(*cli_).ssl_context(); }
if (is_ssl_) { return dynamic_cast<SSLClient &>(*cli_).ssl_context(); }
Copy link
Owner

Choose a reason for hiding this comment

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

Could you please revert it to static_cast, too?

@yhirose
Copy link
Owner

yhirose commented Aug 26, 2025

@JakubHazik I made come comments. After the adjustments are made, could you please run clang-format, so that test/stle-check runs successfully? Thanks!

@yhirose
Copy link
Owner

yhirose commented Aug 29, 2025

I made the adjustments for you at eb5a65e. :)

@yhirose yhirose closed this Aug 29, 2025
@JakubHazik
Copy link
Author

Thank you so much. Sorry for my delay, but I was on vacation :)

@yhirose
Copy link
Owner

yhirose commented Aug 31, 2025

No problem. Thanks for your fine contribution!

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.

SSL verification failure on redirect

2 participants