diff options
author | 1999-09-29 04:35:07 +0000 | |
---|---|---|
committer | 1999-09-29 04:35:07 +0000 | |
commit | 913ec974266f8a62ab2e5ca34a31d6e6f75b3cf0 (patch) | |
tree | 62c001f84cb6413a049c5c811a08bfbe7c747b77 /lib/libssl/src/apps/verify.c | |
parent | fix byte counters; imain@netidea.com (diff) | |
download | wireguard-openbsd-913ec974266f8a62ab2e5ca34a31d6e6f75b3cf0.tar.xz wireguard-openbsd-913ec974266f8a62ab2e5ca34a31d6e6f75b3cf0.zip |
OpenSSL 0.9.4 merge
Diffstat (limited to 'lib/libssl/src/apps/verify.c')
-rw-r--r-- | lib/libssl/src/apps/verify.c | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/lib/libssl/src/apps/verify.c b/lib/libssl/src/apps/verify.c index 8cd675ff0ab..093fe09f2c2 100644 --- a/lib/libssl/src/apps/verify.c +++ b/lib/libssl/src/apps/verify.c @@ -60,27 +60,19 @@ #include <stdlib.h> #include <string.h> #include "apps.h" -#include "bio.h" -#include "err.h" -#include "x509.h" -#include "pem.h" +#include <openssl/bio.h> +#include <openssl/err.h> +#include <openssl/x509.h> +#include <openssl/pem.h> #undef PROG #define PROG verify_main -#ifndef NOPROTO static int MS_CALLBACK cb(int ok, X509_STORE_CTX *ctx); static int check(X509_STORE *ctx,char *file); -#else -static int MS_CALLBACK cb(); -static int check(); -#endif - static int v_verbose=0; -int MAIN(argc, argv) -int argc; -char **argv; +int MAIN(int argc, char **argv) { int i,ret=1; char *CApath=NULL,*CAfile=NULL; @@ -141,6 +133,7 @@ char **argv; X509_LOOKUP_add_dir(lookup,NULL,X509_FILETYPE_DEFAULT); + ERR_clear_error(); if (argc < 1) check(cert_ctx,NULL); else for (i=0; i<argc; i++) @@ -153,9 +146,7 @@ end: EXIT(ret); } -static int check(ctx,file) -X509_STORE *ctx; -char *file; +static int check(X509_STORE *ctx, char *file) { X509 *x=NULL; BIO *in=NULL; @@ -180,7 +171,7 @@ char *file; } } - x=PEM_read_bio_X509(in,NULL,NULL); + x=PEM_read_bio_X509(in,NULL,NULL,NULL); if (x == NULL) { fprintf(stdout,"%s: unable to load certificate file\n", @@ -209,9 +200,7 @@ end: return(ret); } -static int MS_CALLBACK cb(ok,ctx) -int ok; -X509_STORE_CTX *ctx; +static int MS_CALLBACK cb(int ok, X509_STORE_CTX *ctx) { char buf[256]; |