X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=apps%2Fx509.c;h=88386d613690b579c563e811cff65b7d6da12708;hb=487fe20490b1ad031cede19a9308a3fd8fc8a131;hp=f18aaf5d9f9bf72ada804da7a2e0d0d5f5f279e6;hpb=b7a26e6dafdbf97513e968a45757a4d4e9843ba2;p=oweals%2Fopenssl.git diff --git a/apps/x509.c b/apps/x509.c index f18aaf5d9f..88386d6136 100644 --- a/apps/x509.c +++ b/apps/x509.c @@ -73,7 +73,6 @@ #include #include #include -#include #undef PROG #define PROG x509_main @@ -192,6 +191,9 @@ int MAIN(int argc, char **argv) if (bio_err == NULL) bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); + + if (!load_config(bio_err, NULL)) + goto end; STDout=BIO_new_fp(stdout,BIO_NOCLOSE); #ifdef OPENSSL_SYS_VMS { @@ -1128,7 +1130,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;