File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
http-clients/aws-crt-client/src/main/java/software/amazon/awssdk/http/crt/internal Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 2424import software .amazon .awssdk .http .SdkHttpConfigurationOption ;
2525import software .amazon .awssdk .http .crt .TcpKeepAliveConfiguration ;
2626import software .amazon .awssdk .utils .AttributeMap ;
27+ import software .amazon .awssdk .utils .Logger ;
2728import software .amazon .awssdk .utils .NumericUtils ;
2829
2930@ SdkInternalApi
3031public final class AwsCrtConfigurationUtils {
32+ private static final Logger log = Logger .loggerFor (AwsCrtConfigurationUtils .class );
3133
3234 private AwsCrtConfigurationUtils () {
3335 }
@@ -57,9 +59,12 @@ public static SocketOptions buildSocketOptions(TcpKeepAliveConfiguration tcpKeep
5759 public static TlsCipherPreference resolveCipherPreference (Boolean postQuantumTlsEnabled ) {
5860 // As of v0.39.3, aws-crt-java prefers PQ by default, so only return the non-PQ-default policy
5961 // below if the caller explicitly disables PQ by passing in false.
60- if (Boolean .FALSE .equals (postQuantumTlsEnabled )
61- && TlsCipherPreference .TLS_CIPHER_NON_PQ_DEFAULT .isSupported ()) {
62- return TlsCipherPreference .TLS_CIPHER_NON_PQ_DEFAULT ;
62+ if (Boolean .FALSE .equals (postQuantumTlsEnabled )) {
63+ if (TlsCipherPreference .TLS_CIPHER_NON_PQ_DEFAULT .isSupported ()) {
64+ return TlsCipherPreference .TLS_CIPHER_NON_PQ_DEFAULT ;
65+ }
66+ log .warn (() -> "Post-quantum TLS was explicitly disabled but TLS_CIPHER_NON_PQ_DEFAULT is not supported. "
67+ + "Falling back to TLS_CIPHER_SYSTEM_DEFAULT." );
6368 }
6469 return TlsCipherPreference .TLS_CIPHER_SYSTEM_DEFAULT ;
6570 }
You can’t perform that action at this time.
0 commit comments