Skip to content
Open
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
9e98f93
added new security policy w/ new cipher_suites
johubertj Apr 22, 2025
3bcb8ed
send cipher
johubertj Apr 23, 2025
20acf67
Merge branch 'main' into feat/update-fibs-policy
johubertj Apr 25, 2025
c9ebd7b
Merge branch 'main' into feat/update-fibs-policy
johubertj May 7, 2025
1cc0d77
added new default fibs to header file
johubertj May 7, 2025
e8b745d
moved comment to new security policy
johubertj May 7, 2025
7e92b5e
updated unit tests
johubertj May 7, 2025
6b7c90d
fixed security policy bug
johubertj May 7, 2025
24256b1
revert back unit tests
johubertj May 7, 2025
f6817d5
removed space
johubertj May 7, 2025
8d6400a
default_fips now supports tls13 as well
johubertj May 7, 2025
b39e63e
tls1.3 is now supported by default
johubertj May 7, 2025
8291982
fixed comment
johubertj May 7, 2025
849210b
we shouldn't disable tls13
johubertj May 7, 2025
f4137e3
tls 13 used by default
johubertj May 7, 2025
1cb25b7
tls13 is enabled by default
johubertj May 7, 2025
76a66fd
protocol version and s2n tls13
johubertj May 7, 2025
cdbb99f
revert back to default and just turn on tls13 in test
johubertj May 7, 2025
477921a
Merge branch 'main' into feat/update-fibs-policy
johubertj May 7, 2025
6d355a6
should be true used to be false
johubertj May 7, 2025
3bf09c7
updated comment
johubertj May 7, 2025
8da17b9
test that tls13 enabled by default
johubertj May 8, 2025
684d131
revert back to original test case
johubertj May 8, 2025
cace6ca
fixed spacing
johubertj May 8, 2025
2f2504b
print statements testing
johubertj May 9, 2025
4bd4301
Added unit test logic for different s2n builds
johubertj May 9, 2025
652ec61
changed to fips mode
johubertj May 12, 2025
5854fcf
tls 13 disabled for false case
johubertj May 12, 2025
0e65668
Merge branch 'main' into feat/update-fibs-policy
johubertj May 12, 2025
3e7b1e1
Merge branch 'main' into feat/update-fibs-policy
johubertj May 13, 2025
0b6bee3
restore default fips
johubertj May 13, 2025
43661ce
restore
johubertj May 13, 2025
0739a55
updated documentation
johubertj May 13, 2025
e8af4a0
based off 20240502
johubertj May 14, 2025
0af658f
removed from default
johubertj May 14, 2025
69032f8
add new security policy for testing
johubertj May 14, 2025
2c44a0d
added to list of all security policies
johubertj May 14, 2025
799d6fc
Merge branch 'main' into feat/update-fibs-policy
johubertj May 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/unit/s2n_security_policies_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,6 @@ int main(int argc, char **argv)
{
char tls12_only_security_policy_strings[][255] = {
"default",
"default_fips",
"ELBSecurityPolicy-TLS-1-0-2015-04",
"ELBSecurityPolicy-TLS-1-0-2015-05",
"ELBSecurityPolicy-2016-08",
Expand Down Expand Up @@ -908,6 +907,7 @@ int main(int argc, char **argv)
const struct s2n_security_policy *versioned_policies[] = {
&security_policy_20240416,
&security_policy_20240502,
&security_policy_20250416,
};

const struct s2n_supported_cert supported_certs[] = {
Expand Down
21 changes: 10 additions & 11 deletions tests/unit/s2n_tls13_support_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,37 +28,36 @@
int main(int argc, char **argv)
{
BEGIN_TEST();
EXPECT_SUCCESS(s2n_disable_tls13_in_test());

/* TLS 1.3 is not used by default */
EXPECT_FALSE(s2n_use_default_tls13_config());
EXPECT_SUCCESS(s2n_enable_tls13_in_test());
/* TLS 1.3 is used by default */
EXPECT_TRUE(s2n_use_default_tls13_config());

/* TLS1.3 is not supported or configured by default */
/* TLS1.3 is supported by default */
{
/* Client does not support or configure TLS 1.3 */
/* Client does support or configure TLS 1.3 */
{
struct s2n_connection *conn = NULL;
EXPECT_NOT_NULL(conn = s2n_connection_new(S2N_CLIENT));

EXPECT_NOT_EQUAL(conn->client_protocol_version, S2N_TLS13);
EXPECT_EQUAL(conn->client_protocol_version, S2N_TLS13);

const struct s2n_security_policy *security_policy = NULL;
EXPECT_SUCCESS(s2n_connection_get_security_policy(conn, &security_policy));
EXPECT_FALSE(s2n_security_policy_supports_tls13(security_policy));
EXPECT_TRUE(s2n_security_policy_supports_tls13(security_policy));

EXPECT_SUCCESS(s2n_connection_free(conn));
};

/* Server does not support or configure TLS 1.3 */
/* Server does support or configure TLS 1.3 */
{
struct s2n_connection *conn = NULL;
EXPECT_NOT_NULL(conn = s2n_connection_new(S2N_SERVER));

EXPECT_NOT_EQUAL(conn->server_protocol_version, S2N_TLS13);
EXPECT_EQUAL(conn->server_protocol_version, S2N_TLS13);

const struct s2n_security_policy *security_policy = NULL;
EXPECT_SUCCESS(s2n_connection_get_security_policy(conn, &security_policy));
EXPECT_FALSE(s2n_security_policy_supports_tls13(security_policy));
EXPECT_TRUE(s2n_security_policy_supports_tls13(security_policy));

EXPECT_SUCCESS(s2n_connection_free(conn));
};
Expand Down
26 changes: 26 additions & 0 deletions tls/s2n_cipher_preferences.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,32 @@ const struct s2n_cipher_preferences cipher_preferences_20240331 = {
.allow_chacha20_boosting = false,
};

/*
* TLS1.3 support.
* FIPS compliant.
* No DHE (would require extra setup with s2n_config_add_dhparams)
* No CBC ciphers
*/
struct s2n_cipher_suite *cipher_suites_20250422[] = {
/* TLS1.2 with ECDSA */
&s2n_ecdhe_ecdsa_with_aes_128_gcm_sha256,
&s2n_ecdhe_ecdsa_with_aes_256_gcm_sha384,

/* TLS1.2 with RSA */
&s2n_ecdhe_rsa_with_aes_128_gcm_sha256,
&s2n_ecdhe_rsa_with_aes_256_gcm_sha384,

/* TLS1.3 */
&s2n_tls13_aes_128_gcm_sha256,
&s2n_tls13_aes_256_gcm_sha384,
};

const struct s2n_cipher_preferences cipher_preferences_20250422 = {
.count = s2n_array_len(cipher_suites_20250422),
.suites = cipher_suites_20250422,
.allow_chacha20_boosting = false,
};

/* Same as 20160411, but with ChaCha20 added as 1st in Preference List */
struct s2n_cipher_suite *cipher_suites_20190122[] = {
&s2n_ecdhe_rsa_with_chacha20_poly1305_sha256,
Expand Down
1 change: 1 addition & 0 deletions tls/s2n_cipher_preferences.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ struct s2n_cipher_preferences {

extern const struct s2n_cipher_preferences cipher_preferences_20230317;
extern const struct s2n_cipher_preferences cipher_preferences_20240331;
extern const struct s2n_cipher_preferences cipher_preferences_20250422;
extern const struct s2n_cipher_preferences cipher_preferences_20140601;
extern const struct s2n_cipher_preferences cipher_preferences_20141001;
extern const struct s2n_cipher_preferences cipher_preferences_20150202;
Expand Down
17 changes: 15 additions & 2 deletions tls/s2n_security_policies.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ const struct s2n_security_policy security_policy_20240501 = {
},
};

/* FIPS default as of 05/24 */
const struct s2n_security_policy security_policy_20240502 = {
.minimum_protocol_version = S2N_TLS12,
.cipher_preferences = &cipher_preferences_20240331,
Expand All @@ -46,6 +45,20 @@ const struct s2n_security_policy security_policy_20240502 = {
},
};

/* FIPS default as of 05/25 */
const struct s2n_security_policy security_policy_20250416 = {
.minimum_protocol_version = S2N_TLS12,
.cipher_preferences = &cipher_preferences_20250422,
.kem_preferences = &kem_preferences_null,
.signature_preferences = &s2n_signature_preferences_20240501,
.certificate_signature_preferences = &s2n_certificate_signature_preferences_20201110,
.ecc_preferences = &s2n_ecc_preferences_20201021,
.rules = {
[S2N_PERFECT_FORWARD_SECRECY] = true,
[S2N_FIPS_140_3] = true,
},
};

/* TLS1.3 default as of 05/24 */
const struct s2n_security_policy security_policy_20240503 = {
.minimum_protocol_version = S2N_TLS12,
Expand Down Expand Up @@ -1244,7 +1257,7 @@ const struct s2n_security_policy security_policy_null = {
struct s2n_security_policy_selection security_policy_selection[] = {
{ .version = "default", .security_policy = &security_policy_20240501, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
{ .version = "default_tls13", .security_policy = &security_policy_20240503, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
{ .version = "default_fips", .security_policy = &security_policy_20240502, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
{ .version = "default_fips", .security_policy = &security_policy_20250416, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
{ .version = "default_pq", .security_policy = &security_policy_20241001, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
{ .version = "20241106", .security_policy = &security_policy_20241106, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
{ .version = "20240501", .security_policy = &security_policy_20240501, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
Expand Down
3 changes: 2 additions & 1 deletion tls/s2n_security_policies.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ extern struct s2n_security_policy_selection security_policy_selection[];
extern const char *deprecated_security_policies[];
extern const size_t deprecated_security_policies_len;

/* Defaults as of 05/24 */
/* Defaults as of 05/25 */
extern const struct s2n_security_policy security_policy_20250416;
extern const struct s2n_security_policy security_policy_20240501;
extern const struct s2n_security_policy security_policy_20240502;
extern const struct s2n_security_policy security_policy_20240503;
Expand Down
Loading