aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2023-08-16 12:34:21 +0900
committerGitHub <noreply@github.com>2023-08-16 12:34:21 +0900
commit8ac40ba942bb300389e3eed2a79ab45614e1af35 (patch)
treec6da3f934b3b97a6ed008fd7e03d43a41b9be406 /ext/openssl
parent3f45150b6de3ca8542bd4fdf4cea6c5408948a93 (diff)
parent7eb10f7b75735254a17c5996ab329a56ea083e4a (diff)
downloadruby-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.c6
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