summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl/s_server.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr.bin/openssl/s_server.c')
-rw-r--r--src/usr.bin/openssl/s_server.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/usr.bin/openssl/s_server.c b/src/usr.bin/openssl/s_server.c
index 140ab92351..4bdafaf682 100644
--- a/src/usr.bin/openssl/s_server.c
+++ b/src/usr.bin/openssl/s_server.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: s_server.c,v 1.29 2018/02/07 04:57:06 jsing Exp $ */ 1/* $OpenBSD: s_server.c,v 1.30 2018/02/07 05:47:55 jsing 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 *
@@ -487,7 +487,7 @@ cert_status_cb(SSL * s, void *arg)
487 OCSP_RESPONSE_print(err, resp, 2); 487 OCSP_RESPONSE_print(err, resp, 2);
488 } 488 }
489 ret = SSL_TLSEXT_ERR_OK; 489 ret = SSL_TLSEXT_ERR_OK;
490done: 490 done:
491 if (ret != SSL_TLSEXT_ERR_OK) 491 if (ret != SSL_TLSEXT_ERR_OK)
492 ERR_print_errors(err); 492 ERR_print_errors(err);
493 if (aia) { 493 if (aia) {
@@ -503,7 +503,7 @@ done:
503 if (resp) 503 if (resp)
504 OCSP_RESPONSE_free(resp); 504 OCSP_RESPONSE_free(resp);
505 return ret; 505 return ret;
506err: 506 err:
507 ret = SSL_TLSEXT_ERR_ALERT_FATAL; 507 ret = SSL_TLSEXT_ERR_ALERT_FATAL;
508 goto done; 508 goto done;
509} 509}
@@ -858,7 +858,7 @@ s_server_main(int argc, char *argv[])
858 argv++; 858 argv++;
859 } 859 }
860 if (badop) { 860 if (badop) {
861bad: 861 bad:
862 if (errstr) 862 if (errstr)
863 BIO_printf(bio_err, "invalid argument %s: %s\n", 863 BIO_printf(bio_err, "invalid argument %s: %s\n",
864 *argv, errstr); 864 *argv, errstr);
@@ -1198,7 +1198,7 @@ bad:
1198 do_server(port, socket_type, &accept_socket, sv_body, context); 1198 do_server(port, socket_type, &accept_socket, sv_body, context);
1199 print_stats(bio_s_out, ctx); 1199 print_stats(bio_s_out, ctx);
1200 ret = 0; 1200 ret = 0;
1201end: 1201 end:
1202 SSL_CTX_free(ctx); 1202 SSL_CTX_free(ctx);
1203 X509_free(s_cert); 1203 X509_free(s_cert);
1204 X509_free(s_dcert); 1204 X509_free(s_dcert);
@@ -1540,7 +1540,7 @@ sv_body(char *hostname, int s, unsigned char *context)
1540 } 1540 }
1541 } 1541 }
1542 } 1542 }
1543err: 1543 err:
1544 if (con != NULL) { 1544 if (con != NULL) {
1545 BIO_printf(bio_s_out, "shutting down SSL\n"); 1545 BIO_printf(bio_s_out, "shutting down SSL\n");
1546 SSL_set_shutdown(con, SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN); 1546 SSL_set_shutdown(con, SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN);
@@ -1655,7 +1655,7 @@ load_dh_param(const char *dhfile)
1655 if ((bio = BIO_new_file(dhfile, "r")) == NULL) 1655 if ((bio = BIO_new_file(dhfile, "r")) == NULL)
1656 goto err; 1656 goto err;
1657 ret = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); 1657 ret = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
1658err: 1658 err:
1659 BIO_free(bio); 1659 BIO_free(bio);
1660 return (ret); 1660 return (ret);
1661} 1661}
@@ -1940,11 +1940,11 @@ www_body(char *hostname, int s, unsigned char *context)
1940 } else 1940 } else
1941 break; 1941 break;
1942 } 1942 }
1943end: 1943 end:
1944 /* make sure we re-use sessions */ 1944 /* make sure we re-use sessions */
1945 SSL_set_shutdown(con, SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN); 1945 SSL_set_shutdown(con, SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN);
1946 1946
1947err: 1947 err:
1948 1948
1949 if (ret >= 0) 1949 if (ret >= 0)
1950 BIO_printf(bio_s_out, "ACCEPT\n"); 1950 BIO_printf(bio_s_out, "ACCEPT\n");