diff options
author | Geoff Thorpe <geoff@openssl.org> | 2001-09-01 22:02:13 +0200 |
---|---|---|
committer | Geoff Thorpe <geoff@openssl.org> | 2001-09-01 22:02:13 +0200 |
commit | 79aa04ef27f69a1149d4d0e72d2d2953b6241ef0 (patch) | |
tree | 28eb317ea6bcd7f391cffe2fe694e92224ce1ff8 /apps/verify.c | |
parent | First step in fixing "ex_data" support. Warning: big commit log ... (diff) | |
download | openssl-79aa04ef27f69a1149d4d0e72d2d2953b6241ef0.tar.xz openssl-79aa04ef27f69a1149d4d0e72d2d2953b6241ef0.zip |
Make the necessary changes to work with the recent "ex_data" overhaul.
See the commit log message for that for more information.
NB: X509_STORE_CTX's use of "ex_data" support was actually misimplemented
(initialisation by "memset" won't/can't/doesn't work). This fixes that but
requires that X509_STORE_CTX_init() be able to handle errors - so its
prototype has been changed to return 'int' rather than 'void'. All uses of
that function throughout the source code have been tracked down and
adjusted.
Diffstat (limited to 'apps/verify.c')
-rw-r--r-- | apps/verify.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/verify.c b/apps/verify.c index 60da5c5a24..b1a4dacb8b 100644 --- a/apps/verify.c +++ b/apps/verify.c @@ -249,7 +249,11 @@ static int check(X509_STORE *ctx, char *file, STACK_OF(X509) *uchain, STACK_OF(X goto end; } X509_STORE_set_flags(ctx, vflags); - X509_STORE_CTX_init(csc,ctx,x,uchain); + if(!X509_STORE_CTX_init(csc,ctx,x,uchain)) + { + ERR_print_errors(bio_err); + goto end; + } if(tchain) X509_STORE_CTX_trusted_stack(csc, tchain); if(purpose >= 0) X509_STORE_CTX_set_purpose(csc, purpose); i=X509_verify_cert(csc); |