diff options
Diffstat (limited to 'src/lib/libssl/src/apps/s_server.c')
| -rw-r--r-- | src/lib/libssl/src/apps/s_server.c | 42 |
1 files changed, 2 insertions, 40 deletions
diff --git a/src/lib/libssl/src/apps/s_server.c b/src/lib/libssl/src/apps/s_server.c index c34816749a..6cb43ed45d 100644 --- a/src/lib/libssl/src/apps/s_server.c +++ b/src/lib/libssl/src/apps/s_server.c | |||
| @@ -426,11 +426,7 @@ sv_usage(void) | |||
| 426 | #ifndef OPENSSL_NO_PSK | 426 | #ifndef OPENSSL_NO_PSK |
| 427 | BIO_printf(bio_err, " -psk_hint arg - PSK identity hint to use\n"); | 427 | BIO_printf(bio_err, " -psk_hint arg - PSK identity hint to use\n"); |
| 428 | BIO_printf(bio_err, " -psk arg - PSK in hex (without 0x)\n"); | 428 | BIO_printf(bio_err, " -psk arg - PSK in hex (without 0x)\n"); |
| 429 | #ifndef OPENSSL_NO_JPAKE | ||
| 430 | BIO_printf(bio_err, " -jpake arg - JPAKE secret to use\n"); | ||
| 431 | #endif | 429 | #endif |
| 432 | #endif | ||
| 433 | BIO_printf(bio_err, " -ssl2 - Just talk SSLv2\n"); | ||
| 434 | BIO_printf(bio_err, " -ssl3 - Just talk SSLv3\n"); | 430 | BIO_printf(bio_err, " -ssl3 - Just talk SSLv3\n"); |
| 435 | BIO_printf(bio_err, " -tls1_2 - Just talk TLSv1.2\n"); | 431 | BIO_printf(bio_err, " -tls1_2 - Just talk TLSv1.2\n"); |
| 436 | BIO_printf(bio_err, " -tls1_1 - Just talk TLSv1.1\n"); | 432 | BIO_printf(bio_err, " -tls1_1 - Just talk TLSv1.1\n"); |
| @@ -676,9 +672,6 @@ next_proto_cb(SSL * s, const unsigned char **data, unsigned int *len, void *arg) | |||
| 676 | 672 | ||
| 677 | int s_server_main(int, char **); | 673 | int s_server_main(int, char **); |
| 678 | 674 | ||
| 679 | #ifndef OPENSSL_NO_JPAKE | ||
| 680 | static char *jpake_secret = NULL; | ||
| 681 | #endif | ||
| 682 | #ifndef OPENSSL_NO_SRTP | 675 | #ifndef OPENSSL_NO_SRTP |
| 683 | static char *srtp_profiles = NULL; | 676 | static char *srtp_profiles = NULL; |
| 684 | #endif | 677 | #endif |
| @@ -1009,13 +1002,6 @@ s_server_main(int argc, char *argv[]) | |||
| 1009 | } | 1002 | } |
| 1010 | #endif | 1003 | #endif |
| 1011 | #endif | 1004 | #endif |
| 1012 | #if !defined(OPENSSL_NO_JPAKE) && !defined(OPENSSL_NO_PSK) | ||
| 1013 | else if (strcmp(*argv, "-jpake") == 0) { | ||
| 1014 | if (--argc < 1) | ||
| 1015 | goto bad; | ||
| 1016 | jpake_secret = *(++argv); | ||
| 1017 | } | ||
| 1018 | #endif | ||
| 1019 | #ifndef OPENSSL_NO_SRTP | 1005 | #ifndef OPENSSL_NO_SRTP |
| 1020 | else if (strcmp(*argv, "-use_srtp") == 0) { | 1006 | else if (strcmp(*argv, "-use_srtp") == 0) { |
| 1021 | if (--argc < 1) | 1007 | if (--argc < 1) |
| @@ -1046,21 +1032,6 @@ bad: | |||
| 1046 | sv_usage(); | 1032 | sv_usage(); |
| 1047 | goto end; | 1033 | goto end; |
| 1048 | } | 1034 | } |
| 1049 | #if !defined(OPENSSL_NO_JPAKE) && !defined(OPENSSL_NO_PSK) | ||
| 1050 | if (jpake_secret) { | ||
| 1051 | if (psk_key) { | ||
| 1052 | BIO_printf(bio_err, | ||
| 1053 | "Can't use JPAKE and PSK together\n"); | ||
| 1054 | goto end; | ||
| 1055 | } | ||
| 1056 | psk_identity = "JPAKE"; | ||
| 1057 | if (cipher) { | ||
| 1058 | BIO_printf(bio_err, "JPAKE sets cipher to PSK\n"); | ||
| 1059 | goto end; | ||
| 1060 | } | ||
| 1061 | cipher = "PSK"; | ||
| 1062 | } | ||
| 1063 | #endif | ||
| 1064 | 1035 | ||
| 1065 | SSL_load_error_strings(); | 1036 | SSL_load_error_strings(); |
| 1066 | OpenSSL_add_ssl_algorithms(); | 1037 | OpenSSL_add_ssl_algorithms(); |
| @@ -1414,14 +1385,9 @@ bad: | |||
| 1414 | #endif | 1385 | #endif |
| 1415 | 1386 | ||
| 1416 | #ifndef OPENSSL_NO_PSK | 1387 | #ifndef OPENSSL_NO_PSK |
| 1417 | #ifdef OPENSSL_NO_JPAKE | 1388 | if (psk_key != NULL) { |
| 1418 | if (psk_key != NULL) | ||
| 1419 | #else | ||
| 1420 | if (psk_key != NULL || jpake_secret) | ||
| 1421 | #endif | ||
| 1422 | { | ||
| 1423 | if (s_debug) | 1389 | if (s_debug) |
| 1424 | BIO_printf(bio_s_out, "PSK key given or JPAKE in use, setting server callback\n"); | 1390 | BIO_printf(bio_s_out, "PSK key given, setting server callback\n"); |
| 1425 | SSL_CTX_set_psk_server_callback(ctx, psk_server_cb); | 1391 | SSL_CTX_set_psk_server_callback(ctx, psk_server_cb); |
| 1426 | } | 1392 | } |
| 1427 | if (!SSL_CTX_use_psk_identity_hint(ctx, psk_identity_hint)) { | 1393 | if (!SSL_CTX_use_psk_identity_hint(ctx, psk_identity_hint)) { |
| @@ -1628,10 +1594,6 @@ sv_body(char *hostname, int s, unsigned char *context) | |||
| 1628 | test = BIO_new(BIO_f_nbio_test()); | 1594 | test = BIO_new(BIO_f_nbio_test()); |
| 1629 | sbio = BIO_push(test, sbio); | 1595 | sbio = BIO_push(test, sbio); |
| 1630 | } | 1596 | } |
| 1631 | #ifndef OPENSSL_NO_JPAKE | ||
| 1632 | if (jpake_secret) | ||
| 1633 | jpake_server_auth(bio_s_out, sbio, jpake_secret); | ||
| 1634 | #endif | ||
| 1635 | 1597 | ||
| 1636 | SSL_set_bio(con, sbio, sbio); | 1598 | SSL_set_bio(con, sbio, sbio); |
| 1637 | SSL_set_accept_state(con); | 1599 | SSL_set_accept_state(con); |
