]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
OpenSSL: Add Brainpool curves to crypto_ec_key_group()
authorCedric Izoard <cedric.izoard@laposte.net>
Mon, 28 Jun 2021 16:25:23 +0000 (18:25 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 26 Oct 2021 15:07:16 +0000 (18:07 +0300)
Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
src/crypto/crypto_openssl.c

index 471c8bed412c1cda508e236cc23390c8b1563884..3eb492dc1a217694714a3d56f2bd77bf537d8f53 100644 (file)
@@ -2465,7 +2465,21 @@ int crypto_ec_key_group(struct crypto_ec_key *key)
                return 20;
        case NID_secp521r1:
                return 21;
+#ifdef NID_brainpoolP256r1
+       case NID_brainpoolP256r1:
+               return 28;
+#endif /* NID_brainpoolP256r1 */
+#ifdef NID_brainpoolP384r1
+       case NID_brainpoolP384r1:
+               return 29;
+#endif /* NID_brainpoolP384r1 */
+#ifdef NID_brainpoolP512r1
+       case NID_brainpoolP512r1:
+               return 30;
+#endif /* NID_brainpoolP512r1 */
        }
+       wpa_printf(MSG_ERROR, "OpenSSL: Unsupported curve (nid=%d) in EC key",
+                  nid);
        return -1;
 }