pkcs1: Support parsing Ed448 public keys
authorTobias Brunner <tobias@strongswan.org>
Mon, 20 Jan 2020 16:53:31 +0000 (17:53 +0100)
committerTobias Brunner <tobias@strongswan.org>
Mon, 10 Feb 2020 12:37:31 +0000 (13:37 +0100)
src/libstrongswan/plugins/pkcs1/pkcs1_builder.c

index c934f0b..3f89726 100644 (file)
@@ -87,6 +87,13 @@ static public_key_t *parse_public_key(chunk_t blob)
                                                                KEY_ED25519, BUILD_BLOB_ASN1_DER, blob, BUILD_END);
                                        goto end;
                                }
+                               else if (oid == OID_ED448)
+                               {
+                                       /* Need the whole subjectPublicKeyInfo for Ed448 public keys */
+                                       key = lib->creds->create(lib->creds, CRED_PUBLIC_KEY,
+                                                               KEY_ED448, BUILD_BLOB_ASN1_DER, blob, BUILD_END);
+                                       goto end;
+                               }
                                else
                                {
                                        /* key type not supported */