summaryrefslogtreecommitdiff
path: root/src/feature/relay
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-09-04 20:21:07 -0400
committerNick Mathewson <nickm@torproject.org>2018-09-04 20:21:07 -0400
commit0db5c549571eb0098a3f709ffb25c2e4909ca01d (patch)
tree0dbf1fbe9b25ddab292eadca50703f34de4c919e /src/feature/relay
parentfd994f55c441922d3c5ae19ad5c254a1ae1eccfd (diff)
parentd644c93ae9373f99d95870c7b752b790f8714201 (diff)
downloadtor-0db5c549571eb0098a3f709ffb25c2e4909ca01d.tar.gz
tor-0db5c549571eb0098a3f709ffb25c2e4909ca01d.zip
Merge branch 'nss_squashed' into nss_merge
Diffstat (limited to 'src/feature/relay')
-rw-r--r--src/feature/relay/router.c3
-rw-r--r--src/feature/relay/routerkeys.c1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c
index b9a930dbe9..1f316ebf08 100644
--- a/src/feature/relay/router.c
+++ b/src/feature/relay/router.c
@@ -55,6 +55,7 @@
#include "lib/tls/tortls.h"
#include "lib/encoding/confline.h"
#include "lib/crypt_ops/crypto_format.h"
+#include "lib/crypt_ops/crypto_init.h"
/**
* \file router.c
@@ -579,7 +580,7 @@ init_key_from_file(const char *fname, int generate, int severity,
tor_log(severity, LD_GENERAL,"Error generating onion key");
goto error;
}
- if (crypto_pk_check_key(prkey) <= 0) {
+ if (! crypto_pk_is_valid_private_key(prkey)) {
tor_log(severity, LD_GENERAL,"Generated key seems invalid");
goto error;
}
diff --git a/src/feature/relay/routerkeys.c b/src/feature/relay/routerkeys.c
index 294d452e17..47af0f812c 100644
--- a/src/feature/relay/routerkeys.c
+++ b/src/feature/relay/routerkeys.c
@@ -24,6 +24,7 @@
#include "lib/crypt_ops/crypto_util.h"
#include "lib/term/getpass.h"
#include "lib/tls/tortls.h"
+#include "lib/tls/x509.h"
#include "lib/crypt_ops/crypto_format.h"
#define ENC_KEY_HEADER "Boxed Ed25519 key"