diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2023-08-16 12:34:21 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-16 12:34:21 +0900 |
commit | 8ac40ba942bb300389e3eed2a79ab45614e1af35 (patch) | |
tree | c6da3f934b3b97a6ed008fd7e03d43a41b9be406 /ext/openssl | |
parent | 3f45150b6de3ca8542bd4fdf4cea6c5408948a93 (diff) | |
parent | 7eb10f7b75735254a17c5996ab329a56ea083e4a (diff) | |
download | ruby-openssl-8ac40ba942bb300389e3eed2a79ab45614e1af35.tar.gz |
Merge pull request #659 from rhenium/ky/ssl-ca-file-ca-path-raise
ssl: raise SSLError if loading ca_file or ca_path fails
Diffstat (limited to 'ext/openssl')
-rw-r--r-- | ext/openssl/ossl_ssl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c index ce6a5d4e..5384893e 100644 --- a/ext/openssl/ossl_ssl.c +++ b/ext/openssl/ossl_ssl.c @@ -885,9 +885,9 @@ ossl_sslctx_setup(VALUE self) if (ca_path && !SSL_CTX_load_verify_dir(ctx, ca_path)) ossl_raise(eSSLError, "SSL_CTX_load_verify_dir"); #else - if(ca_file || ca_path){ - if (!SSL_CTX_load_verify_locations(ctx, ca_file, ca_path)) - rb_warning("can't set verify locations"); + if (ca_file || ca_path) { + if (!SSL_CTX_load_verify_locations(ctx, ca_file, ca_path)) + ossl_raise(eSSLError, "SSL_CTX_load_verify_locations"); } #endif |