summaryrefslogtreecommitdiffstats
path: root/apps/s_cb.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2012-07-03 14:53:27 +0000
committerDr. Stephen Henson <steve@openssl.org>2012-07-03 14:53:27 +0000
commit3208fc59dbc31c58ab1eb1e631e43a2cfa886c7e (patch)
tree837844314c5abc3bc04599614bdbb26e0fce612d /apps/s_cb.c
parent87adf1fa96ab4bba2787e1d44d1bd0f578580bf8 (diff)
add support for client certificate callbak, fix memory leak
Diffstat (limited to 'apps/s_cb.c')
-rw-r--r--apps/s_cb.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/apps/s_cb.c b/apps/s_cb.c
index 34c0185559..6c4c405792 100644
--- a/apps/s_cb.c
+++ b/apps/s_cb.c
@@ -1192,11 +1192,16 @@ int args_excert(char ***pargs, int *pargc,
{
char *arg = **pargs, *argn = (*pargs)[1];
SSL_EXCERT *exc = *pexc;
- if (!exc && !ssl_excert_prepend(&exc))
+ if (!exc)
{
- BIO_printf(err, "Error initialising xcert\n");
- *badarg = 1;
- goto err;
+ if (ssl_excert_prepend(&exc))
+ *pexc = exc;
+ else
+ {
+ BIO_printf(err, "Error initialising xcert\n");
+ *badarg = 1;
+ goto err;
+ }
}
if (strcmp(arg, "-xcert") == 0)
{