diff options
Diffstat (limited to 'src/lib/libssl/src/apps/s_server.c')
-rw-r--r-- | src/lib/libssl/src/apps/s_server.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/lib/libssl/src/apps/s_server.c b/src/lib/libssl/src/apps/s_server.c index 7919c437c6..84b1b28461 100644 --- a/src/lib/libssl/src/apps/s_server.c +++ b/src/lib/libssl/src/apps/s_server.c | |||
@@ -742,6 +742,10 @@ BIO_printf(err, "cert_status: received %d ids\n", sk_OCSP_RESPID_num(ids)); | |||
742 | #endif | 742 | #endif |
743 | int MAIN(int, char **); | 743 | int MAIN(int, char **); |
744 | 744 | ||
745 | #ifndef OPENSSL_NO_JPAKE | ||
746 | static char *jpake_secret = NULL; | ||
747 | #endif | ||
748 | |||
745 | int MAIN(int argc, char *argv[]) | 749 | int MAIN(int argc, char *argv[]) |
746 | { | 750 | { |
747 | X509_STORE *store = NULL; | 751 | X509_STORE *store = NULL; |
@@ -760,9 +764,7 @@ int MAIN(int argc, char *argv[]) | |||
760 | int state=0; | 764 | int state=0; |
761 | SSL_METHOD *meth=NULL; | 765 | SSL_METHOD *meth=NULL; |
762 | int socket_type=SOCK_STREAM; | 766 | int socket_type=SOCK_STREAM; |
763 | #ifndef OPENSSL_NO_ENGINE | ||
764 | ENGINE *e=NULL; | 767 | ENGINE *e=NULL; |
765 | #endif | ||
766 | char *inrand=NULL; | 768 | char *inrand=NULL; |
767 | int s_cert_format = FORMAT_PEM, s_key_format = FORMAT_PEM; | 769 | int s_cert_format = FORMAT_PEM, s_key_format = FORMAT_PEM; |
768 | char *passarg = NULL, *pass = NULL; | 770 | char *passarg = NULL, *pass = NULL; |
@@ -774,7 +776,6 @@ int MAIN(int argc, char *argv[]) | |||
774 | EVP_PKEY *s_key2 = NULL; | 776 | EVP_PKEY *s_key2 = NULL; |
775 | X509 *s_cert2 = NULL; | 777 | X509 *s_cert2 = NULL; |
776 | #endif | 778 | #endif |
777 | |||
778 | #ifndef OPENSSL_NO_TLSEXT | 779 | #ifndef OPENSSL_NO_TLSEXT |
779 | tlsextctx tlsextcbp = {NULL, NULL, SSL_TLSEXT_ERR_ALERT_WARNING}; | 780 | tlsextctx tlsextcbp = {NULL, NULL, SSL_TLSEXT_ERR_ALERT_WARNING}; |
780 | #endif | 781 | #endif |
@@ -1071,6 +1072,14 @@ int MAIN(int argc, char *argv[]) | |||
1071 | if (--argc < 1) goto bad; | 1072 | if (--argc < 1) goto bad; |
1072 | s_key_file2= *(++argv); | 1073 | s_key_file2= *(++argv); |
1073 | } | 1074 | } |
1075 | |||
1076 | #endif | ||
1077 | #ifndef OPENSSL_NO_JPAKE | ||
1078 | else if (strcmp(*argv,"-jpake") == 0) | ||
1079 | { | ||
1080 | if (--argc < 1) goto bad; | ||
1081 | jpake_secret = *(++argv); | ||
1082 | } | ||
1074 | #endif | 1083 | #endif |
1075 | else | 1084 | else |
1076 | { | 1085 | { |
@@ -1673,6 +1682,11 @@ static int sv_body(char *hostname, int s, unsigned char *context) | |||
1673 | test=BIO_new(BIO_f_nbio_test()); | 1682 | test=BIO_new(BIO_f_nbio_test()); |
1674 | sbio=BIO_push(test,sbio); | 1683 | sbio=BIO_push(test,sbio); |
1675 | } | 1684 | } |
1685 | #ifndef OPENSSL_NO_JPAKE | ||
1686 | if(jpake_secret) | ||
1687 | jpake_server_auth(bio_s_out, sbio, jpake_secret); | ||
1688 | #endif | ||
1689 | |||
1676 | SSL_set_bio(con,sbio,sbio); | 1690 | SSL_set_bio(con,sbio,sbio); |
1677 | SSL_set_accept_state(con); | 1691 | SSL_set_accept_state(con); |
1678 | /* SSL_set_fd(con,s); */ | 1692 | /* SSL_set_fd(con,s); */ |