diff options
Diffstat (limited to 'src/lib/libssl/src/apps/s_server.c')
| -rw-r--r-- | src/lib/libssl/src/apps/s_server.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/lib/libssl/src/apps/s_server.c b/src/lib/libssl/src/apps/s_server.c index 75e7d83354..b6e16f31ae 100644 --- a/src/lib/libssl/src/apps/s_server.c +++ b/src/lib/libssl/src/apps/s_server.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: s_server.c,v 1.60 2014/07/12 19:31:21 jsing Exp $ */ | 1 | /* $OpenBSD: s_server.c,v 1.61 2014/07/14 00:35:10 deraadt Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -185,7 +185,7 @@ static void close_accept_socket(void); | |||
| 185 | static void sv_usage(void); | 185 | static void sv_usage(void); |
| 186 | static int init_ssl_connection(SSL * s); | 186 | static int init_ssl_connection(SSL * s); |
| 187 | static void print_stats(BIO * bp, SSL_CTX * ctx); | 187 | static void print_stats(BIO * bp, SSL_CTX * ctx); |
| 188 | static int | 188 | static int |
| 189 | generate_session_id(const SSL * ssl, unsigned char *id, | 189 | generate_session_id(const SSL * ssl, unsigned char *id, |
| 190 | unsigned int *id_len); | 190 | unsigned int *id_len); |
| 191 | #ifndef OPENSSL_NO_DH | 191 | #ifndef OPENSSL_NO_DH |
| @@ -282,7 +282,7 @@ static int cert_chain = 0; | |||
| 282 | 282 | ||
| 283 | 283 | ||
| 284 | 284 | ||
| 285 | static void | 285 | static void |
| 286 | s_server_init(void) | 286 | s_server_init(void) |
| 287 | { | 287 | { |
| 288 | accept_socket = -1; | 288 | accept_socket = -1; |
| @@ -312,7 +312,7 @@ s_server_init(void) | |||
| 312 | #endif | 312 | #endif |
| 313 | } | 313 | } |
| 314 | 314 | ||
| 315 | static void | 315 | static void |
| 316 | sv_usage(void) | 316 | sv_usage(void) |
| 317 | { | 317 | { |
| 318 | BIO_printf(bio_err, "usage: s_server [args ...]\n"); | 318 | BIO_printf(bio_err, "usage: s_server [args ...]\n"); |
| @@ -415,7 +415,7 @@ typedef struct tlsextctx_st { | |||
| 415 | } tlsextctx; | 415 | } tlsextctx; |
| 416 | 416 | ||
| 417 | 417 | ||
| 418 | static int | 418 | static int |
| 419 | ssl_servername_cb(SSL * s, int *ad, void *arg) | 419 | ssl_servername_cb(SSL * s, int *ad, void *arg) |
| 420 | { | 420 | { |
| 421 | tlsextctx *p = (tlsextctx *) arg; | 421 | tlsextctx *p = (tlsextctx *) arg; |
| @@ -461,7 +461,7 @@ static tlsextstatusctx tlscstatp = {NULL, NULL, NULL, 0, -1, NULL, 0}; | |||
| 461 | * considered "expired". | 461 | * considered "expired". |
| 462 | */ | 462 | */ |
| 463 | 463 | ||
| 464 | static int | 464 | static int |
| 465 | cert_status_cb(SSL * s, void *arg) | 465 | cert_status_cb(SSL * s, void *arg) |
| 466 | { | 466 | { |
| 467 | tlsextstatusctx *srctx = arg; | 467 | tlsextstatusctx *srctx = arg; |
| @@ -577,7 +577,7 @@ typedef struct tlsextnextprotoctx_st { | |||
| 577 | unsigned int len; | 577 | unsigned int len; |
| 578 | } tlsextnextprotoctx; | 578 | } tlsextnextprotoctx; |
| 579 | 579 | ||
| 580 | static int | 580 | static int |
| 581 | next_proto_cb(SSL * s, const unsigned char **data, unsigned int *len, void *arg) | 581 | next_proto_cb(SSL * s, const unsigned char **data, unsigned int *len, void *arg) |
| 582 | { | 582 | { |
| 583 | tlsextnextprotoctx *next_proto = arg; | 583 | tlsextnextprotoctx *next_proto = arg; |
| @@ -598,7 +598,7 @@ int s_server_main(int, char **); | |||
| 598 | static char *srtp_profiles = NULL; | 598 | static char *srtp_profiles = NULL; |
| 599 | #endif | 599 | #endif |
| 600 | 600 | ||
| 601 | int | 601 | int |
| 602 | s_server_main(int argc, char *argv[]) | 602 | s_server_main(int argc, char *argv[]) |
| 603 | { | 603 | { |
| 604 | X509_VERIFY_PARAM *vpm = NULL; | 604 | X509_VERIFY_PARAM *vpm = NULL; |
| @@ -1315,11 +1315,11 @@ end: | |||
| 1315 | BIO_free(bio_s_out); | 1315 | BIO_free(bio_s_out); |
| 1316 | bio_s_out = NULL; | 1316 | bio_s_out = NULL; |
| 1317 | } | 1317 | } |
| 1318 | 1318 | ||
| 1319 | return (ret); | 1319 | return (ret); |
| 1320 | } | 1320 | } |
| 1321 | 1321 | ||
| 1322 | static void | 1322 | static void |
| 1323 | print_stats(BIO * bio, SSL_CTX * ssl_ctx) | 1323 | print_stats(BIO * bio, SSL_CTX * ssl_ctx) |
| 1324 | { | 1324 | { |
| 1325 | BIO_printf(bio, "%4ld items in the session cache\n", | 1325 | BIO_printf(bio, "%4ld items in the session cache\n", |
| @@ -1345,7 +1345,7 @@ print_stats(BIO * bio, SSL_CTX * ssl_ctx) | |||
| 1345 | SSL_CTX_sess_get_cache_size(ssl_ctx)); | 1345 | SSL_CTX_sess_get_cache_size(ssl_ctx)); |
| 1346 | } | 1346 | } |
| 1347 | 1347 | ||
| 1348 | static int | 1348 | static int |
| 1349 | sv_body(char *hostname, int s, unsigned char *context) | 1349 | sv_body(char *hostname, int s, unsigned char *context) |
| 1350 | { | 1350 | { |
| 1351 | char *buf = NULL; | 1351 | char *buf = NULL; |
| @@ -1653,7 +1653,7 @@ err: | |||
| 1653 | return (ret); | 1653 | return (ret); |
| 1654 | } | 1654 | } |
| 1655 | 1655 | ||
| 1656 | static void | 1656 | static void |
| 1657 | close_accept_socket(void) | 1657 | close_accept_socket(void) |
| 1658 | { | 1658 | { |
| 1659 | BIO_printf(bio_err, "shutdown accept socket\n"); | 1659 | BIO_printf(bio_err, "shutdown accept socket\n"); |
| @@ -1663,7 +1663,7 @@ close_accept_socket(void) | |||
| 1663 | } | 1663 | } |
| 1664 | } | 1664 | } |
| 1665 | 1665 | ||
| 1666 | static int | 1666 | static int |
| 1667 | init_ssl_connection(SSL * con) | 1667 | init_ssl_connection(SSL * con) |
| 1668 | { | 1668 | { |
| 1669 | int i; | 1669 | int i; |
| @@ -1779,7 +1779,7 @@ err: | |||
| 1779 | } | 1779 | } |
| 1780 | #endif | 1780 | #endif |
| 1781 | 1781 | ||
| 1782 | static int | 1782 | static int |
| 1783 | www_body(char *hostname, int s, unsigned char *context) | 1783 | www_body(char *hostname, int s, unsigned char *context) |
| 1784 | { | 1784 | { |
| 1785 | char *buf = NULL; | 1785 | char *buf = NULL; |
| @@ -2128,7 +2128,7 @@ tmp_rsa_cb(SSL * s, int is_export, int keylength) | |||
| 2128 | } | 2128 | } |
| 2129 | 2129 | ||
| 2130 | #define MAX_SESSION_ID_ATTEMPTS 10 | 2130 | #define MAX_SESSION_ID_ATTEMPTS 10 |
| 2131 | static int | 2131 | static int |
| 2132 | generate_session_id(const SSL * ssl, unsigned char *id, | 2132 | generate_session_id(const SSL * ssl, unsigned char *id, |
| 2133 | unsigned int *id_len) | 2133 | unsigned int *id_len) |
| 2134 | { | 2134 | { |
