Skip to content

pkcs8: fix PEM decoding of keys with attributes or extensions - #2558

Merged
tarcieri merged 1 commit into
masterfrom
pkcs8/fix-pem-decoding
Nov 20, 2026
Merged

tarcieri merged 1 commit into
masterfrom
pkcs8/fix-pem-decoding

Conversation

@tarcieri

Copy link
Copy Markdown
Member

Use Reader::drain for fields that PrivateKeyInfo discards.

Borrowing their contents as SequenceRef or AnyRef caused PrivateKeyInfoOwned::from_pem to fail on valid keys.

Closes #2556

Use `Reader::drain` for fields that `PrivateKeyInfo` discards.

Borrowing their contents as `&SequenceRef` or `AnyRef` caused
`PrivateKeyInfoOwned::from_pem` to fail on valid keys.

Closes #2556
@tarcieri
tarcieri merged commit 31bf851 into master Nov 20, 2026
11 checks passed
@tarcieri
tarcieri deleted the pkcs8/fix-pem-decoding branch November 20, 2026 17:25
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.

der: DecodePem::from_pem fails with ErrorKind::Reader on types that decode borrowed values

1 participant