-
Notifications
You must be signed in to change notification settings - Fork 41.9k
PrivateKeyParser doesn't support ed448, XDH and RSA-PSS keys #37237
Copy link
Copy link
Closed
Description
Here's such a ed448 key:
-----BEGIN PRIVATE KEY-----
MEcCAQAwBQYDK2VxBDsEOSSF8O0uKk5pRrjUNV+QgonwO+WeDRb/i1U7vM+TLzh7
jAV58E6oglA53konKxGv+GC38dCb72gSeQ==
-----END PRIVATE KEY-----
(it has been generated with openssl genpkey -algorithm ed448 -out ed448.key and then converted to PKCS#8 with openssl pkcs8 -topk8 -in ed448.key -nocrypt -out ed448_2.key).
I guess the only change needed is to include Ed448 in these lines:
parsers.add(new PemParser(PKCS8_HEADER, PKCS8_FOOTER, PemPrivateKeyParser::createKeySpecForPkcs8, "RSA", "EC", "DSA", "Ed25519"));
parsers.add(new PemParser(PKCS8_ENCRYPTED_HEADER, PKCS8_ENCRYPTED_FOOTER, PemPrivateKeyParser::createKeySpecForPkcs8Encrypted, "RSA", "EC", "DSA", "Ed25519"));
and add tests for it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type: bugA general bugA general bug