X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fx509%2Fx509_d2.c;h=753d53eb437bc3422c1ece6ffd8e6dcfde77544c;hb=9fd4ee5d7c0925aa4c1c52e33429bdebe868f9e2;hp=01e22f4cb424e8ed4f5c5349704dba6ed7c5f9b5;hpb=78414a6a897db42c9bcf06aa21c705811ab33921;p=oweals%2Fopenssl.git diff --git a/crypto/x509/x509_d2.c b/crypto/x509/x509_d2.c index 01e22f4cb4..753d53eb43 100644 --- a/crypto/x509/x509_d2.c +++ b/crypto/x509/x509_d2.c @@ -57,15 +57,12 @@ */ #include -#include -#include #include "cryptlib.h" -#include "crypto.h" -#include "x509.h" +#include +#include #ifndef NO_STDIO -int X509_STORE_set_default_paths(ctx) -X509_STORE *ctx; +int X509_STORE_set_default_paths(X509_STORE *ctx) { X509_LOOKUP *lookup; @@ -83,10 +80,8 @@ X509_STORE *ctx; return(1); } -int X509_STORE_load_locations(ctx,file,path) -X509_STORE *ctx; -char *file; -char *path; +int X509_STORE_load_locations(X509_STORE *ctx, const char *file, + const char *path) { X509_LOOKUP *lookup; @@ -94,13 +89,15 @@ char *path; { 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);