From: Daniel Kahn Gillmor Date: Thu, 6 May 2021 18:10:46 +0000 (-0400) Subject: algorithms: Explicitly name ECDH_X448_OID and ECDH_X25519_OID X-Git-Tag: 3.7.3~37^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19945cb637c9def9f79fa2edcab4bc63a5084791;p=thirdparty%2Fgnutls.git algorithms: Explicitly name ECDH_X448_OID and ECDH_X25519_OID Signed-off-by: Daniel Kahn Gillmor --- diff --git a/lib/algorithms/ecc.c b/lib/algorithms/ecc.c index 917f83a624..adab4e1c18 100644 --- a/lib/algorithms/ecc.c +++ b/lib/algorithms/ecc.c @@ -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, diff --git a/lib/algorithms/publickey.c b/lib/algorithms/publickey.c index c298a38936..b4cd6b1df0 100644 --- a/lib/algorithms/publickey.c +++ b/lib/algorithms/publickey.c @@ -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 }, diff --git a/lib/x509/common.h b/lib/x509/common.h index 4690d68825..c1df15980f 100644 --- a/lib/x509/common.h +++ b/lib/x509/common.h @@ -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"