diff options
author | Daniel Pinto <danielpinto52@gmail.com> | 2020-06-06 11:34:47 +0100 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-07-23 08:25:22 -0400 |
commit | d72618eb7f152c8f1633294fa30978c7ac0a48f3 (patch) | |
tree | a8ed65e80420b8a7e254bcde56634f70051e95f4 /src/test/test_dir.c | |
parent | 27315de590da24fe55353332c29a3a4454ee7da2 (diff) | |
download | tor-d72618eb7f152c8f1633294fa30978c7ac0a48f3.tar.gz tor-d72618eb7f152c8f1633294fa30978c7ac0a48f3.zip |
Remove padding from ntor-onion-key #7869
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 3a0b8237cb..f6a21c804e 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); |