Skip to content

Commit

Permalink
[proxy] Proxy doesn't use the right ca certicate to connect to brokers (
Browse files Browse the repository at this point in the history
apache#5971)

*Motivation*

Currently proxy uses the proxy ca certicate to connect to brokers.
It is fine if proxy and broker are using th same CA. However if the broker
is using a different CA than proxy, "HTTP 502 Bad Gateway" is returned from proxy
when tlsEnabledWithBroker is set to true.

*Modifications*

Change to use the right CA

*Verify this change*

Verify it is working in a production environment.
  • Loading branch information
sijie authored and jiazhai committed Jan 3, 2020
1 parent 4b57776 commit d98562d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ protected HttpClient newHttpClient() {
if (config.isTlsEnabledWithBroker()) {
try {
X509Certificate trustCertificates[] = SecurityUtility
.loadCertificatesFromPemFile(config.getTlsTrustCertsFilePath());
.loadCertificatesFromPemFile(config.getBrokerClientTrustCertsFilePath());

SSLContext sslCtx;
AuthenticationDataProvider authData = auth.getAuthData();
Expand Down

0 comments on commit d98562d

Please sign in to comment.