Skip to content

PKCS#8 private keys with [0] attributes fail to decode (ASN_PARSE_E) #11670

Description

@MarkAtwood

DecodeAsymKey_Assign rejects any RFC 5958 OneAsymmetricKey that carries the optional attributes [0] field, in both the template and original ASN paths. The RFC 8410 section 10.3 example Ed25519 key fails with ASN_PARSE_E, and so does a v1 key that has only attributes.

Repro: decode the RFC 8410 section 10.3 key with wc_Ed25519PrivateKeyDecode. Expected: success, public key 19bf44...66e1. Actual: ASN_PARSE_E.

Found while fixing #10019. Fix: skip [0] attributes when decoding (wolfSSL doesn't need their contents). A PR will follow once #10019 lands.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions