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

Move CA bundle validation into NitroValidator contract #13

Merged
merged 1 commit into from
Jan 11, 2025

Conversation

mdehoog
Copy link
Collaborator

@mdehoog mdehoog commented Jan 11, 2025

The CertManager contract is too big for deployment, due to recent changes from audit.

This PR moves the cabundle loop into the NitroValidator contract, and splits CA and client cert verification into separate methods.

@mdehoog mdehoog merged commit cc45e9c into main Jan 11, 2025
2 checks passed
@mdehoog mdehoog deleted the michael/contract-sizes branch January 11, 2025 02:54
VerifiedCert memory parent;
for (uint256 i = 0; i < cabundle.length; i++) {
bytes32 certHash = keccak256(cabundle[i]);
require(i > 0 || certHash == ROOT_CA_CERT_HASH, "Root CA cert not matching");
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check has been removed. It should be covered by the checks inside the certHash != ROOT_CA_CERT_HASH conditional in _verifyCert

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant