Skip to content

Commit 1a72255

Browse files
committed
Default ssl.ca.location to probe on OSX
1 parent 439a5fc commit 1a72255

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ librdkafka v1.6.1 is a maintenance release.
2121
* Admin API and transactional `send_offsets_to_transaction()` coordinator
2222
requests, such as TxnOffsetCommitRequest, could in rare cases be sent
2323
multiple times which could cause a crash.
24+
* `ssl.ca.location=probe` is now enabled by default on Mac OSX since the
25+
librdkafka-bundled OpenSSL might not have the same default CA search paths
26+
as the system or brew installed OpenSSL. Probing scans all known locations.
2427

2528
### Transactional Producer fixes
2629

CONFIGURATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ ssl_key | * | |
6767
ssl.certificate.location | * | | | low | Path to client's public key (PEM) used for authentication. <br>*Type: string*
6868
ssl.certificate.pem | * | | | low | Client's public key string (PEM format) used for authentication. <br>*Type: string*
6969
ssl_certificate | * | | | low | Client's public key as set by rd_kafka_conf_set_ssl_cert() <br>*Type: see dedicated API*
70-
ssl.ca.location | * | | | low | File or directory path to CA certificate(s) for verifying the broker's key. Defaults: On Windows the system's CA certificates are automatically looked up in the Windows Root certificate store. On Mac OSX it is recommended to install openssl using Homebrew, to provide CA certificates. On Linux install the distribution's ca-certificates package. If OpenSSL is statically linked or `ssl.ca.location` is set to `probe` a list of standard paths will be probed and the first one found will be used as the default CA certificate location path. If OpenSSL is dynamically linked the OpenSSL library's default path will be used (see `OPENSSLDIR` in `openssl version -a`). <br>*Type: string*
70+
ssl.ca.location | * | | | low | File or directory path to CA certificate(s) for verifying the broker's key. Defaults: On Windows the system's CA certificates are automatically looked up in the Windows Root certificate store. On Mac OSX this configuration defaults to `probe`. It is recommended to install openssl using Homebrew, to provide CA certificates. On Linux install the distribution's ca-certificates package. If OpenSSL is statically linked or `ssl.ca.location` is set to `probe` a list of standard paths will be probed and the first one found will be used as the default CA certificate location path. If OpenSSL is dynamically linked the OpenSSL library's default path will be used (see `OPENSSLDIR` in `openssl version -a`). <br>*Type: string*
7171
ssl_ca | * | | | low | CA certificate as set by rd_kafka_conf_set_ssl_cert() <br>*Type: see dedicated API*
7272
ssl.ca.certificate.stores | * | | Root | low | Comma-separated list of Windows Certificate stores to load CA certificates from. Certificates will be loaded in the same order as stores are specified. If no certificates can be loaded from any of the specified stores an error is logged and the OpenSSL library's default CA location is used instead. Store names are typically one or more of: MY, Root, Trust, CA. <br>*Type: string*
7373
ssl.crl.location | * | | | low | Path to CRL for verifying broker's certificate validity. <br>*Type: string*

src/rdkafka_conf.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,14 +773,18 @@ static const struct rd_kafka_property rd_kafka_properties[] = {
773773
"Defaults: "
774774
"On Windows the system's CA certificates are automatically looked "
775775
"up in the Windows Root certificate store. "
776-
"On Mac OSX it is recommended to install openssl using Homebrew, "
776+
"On Mac OSX this configuration defaults to `probe`. "
777+
"It is recommended to install openssl using Homebrew, "
777778
"to provide CA certificates. "
778779
"On Linux install the distribution's ca-certificates package. "
779780
"If OpenSSL is statically linked or `ssl.ca.location` is set to "
780781
"`probe` a list of standard paths will be probed and the first one "
781782
"found will be used as the default CA certificate location path. "
782783
"If OpenSSL is dynamically linked the OpenSSL library's default "
783784
"path will be used (see `OPENSSLDIR` in `openssl version -a`).",
785+
#ifdef __APPLE__
786+
.sdef = "probe",
787+
#endif
784788
_UNSUPPORTED_SSL
785789
},
786790
{ _RK_GLOBAL, "ssl_ca", _RK_C_INTERNAL,

0 commit comments

Comments
 (0)