Skip to content

Commit 207bea5

Browse files
bsmelozoewangg
authored andcommitted
Fix: Warn about SSL Certificate verification being disabled only when it's actually disabled
Only Boolean.TRUE disables SSL Certificate Validation, so both Boolean.FALSE and null should skip the warning message
1 parent e06b238 commit 207bea5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

services/s3/src/main/java/software/amazon/awssdk/services/s3/internal/crt/S3NativeClientConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public S3NativeClientConfiguration(Builder builder) {
7777
.withCipherPreference(TlsCipherPreference.TLS_CIPHER_SYSTEM_DEFAULT);
7878

7979
if (builder.httpConfiguration != null
80-
&& builder.httpConfiguration.trustAllCertificatesEnabled() != null) {
80+
&& Boolean.TRUE.equals(builder.httpConfiguration.trustAllCertificatesEnabled())) {
8181
log.warn(() -> "SSL Certificate verification is disabled. "
8282
+ "This is not a safe setting and should only be used for testing.");
8383
clientTlsContextOptions.withVerifyPeer(!builder.httpConfiguration.trustAllCertificatesEnabled());

0 commit comments

Comments
 (0)