We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c88c545 commit 0819c37Copy full SHA for 0819c37
1 file changed
src/tls/openssl.c
@@ -801,7 +801,11 @@ static void *tls_context_create(int verify,
801
SSL_CTX_set_verify(ssl_ctx, SSL_VERIFY_NONE, NULL);
802
}
803
else {
804
- SSL_CTX_set_verify(ssl_ctx, SSL_VERIFY_PEER, NULL);
+ int verify_flags = SSL_VERIFY_PEER;
805
+ if (mode == FLB_TLS_SERVER_MODE) {
806
+ verify_flags |= SSL_VERIFY_FAIL_IF_NO_PEER_CERT;
807
+ }
808
+ SSL_CTX_set_verify(ssl_ctx, verify_flags, NULL);
809
810
811
/* ca_path | ca_file */
0 commit comments