client descriptor-cookies are wrong for stealth auth
Tor writes the descriptor-cookies for stealth-authentications into two spots: "client_keys" and the "hostname" files. In the client_keys file, there appears to be an off-by-one in rendservice.c:1026, around this code:
if (base64_encode(desc_cook_out, 3*REND_DESC_COOKIE_LEN_BASE64+1,
extended_desc_cookie,
REND_DESC_COOKIE_LEN+1) < 0) {
log_warn(LD_BUG, "Could not base64-encode descriptor cookie.");
goto err;
}
The REND_DESC_COOKIE_LEN shouldn't have the +1, I don't believe. (Or, the base64_encode call higher up should have one). In any case, both descriptor cookies are the same after that change (and work).
This is in master, as of commit 3bcdb262
I put a simple fix in https://github.com/meejah/tor/tree/descriptor-cookie-serialization