diff options
author | Dr. Stephen Henson <steve@openssl.org> | 1999-01-03 01:08:33 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 1999-01-03 01:08:33 +0000 |
commit | cfcf645356b0957e9ec7190e3afb3e4d6c406d5b (patch) | |
tree | cc2924b1fd4399c24493f588d78ac0e582fb550d /apps | |
parent | cdbb8c2f26574349b721b651f40f120864848059 (diff) |
Make sure applications free up pkey structures and add netscape extension
handling to x509.c
Diffstat (limited to 'apps')
-rw-r--r-- | apps/req.c | 5 | ||||
-rw-r--r-- | apps/x509.c | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/apps/req.c b/apps/req.c index 17f58d07cb..525995dd51 100644 --- a/apps/req.c +++ b/apps/req.c @@ -663,7 +663,10 @@ loop: } i=X509_REQ_verify(req,pkey); - if (tmp) pkey=NULL; + if (tmp) { + EVP_PKEY_free(pkey); + pkey=NULL; + } if (i < 0) { diff --git a/apps/x509.c b/apps/x509.c index 1d7bad111a..71af49f7f5 100644 --- a/apps/x509.c +++ b/apps/x509.c @@ -305,6 +305,7 @@ bad: } ERR_load_crypto_strings(); + X509v3_add_netscape_extensions(); if (!X509_STORE_set_default_paths(ctx)) { @@ -368,6 +369,7 @@ bad: goto end; } i=X509_REQ_verify(req,pkey); + EVP_PKEY_free(pkey); if (i < 0) { BIO_printf(bio_err,"Signature verification error\n"); @@ -481,6 +483,7 @@ bad: else BIO_printf(STDout,"Wrong Algorithm type"); BIO_printf(STDout,"\n"); + EVP_PKEY_free(pkey); } else #endif @@ -688,6 +691,7 @@ end: if (Upkey != NULL) EVP_PKEY_free(Upkey); if (CApkey != NULL) EVP_PKEY_free(CApkey); if (rq != NULL) X509_REQ_free(rq); + X509v3_cleanup_extensions(); EXIT(ret); } |