version 1.29, 2018/02/07 04:57:06 |
version 1.30, 2018/02/07 05:47:55 |
|
|
OCSP_RESPONSE_print(err, resp, 2); |
OCSP_RESPONSE_print(err, resp, 2); |
} |
} |
ret = SSL_TLSEXT_ERR_OK; |
ret = SSL_TLSEXT_ERR_OK; |
done: |
done: |
if (ret != SSL_TLSEXT_ERR_OK) |
if (ret != SSL_TLSEXT_ERR_OK) |
ERR_print_errors(err); |
ERR_print_errors(err); |
if (aia) { |
if (aia) { |
|
|
if (resp) |
if (resp) |
OCSP_RESPONSE_free(resp); |
OCSP_RESPONSE_free(resp); |
return ret; |
return ret; |
err: |
err: |
ret = SSL_TLSEXT_ERR_ALERT_FATAL; |
ret = SSL_TLSEXT_ERR_ALERT_FATAL; |
goto done; |
goto done; |
} |
} |
|
|
argv++; |
argv++; |
} |
} |
if (badop) { |
if (badop) { |
bad: |
bad: |
if (errstr) |
if (errstr) |
BIO_printf(bio_err, "invalid argument %s: %s\n", |
BIO_printf(bio_err, "invalid argument %s: %s\n", |
*argv, errstr); |
*argv, errstr); |
|
|
do_server(port, socket_type, &accept_socket, sv_body, context); |
do_server(port, socket_type, &accept_socket, sv_body, context); |
print_stats(bio_s_out, ctx); |
print_stats(bio_s_out, ctx); |
ret = 0; |
ret = 0; |
end: |
end: |
SSL_CTX_free(ctx); |
SSL_CTX_free(ctx); |
X509_free(s_cert); |
X509_free(s_cert); |
X509_free(s_dcert); |
X509_free(s_dcert); |
|
|
} |
} |
} |
} |
} |
} |
err: |
err: |
if (con != NULL) { |
if (con != NULL) { |
BIO_printf(bio_s_out, "shutting down SSL\n"); |
BIO_printf(bio_s_out, "shutting down SSL\n"); |
SSL_set_shutdown(con, SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN); |
SSL_set_shutdown(con, SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN); |
|
|
if ((bio = BIO_new_file(dhfile, "r")) == NULL) |
if ((bio = BIO_new_file(dhfile, "r")) == NULL) |
goto err; |
goto err; |
ret = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); |
ret = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); |
err: |
err: |
BIO_free(bio); |
BIO_free(bio); |
return (ret); |
return (ret); |
} |
} |
|
|
} else |
} else |
break; |
break; |
} |
} |
end: |
end: |
/* make sure we re-use sessions */ |
/* make sure we re-use sessions */ |
SSL_set_shutdown(con, SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN); |
SSL_set_shutdown(con, SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN); |
|
|
err: |
err: |
|
|
if (ret >= 0) |
if (ret >= 0) |
BIO_printf(bio_s_out, "ACCEPT\n"); |
BIO_printf(bio_s_out, "ACCEPT\n"); |