diff options
author | Geoff Thorpe <geoff@openssl.org> | 2001-09-01 20:02:13 +0000 |
---|---|---|
committer | Geoff Thorpe <geoff@openssl.org> | 2001-09-01 20:02:13 +0000 |
commit | 79aa04ef27f69a1149d4d0e72d2d2953b6241ef0 (patch) | |
tree | 28eb317ea6bcd7f391cffe2fe694e92224ce1ff8 /apps/x509.c | |
parent | 3a0799977bcb154d044828e96a25a01eb478de51 (diff) | |
download | openssl-79aa04ef27f69a1149d4d0e72d2d2953b6241ef0.tar.gz |
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/x509.c')
-rw-r--r-- | apps/x509.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/x509.c b/apps/x509.c index f18aaf5d9f..65b072cc9a 100644 --- a/apps/x509.c +++ b/apps/x509.c @@ -1128,7 +1128,11 @@ static int x509_certify(X509_STORE *ctx, char *CAfile, const EVP_MD *digest, EVP_PKEY_copy_parameters(upkey,pkey); EVP_PKEY_free(upkey); - X509_STORE_CTX_init(&xsc,ctx,x,NULL); + if(!X509_STORE_CTX_init(&xsc,ctx,x,NULL)) + { + BIO_printf(bio_err,"Error initialising X509 store\n"); + goto end; + } if (sno) bs = sno; else if (!(bs = load_serial(CAfile, serialfile, create))) goto end; |