Skip to content

[1.16] Fix Ed key parsing - #156

Merged
JoshVanL merged 1 commit into
dapr:release-0.16from
JoshVanL:fix-ed-key-parsing-1.16
May 25, 2026
Merged

JoshVanL merged 1 commit into
dapr:release-0.16from
JoshVanL:fix-ed-key-parsing-1.16

Conversation

@JoshVanL

@JoshVanL JoshVanL commented May 7, 2026

Copy link
Copy Markdown
Member

No description provided.

Signed-off-by: joshvanl <me@joshvanl.dev>
Copilot AI review requested due to automatic review settings May 7, 2026 17:57
@JoshVanL
JoshVanL requested review from a team as code owners May 7, 2026 17:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes private key PEM encoding support for Ed25519 keys by accepting the correct Ed25519 private key type, and expands support to include RSA private keys when encoding to PKCS#8 PEM.

Changes:

  • Update EncodePrivateKey to accept ed25519.PrivateKey (non-pointer) and *rsa.PrivateKey for PKCS#8 PEM encoding.
  • Add unit tests validating roundtrip encode/decode for ECDSA, RSA, and Ed25519 keys, plus an unsupported-type error case.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
crypto/pem/pem.go Adjusts supported key types for PKCS#8 PEM encoding (fixes Ed25519 handling; adds RSA).
crypto/pem/pem_test.go Adds coverage for encoding and decoding ECDSA/RSA/Ed25519 keys and unsupported input.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@JoshVanL
JoshVanL merged commit 5eaa5f5 into dapr:release-0.16 May 25, 2026
9 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.

3 participants