Skip to content

Commit

Permalink
Log a warning when client cerificate isn't sent
Browse files Browse the repository at this point in the history
  • Loading branch information
emasab committed Dec 5, 2024
1 parent c7d1a6c commit 4eaab30
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/rdkafka_ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,7 @@ static int rd_kafka_ssl_cert_issuer_match(STACK_OF(X509_NAME) * ca_dns,
* `ssl.client.auth=requested`.
*/
static int rd_kafka_ssl_cert_callback(SSL *ssl, void *arg) {
rd_kafka_t *rk = arg;
STACK_OF(X509_NAME) * ca_list;
STACK_OF(X509) *certs = NULL;
X509 *cert;
Expand Down Expand Up @@ -1113,6 +1114,10 @@ static int rd_kafka_ssl_cert_callback(SSL *ssl, void *arg) {
/* No match is found, which means they would almost certainly be
* rejected by the peer.
* We decide to send no certificates. */
rd_kafka_log(rk, LOG_WARNING, "SSL",
"No matching issuer found in "
"server trusted certificate authorities, "
"not sending any client certificates");
SSL_certs_clear(ssl);
return 1;
}
Expand Down

0 comments on commit 4eaab30

Please sign in to comment.