Skip to content
New issue

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

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

Already on GitHub? # to your account

Disallow importing public ECDH keys with non-empty usage #433

Merged
merged 1 commit into from
Mar 7, 2023

Conversation

fhanau
Copy link
Collaborator

@fhanau fhanau commented Mar 7, 2023

Addresses the suggestion in #415 – the usage set is actually required to be empty when importing public ECDH keys. Since we currently allow derive* usages and used to allow usages in CryptoKeyUsageSet::publicKeyMask() for public spki and jwk, only log a warning for now. The TODO comment describes how to check for an empty set if this proves to not produce warnings.

Upstream PR is available

@fhanau fhanau requested a review from jasnell March 7, 2023 20:10
@fhanau fhanau merged commit cf0f06c into main Mar 7, 2023
@kentonv kentonv deleted the felix/ecdh-usage-fix branch March 8, 2023 16:03
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants