aboutsummaryrefslogtreecommitdiff
path: root/src/config
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2024-01-30 18:00:31 +0000
committerMichael Brown <mcb30@ipxe.org>2024-01-30 18:01:44 +0000
commita881a26061a75bbca68a709eb40b396c4ef5656b (patch)
treeea404b74b3e4b6d8212802e78b6529deba3c94f7 /src/config
parentb234226dbc4f348c7e4a5c61bdf7b0f8f0aef16c (diff)
downloadipxe-a881a26061a75bbca68a709eb40b396c4ef5656b.zip
ipxe-a881a26061a75bbca68a709eb40b396c4ef5656b.tar.gz
ipxe-a881a26061a75bbca68a709eb40b396c4ef5656b.tar.bz2
[crypto] Add X25519 OID-identified algorithm and TLS named curve
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/config')
-rw-r--r--src/config/config_crypto.c5
-rw-r--r--src/config/crypto.h3
2 files changed, 8 insertions, 0 deletions
diff --git a/src/config/config_crypto.c b/src/config/config_crypto.c
index fa1996a..72b7092 100644
--- a/src/config/config_crypto.c
+++ b/src/config/config_crypto.c
@@ -83,6 +83,11 @@ REQUIRE_OBJECT ( oid_sha512_224 );
REQUIRE_OBJECT ( oid_sha512_256 );
#endif
+/* X25519 */
+#if defined ( CRYPTO_CURVE_X25519 )
+REQUIRE_OBJECT ( oid_x25519 );
+#endif
+
/* RSA and MD5 */
#if defined ( CRYPTO_PUBKEY_RSA ) && defined ( CRYPTO_DIGEST_MD5 )
REQUIRE_OBJECT ( rsa_md5 );
diff --git a/src/config/crypto.h b/src/config/crypto.h
index 76bf14d..637a06c 100644
--- a/src/config/crypto.h
+++ b/src/config/crypto.h
@@ -48,6 +48,9 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
/** SHA-512/256 digest algorithm */
//#define CRYPTO_DIGEST_SHA512_256
+/** X25519 elliptic curve */
+#define CRYPTO_CURVE_X25519
+
/** Margin of error (in seconds) allowed in signed timestamps
*
* We default to allowing a reasonable margin of error: 12 hours to