diff options
Diffstat (limited to 'src/lib/libcrypto/x509/x509_d2.c')
-rw-r--r-- | src/lib/libcrypto/x509/x509_d2.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/src/lib/libcrypto/x509/x509_d2.c b/src/lib/libcrypto/x509/x509_d2.c index 01e22f4cb4..51410cfd1a 100644 --- a/src/lib/libcrypto/x509/x509_d2.c +++ b/src/lib/libcrypto/x509/x509_d2.c | |||
@@ -57,15 +57,12 @@ | |||
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 "crypto.h" | 61 | #include <openssl/crypto.h> |
64 | #include "x509.h" | 62 | #include <openssl/x509.h> |
65 | 63 | ||
66 | #ifndef NO_STDIO | 64 | #ifndef OPENSSL_NO_STDIO |
67 | int X509_STORE_set_default_paths(ctx) | 65 | int X509_STORE_set_default_paths(X509_STORE *ctx) |
68 | X509_STORE *ctx; | ||
69 | { | 66 | { |
70 | X509_LOOKUP *lookup; | 67 | X509_LOOKUP *lookup; |
71 | 68 | ||
@@ -83,10 +80,8 @@ X509_STORE *ctx; | |||
83 | return(1); | 80 | return(1); |
84 | } | 81 | } |
85 | 82 | ||
86 | int X509_STORE_load_locations(ctx,file,path) | 83 | int X509_STORE_load_locations(X509_STORE *ctx, const char *file, |
87 | X509_STORE *ctx; | 84 | const char *path) |
88 | char *file; | ||
89 | char *path; | ||
90 | { | 85 | { |
91 | X509_LOOKUP *lookup; | 86 | X509_LOOKUP *lookup; |
92 | 87 | ||
@@ -94,13 +89,15 @@ char *path; | |||
94 | { | 89 | { |
95 | lookup=X509_STORE_add_lookup(ctx,X509_LOOKUP_file()); | 90 | lookup=X509_STORE_add_lookup(ctx,X509_LOOKUP_file()); |
96 | if (lookup == NULL) return(0); | 91 | if (lookup == NULL) return(0); |
97 | X509_LOOKUP_load_file(lookup,file,X509_FILETYPE_PEM); | 92 | if (X509_LOOKUP_load_file(lookup,file,X509_FILETYPE_PEM) != 1) |
93 | return(0); | ||
98 | } | 94 | } |
99 | if (path != NULL) | 95 | if (path != NULL) |
100 | { | 96 | { |
101 | lookup=X509_STORE_add_lookup(ctx,X509_LOOKUP_hash_dir()); | 97 | lookup=X509_STORE_add_lookup(ctx,X509_LOOKUP_hash_dir()); |
102 | if (lookup == NULL) return(0); | 98 | if (lookup == NULL) return(0); |
103 | X509_LOOKUP_add_dir(lookup,path,X509_FILETYPE_PEM); | 99 | if (X509_LOOKUP_add_dir(lookup,path,X509_FILETYPE_PEM) != 1) |
100 | return(0); | ||
104 | } | 101 | } |
105 | if ((path == NULL) && (file == NULL)) | 102 | if ((path == NULL) && (file == NULL)) |
106 | return(0); | 103 | return(0); |