diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-09-04 20:21:07 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-09-04 20:21:07 -0400 |
commit | 0db5c549571eb0098a3f709ffb25c2e4909ca01d (patch) | |
tree | 0dbf1fbe9b25ddab292eadca50703f34de4c919e /src/feature | |
parent | fd994f55c441922d3c5ae19ad5c254a1ae1eccfd (diff) | |
parent | d644c93ae9373f99d95870c7b752b790f8714201 (diff) | |
download | tor-0db5c549571eb0098a3f709ffb25c2e4909ca01d.tar.gz tor-0db5c549571eb0098a3f709ffb25c2e4909ca01d.zip |
Merge branch 'nss_squashed' into nss_merge
Diffstat (limited to 'src/feature')
-rw-r--r-- | src/feature/control/control.c | 4 | ||||
-rw-r--r-- | src/feature/nodelist/parsecommon.c | 2 | ||||
-rw-r--r-- | src/feature/nodelist/torcert.c | 1 | ||||
-rw-r--r-- | src/feature/relay/router.c | 3 | ||||
-rw-r--r-- | src/feature/relay/routerkeys.c | 1 | ||||
-rw-r--r-- | src/feature/rend/rendmid.c | 2 | ||||
-rw-r--r-- | src/feature/rend/rendservice.c | 2 |
7 files changed, 9 insertions, 6 deletions
diff --git a/src/feature/control/control.c b/src/feature/control/control.c index f71818241d..61d1ebd8bf 100644 --- a/src/feature/control/control.c +++ b/src/feature/control/control.c @@ -4994,7 +4994,7 @@ add_onion_helper_keyarg(const char *arg, int discard_pk, if (!strcasecmp(key_type_rsa1024, key_type)) { /* "RSA:<Base64 Blob>" - Loading a pre-existing RSA1024 key. */ - pk = crypto_pk_base64_decode(key_blob, strlen(key_blob)); + pk = crypto_pk_base64_decode_private(key_blob, strlen(key_blob)); if (!pk) { err_msg = tor_strdup("512 Failed to decode RSA key\r\n"); goto err; @@ -5029,7 +5029,7 @@ add_onion_helper_keyarg(const char *arg, int discard_pk, goto err; } if (!discard_pk) { - if (crypto_pk_base64_encode(pk, &key_new_blob)) { + if (crypto_pk_base64_encode_private(pk, &key_new_blob)) { crypto_pk_free(pk); tor_asprintf(&err_msg, "551 Failed to encode %s key\r\n", key_type_rsa1024); diff --git a/src/feature/nodelist/parsecommon.c b/src/feature/nodelist/parsecommon.c index 3aaf8ac501..e05657aca0 100644 --- a/src/feature/nodelist/parsecommon.c +++ b/src/feature/nodelist/parsecommon.c @@ -14,7 +14,7 @@ #include "lib/string/util_string.h" #include "lib/string/printf.h" #include "lib/memarea/memarea.h" -#include "lib/crypt_ops/crypto.h" +#include "lib/crypt_ops/crypto_rsa.h" #include <string.h> diff --git a/src/feature/nodelist/torcert.c b/src/feature/nodelist/torcert.c index a276082021..fe67e56403 100644 --- a/src/feature/nodelist/torcert.c +++ b/src/feature/nodelist/torcert.c @@ -33,6 +33,7 @@ #include "lib/log/log.h" #include "trunnel/link_handshake.h" #include "lib/tls/tortls.h" +#include "lib/tls/x509.h" #include "core/or/or_handshake_certs_st.h" 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" diff --git a/src/feature/rend/rendmid.c b/src/feature/rend/rendmid.c index 0fd6516eaa..8ca19a2522 100644 --- a/src/feature/rend/rendmid.c +++ b/src/feature/rend/rendmid.c @@ -12,7 +12,7 @@ #include "core/or/circuitlist.h" #include "core/or/circuituse.h" #include "app/config/config.h" -#include "lib/crypt_ops/crypto.h" +#include "lib/crypt_ops/crypto_cipher.h" #include "core/or/dos.h" #include "core/or/relay.h" #include "feature/rend/rendmid.h" diff --git a/src/feature/rend/rendservice.c b/src/feature/rend/rendservice.c index 1af9117aaf..66a4fb5f4f 100644 --- a/src/feature/rend/rendservice.c +++ b/src/feature/rend/rendservice.c @@ -1652,7 +1652,7 @@ rend_service_load_auth_keys(rend_service_t *s, const char *hfname) crypto_pk_free(prkey); goto err; } - if (crypto_pk_check_key(prkey) <= 0) { + if (! crypto_pk_is_valid_private_key(prkey)) { log_warn(LD_BUG,"Generated client key seems invalid"); crypto_pk_free(prkey); goto err; |