Skip to content

Fix a confusing type parameter for generating signatures. #32

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 2 commits into from
Jun 14, 2025

Conversation

AkshatM
Copy link
Contributor

@AkshatM AkshatM commented Jun 14, 2025

The generate_signature_headers_content method's signing_key
argument references PublicKey as its type. That's semantically wrong -
a signing key must be a private key. In this case, PublicKey is a type
alias for Vec<u8>, which is why it works - but there's no reason for
us to confuse the public. I have removed the PublicKey and replaced it
directly with Vec<u8>, and bumped Cargo accordingly per semver.

AkshatM and others added 2 commits June 13, 2025 22:53
The `generate_signature_headers_content` method's `signing_key`
argument references `PublicKey` as its type. That's semantically wrong -
a signing key must be a private key. In this case, `PublicKey` is a type
alias for `Vec<u8>`, which is why it works - but there's no reason for
us to confuse the public. I have removed the `PublicKey` and replaced it
directly with `Vec<u8>`, and bumped Cargo accordingly per semver.
@AkshatM AkshatM merged commit 09fa8b3 into cloudflare:main Jun 14, 2025
2 checks passed
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