summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2008-06-04 19:52:36 +0000
committerDr. Stephen Henson <steve@openssl.org>2008-06-04 19:52:36 +0000
commit1cfe6842d5e27c64f16a3de210fff00600da50eb (patch)
treef90b75d64838d4912dbef93b48f99ecf4790fe84 /apps
parentf4c98a6a3d8eaa1227c55feadd11507d29125fb0 (diff)
Backport s_client changes.
Diffstat (limited to 'apps')
-rw-r--r--apps/s_client.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/apps/s_client.c b/apps/s_client.c
index a4983c178f..9a0989fc42 100644
--- a/apps/s_client.c
+++ b/apps/s_client.c
@@ -317,7 +317,8 @@ int MAIN(int argc, char **argv)
int mbuf_len=0;
#ifndef OPENSSL_NO_ENGINE
char *engine_id=NULL;
- ENGINE *e=NULL;
+ char *ssl_client_engine_id=NULL;
+ ENGINE *e=NULL, *ssl_client_engine=NULL;
#endif
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_NETWARE)
struct timeval tv;
@@ -555,6 +556,11 @@ int MAIN(int argc, char **argv)
if (--argc < 1) goto bad;
engine_id = *(++argv);
}
+ else if (strcmp(*argv,"-ssl_client_engine") == 0)
+ {
+ if (--argc < 1) goto bad;
+ ssl_client_engine_id = *(++argv);
+ }
#endif
else if (strcmp(*argv,"-rand") == 0)
{
@@ -590,6 +596,16 @@ bad:
#ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine_id, 1);
+ if (ssl_client_engine_id)
+ {
+ ssl_client_engine = ENGINE_by_id(ssl_client_engine_id);
+ if (!ssl_client_engine)
+ {
+ BIO_printf(bio_err,
+ "Error getting client auth engine\n");
+ goto end;
+ }
+ }
#endif
if (!app_passwd(bio_err, passarg, NULL, &pass, NULL))
{