Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: bump cert authorities max size to 20kb #4832

Merged
merged 3 commits into from
Oct 10, 2024
Merged

Conversation

lrstewart
Copy link
Contributor

@lrstewart lrstewart commented Oct 8, 2024

Description of changes:

Bumping the cert authorities limit for a customer.

Call-outs:

The extensions are limited to a size of UINT16_MAX, so about 65K. The cert authorities have to share that size with the other extensions, so this max size leaves about 45K for other extensions. We currently only support the cert authorities extension on the certificate request message, which only also supports the signature algorithms and certificate status extensions, but could support more extensions in the future.

Testing:

Existing tests pass, including the test that verifies we can't load the default AL2012 trust store due to its size:

/* Test: too many CAs in trust store */
if (s2n_cert_authorities_supported_from_trust_store()) {
DEFER_CLEANUP(struct s2n_config *config = s2n_config_new_minimal(), s2n_config_ptr_free);
EXPECT_NOT_NULL(config);
/* This is just a copy of the default trust store from an Amazon Linux instance */
EXPECT_SUCCESS(s2n_config_set_verification_ca_location(config, S2N_TEST_TRUST_STORE, NULL));
EXPECT_FAILURE_WITH_ERRNO(
s2n_config_set_cert_authorities_from_trust_store(config),
S2N_ERR_TOO_MANY_CAS);
EXPECT_EQUAL(config->cert_authorities.size, 0);
};

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@github-actions github-actions bot added the s2n-core team label Oct 8, 2024
@lrstewart lrstewart marked this pull request as ready for review October 9, 2024 00:02
@lrstewart lrstewart enabled auto-merge (squash) October 9, 2024 17:37
@lrstewart lrstewart merged commit e34a559 into aws:main Oct 10, 2024
37 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants