diff options
author | Ben Laurie <ben@openssl.org> | 2008-10-26 18:40:52 +0000 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 2008-10-26 18:40:52 +0000 |
commit | 6caa4edd3e6410aff7c80011d905abcd3c1b1143 (patch) | |
tree | cd78ea1921ac59740eb310b88bad25d642dc281a /apps/s_client.c | |
parent | ac786241a2607ea14cf29e3a0e4ad1aae672a8df (diff) |
Add JPAKE.
Diffstat (limited to 'apps/s_client.c')
-rw-r--r-- | apps/s_client.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/apps/s_client.c b/apps/s_client.c index f038a55323..93c62b4386 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -418,7 +418,6 @@ int MAIN(int argc, char **argv) int stdin_set = 0; #endif #endif - #ifndef OPENSSL_NO_TLSEXT char *servername = NULL; tlsextctx tlsextcbp = @@ -430,6 +429,7 @@ int MAIN(int argc, char **argv) int peerlen = sizeof(peer); int enable_timeouts = 0 ; long socket_mtu = 0; + char *jpake_secret = NULL; #if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3) meth=SSLv23_client_method(); @@ -699,6 +699,11 @@ int MAIN(int argc, char **argv) /* meth=TLSv1_client_method(); */ } #endif + else if (strcmp(*argv,"-jpake") == 0) + { + if (--argc < 1) goto bad; + jpake_secret = *++argv; + } else { BIO_printf(bio_err,"unknown option %s\n",*argv); @@ -974,8 +979,6 @@ re_start: else sbio=BIO_new_socket(s,BIO_NOCLOSE); - - if (nbio_test) { BIO *test; @@ -1020,6 +1023,9 @@ SSL_set_tlsext_status_ids(con, ids); } #endif + if (jpake_secret) + jpake_client_auth(bio_c_out, sbio, jpake_secret); + SSL_set_bio(con,sbio,sbio); SSL_set_connect_state(con); |