diff options
author | René Korthaus <[email protected]> | 2016-11-03 19:15:12 +0100 |
---|---|---|
committer | René Korthaus <[email protected]> | 2016-11-03 20:46:42 +0100 |
commit | b08d02df85ebd358af442c36a86589b3ba131d58 (patch) | |
tree | 10b83d5f82ab802e231b1e24d4a00a74a77af831 /src/lib/asn1/oids.cpp | |
parent | f61363dea7be957e07c13aa6a4d7da7e1f57d914 (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/asn1/oids.cpp')
-rw-r--r-- | src/lib/asn1/oids.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/asn1/oids.cpp b/src/lib/asn1/oids.cpp index a9651187c..1ad2d06f1 100644 --- a/src/lib/asn1/oids.cpp +++ b/src/lib/asn1/oids.cpp @@ -171,6 +171,11 @@ std::string lookup(const OID& oid) if(oid_str == "2.5.4.7") return "X520.Locality"; if(oid_str == "2.5.4.8") return "X520.State"; if(oid_str == "2.5.8.1.1") return "RSA"; + +#if defined(BOTAN_HOUSE_ECC_CURVE_NAME) + if(oid_str == BOTAN_HOUSE_ECC_CURVE_OID) return BOTAN_HOUSE_ECC_CURVE_NAME; +#endif + return std::string(); } @@ -329,6 +334,11 @@ OID lookup(const std::string& name) if(name == "x962_p239v1") return OID("1.2.840.10045.3.1.4"); if(name == "x962_p239v2") return OID("1.2.840.10045.3.1.5"); if(name == "x962_p239v3") return OID("1.2.840.10045.3.1.6"); + +#if defined(BOTAN_HOUSE_ECC_CURVE_NAME) + if(name == BOTAN_HOUSE_ECC_CURVE_NAME) return OID(BOTAN_HOUSE_ECC_CURVE_OID); +#endif + return OID(); } |