aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-02-08 07:34:10 -0500
committerJack Lloyd <[email protected]>2018-02-13 07:48:56 -0500
commit2a9e0a9cd5aacdb74cb12e0faaa9f8f5342549c7 (patch)
tree6c20361c4febfc82fd5c14ada03aff41e1d57d48
parentaf6b860d327e523503da694a7dca9316b6501e34 (diff)
Remove house curve support
-rwxr-xr-xconfigure.py35
-rw-r--r--src/build-data/buildh.in4
-rw-r--r--src/lib/asn1/oids.cpp10
-rw-r--r--src/lib/pubkey/ec_group/ec_named.cpp3
-rw-r--r--src/lib/tls/tls_algos.cpp5
-rw-r--r--src/lib/tls/tls_algos.h4
-rwxr-xr-xsrc/scripts/oids.py8
7 files changed, 0 insertions, 69 deletions
diff --git a/configure.py b/configure.py
index eb3740345..4555e0818 100755
--- a/configure.py
+++ b/configure.py
@@ -534,11 +534,6 @@ def process_command_line(args): # pylint: disable=too-many-locals
install_group.add_option('--includedir', metavar='DIR',
help='set the include file install dir')
- misc_group = optparse.OptionGroup(parser, 'Miscellaneous options')
-
- misc_group.add_option('--house-curve', metavar='STRING', dest='house_curve',
- help='a custom in-house curve of the format: curve.pem,NAME,OID,CURVEID')
-
info_group = optparse.OptionGroup(parser, 'Informational')
info_group.add_option('--list-modules', dest='list_modules',
@@ -554,7 +549,6 @@ def process_command_line(args): # pylint: disable=too-many-locals
parser.add_option_group(docs_group)
parser.add_option_group(mods_group)
parser.add_option_group(install_group)
- parser.add_option_group(misc_group)
parser.add_option_group(info_group)
# These exist only for autoconf compatibility (requested by zw for mtn)
@@ -1636,34 +1630,6 @@ def generate_build_info(build_paths, modules, cc, arch, osinfo):
return out
-def house_ecc_curve_macros(house_curve):
- def _read_pem(filepath):
- try:
- with open(filepath) as f:
- lines = [line.rstrip() for line in f]
- except IOError:
- raise UserError("Error reading file '%s'" % filepath)
-
- for ndx, _ in enumerate(lines):
- lines[ndx] = ' \"%s\"' % lines[ndx]
- return "\\\n" + ' \\\n'.join(lines)
-
- if house_curve is None:
- return []
- else:
- p = house_curve.split(",")
- if len(p) != 4:
- raise UserError('--house-curve must have 4 comma separated parameters. See --help')
- # make sure TLS curve id is in reserved for private use range (0xFE00..0xFEFF)
- curve_id = int(p[3], 16)
- if curve_id < 0xfe00 or curve_id > 0xfeff:
- raise UserError('TLS curve ID not in reserved range (see RFC 4492)')
-
- return ['NAME \"' + p[1] + '\"',
- 'OID \"' + p[2] + '\"',
- 'PEM ' + _read_pem(filepath=p[0]),
- 'TLS_ID ' + hex(curve_id)]
-
def create_template_vars(source_paths, build_paths, options, modules, cc, arch, osinfo):
#pylint: disable=too-many-locals,too-many-branches,too-many-statements
@@ -1885,7 +1851,6 @@ def create_template_vars(source_paths, build_paths, options, modules, cc, arch,
'os_features': osinfo.enabled_features(options),
'os_name': osinfo.basename,
'cpu_features': arch.supported_isa_extensions(cc, options),
- 'house_ecc_curve_defines': house_ecc_curve_macros(options.house_curve),
'fuzzer_mode': options.unsafe_fuzzer_mode,
'fuzzer_type': options.build_fuzzers.upper() if options.build_fuzzers else '',
diff --git a/src/build-data/buildh.in b/src/build-data/buildh.in
index 9333cfb8a..8ddf85b2b 100644
--- a/src/build-data/buildh.in
+++ b/src/build-data/buildh.in
@@ -87,10 +87,6 @@
*/
%{local_config}
-%{for house_ecc_curve_defines}
-#define BOTAN_HOUSE_ECC_CURVE_%{i}
-%{endfor}
-
/*
* Things you can edit (but probably shouldn't)
*/
diff --git a/src/lib/asn1/oids.cpp b/src/lib/asn1/oids.cpp
index b9ba1f858..59ce08b35 100644
--- a/src/lib/asn1/oids.cpp
+++ b/src/lib/asn1/oids.cpp
@@ -44,11 +44,6 @@ class OID_Map
{
const std::string oid_str = oid.as_string();
-#if defined(BOTAN_HOUSE_ECC_CURVE_NAME)
- if(oid_str == BOTAN_HOUSE_ECC_CURVE_OID)
- return BOTAN_HOUSE_ECC_CURVE_NAME;
-#endif
-
lock_guard_type<mutex_type> lock(m_mutex);
auto i = m_oid2str.find(oid_str);
@@ -60,11 +55,6 @@ class OID_Map
OID lookup(const std::string& str)
{
-#if defined(BOTAN_HOUSE_ECC_CURVE_NAME)
- if(str == BOTAN_HOUSE_ECC_CURVE_NAME)
- return OID(BOTAN_HOUSE_ECC_CURVE_OID);
-#endif
-
lock_guard_type<mutex_type> lock(m_mutex);
auto i = m_str2oid.find(str);
if(i != m_str2oid.end())
diff --git a/src/lib/pubkey/ec_group/ec_named.cpp b/src/lib/pubkey/ec_group/ec_named.cpp
index cfab1fafd..ba91b5eaa 100644
--- a/src/lib/pubkey/ec_group/ec_named.cpp
+++ b/src/lib/pubkey/ec_group/ec_named.cpp
@@ -283,9 +283,6 @@ const std::set<std::string>& EC_Group::known_named_groups()
"gost_256A",
"frp256v1",
"sm2p256v1"
-#if defined(BOTAN_HOUSE_ECC_CURVE_NAME)
- ,BOTAN_HOUSE_ECC_CURVE_NAME
-#endif
};
return named_groups;
}
diff --git a/src/lib/tls/tls_algos.cpp b/src/lib/tls/tls_algos.cpp
index ce32963b7..db75bf14e 100644
--- a/src/lib/tls/tls_algos.cpp
+++ b/src/lib/tls/tls_algos.cpp
@@ -182,11 +182,6 @@ std::string group_param_to_string(Group_Params group)
case Group_Params::FFDHE_8192:
return "ffdhe/ietf/8192";
-#if defined(BOTAN_HOUSE_ECC_CURVE_NAME)
- case BOTAN_HOUSE_ECC_CURVE_TLS_ID:
- return BOTAN_HOUSE_ECC_CURVE_NAME;
-#endif
-
default:
return "";
}
diff --git a/src/lib/tls/tls_algos.h b/src/lib/tls/tls_algos.h
index 9ad1a7a85..e0b2dabc2 100644
--- a/src/lib/tls/tls_algos.h
+++ b/src/lib/tls/tls_algos.h
@@ -134,10 +134,6 @@ enum class Group_Params : uint16_t {
FFDHE_4096 = 258,
FFDHE_6144 = 259,
FFDHE_8192 = 260,
-
-#if defined(BOTAN_HOUSE_ECC_CURVE_NAME)
- HOUSE_CURVE = BOTAN_HOUSE_ECC_CURVE_TLS_ID,
-#endif
};
std::string group_param_to_string(Group_Params group);
diff --git a/src/scripts/oids.py b/src/scripts/oids.py
index 61a31a6f6..8b9d8ba3e 100755
--- a/src/scripts/oids.py
+++ b/src/scripts/oids.py
@@ -107,10 +107,6 @@ std::string lookup(const OID& oid)
const std::string oid_str = oid.as_string();
%s
-#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();
}
@@ -118,10 +114,6 @@ OID lookup(const std::string& name)
{
%s
-#if defined(BOTAN_HOUSE_ECC_CURVE_NAME)
- if(name == BOTAN_HOUSE_ECC_CURVE_NAME) return OID(BOTAN_HOUSE_ECC_CURVE_OID);
-#endif
-
return OID();
}