Skip to content

Commit 25faa8d

Browse files
authored
Support s2n security policy for TLS 1.2 and FIPS (#739)
1 parent ee7925a commit 25faa8d

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

include/aws/io/tls_channel_handler.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ enum aws_tls_cipher_pref {
4646
/* Recommended default policy with post-quantum algorithm support. This policy may change over time. */
4747
AWS_IO_TLS_CIPHER_PREF_PQ_DEFAULT = 8,
4848

49+
/* This security policy is based on AWS-CRT-SDK-TLSv1.2-2023 (the default when a minimum TLS version is TLS 1.2),
50+
* with tightened security. This security policy is FIPS-complaint.
51+
*/
52+
AWS_IO_TLS_CIPHER_PREF_TLSV1_2_2025_07 = 9,
53+
4954
AWS_IO_TLS_CIPHER_PREF_END_RANGE = 0xFFFF
5055
};
5156

source/s2n/s2n_tls_channel_handler.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,8 @@ bool aws_tls_is_cipher_pref_supported(enum aws_tls_cipher_pref cipher_pref) {
274274
return true;
275275
#endif
276276

277+
case AWS_IO_TLS_CIPHER_PREF_TLSV1_2_2025_07:
278+
return true;
277279
default:
278280
return false;
279281
}
@@ -1542,13 +1544,24 @@ static struct aws_tls_ctx *s_tls_ctx_new(
15421544
case AWS_IO_TLS_CIPHER_PREF_PQ_TLSV1_2_2024_10:
15431545
security_policy = "AWS-CRT-SDK-TLSv1.2-2023-PQ";
15441546
break;
1547+
case AWS_IO_TLS_CIPHER_PREF_TLSV1_2_2025_07:
1548+
security_policy = "AWS-CRT-SDK-TLSv1.2-2025";
1549+
break;
15451550
default:
15461551
AWS_LOGF_ERROR(AWS_LS_IO_TLS, "Unrecognized TLS Cipher Preference: %d", options->cipher_pref);
15471552
aws_raise_error(AWS_IO_TLS_CIPHER_PREF_UNSUPPORTED);
15481553
goto cleanup_s2n_config;
15491554
}
15501555

15511556
AWS_ASSERT(security_policy != NULL);
1557+
1558+
AWS_LOGF_DEBUG(
1559+
AWS_LS_IO_TLS,
1560+
"Set security policy to %s (minimum_tls_version: %d; cipher_pref: %d)",
1561+
security_policy,
1562+
(int)options->minimum_tls_version,
1563+
(int)options->cipher_pref);
1564+
15521565
if (s2n_config_set_cipher_preferences(s2n_ctx->s2n_config, security_policy)) {
15531566
AWS_LOGF_ERROR(
15541567
AWS_LS_IO_TLS,

0 commit comments

Comments
 (0)