Skip to content

x509-cert: make (Tbs)CertificateInner fields private #1505

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

Merged
merged 7 commits into from
Sep 8, 2024

Conversation

tarcieri
Copy link
Member

@tarcieri tarcieri commented Sep 6, 2024

This allows them to maintain invariants.

Adds read-only accessor methods in place of public fields.

Closes #1486.

@tarcieri tarcieri requested a review from baloo September 6, 2024 18:24
@tarcieri
Copy link
Member Author

tarcieri commented Sep 6, 2024

Note: this is just a first pass for TbsCertificateInner. I intend to make at least CertificateInner's fields private as well.

@tarcieri tarcieri force-pushed the x509-cert/private-certificate-fields branch from 4509da7 to 8c7db65 Compare September 7, 2024 18:05
@tarcieri tarcieri force-pushed the x509-cert/private-certificate-fields branch from b3a92a7 to 379c28d Compare September 8, 2024 17:53
@tarcieri tarcieri marked this pull request as ready for review September 8, 2024 18:08
@tarcieri tarcieri changed the title [WIP] x509-cert: make fields of certificate structs private x509-cert: make fields of certificate structs private Sep 8, 2024
@tarcieri tarcieri changed the title x509-cert: make fields of certificate structs private x509-cert: make (Tbs)CertificateInner fields private Sep 8, 2024
@tarcieri
Copy link
Member Author

tarcieri commented Sep 8, 2024

There are definitely more types that should be given this treatment, but this seems like a reasonable first pass

@tarcieri tarcieri merged commit 8d99360 into master Sep 8, 2024
53 checks passed
@tarcieri tarcieri deleted the x509-cert/private-certificate-fields branch September 8, 2024 18:16
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.

x509-cert: Only allow Certificates to be constructed via either the builder or deserialization
3 participants