]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
algorithms: Explicitly name ECDH_X448_OID and ECDH_X25519_OID
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Thu, 6 May 2021 18:10:46 +0000 (14:10 -0400)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Fri, 17 Sep 2021 20:33:07 +0000 (16:33 -0400)
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
lib/algorithms/ecc.c
lib/algorithms/publickey.c
lib/x509/common.h

index 917f83a62424e383b876c7414ed738af683d73d7..adab4e1c185d3c60883da927d271b2c3e87012aa 100644 (file)
@@ -81,6 +81,7 @@ gnutls_ecc_curve_entry_st ecc_curves[] = {
        },
        {
         .name = "X25519",
+         .oid = ECDH_X25519_OID,
         .id = GNUTLS_ECC_CURVE_X25519,
         .group = GNUTLS_GROUP_X25519,
         .pk = GNUTLS_PK_ECDH_X25519,
@@ -98,6 +99,7 @@ gnutls_ecc_curve_entry_st ecc_curves[] = {
        },
        {
         .name = "X448",
+         .oid = ECDH_X448_OID,
         .id = GNUTLS_ECC_CURVE_X448,
         .pk = GNUTLS_PK_ECDH_X448,
         .size = 56,
index c298a38936227d6f638a7d1cd4d832dc9196b53f..b4cd6b1df0b3d8886ac413f3dffeeedb88e99f66 100644 (file)
@@ -146,9 +146,9 @@ static const gnutls_pk_entry pk_algorithms[] = {
          .curve = GNUTLS_ECC_CURVE_ED448, .no_prehashed = 1 },
        { .name = "DH", .oid = NULL, .id = GNUTLS_PK_DH,
           .curve = GNUTLS_ECC_CURVE_INVALID },
-       { .name = "ECDH (X25519)", .oid = "1.3.101.110", .id = GNUTLS_PK_ECDH_X25519,
+       { .name = "ECDH (X25519)", .oid = ECDH_X25519_OID, .id = GNUTLS_PK_ECDH_X25519,
          .curve = GNUTLS_ECC_CURVE_X25519 },
-       { .name = "ECDH (X448)", .oid = "1.3.101.111", .id = GNUTLS_PK_ECDH_X448,
+       { .name = "ECDH (X448)", .oid = ECDH_X448_OID, .id = GNUTLS_PK_ECDH_X448,
          .curve = GNUTLS_ECC_CURVE_X448 },
        { .name = "UNKNOWN", .oid = NULL, .id = GNUTLS_PK_UNKNOWN, 
          .curve = GNUTLS_ECC_CURVE_INVALID },
index 4690d68825faaa7446794eca4a7f530c155b97e6..c1df15980f3deb23b2811ef7ec2a658183630fae 100644 (file)
@@ -97,6 +97,9 @@
 #define SIG_RSA_SHA3_384_OID "2.16.840.1.101.3.4.3.15"
 #define SIG_RSA_SHA3_512_OID "2.16.840.1.101.3.4.3.16"
 
+#define ECDH_X25519_OID "1.3.101.110"
+#define ECDH_X448_OID "1.3.101.111"
+
 #define SIG_EDDSA_SHA512_OID "1.3.101.112"
 #define SIG_ED448_OID "1.3.101.113"