summaryrefslogtreecommitdiffstats
path: root/apps/s_cb.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2012-12-26 14:47:31 +0000
committerDr. Stephen Henson <steve@openssl.org>2012-12-26 14:47:31 +0000
commitaa5c5eb4c1c0471fe5a739766f92d026cb790528 (patch)
treef02629dce469a033695748d35e8fa32fce2688fc /apps/s_cb.c
parent731abd3bd7bb5fd0a1e1c943979c664045d8ae50 (diff)
add support for client certificate callbak, fix memory leak
(backport from HEAD)
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 9a73197286..bd487d35db 100644
--- a/apps/s_cb.c
+++ b/apps/s_cb.c
@@ -1194,11 +1194,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)
{