]> git.ipfire.org Git - thirdparty/tor.git/commit
Move rend auth cookie en-/decoding to a function
authorJohn Brooks <john.brooks@dereferenced.net>
Tue, 14 Apr 2015 03:35:06 +0000 (21:35 -0600)
committerNick Mathewson <nickm@torproject.org>
Mon, 9 May 2016 18:28:08 +0000 (14:28 -0400)
commitd5a23ce115bf89046cc0e9deb64b288113c8dd92
treed6cdf06e81920f88912aae994289fe8bcfbd7875
parente7ff23beea6f415f661821bdefda8b1df3deb7a6
Move rend auth cookie en-/decoding to a function

Tor stores client authorization cookies in two slightly different forms.
The service's client_keys file has the standard base64-encoded cookie,
including two chars of padding. The hostname file and the client remove
the two padding chars, and store an auth type flag in the unused bits.

The distinction makes no sense. Refactor all decoding to use the same
function, which will accept either form, and use a helper function for
encoding the truncated format.
src/or/rendclient.c
src/or/rendcommon.c
src/or/rendcommon.h
src/or/rendservice.c
src/or/routerparse.c
src/test/test_hs.c