From b08d02df85ebd358af442c36a86589b3ba131d58 Mon Sep 17 00:00:00 2001 From: René Korthaus Date: Thu, 3 Nov 2016 19:15:12 +0100 Subject: Add an in-house EC curve for TLS at compile-time One additional, application-specific curve can be added at compile time, using the new configure.py --house-curve=curve.pem,funky311,1.2.3.4,FEFF. --- src/lib/tls/tls_extensions.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/lib/tls') diff --git a/src/lib/tls/tls_extensions.cpp b/src/lib/tls/tls_extensions.cpp index a2db1faaf..f8eef5ac6 100644 --- a/src/lib/tls/tls_extensions.cpp +++ b/src/lib/tls/tls_extensions.cpp @@ -299,6 +299,11 @@ std::string Supported_Elliptic_Curves::curve_id_to_name(u16bit id) return "x25519"; #endif +#if defined(BOTAN_HOUSE_ECC_CURVE_NAME) + case BOTAN_HOUSE_ECC_CURVE_TLS_ID: + return BOTAN_HOUSE_ECC_CURVE_NAME; +#endif + default: return ""; // something we don't know or support } @@ -324,6 +329,11 @@ u16bit Supported_Elliptic_Curves::name_to_curve_id(const std::string& name) return 29; #endif +#if defined(BOTAN_HOUSE_ECC_CURVE_NAME) + if(name == BOTAN_HOUSE_ECC_CURVE_NAME) + return BOTAN_HOUSE_ECC_CURVE_TLS_ID; +#endif + // Unknown/unavailable EC curves are ignored return 0; } -- cgit v1.2.3