Mercurial > hg > nginx
comparison src/event/ngx_event_openssl.c @ 7664:699f6e55bbb4
SSL: added verify callback to ngx_ssl_trusted_certificate().
This ensures that certificate verification is properly logged to debug
log during upstream server certificate verification. This should help
with debugging various certificate issues.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 03 Jun 2020 19:11:32 +0300 |
parents | 8409f9df6219 |
children | 3dcb1aba894a |
comparison
equal
deleted
inserted
replaced
7663:7cbf6389194b | 7664:699f6e55bbb4 |
---|---|
918 | 918 |
919 ngx_int_t | 919 ngx_int_t |
920 ngx_ssl_trusted_certificate(ngx_conf_t *cf, ngx_ssl_t *ssl, ngx_str_t *cert, | 920 ngx_ssl_trusted_certificate(ngx_conf_t *cf, ngx_ssl_t *ssl, ngx_str_t *cert, |
921 ngx_int_t depth) | 921 ngx_int_t depth) |
922 { | 922 { |
923 SSL_CTX_set_verify(ssl->ctx, SSL_VERIFY_PEER, ngx_ssl_verify_callback); | |
924 | |
923 SSL_CTX_set_verify_depth(ssl->ctx, depth); | 925 SSL_CTX_set_verify_depth(ssl->ctx, depth); |
924 | 926 |
925 if (cert->len == 0) { | 927 if (cert->len == 0) { |
926 return NGX_OK; | 928 return NGX_OK; |
927 } | 929 } |