aboutsummaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-10-26 18:05:58 -0400
committerNick Mathewson <nickm@torproject.org>2019-11-07 07:28:43 -0500
commit8cd3e66d93a7b3f61afc3bc0c8868fb50c85af22 (patch)
tree03f567e7ba8d2fb328d6d07dd0c8453036f5f3a6 /src/app
parentb06e9d8ad58bfe11d2c1f6a921ba059658a578f2 (diff)
downloadtor-8cd3e66d93a7b3f61afc3bc0c8868fb50c85af22.tar.gz
tor-8cd3e66d93a7b3f61afc3bc0c8868fb50c85af22.zip
Use new configuration architecture for crypto options
This is a comparatively simple change.
Diffstat (limited to 'src/app')
-rw-r--r--src/app/config/config.c8
-rw-r--r--src/app/config/or_options_st.h4
-rw-r--r--src/app/main/main.c10
3 files changed, 0 insertions, 22 deletions
diff --git a/src/app/config/config.c b/src/app/config/config.c
index 8929349709..480d225e92 100644
--- a/src/app/config/config.c
+++ b/src/app/config/config.c
@@ -498,11 +498,8 @@ static const config_var_t option_vars_[] = {
#endif /* defined(_WIN32) */
OBSOLETE("Group"),
V(GuardLifetime, INTERVAL, "0 minutes"),
- V_IMMUTABLE(HardwareAccel, BOOL, "0"),
V(HeartbeatPeriod, INTERVAL, "6 hours"),
V(MainloopStats, BOOL, "0"),
- V_IMMUTABLE(AccelName, STRING, NULL),
- V_IMMUTABLE(AccelDir, FILENAME, NULL),
V(HashedControlPassword, LINELIST, NULL),
OBSOLETE("HidServDirectoryV2"),
VAR("HiddenServiceDir", LINELIST_S, RendConfigLines, NULL),
@@ -3938,11 +3935,6 @@ options_validate_cb(const void *old_options_, void *options_, char **msg)
"testing Tor network!");
}
- if (options->AccelName && !options->HardwareAccel)
- options->HardwareAccel = 1;
- if (options->AccelDir && !options->AccelName)
- REJECT("Can't use hardware crypto accelerator dir without engine name.");
-
if (options_validate_scheduler(options, msg) < 0) {
return -1;
}
diff --git a/src/app/config/or_options_st.h b/src/app/config/or_options_st.h
index 5511763daa..a3d63d9208 100644
--- a/src/app/config/or_options_st.h
+++ b/src/app/config/or_options_st.h
@@ -536,12 +536,8 @@ struct or_options_t {
* protocol, is it a warn or an info in our logs? */
int TestSocks; /**< Boolean: when we get a socks connection, do we loudly
* log whether it was DNS-leaking or not? */
- int HardwareAccel; /**< Boolean: Should we enable OpenSSL hardware
- * acceleration where available? */
/** Token Bucket Refill resolution in milliseconds. */
int TokenBucketRefillInterval;
- char *AccelName; /**< Optional hardware acceleration engine name. */
- char *AccelDir; /**< Optional hardware acceleration engine search dir. */
/** Boolean: Do we try to enter from a smallish number
* of fixed nodes? */
diff --git a/src/app/main/main.c b/src/app/main/main.c
index fad2e0b62f..6029ed3d2d 100644
--- a/src/app/main/main.c
+++ b/src/app/main/main.c
@@ -592,9 +592,6 @@ tor_init(int argc, char *argv[])
return 1;
}
- /* The options are now initialised */
- const or_options_t *options = get_options();
-
/* Initialize channelpadding and circpad parameters to defaults
* until we get a consensus */
channelpadding_new_consensus_params(NULL);
@@ -616,13 +613,6 @@ tor_init(int argc, char *argv[])
"and you probably shouldn't.");
#endif
- if (crypto_global_init(options->HardwareAccel,
- options->AccelName,
- options->AccelDir)) {
- log_err(LD_BUG, "Unable to initialize OpenSSL. Exiting.");
- return -1;
- }
-
/* Scan/clean unparseable descriptors; after reading config */
routerparse_init();