diff options
Diffstat (limited to 'src/lib/libcrypto/x509/x509_d2.c')
-rw-r--r-- | src/lib/libcrypto/x509/x509_d2.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/x509/x509_d2.c b/src/lib/libcrypto/x509/x509_d2.c index 3e7ec5b432..753d53eb43 100644 --- a/src/lib/libcrypto/x509/x509_d2.c +++ b/src/lib/libcrypto/x509/x509_d2.c | |||
@@ -57,8 +57,6 @@ | |||
57 | */ | 57 | */ |
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <sys/types.h> | ||
61 | #include <sys/stat.h> | ||
62 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
63 | #include <openssl/crypto.h> | 61 | #include <openssl/crypto.h> |
64 | #include <openssl/x509.h> | 62 | #include <openssl/x509.h> |
@@ -91,13 +89,15 @@ int X509_STORE_load_locations(X509_STORE *ctx, const char *file, | |||
91 | { | 89 | { |
92 | lookup=X509_STORE_add_lookup(ctx,X509_LOOKUP_file()); | 90 | lookup=X509_STORE_add_lookup(ctx,X509_LOOKUP_file()); |
93 | if (lookup == NULL) return(0); | 91 | if (lookup == NULL) return(0); |
94 | X509_LOOKUP_load_file(lookup,file,X509_FILETYPE_PEM); | 92 | if (X509_LOOKUP_load_file(lookup,file,X509_FILETYPE_PEM) != 1) |
93 | return(0); | ||
95 | } | 94 | } |
96 | if (path != NULL) | 95 | if (path != NULL) |
97 | { | 96 | { |
98 | lookup=X509_STORE_add_lookup(ctx,X509_LOOKUP_hash_dir()); | 97 | lookup=X509_STORE_add_lookup(ctx,X509_LOOKUP_hash_dir()); |
99 | if (lookup == NULL) return(0); | 98 | if (lookup == NULL) return(0); |
100 | X509_LOOKUP_add_dir(lookup,path,X509_FILETYPE_PEM); | 99 | if (X509_LOOKUP_add_dir(lookup,path,X509_FILETYPE_PEM) != 1) |
100 | return(0); | ||
101 | } | 101 | } |
102 | if ((path == NULL) && (file == NULL)) | 102 | if ((path == NULL) && (file == NULL)) |
103 | return(0); | 103 | return(0); |