X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fx509%2Fby_file.c;h=0457f01c345fa3e97103313d3eefa6e941b0446d;hp=991f04aad9a28a9c0eec7d60d6916a91408ea328;hb=06556a1744dced40a2a77d7b6e4bb73f6e611b8d;hpb=e778802f53c8d47e96a6e4cbc776eb6e1d4c461a diff --git a/crypto/x509/by_file.c b/crypto/x509/by_file.c index 991f04aad9..0457f01c34 100644 --- a/crypto/x509/by_file.c +++ b/crypto/x509/by_file.c @@ -59,24 +59,17 @@ #include #include #include -#include -#include #include "cryptlib.h" -#include "lhash.h" -#include "buffer.h" -#include "x509.h" -#include "pem.h" +#include +#include +#include +#include #ifndef NO_STDIO -#ifndef NOPROTO -static int by_file_ctrl(X509_LOOKUP *ctx,int cmd,char *argc, - long argl,char **ret); -#else -static int by_file_ctrl(); -#endif - +static int by_file_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc, + long argl, char **ret); X509_LOOKUP_METHOD x509_file_lookup= { "Load file into cache", @@ -91,17 +84,13 @@ X509_LOOKUP_METHOD x509_file_lookup= NULL, /* get_by_alias */ }; -X509_LOOKUP_METHOD *X509_LOOKUP_file() +X509_LOOKUP_METHOD *X509_LOOKUP_file(void) { return(&x509_file_lookup); } -static int by_file_ctrl(ctx,cmd,argp,argl,ret) -X509_LOOKUP *ctx; -int cmd; -char *argp; -long argl; -char **ret; +static int by_file_ctrl(X509_LOOKUP *ctx, int cmd, const char *argp, long argl, + char **ret) { int ok=0,ok2=0; char *file; @@ -138,10 +127,7 @@ char **ret; return((ok && ok2)?ok:0); } -int X509_load_cert_file(ctx,file,type) -X509_LOOKUP *ctx; -const char *file; -int type; +int X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type) { int ret=0; BIO *in=NULL; @@ -161,7 +147,7 @@ int type; { for (;;) { - x=PEM_read_bio_X509(in,NULL,NULL); + x=PEM_read_bio_X509_AUX(in,NULL,NULL,NULL); if (x == NULL) { if ((ERR_GET_REASON(ERR_peek_error()) == @@ -208,10 +194,7 @@ err: return(ret); } -int X509_load_crl_file(ctx,file,type) -X509_LOOKUP *ctx; -const char *file; -int type; +int X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type) { int ret=0; BIO *in=NULL; @@ -231,7 +214,7 @@ int type; { for (;;) { - x=PEM_read_bio_X509_CRL(in,NULL,NULL); + x=PEM_read_bio_X509_CRL(in,NULL,NULL,NULL); if (x == NULL) { if ((ERR_GET_REASON(ERR_peek_error()) ==