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

Fail revoke() calls for old (deserialized) accounts that don't have a URL for it #45

Merged
merged 3 commits into from
Feb 5, 2024

Conversation

djc
Copy link
Owner

@djc djc commented Feb 5, 2024

No description provided.

@djc djc requested a review from cycraig February 5, 2024 13:53
Comment on lines -353 to +361
pub(crate) revoke_cert: String,
// The fields below were added later and old `AccountCredentials` may not have it.
// Newer deserialized account credentials grab a fresh set of `DirectoryUrls` on
// deserialization, so they should be fine. Newer fields should be optional, too.
pub(crate) new_authz: Option<String>,
pub(crate) revoke_cert: Option<String>,
pub(crate) key_change: Option<String>,
Copy link

@cycraig cycraig Feb 5, 2024

Choose a reason for hiding this comment

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

You may want to update the deserialize_old_credentials (add these fields?), and maybe deserialize_new_credentials unit tests accordingly.

Copy link
Owner Author

Choose a reason for hiding this comment

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

I actually don't want to update old_credentials, because that reflects the old usage that I'm trying to still support to the extent possible. From that perspective new_credentials is testing the "new old" behavior, so probably also want to keep it as is. Can't think of another one for which adding it would have much value?

Comment on lines +356 to +361
// The fields below were added later and old `AccountCredentials` may not have it.
// Newer deserialized account credentials grab a fresh set of `DirectoryUrls` on
// deserialization, so they should be fine. Newer fields should be optional, too.
pub(crate) new_authz: Option<String>,
pub(crate) revoke_cert: Option<String>,
pub(crate) key_change: Option<String>,
Copy link

Choose a reason for hiding this comment

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

I'm also seeing renewalInfo and meta fields at https://acme-staging-v02.api.letsencrypt.org/directory, do those matter?

Copy link
Owner Author

Choose a reason for hiding this comment

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

I think meta doesn't matter for this library's purpose for now. renewalInfo is still in draft apparently so I'd prefer to avoid it for now.

@djc djc merged commit eac4f43 into 0.4.x Feb 5, 2024
7 checks passed
@djc djc deleted the revoke-compatibility branch February 5, 2024 14:46
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.

2 participants