diff options
author | Bodo Möller <bodo@openssl.org> | 1999-10-26 03:52:16 +0200 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 1999-10-26 03:52:16 +0200 |
commit | 38899535f85784442395aeab921b25fc79266491 (patch) | |
tree | b6490263dd3f7a9b8c15ea7d4b5d003852f791c1 | |
parent | Update Borland C++ builder support. (diff) | |
download | openssl-38899535f85784442395aeab921b25fc79266491.tar.xz openssl-38899535f85784442395aeab921b25fc79266491.zip |
Report an error from X509_STORE_load_locations
when X509_LOOKUP_load_file or X509_LOOKUP_add_dir failed.
-rw-r--r-- | crypto/x509/x509_d2.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/x509/x509_d2.c b/crypto/x509/x509_d2.c index 5f0da4c9f2..753d53eb43 100644 --- a/crypto/x509/x509_d2.c +++ b/crypto/x509/x509_d2.c @@ -89,13 +89,15 @@ int X509_STORE_load_locations(X509_STORE *ctx, const char *file, { lookup=X509_STORE_add_lookup(ctx,X509_LOOKUP_file()); if (lookup == NULL) return(0); - X509_LOOKUP_load_file(lookup,file,X509_FILETYPE_PEM); + if (X509_LOOKUP_load_file(lookup,file,X509_FILETYPE_PEM) != 1) + return(0); } if (path != NULL) { lookup=X509_STORE_add_lookup(ctx,X509_LOOKUP_hash_dir()); if (lookup == NULL) return(0); - X509_LOOKUP_add_dir(lookup,path,X509_FILETYPE_PEM); + if (X509_LOOKUP_add_dir(lookup,path,X509_FILETYPE_PEM) != 1) + return(0); } if ((path == NULL) && (file == NULL)) return(0); |