aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/tls
diff options
context:
space:
mode:
authorRenĂ© Korthaus <[email protected]>2016-11-03 19:15:12 +0100
committerRenĂ© Korthaus <[email protected]>2016-11-03 20:46:42 +0100
commitb08d02df85ebd358af442c36a86589b3ba131d58 (patch)
tree10b83d5f82ab802e231b1e24d4a00a74a77af831 /src/lib/tls
parentf61363dea7be957e07c13aa6a4d7da7e1f57d914 (diff)
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.
Diffstat (limited to 'src/lib/tls')
-rw-r--r--src/lib/tls/tls_extensions.cpp10
1 files changed, 10 insertions, 0 deletions
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;
}