diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-07-23 08:26:44 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-07-23 08:26:44 -0400 |
commit | b3112a6d26d4f142e3007994ce8da6d7517287bb (patch) | |
tree | fd555d9408056d22ce467e22a08ffc83a9b555c7 /src/test/test_dir.c | |
parent | 9cd20e82763af43424085cf651dd4b08e69967e1 (diff) | |
parent | 8763d96d20f33ca7367effb77fb5d7ab30c39766 (diff) | |
download | tor-b3112a6d26d4f142e3007994ce8da6d7517287bb.tar.gz tor-b3112a6d26d4f142e3007994ce8da6d7517287bb.zip |
Merge branch 'remove-padding-fix-7869-v2'
Diffstat (limited to 'src/test/test_dir.c')
-rw-r--r-- | src/test/test_dir.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/test/test_dir.c b/src/test/test_dir.c index 12221f6ad4..ab0315aa2d 100644 --- a/src/test/test_dir.c +++ b/src/test/test_dir.c @@ -397,18 +397,14 @@ get_new_ntor_onion_key_line(const curve25519_public_key_t *ntor_onion_pubkey) { char *line = NULL; char cert_buf[256]; - int rv = 0; tor_assert(ntor_onion_pubkey); - rv = base64_encode(cert_buf, sizeof(cert_buf), - (const char*)ntor_onion_pubkey->public_key, 32, - BASE64_ENCODE_MULTILINE); - tor_assert(rv > 0); + curve25519_public_to_base64(cert_buf, ntor_onion_pubkey, false); tor_assert(strlen(cert_buf) > 0); tor_asprintf(&line, - "ntor-onion-key %s", + "ntor-onion-key %s\n", cert_buf); tor_assert(line); |