Skip to content

Update CF CookieSigner to use crypto.Signer interface#3325

Open
dw-kihara wants to merge 1 commit intoaws:mainfrom
dw-kihara:cf-cookie-signer-interface
Open

Update CF CookieSigner to use crypto.Signer interface#3325
dw-kihara wants to merge 1 commit intoaws:mainfrom
dw-kihara:cf-cookie-signer-interface

Conversation

@dw-kihara
Copy link
Copy Markdown

Updates CookieSigner to use crypto.Signer in order to support ECDSA keys and other signing methods.

CloudFront supports ECDSA since 2025, but CookieSigner accepts only *rsa.PrivateKey and thus prevents users from using ECDSA in Go. This change makes CookieSigner accept *ecdsa.PrivateKey and other signing methods in addition to *rsa.PrivateKey (which also implements crypto.Signer). Existing *rsa.PrivateKey usage is compatible with this change.

For URLSigner, #2087 has resolved the problem.

@dw-kihara dw-kihara requested a review from a team as a code owner February 14, 2026 06:36
CloudFront CookieSigner uses *rsa.PrivateKey, but CloudFront
supports ECDSA since 2025. To support ECDSA, this commit makes
CookieSigner accept crypto.Signer, including *rsa.PrivateKey
and *ecdsa.PrivateKey.
For CF URLSigner, the same change was done by bedf94c.
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