Welcome! Log In Create A New Profile

Advanced

[nginx] SSL: added check for debugging.

Maxim Dounin
February 20, 2021 11:22AM
details: https://hg.nginx.org/nginx/rev/51e6a665523c
branches:
changeset: 7781:51e6a665523c
user: Maxim Dounin <mdounin@mdounin.ru>
date: Sat Feb 20 18:03:04 2021 +0300
description:
SSL: added check for debugging.

If debugging is not enabled, there is no need to do extra work in
ngx_ssl_verify_callback() and ngx_ssl_handshake_log().

diffstat:

src/event/ngx_event_openssl.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)

diffs (25 lines):

diff -r 3bed5797a1b7 -r 51e6a665523c src/event/ngx_event_openssl.c
--- a/src/event/ngx_event_openssl.c Sat Feb 20 18:02:54 2021 +0300
+++ b/src/event/ngx_event_openssl.c Sat Feb 20 18:03:04 2021 +0300
@@ -1014,6 +1014,10 @@ ngx_ssl_verify_callback(int ok, X509_STO

c = ngx_ssl_get_connection(ssl_conn);

+ if (!(c->log->log_level & NGX_LOG_DEBUG_EVENT)) {
+ return 1;
+ }
+
cert = X509_STORE_CTX_get_current_cert(x509_store);
err = X509_STORE_CTX_get_error(x509_store);
depth = X509_STORE_CTX_get_error_depth(x509_store);
@@ -1970,6 +1974,10 @@ ngx_ssl_handshake_log(ngx_connection_t *
#endif
SSL_CIPHER *cipher;

+ if (!(c->log->log_level & NGX_LOG_DEBUG_EVENT)) {
+ return;
+ }
+
cipher = SSL_get_current_cipher(c->ssl->connection);

if (cipher) {
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] SSL: added check for debugging.

Maxim Dounin 74 February 20, 2021 11:22AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 68
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready