mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Merge remote-tracking branch 'tor-gitlab/mr/174' into master
This commit is contained in:
commit
54e6109499
4
changes/ticket40132
Normal file
4
changes/ticket40132
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
o Minor features (specification update):
|
||||||
|
- Several fields in microdescriptors, router descriptors, and consensus
|
||||||
|
documents that were formerly optional are now required. Implements
|
||||||
|
proposal 315; closes ticket 40132.
|
@ -70,19 +70,39 @@ i2d_RSAPublicKey.argtypes = [
|
|||||||
i2d_RSAPublicKey.restype = ctypes.c_int
|
i2d_RSAPublicKey.restype = ctypes.c_int
|
||||||
|
|
||||||
|
|
||||||
|
HEADER = """\
|
||||||
|
router fred 127.0.0.1 9001 0 9002
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert {d.NTOR_CROSSCERT_SIGN}
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
"""
|
||||||
|
|
||||||
|
FOOTER="""
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
def rsa_sign(msg, rsa):
|
def rsa_sign(msg, rsa):
|
||||||
buf = ctypes.create_string_buffer(1024)
|
buf = ctypes.create_string_buffer(2048)
|
||||||
n = RSA_private_encrypt(len(msg), msg, buf, rsa, 1)
|
n = RSA_private_encrypt(len(msg), msg, buf, rsa, 1)
|
||||||
if n <= 0:
|
if n <= 0:
|
||||||
raise Exception()
|
raise Exception()
|
||||||
return buf.raw[:n]
|
return buf.raw[:n]
|
||||||
|
|
||||||
def b64(x):
|
def b64(x1):
|
||||||
x = base64.b64encode(x)
|
x = binascii.b2a_base64(x1)
|
||||||
res = []
|
res = []
|
||||||
for i in xrange(0, len(x), 64):
|
for i in xrange(0, len(x), 64):
|
||||||
res.append(x[i:i+64]+"\n")
|
res.append((x[i:i+64]).decode("ascii"))
|
||||||
return "".join(res)
|
return "\n".join(res)
|
||||||
|
|
||||||
def bio_extract(bio):
|
def bio_extract(bio):
|
||||||
buf = ctypes.c_char_p()
|
buf = ctypes.c_char_p()
|
||||||
@ -100,18 +120,19 @@ def make_rsa_key(e=65537):
|
|||||||
n = crypt.i2d_RSAPublicKey(rsa, ctypes.byref(pBuf))
|
n = crypt.i2d_RSAPublicKey(rsa, ctypes.byref(pBuf))
|
||||||
s = buf.raw[:n]
|
s = buf.raw[:n]
|
||||||
digest = hashlib.sha1(s).digest()
|
digest = hashlib.sha1(s).digest()
|
||||||
|
pem = pem.decode("ascii")
|
||||||
return (rsa,pem,digest)
|
return (rsa,pem,digest)
|
||||||
|
|
||||||
def makeEdSigningKeyCert(sk_master, pk_master, pk_signing, date,
|
def makeEdSigningKeyCert(sk_master, pk_master, pk_signing, date,
|
||||||
includeSigning=False, certType=1):
|
includeSigning=False, certType=1):
|
||||||
assert len(pk_signing) == len(pk_master) == 32
|
assert len(pk_signing) == len(pk_master) == 32
|
||||||
expiration = struct.pack("!L", date//3600)
|
expiration = struct.pack(b"!L", date//3600)
|
||||||
if includeSigning:
|
if includeSigning:
|
||||||
extensions = "\x01\x00\x20\x04\x00%s"%(pk_master)
|
extensions = b"\x01\x00\x20\x04\x00%s"%(pk_master)
|
||||||
else:
|
else:
|
||||||
extensions = "\x00"
|
extensions = b"\x00"
|
||||||
signed = "\x01%s%s\x01%s%s" % (
|
signed = b"\x01%s%s\x01%s%s" % (
|
||||||
chr(certType), expiration, pk_signing, extensions)
|
bytes([certType]), expiration, pk_signing, extensions)
|
||||||
signature = ed25519_exts_ref.signatureWithESK(signed, sk_master, pk_master)
|
signature = ed25519_exts_ref.signatureWithESK(signed, sk_master, pk_master)
|
||||||
assert len(signature) == 64
|
assert len(signature) == 64
|
||||||
return signed+signature
|
return signed+signature
|
||||||
@ -127,7 +148,7 @@ MAGIC2 = "<<<<<!#!#!#XYZZY#!#!#!>>>>>"
|
|||||||
class OnDemandKeys(object):
|
class OnDemandKeys(object):
|
||||||
def __init__(self, certDate=None):
|
def __init__(self, certDate=None):
|
||||||
if certDate is None:
|
if certDate is None:
|
||||||
certDate = time.time() + 86400
|
certDate = int(time.time()) + 86400
|
||||||
self.certDate = certDate
|
self.certDate = certDate
|
||||||
self.rsa_id = None
|
self.rsa_id = None
|
||||||
self.rsa_onion_key = None
|
self.rsa_onion_key = None
|
||||||
@ -151,7 +172,7 @@ class OnDemandKeys(object):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def RSA_FINGERPRINT_NOSPACE(self):
|
def RSA_FINGERPRINT_NOSPACE(self):
|
||||||
return binascii.b2a_hex(self.RSA_ID_DIGEST).upper()
|
return binascii.b2a_hex(self.RSA_ID_DIGEST).upper().decode("ascii")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def RSA_ONION_KEY(self):
|
def RSA_ONION_KEY(self):
|
||||||
@ -162,7 +183,7 @@ class OnDemandKeys(object):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def RSA_FINGERPRINT(self):
|
def RSA_FINGERPRINT(self):
|
||||||
hexdigest = self.RSA_FINGERPRINT_NOSPACEK
|
hexdigest = self.RSA_FINGERPRINT_NOSPACE
|
||||||
return " ".join(hexdigest[i:i+4] for i in range(0,len(hexdigest),4))
|
return " ".join(hexdigest[i:i+4] for i in range(0,len(hexdigest),4))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -178,7 +199,7 @@ class OnDemandKeys(object):
|
|||||||
if self.ntor_sk is None:
|
if self.ntor_sk is None:
|
||||||
self.ntor_sk = slownacl_curve25519.Private()
|
self.ntor_sk = slownacl_curve25519.Private()
|
||||||
self.ntor_pk = self.ntor_sk.get_public()
|
self.ntor_pk = self.ntor_sk.get_public()
|
||||||
return base64.b64encode(self.ntor_pk.serialize())
|
return base64.b64encode(self.ntor_pk.serialize()).decode("ascii")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def ED_CERT(self):
|
def ED_CERT(self):
|
||||||
@ -191,6 +212,11 @@ class OnDemandKeys(object):
|
|||||||
|
|
||||||
return objwrap('ED25519 CERT', b64(self.ed_cert))
|
return objwrap('ED25519 CERT', b64(self.ed_cert))
|
||||||
|
|
||||||
|
@property
|
||||||
|
def ED_IDENTITY(self):
|
||||||
|
self.ED_CERT
|
||||||
|
return binascii.b2a_base64(self.ed_id_pk).strip().decode("ascii")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def NTOR_CROSSCERT(self):
|
def NTOR_CROSSCERT(self):
|
||||||
if self.ntor_crosscert is None:
|
if self.ntor_crosscert is None:
|
||||||
@ -199,7 +225,7 @@ class OnDemandKeys(object):
|
|||||||
|
|
||||||
ed_privkey = self.ntor_sk.serialize() + os.urandom(32)
|
ed_privkey = self.ntor_sk.serialize() + os.urandom(32)
|
||||||
ed_pub0 = ed25519_exts_ref.publickeyFromESK(ed_privkey)
|
ed_pub0 = ed25519_exts_ref.publickeyFromESK(ed_privkey)
|
||||||
sign = (ord(ed_pub0[31]) & 255) >> 7
|
sign = ((ed_pub0[31]) & 255) >> 7
|
||||||
|
|
||||||
self.ntor_crosscert = makeEdSigningKeyCert(self.ntor_sk.serialize() + os.urandom(32), ed_pub0, self.ed_id_pk, self.certDate, certType=10)
|
self.ntor_crosscert = makeEdSigningKeyCert(self.ntor_sk.serialize() + os.urandom(32), ed_pub0, self.ed_id_pk, self.certDate, certType=10)
|
||||||
self.ntor_crosscert_sign = sign
|
self.ntor_crosscert_sign = sign
|
||||||
@ -234,18 +260,19 @@ class OnDemandKeys(object):
|
|||||||
self.ED_CERT
|
self.ED_CERT
|
||||||
signed_part = body[:idx+len("\nrouter-sig-ed25519 ")]
|
signed_part = body[:idx+len("\nrouter-sig-ed25519 ")]
|
||||||
signed_part = "Tor router descriptor signature v1" + signed_part
|
signed_part = "Tor router descriptor signature v1" + signed_part
|
||||||
digest = hashlib.sha256(signed_part).digest()
|
digest = hashlib.sha256(signed_part.encode("utf-8")).digest()
|
||||||
ed_sig = ed25519_exts_ref.signatureWithESK(digest,
|
ed_sig = ed25519_exts_ref.signatureWithESK(digest,
|
||||||
self.ed_signing_sk, self.ed_signing_pk)
|
self.ed_signing_sk, self.ed_signing_pk)
|
||||||
|
|
||||||
body = body.replace(MAGIC2, base64.b64encode(ed_sig).replace("=",""))
|
body = body.replace(MAGIC2, base64.b64encode(ed_sig).decode("ascii").replace("=",""))
|
||||||
|
|
||||||
|
self.RSA_IDENTITY
|
||||||
idx = body.rindex("\nrouter-signature")
|
idx = body.rindex("\nrouter-signature")
|
||||||
end_of_sig = body.index("\n", idx+1)
|
end_of_sig = body.index("\n", idx+1)
|
||||||
|
|
||||||
signed_part = body[:end_of_sig+1]
|
signed_part = body[:end_of_sig+1]
|
||||||
|
|
||||||
digest = hashlib.sha1(signed_part).digest()
|
digest = hashlib.sha1(signed_part.encode("utf-8")).digest()
|
||||||
assert len(digest) == 20
|
assert len(digest) == 20
|
||||||
|
|
||||||
rsasig = rsa_sign(digest, self.rsa_id)
|
rsasig = rsa_sign(digest, self.rsa_id)
|
||||||
@ -318,29 +345,42 @@ def emit_ri(name, body):
|
|||||||
body = info.sign_desc(body)
|
body = info.sign_desc(body)
|
||||||
print_c_string("EX_RI_%s"%name.upper(), body)
|
print_c_string("EX_RI_%s"%name.upper(), body)
|
||||||
|
|
||||||
def emit_ei(name, body):
|
def emit_ei(name, body, fields):
|
||||||
info = OnDemandKeys()
|
info = OnDemandKeys()
|
||||||
body = body.format(d=info)
|
body = body.format(d=info)
|
||||||
body = info.sign_desc(body)
|
body = info.sign_desc(body)
|
||||||
print_c_string("EX_EI_%s"%name.upper(), body)
|
print_c_string("EX_EI_%s"%name.upper(), body)
|
||||||
|
|
||||||
print('const char EX_EI_{NAME}_FP[] = "{d.RSA_FINGERPRINT_NOSPACE}";'.format(
|
print('ATTR_UNUSED static const char EX_EI_{NAME}_FP[] = "{d.RSA_FINGERPRINT_NOSPACE}";'.format(
|
||||||
d=info, NAME=name.upper()))
|
d=info, NAME=name.upper()))
|
||||||
|
print("ATTR_UNUSED")
|
||||||
print_c_string("EX_EI_%s_KEY"%name.upper(), info.RSA_IDENTITY)
|
print_c_string("EX_EI_%s_KEY"%name.upper(), info.RSA_IDENTITY)
|
||||||
|
|
||||||
def analyze(s):
|
def analyze(s):
|
||||||
fields = {}
|
while s:
|
||||||
while s.startswith(":::"):
|
fields = {}
|
||||||
first,s=s.split("\n", 1)
|
s_pre = s
|
||||||
m = re.match(r'^:::(\w+)=(.*)',first)
|
while s.startswith(":::"):
|
||||||
if not m:
|
first,s=s.split("\n", 1)
|
||||||
raise ValueError(first)
|
m = re.match(r'^:::(\w+)=(.*)',first)
|
||||||
k,v = m.groups()
|
if not m:
|
||||||
fields[k] = v
|
raise ValueError(first)
|
||||||
return fields, s
|
k,v = m.groups()
|
||||||
|
fields[k] = v
|
||||||
|
if "name" not in fields:
|
||||||
|
print(repr(s_pre))
|
||||||
|
|
||||||
def process_file(s):
|
idx = s.find(":::")
|
||||||
fields, s = analyze(s)
|
if idx != -1:
|
||||||
|
body = s[:idx].rstrip()
|
||||||
|
s = s[idx:]
|
||||||
|
else:
|
||||||
|
body = s.rstrip()
|
||||||
|
s = ""
|
||||||
|
|
||||||
|
yield (fields, body)
|
||||||
|
|
||||||
|
def emit_entry(fields, s):
|
||||||
try:
|
try:
|
||||||
name = fields['name']
|
name = fields['name']
|
||||||
tp = fields['type']
|
tp = fields['type']
|
||||||
@ -348,12 +388,21 @@ def process_file(s):
|
|||||||
raise ValueError("missing required field")
|
raise ValueError("missing required field")
|
||||||
|
|
||||||
if tp == 'ei':
|
if tp == 'ei':
|
||||||
emit_ei(name, s)
|
emit_ei(name, s, fields)
|
||||||
elif tp == 'ri':
|
elif tp == 'ri':
|
||||||
emit_ri(name, s)
|
emit_ri(name, s)
|
||||||
else:
|
else:
|
||||||
raise ValueError("unrecognized type")
|
raise ValueError("unrecognized type")
|
||||||
|
|
||||||
|
def process_file(s):
|
||||||
|
print("""\
|
||||||
|
/* These entries are automatically generated by makedesc.py to make sure
|
||||||
|
* that their keys and signatures are right except when otherwise
|
||||||
|
* specified. */
|
||||||
|
""")
|
||||||
|
for (fields, s) in analyze(s):
|
||||||
|
emit_entry(fields, s)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
import sys
|
import sys
|
||||||
for fn in sys.argv[1:]:
|
for fn in sys.argv[1:]:
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
// clang-format off
|
// clang-format off
|
||||||
static token_rule_t microdesc_token_table[] = {
|
static token_rule_t microdesc_token_table[] = {
|
||||||
T1_START("onion-key", K_ONION_KEY, NO_ARGS, NEED_KEY_1024),
|
T1_START("onion-key", K_ONION_KEY, NO_ARGS, NEED_KEY_1024),
|
||||||
T01("ntor-onion-key", K_ONION_KEY_NTOR, GE(1), NO_OBJ ),
|
T1("ntor-onion-key", K_ONION_KEY_NTOR, GE(1), NO_OBJ ),
|
||||||
T0N("id", K_ID, GE(2), NO_OBJ ),
|
T0N("id", K_ID, GE(2), NO_OBJ ),
|
||||||
T0N("a", K_A, GE(1), NO_OBJ ),
|
T0N("a", K_A, GE(1), NO_OBJ ),
|
||||||
T01("family", K_FAMILY, CONCAT_ARGS, NO_OBJ ),
|
T01("family", K_FAMILY, CONCAT_ARGS, NO_OBJ ),
|
||||||
|
@ -54,7 +54,7 @@ static token_rule_t rtrstatus_token_table[] = {
|
|||||||
T01("w", K_W, ARGS, NO_OBJ ),
|
T01("w", K_W, ARGS, NO_OBJ ),
|
||||||
T0N("m", K_M, CONCAT_ARGS, NO_OBJ ),
|
T0N("m", K_M, CONCAT_ARGS, NO_OBJ ),
|
||||||
T0N("id", K_ID, GE(2), NO_OBJ ),
|
T0N("id", K_ID, GE(2), NO_OBJ ),
|
||||||
T01("pr", K_PROTO, CONCAT_ARGS, NO_OBJ ),
|
T1("pr", K_PROTO, CONCAT_ARGS, NO_OBJ ),
|
||||||
T0N("opt", K_OPT, CONCAT_ARGS, OBJ_OK ),
|
T0N("opt", K_OPT, CONCAT_ARGS, OBJ_OK ),
|
||||||
END_OF_TABLE
|
END_OF_TABLE
|
||||||
};
|
};
|
||||||
|
@ -91,24 +91,24 @@ const token_rule_t routerdesc_token_table[] = {
|
|||||||
T01("ipv6-policy", K_IPV6_POLICY, CONCAT_ARGS, NO_OBJ),
|
T01("ipv6-policy", K_IPV6_POLICY, CONCAT_ARGS, NO_OBJ),
|
||||||
T1( "signing-key", K_SIGNING_KEY, NO_ARGS, NEED_KEY_1024 ),
|
T1( "signing-key", K_SIGNING_KEY, NO_ARGS, NEED_KEY_1024 ),
|
||||||
T1( "onion-key", K_ONION_KEY, NO_ARGS, NEED_KEY_1024 ),
|
T1( "onion-key", K_ONION_KEY, NO_ARGS, NEED_KEY_1024 ),
|
||||||
T01("ntor-onion-key", K_ONION_KEY_NTOR, GE(1), NO_OBJ ),
|
T1("ntor-onion-key", K_ONION_KEY_NTOR, GE(1), NO_OBJ ),
|
||||||
T1_END( "router-signature", K_ROUTER_SIGNATURE, NO_ARGS, NEED_OBJ ),
|
T1_END( "router-signature", K_ROUTER_SIGNATURE, NO_ARGS, NEED_OBJ ),
|
||||||
T1( "published", K_PUBLISHED, CONCAT_ARGS, NO_OBJ ),
|
T1( "published", K_PUBLISHED, CONCAT_ARGS, NO_OBJ ),
|
||||||
T01("uptime", K_UPTIME, GE(1), NO_OBJ ),
|
T01("uptime", K_UPTIME, GE(1), NO_OBJ ),
|
||||||
T01("fingerprint", K_FINGERPRINT, CONCAT_ARGS, NO_OBJ ),
|
T01("fingerprint", K_FINGERPRINT, CONCAT_ARGS, NO_OBJ ),
|
||||||
T01("hibernating", K_HIBERNATING, GE(1), NO_OBJ ),
|
T01("hibernating", K_HIBERNATING, GE(1), NO_OBJ ),
|
||||||
T01("platform", K_PLATFORM, CONCAT_ARGS, NO_OBJ ),
|
T01("platform", K_PLATFORM, CONCAT_ARGS, NO_OBJ ),
|
||||||
T01("proto", K_PROTO, CONCAT_ARGS, NO_OBJ ),
|
T1("proto", K_PROTO, CONCAT_ARGS, NO_OBJ ),
|
||||||
T01("contact", K_CONTACT, CONCAT_ARGS, NO_OBJ ),
|
T01("contact", K_CONTACT, CONCAT_ARGS, NO_OBJ ),
|
||||||
T01("read-history", K_READ_HISTORY, ARGS, NO_OBJ ),
|
T01("read-history", K_READ_HISTORY, ARGS, NO_OBJ ),
|
||||||
T01("write-history", K_WRITE_HISTORY, ARGS, NO_OBJ ),
|
T01("write-history", K_WRITE_HISTORY, ARGS, NO_OBJ ),
|
||||||
T01("extra-info-digest", K_EXTRA_INFO_DIGEST, GE(1), NO_OBJ ),
|
T01("extra-info-digest", K_EXTRA_INFO_DIGEST, GE(1), NO_OBJ ),
|
||||||
T01("hidden-service-dir", K_HIDDEN_SERVICE_DIR, NO_ARGS, NO_OBJ ),
|
T01("hidden-service-dir", K_HIDDEN_SERVICE_DIR, NO_ARGS, NO_OBJ ),
|
||||||
T01("identity-ed25519", K_IDENTITY_ED25519, NO_ARGS, NEED_OBJ ),
|
T1("identity-ed25519", K_IDENTITY_ED25519, NO_ARGS, NEED_OBJ ),
|
||||||
T01("master-key-ed25519", K_MASTER_KEY_ED25519, GE(1), NO_OBJ ),
|
T1("master-key-ed25519", K_MASTER_KEY_ED25519, GE(1), NO_OBJ ),
|
||||||
T01("router-sig-ed25519", K_ROUTER_SIG_ED25519, GE(1), NO_OBJ ),
|
T1("router-sig-ed25519", K_ROUTER_SIG_ED25519, GE(1), NO_OBJ ),
|
||||||
T01("onion-key-crosscert", K_ONION_KEY_CROSSCERT, NO_ARGS, NEED_OBJ ),
|
T1("onion-key-crosscert", K_ONION_KEY_CROSSCERT, NO_ARGS, NEED_OBJ ),
|
||||||
T01("ntor-onion-key-crosscert", K_NTOR_ONION_KEY_CROSSCERT,
|
T1("ntor-onion-key-crosscert", K_NTOR_ONION_KEY_CROSSCERT,
|
||||||
EQ(1), NEED_OBJ ),
|
EQ(1), NEED_OBJ ),
|
||||||
|
|
||||||
T01("allow-single-hop-exits",K_ALLOW_SINGLE_HOP_EXITS, NO_ARGS, NO_OBJ ),
|
T01("allow-single-hop-exits",K_ALLOW_SINGLE_HOP_EXITS, NO_ARGS, NO_OBJ ),
|
||||||
@ -131,8 +131,8 @@ const token_rule_t routerdesc_token_table[] = {
|
|||||||
static token_rule_t extrainfo_token_table[] = {
|
static token_rule_t extrainfo_token_table[] = {
|
||||||
T1_END( "router-signature", K_ROUTER_SIGNATURE, NO_ARGS, NEED_OBJ ),
|
T1_END( "router-signature", K_ROUTER_SIGNATURE, NO_ARGS, NEED_OBJ ),
|
||||||
T1( "published", K_PUBLISHED, CONCAT_ARGS, NO_OBJ ),
|
T1( "published", K_PUBLISHED, CONCAT_ARGS, NO_OBJ ),
|
||||||
T01("identity-ed25519", K_IDENTITY_ED25519, NO_ARGS, NEED_OBJ ),
|
T1("identity-ed25519", K_IDENTITY_ED25519, NO_ARGS, NEED_OBJ ),
|
||||||
T01("router-sig-ed25519", K_ROUTER_SIG_ED25519, GE(1), NO_OBJ ),
|
T1("router-sig-ed25519", K_ROUTER_SIG_ED25519, GE(1), NO_OBJ ),
|
||||||
T0N("opt", K_OPT, CONCAT_ARGS, OBJ_OK ),
|
T0N("opt", K_OPT, CONCAT_ARGS, OBJ_OK ),
|
||||||
T01("read-history", K_READ_HISTORY, ARGS, NO_OBJ ),
|
T01("read-history", K_READ_HISTORY, ARGS, NO_OBJ ),
|
||||||
T01("write-history", K_WRITE_HISTORY, ARGS, NO_OBJ ),
|
T01("write-history", K_WRITE_HISTORY, ARGS, NO_OBJ ),
|
||||||
|
@ -139,13 +139,13 @@ signed_digest_equals, (const uint8_t *d1, const uint8_t *d2, size_t len))
|
|||||||
* the document when generating log messages. Return 0 on success, negative
|
* the document when generating log messages. Return 0 on success, negative
|
||||||
* on failure.
|
* on failure.
|
||||||
*/
|
*/
|
||||||
int
|
MOCK_IMPL(int,
|
||||||
check_signature_token(const char *digest,
|
check_signature_token,(const char *digest,
|
||||||
ssize_t digest_len,
|
ssize_t digest_len,
|
||||||
directory_token_t *tok,
|
directory_token_t *tok,
|
||||||
crypto_pk_t *pkey,
|
crypto_pk_t *pkey,
|
||||||
int flags,
|
int flags,
|
||||||
const char *doctype)
|
const char *doctype))
|
||||||
{
|
{
|
||||||
char *signed_digest;
|
char *signed_digest;
|
||||||
size_t keysize;
|
size_t keysize;
|
||||||
|
@ -20,12 +20,12 @@ int router_get_hash_impl(const char *s, size_t s_len, char *digest,
|
|||||||
|
|
||||||
#define CST_NO_CHECK_OBJTYPE (1<<0)
|
#define CST_NO_CHECK_OBJTYPE (1<<0)
|
||||||
struct directory_token_t;
|
struct directory_token_t;
|
||||||
int check_signature_token(const char *digest,
|
MOCK_DECL(int, check_signature_token,(const char *digest,
|
||||||
ssize_t digest_len,
|
ssize_t digest_len,
|
||||||
struct directory_token_t *tok,
|
struct directory_token_t *tok,
|
||||||
crypto_pk_t *pkey,
|
crypto_pk_t *pkey,
|
||||||
int flags,
|
int flags,
|
||||||
const char *doctype);
|
const char *doctype));
|
||||||
|
|
||||||
int router_get_hash_impl_helper(const char *s, size_t s_len,
|
int router_get_hash_impl_helper(const char *s, size_t s_len,
|
||||||
const char *start_str,
|
const char *start_str,
|
||||||
|
@ -53,7 +53,7 @@ def blindPK(pk, param):
|
|||||||
def expandSK(sk):
|
def expandSK(sk):
|
||||||
h = H(sk)
|
h = H(sk)
|
||||||
a = 2**(b-2) + sum(2**i * bit(h,i) for i in range(3,b-2))
|
a = 2**(b-2) + sum(2**i * bit(h,i) for i in range(3,b-2))
|
||||||
k = ''.join([h[i] for i in range(b/8,b/4)])
|
k = bytes(h[i] for i in range(b//8,b//4))
|
||||||
assert len(k) == 32
|
assert len(k) == 32
|
||||||
return encodeint(a)+k
|
return encodeint(a)+k
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ def publickeyFromESK(h):
|
|||||||
|
|
||||||
def signatureWithESK(m,h,pk):
|
def signatureWithESK(m,h,pk):
|
||||||
a = decodeint(h[:32])
|
a = decodeint(h[:32])
|
||||||
r = Hint(''.join([h[i] for i in range(b/8,b/4)]) + m)
|
r = Hint(bytes([h[i] for i in range(b//8,b//4)]) + m)
|
||||||
R = scalarmult(B,r)
|
R = scalarmult(B,r)
|
||||||
S = (r + Hint(encodepoint(R) + pk + m) * a) % l
|
S = (r + Hint(encodepoint(R) + pk + m) * a) % l
|
||||||
return encodepoint(R) + encodeint(S)
|
return encodepoint(R) + encodeint(S)
|
||||||
@ -263,5 +263,3 @@ if __name__ == '__main__':
|
|||||||
unittest.main()
|
unittest.main()
|
||||||
else:
|
else:
|
||||||
makeTestVectors()
|
makeTestVectors()
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,25 +1,42 @@
|
|||||||
|
/* These entries are automatically generated by makedesc.py to make sure
|
||||||
|
* that their keys and signatures are right except when otherwise
|
||||||
|
* specified. */
|
||||||
|
|
||||||
static const char EX_EI_MINIMAL[] =
|
static const char EX_EI_MINIMAL[] =
|
||||||
"extra-info bob 3E1B2DC141F2B7C6A0F3C4ED9A14A9C35762E24B\n"
|
"extra-info HomersRelay 3390094906366A15D5CD78550424FAD141CF1067\n"
|
||||||
"published 2014-10-05 20:07:00\n"
|
"identity-ed25519\n"
|
||||||
|
"-----BEGIN ED25519 CERT-----\n"
|
||||||
|
"AQQABstTAd17tFTNejNRgbv721EkIcbFOsiQYWMvXPIwupcMVOSRAQAgBABG7Eha\n"
|
||||||
|
"cQElmfndkTBiOJBk18P4nP6BtRWGhYEz9th4chXWqOuA+/8IfLPYb39YuFUOadAE\n"
|
||||||
|
"cgKPEa14EHB7K5QbGToAm91E0H5kVX6A9GDAc7QKKMYLGO4Tcu2WntzSmgY=\n"
|
||||||
|
"-----END ED25519 CERT-----\n"
|
||||||
|
"published 2020-10-14 20:58:04\n"
|
||||||
|
"router-sig-ed25519 3c5gw2tHzcjS0zKSdZrL2Mx3pdEe2j8Gc62nQWKl8m2DLhWqrTz9dC6LimoiipWuV0Xo8tT2f/fStMBGbayRAQ\n"
|
||||||
"router-signature\n"
|
"router-signature\n"
|
||||||
"-----BEGIN SIGNATURE-----\n"
|
"-----BEGIN SIGNATURE-----\n"
|
||||||
"K5GAkVjpUlofL78NIOE1VDxFn8yYbHK50rVuZG2HxqG/727bon+uMprv4MHjfDcP\n"
|
"tcFC3oRyHAaZTQn0g5G5rsjq3CI9Ky/GlhIQz1G5VWczjTXIb0fGGyerraq5HW7v\n"
|
||||||
"V3l9u1uUdGiUPOl8j+hRNw4z/ODeCj/24r2+L32MTjyfUhK49Ld2IlK9iZKlgKYi\n"
|
"UEDQrA3dYjuFB3ACyKesoR9HbMSVOPSHkge4WWtlm9XoPzgU6IGWPhlnWjYC9ozV\n"
|
||||||
"zyoatxdAjU8Xc5WPX692HO4/R9CGLsUfYcEEFU2R3EA=\n"
|
"2m8J8Gx+3IUy4xWWIDOXLV0Wlp6PWwXbYHWllHQLjKM=\n"
|
||||||
"-----END SIGNATURE-----\n"
|
"-----END SIGNATURE-----\n"
|
||||||
;
|
;
|
||||||
|
ATTR_UNUSED static const char EX_EI_MINIMAL_FP[] = "3390094906366A15D5CD78550424FAD141CF1067";
|
||||||
static const char EX_EI_MINIMAL_FP[] = "3E1B2DC141F2B7C6A0F3C4ED9A14A9C35762E24B";
|
ATTR_UNUSED
|
||||||
static const char EX_EI_MINIMAL_KEY[] =
|
static const char EX_EI_MINIMAL_KEY[] =
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
"MIGJAoGBALSppIF3t3wOAm4fzxRvK+q/wh1gGAWwS0JEn8d+c/x+rt1oQabGkqsB\n"
|
"MIGJAoGBANNVP8AEuktLfk1QmK5SYrfPF9KBxub5dubqaPGMGEHwtOpR8Mo8ZfKZ\n"
|
||||||
"GU6rz1z1AN02W0P2+EcyJQVBjGR3gHQNoDGx0KIdnr3caGAw3XmQXrJLPaViEk28\n"
|
"bi3nmpO273uVZDz0toqgcI9v87x6v/2ZPaksRcFXl2vVdJ2L8R51yvr6EjhatEi/\n"
|
||||||
"RJMxx6umpP27YKSyEMHgVTDXblKImT0mE7fVOx8tD0EWRYazmp4NAgMBAAE=\n"
|
"ntPRQ67oSEA9sqeI4R1NRcrfEpzLyBOGZ/SHsctGX+9edZGZVpkrAgMBAAE=\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n";
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
|
;
|
||||||
static const char EX_EI_MAXIMAL[] =
|
static const char EX_EI_MAXIMAL[] =
|
||||||
"extra-info bob FF8248FE780A7236D3FA5D62DEA642055135F942\n"
|
"extra-info HomersRelay 7369E5BE5E183609D08A766F6FF36F9F5DE2AD32\n"
|
||||||
"published 2014-10-05 20:07:00\n"
|
"identity-ed25519\n"
|
||||||
|
"-----BEGIN ED25519 CERT-----\n"
|
||||||
|
"AQQABstTAY8EcZ8LbMYKiBCrVu1KMM1b0nM5amNOdjzblJezWiJSAQAgBABdtyfT\n"
|
||||||
|
"YOvrB4cdPm0k7IoyXzVi3qYFtr82nshImKJ/tGO8H7DhU7s+7lsOKInn4RVaUS1/\n"
|
||||||
|
"r2Z05Qb7lj9q/jhVnruoiG/N6Ii0rjWuRZmmR7sZdCpAGzJoRx0hO1vshAU=\n"
|
||||||
|
"-----END ED25519 CERT-----\n"
|
||||||
|
"published 2020-10-14 20:58:04\n"
|
||||||
"opt foobarbaz\n"
|
"opt foobarbaz\n"
|
||||||
"read-history 900 1,2,3\n"
|
"read-history 900 1,2,3\n"
|
||||||
"write-history 900 1,2,3\n"
|
"write-history 900 1,2,3\n"
|
||||||
@ -46,390 +63,322 @@ static const char EX_EI_MAXIMAL[] =
|
|||||||
"exit-kibibytes-written FOO\n"
|
"exit-kibibytes-written FOO\n"
|
||||||
"exit-kibibytes-read FOO\n"
|
"exit-kibibytes-read FOO\n"
|
||||||
"exit-streams-opened FOO\n"
|
"exit-streams-opened FOO\n"
|
||||||
|
"router-sig-ed25519 JKJB3EvFZUOff5RgwgSowwTB/TP6VB+IbbeqGPA0Mp9ft9KiulgCuoWqGiUdu/1Zm02dSdYWIlKNf2AijTy0Cg\n"
|
||||||
"router-signature\n"
|
"router-signature\n"
|
||||||
"-----BEGIN SIGNATURE-----\n"
|
"-----BEGIN SIGNATURE-----\n"
|
||||||
"ZO79bLlWVNIruCnWW9duDcOKydPWbL5DfrpUv5IRLF4MMFoacMUdJPDUs9e+wY2C\n"
|
"rk8hYNILFc+Ka3a8vyVg3O4Qs5++ih5KmCP1f/onm++fUM/kGCA13KP3hF0conRH\n"
|
||||||
"zndHe6i2JK7yKJj+uCOSC8cx61OLG+kVxMLJ/qhA4H5thrYb+GpzMKwbHzQc3PTH\n"
|
"bTdDas6PJALVgNq1bWsCbuqtz2eIf8r22+gE5nRuahh5u0JLzJzEXeZo/jpHQDAM\n"
|
||||||
"zHRzj041iWXTL7/DMaQlpJOBoac/wTSIKzoV2B00jBw=\n"
|
"ZbMqs2SOKQk8QmGyUa+ul89FR9El0mBE8dMPwYnWl14=\n"
|
||||||
"-----END SIGNATURE-----\n"
|
"-----END SIGNATURE-----\n"
|
||||||
;
|
;
|
||||||
|
ATTR_UNUSED static const char EX_EI_MAXIMAL_FP[] = "7369E5BE5E183609D08A766F6FF36F9F5DE2AD32";
|
||||||
static const char EX_EI_MAXIMAL_FP[] = "FF8248FE780A7236D3FA5D62DEA642055135F942";
|
ATTR_UNUSED
|
||||||
static const char EX_EI_MAXIMAL_KEY[] =
|
static const char EX_EI_MAXIMAL_KEY[] =
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
"MIGJAoGBANSpkYhHUW1EqodY4d3JRbvEM1vjjR/vEE8gjONiJ5t2Sten53jzt8bh\n"
|
"MIGJAoGBAMJ9qPjQ0i7LGsRDIBJw+gMZLx1rYNCmu0KPSf7BixQP1Tk7u8TVL+/O\n"
|
||||||
"8/VJn7pQGs8zR5CIxCw4P68xMtZJJedS3hhjqubheOE/yW1DtpkiCf+zVEaLpeA8\n"
|
"jmzOP8L2etdsl5ousnDjulXbxF3wn5pU1+d35XxkfUbcuYzKc90SwYsXp0HOdH0q\n"
|
||||||
"fYQChkRICnR/BZd4W9bbohLVII5ym2PaJt2ihB3FeVZIsGXm4wxhAgMBAAE=\n"
|
"XdKofHK0TyTfWknBp9JId1r6lmjR2Sk+o88yES05NS95evaRkX2/AgMBAAE=\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n";
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
|
;
|
||||||
static const char EX_EI_BAD_SIG1[] =
|
static const char EX_EI_BAD_SIG1[] =
|
||||||
"extra-info bob 3E1B2DC141F2B7C6A0F3C4ED9A14A9C35762E24B\n"
|
"extra-info HomersRelay 2F6C040BC5154D4A0F5BDFC1D6560EBD33B735C7\n"
|
||||||
"published 2014-10-05 20:07:00\n"
|
"identity-ed25519\n"
|
||||||
|
"-----BEGIN ED25519 CERT-----\n"
|
||||||
|
"AQQABstTAQhl8HDHWPB6RgLDaVIHfzcJ0CKg6wZINNChtW8QyAacAQAgBAA0yzGH\n"
|
||||||
|
"Ny+LC1czePmvy4QZMKgiyWIhrqqtT5cYgTnnF+oBcVpKEYkEvl/z2/bOTcIFW46U\n"
|
||||||
|
"wqGWJkQxqMbrxYKRo3dspN5Z7E1E8inkI3+oAv2rn4Xj+ZG7lWTwwuw97wc=\n"
|
||||||
|
"-----END ED25519 CERT-----\n"
|
||||||
|
"published 2020-10-14 20:58:04\n"
|
||||||
|
"router-sig-ed25519 1O2wsG/FhFdr117eNcqlB0RSJy5G4ExPCSAS8VG5yDirv6SepYLn99ppqGDH80WtOTc1+LzwZYkQ8tyko1vYAw\n"
|
||||||
"router-signature\n"
|
"router-signature\n"
|
||||||
"-----BEGIN SIGNATURE-----\n"
|
"-----BEGIN SIGNATURE-----\n"
|
||||||
"K5GAkVjpUlofL78NIOE1VDxFn8yYbHK50rVuZG2HxqG/727bon+uMprv4MHjfDcP\n"
|
|
||||||
"V3l9u1uUdGiUPOl8j+hXXw4z/ODeCj/24r2+L32MTjyfUhK49Ld2IlK9iZKlgKYi\n"
|
"V3l9u1uUdGiUPOl8j+hXXw4z/ODeCj/24r2+L32MTjyfUhK49Ld2IlK9iZKlgKYi\n"
|
||||||
"zyoatxdAjU8Xc5WPX692HO4/R9CGLsUfYcEEFU2R3EA=\n"
|
"zyoatxdAjU8Xc5WPX692HO4/R9CGLsUfYcEEFU2R3EA=\n"
|
||||||
"-----END SIGNATURE-----\n"
|
"-----END SIGNATURE-----\n"
|
||||||
;
|
;
|
||||||
|
ATTR_UNUSED static const char EX_EI_BAD_SIG1_FP[] = "2F6C040BC5154D4A0F5BDFC1D6560EBD33B735C7";
|
||||||
static const char EX_EI_BAD_SIG2[] =
|
ATTR_UNUSED
|
||||||
"extra-info bob 3E1B2DC141F2B7C6A0F3C4ED9A14A9C35762E24B\n"
|
static const char EX_EI_BAD_SIG1_KEY[] =
|
||||||
"published 2014-10-06 20:07:00\n"
|
|
||||||
"router-signature\n"
|
|
||||||
"-----BEGIN SIGNATURE-----\n"
|
|
||||||
"K5GAkVjpUlofL78NIOE1VDxFn8yYbHK50rVuZG2HxqG/727bon+uMprv4MHjfDcP\n"
|
|
||||||
"V3l9u1uUdGiUPOl8j+hRNw4z/ODeCj/24r2+L32MTjyfUhK49Ld2IlK9iZKlgKYi\n"
|
|
||||||
"zyoatxdAjU8Xc5WPX692HO4/R9CGLsUfYcEEFU2R3EA=\n"
|
|
||||||
"-----END SIGNATURE-----\n"
|
|
||||||
;
|
|
||||||
|
|
||||||
static const char EX_EI_BAD_SIG3[] =
|
|
||||||
"extra-info bob 3E1B2DC141F2B7C6A0F3C4ED9A14A9C35762E24B\n"
|
|
||||||
"published 2014-10-05 20:07:00\n"
|
|
||||||
"router-signature\n"
|
|
||||||
"-----BEGIN SIGNATURE-----\n"
|
|
||||||
"K5GAkVjpUlofL78NIOE1VDxFn8yYbHK50rVuZG2HxqG/727bon+uMprv4MHjfDcP\n"
|
|
||||||
"V3l9u1uUdGiUPOl8j+hRNw4z/ODeCj/24r2+L32MTjyfUhK49Ld2IlK9iZKlgKYi\n"
|
|
||||||
"zyoatxdAjU8Xc5WPX692HO4/R9CGLsUfYcEEFU2=\n"
|
|
||||||
"-----END SIGNATURE-----\n"
|
|
||||||
;
|
|
||||||
|
|
||||||
static const char EX_EI_BAD_FP[] =
|
|
||||||
"extra-info bob C34293303F0F1E42CB14E593717B834E8E53797D8888\n"
|
|
||||||
"published 2014-10-05 20:07:00\n"
|
|
||||||
"router-signature\n"
|
|
||||||
"-----BEGIN SIGNATURE-----\n"
|
|
||||||
"IDA8ryUYeMx7+Au/xQmX7Y8fXksoHUOXmePND2JYM4rPfishQJ1LpQ15KrolOZDH\n"
|
|
||||||
"FVIk3RmCefNlJeS1/UgWPcU8u2nGw1YQuRBHF4ViTmZ0OevI1pTsSApl4+oIx2dy\n"
|
|
||||||
"DGgCQmKfMbaOixIK8Ioh1Z2NUfMkjbUUE2WWgFTAsac=\n"
|
|
||||||
"-----END SIGNATURE-----\n"
|
|
||||||
;
|
|
||||||
|
|
||||||
static const char EX_EI_BAD_FP_FP[] = "C34293303F0F1E42CB14E593717B834E8E53797D";
|
|
||||||
static const char EX_EI_BAD_FP_KEY[] =
|
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
"MIGJAoGBAKXMSbif4fG+BW/5lIq5V1tMRondIUfKiNizp0E6EcBw5LvYfQV6zrj8\n"
|
"MIGJAoGBAKN5UTDCnsKYmUa2kORmJZUbpNv+dn66Fy4tj3x4rwFHKp7MOlgwK0Zj\n"
|
||||||
"HmMFbB/WGf9XGVMxIBzxzeQBRvCQJh+0QH7+ju5/isIHJZsACMILepr6ywmCcjVU\n"
|
"C4dh77PUXRvnqM0yb3hDCiVJ9XsMbql8JCO8KrMoCoBvKXCVud30/gCY7G0Nf+Py\n"
|
||||||
"iYRtC8zGQLqfkf2cNoo7AhcI5i/YzyW2u1zmbPX5J+8sUErfxydbAgMBAAE=\n"
|
"Z8j1NnOmKLuXnvX5saLtFKLEgAGMf/JTUExWmTAWKk0Ax9rQjVtVAgMBAAE=\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n";
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
|
;
|
||||||
static const char EX_EI_BAD_NICKNAME[] =
|
static const char EX_EI_BAD_SIG2[] =
|
||||||
"extra-info bobhasaverylongnameandidontthinkweshouldlethim A4EA2389A52459B3F7C7121A46012F098BDFC2A4\n"
|
"extra-info HomersRelay 292CB24DC90BEB8210E33B54F63271ED4034ABF9\n"
|
||||||
"published 2014-10-05 20:07:00\n"
|
"identity-ed25519\n"
|
||||||
|
"-----BEGIN ED25519 CERT-----\n"
|
||||||
|
"AQQABstTAS/RMEB+g3lPq9f9/tSb67KQWzKS1B8ujutOZv0byqpyAQAgBABZsEqr\n"
|
||||||
|
"UbN2SrNDRAIWkC7EL8hpUJOCbIRYKRuQ9HQFDrIM8ZI7h542JOKJexNOQmiZA5Ut\n"
|
||||||
|
"cWa/cJvraK48DChLlOZq62S2fNpX43pTktDVV6WqGp/P8IJwT+l6zBqFZQQ=\n"
|
||||||
|
"-----END ED25519 CERT-----\n"
|
||||||
|
"published 2020-10-14 20:58:04\n"
|
||||||
|
"router-sig-ed25519 XFBQj7H4bitpx5Bq9c0Od7dO4qiZKDHbeLGeV4FP+SsGfpft2VvY8/V0oHx2z2Sl3938MIfNxQMjBQ+EtHrdYDA\n"
|
||||||
"router-signature\n"
|
"router-signature\n"
|
||||||
"-----BEGIN SIGNATURE-----\n"
|
"-----BEGIN SIGNATURE-----\n"
|
||||||
"e2wLJFThRMGawxKrQPuH2XCLek/LJsg4XOB8waAjE0xdHOrzjur9x1jIxy7DVU6t\n"
|
"sb8tYPSeSmaTEUpu7v374PVPEoYqTbIpaHezqbC/PfldVenXRLkoB893hP72IJQZ\n"
|
||||||
"z1edbIoL24qucMJvFy2xjSQhFRX4OsyNc0nWr3LfJnTW9aEmxuwXM+mltUD2uFN1\n"
|
"ru9go6Kc6LuobMuVtpwey8nsPqhu8WZn3E4pSL8lCXosttvxtZnDD7/Fu6Ddj05A\n"
|
||||||
"2vYOIQjUmJwS2yfeSKnhXEl2PWVUmgzYL3r4S5kHco4=\n"
|
"ehZpDi2oyBVdR0b5JI7a+m6/j5snn0TTjbGmHHnDPY0=\n"
|
||||||
"-----END SIGNATURE-----\n"
|
"-----END SIGNATURE-----\n"
|
||||||
;
|
;
|
||||||
|
ATTR_UNUSED static const char EX_EI_BAD_SIG2_FP[] = "292CB24DC90BEB8210E33B54F63271ED4034ABF9";
|
||||||
static const char EX_EI_BAD_NICKNAME_FP[] = "A4EA2389A52459B3F7C7121A46012F098BDFC2A4";
|
ATTR_UNUSED
|
||||||
|
static const char EX_EI_BAD_SIG2_KEY[] =
|
||||||
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
|
"MIGJAoGBAM3PF/tml0dOEm53J54liJStfBBlK8cgYhApmm9NMDxqK1DssZBIL4v7\n"
|
||||||
|
"6KTx4yTr9U/rIBHF/0rISy9l86J38eT4twFxuIGcFtGSEFnUgp21uVysev+svQdW\n"
|
||||||
|
"s+RrFLkPu0Wus9v72f7QeAdFA2GKQmZnybsvRhLiGfomQls062wDAgMBAAE=\n"
|
||||||
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
|
;
|
||||||
|
static const char EX_EI_BAD_NICKNAME[] =
|
||||||
|
"extra-info bobhasaverylongnameandidontthinkweshouldlethim AB6C1ABB2A8F6D48ABE641912C8829F686BC6A9D\n"
|
||||||
|
"identity-ed25519\n"
|
||||||
|
"-----BEGIN ED25519 CERT-----\n"
|
||||||
|
"AQQABstTAdi62xiknL6gvZDhCF37r7jL281WUDop4iImEX8bTeSYAQAgBAAfBLo2\n"
|
||||||
|
"i4Yuo3t/HGACeJZoHvVww8HTJq4NyDH5HBdU594t+qpdy/3rlQDsZFxTdh6nYV27\n"
|
||||||
|
"F6aZ6ZkgUSKW//XfX9Vn2xCSGhhwM2kkbWPQCelHAeVUwkCmScz4/rWo0wg=\n"
|
||||||
|
"-----END ED25519 CERT-----\n"
|
||||||
|
"published 2020-10-14 20:58:04\n"
|
||||||
|
"router-sig-ed25519 2YBjWS4B6+ZmLDt7DXxyckF/RgAu9PnaVgpJQTEbrogAjyeoiOplwzx86nc1YtxggCde1KsqicqsYENa+kgiCA\n"
|
||||||
|
"router-signature\n"
|
||||||
|
"-----BEGIN SIGNATURE-----\n"
|
||||||
|
"YiYQB9RBEDxJf729Qgil/pzRqKNR5hsvTD3ODN2IcF/hbwKTtjURCTQYBDXAIB1q\n"
|
||||||
|
"mRpS1R+Rxcp6ta2kfKv5xeuDTcoYcCLeee6Cwivq8/JHhoqQcndG+2Bh8WUGPrRN\n"
|
||||||
|
"8X2AKAVVy/OF+/AZmTAhvWqYfJEZ9HaKEj+k8Ot/u5w=\n"
|
||||||
|
"-----END SIGNATURE-----\n"
|
||||||
|
;
|
||||||
|
ATTR_UNUSED static const char EX_EI_BAD_NICKNAME_FP[] = "AB6C1ABB2A8F6D48ABE641912C8829F686BC6A9D";
|
||||||
|
ATTR_UNUSED
|
||||||
static const char EX_EI_BAD_NICKNAME_KEY[] =
|
static const char EX_EI_BAD_NICKNAME_KEY[] =
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
"MIGJAoGBAKfq7oxD1kMu1+zeG2UVXN4vOu6FDp0V/olA3ttmXpUCgCiBxWTgtwNl\n"
|
"MIGJAoGBAMhug5Yec6r7TIViU3V4BeGGIckfWDVS1ewrhWe/mK5JP2jWZ8JJov7v\n"
|
||||||
"nPf0HcKMaCp/0D9XrbhvIoOsg0OTf1TcJfGsA/zPG7jrWYa4xhD50KYvty9EINK9\n"
|
"Wc2WArhMWYm8idmA+QwFKMmywdfkwc4jHu2jTcIFxTxl2zjFddThSgMgIGXtaBwc\n"
|
||||||
"/UBWNSyXCFDMqnddb/LZ8+VgttmxfYkpeRzSSmDijN3RbOvYJhhBAgMBAAE=\n"
|
"Rn4kuIAG8PekuNNL903rol5OakE6EUvLmJcMYB3rO4W8C6oMhvalAgMBAAE=\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n";
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
|
;
|
||||||
static const char EX_EI_BAD_TOKENS[] =
|
static const char EX_EI_BAD_TOKENS[] =
|
||||||
"extra-info bob 6F314FB01A31162BD5E473D4977AC570DC5B86BB\n"
|
"extra-info HomersRelay 50AF9F6CE4107055260137181DEA24095D292F81\n"
|
||||||
"published 2014-10-05 20:07:00\n"
|
"identity-ed25519\n"
|
||||||
"published 2014-10-05 20:07:00\n"
|
"-----BEGIN ED25519 CERT-----\n"
|
||||||
|
"AQQABstTAfELNKA/8+s09sVWDRCVk0hfX3+ysqp2vFE6atiPZ4hGAQAgBADVXm9g\n"
|
||||||
|
"BXoEjAjHvPwNPaZmrtjYTIc4ssiqud7/XKN1R1Ys+yJuZv23pJrGktXHiNBPI3UX\n"
|
||||||
|
"JOfbtNtw8depsxsDa232u1ZSLWCQ6LtaoalyT/mqs47ASSyYwcvgauWPYQY=\n"
|
||||||
|
"-----END ED25519 CERT-----\n"
|
||||||
|
"published 2020-10-14 20:58:04\n"
|
||||||
|
"published 2020-10-14 20:58:04\n"
|
||||||
|
"router-sig-ed25519 8ggCNPsFzbfbILBVpiKRlUqEaATq5F17Xo+5op/aoPPhp0pCmucYpl0aGX0hbJCGAOjShBmX362ARmpBBDoADQ\n"
|
||||||
"router-signature\n"
|
"router-signature\n"
|
||||||
"-----BEGIN SIGNATURE-----\n"
|
"-----BEGIN SIGNATURE-----\n"
|
||||||
"lhRIafrkKoQmnUoBLiq4XC8XKXrleGJZ5vefkLcgjOJ5IffsvVdIA7Vqq/ISbPrG\n"
|
"LW/DIzbGzTmvvr/wKQo41utHqwAbHvrtF/X4wCQ0Db4GDHgDlac2gtzhz++X8Rrh\n"
|
||||||
"b/Zs0sJNL6naHPxJBglgHJqksSyiYHaeOetXg2Rb+vZ1v2S5BrVgk1nPMDhyIzqc\n"
|
"fiLBdby4omYP/uPkk9pTwvNaSHpsE17zCWrg6re7lUfgq/mJ7VB8eRGzd8NIELEQ\n"
|
||||||
"zU7eCxFf/1sXKtWlEKxGdX4LmVfnIln5aI31Bc4xRrE=\n"
|
"gBK/DQ9oF4yHHRTbNRusUBwtU/UB8wNdkvTYAVw9VWw=\n"
|
||||||
"-----END SIGNATURE-----\n"
|
"-----END SIGNATURE-----\n"
|
||||||
;
|
;
|
||||||
|
ATTR_UNUSED static const char EX_EI_BAD_TOKENS_FP[] = "50AF9F6CE4107055260137181DEA24095D292F81";
|
||||||
static const char EX_EI_BAD_TOKENS_FP[] =
|
ATTR_UNUSED
|
||||||
"6F314FB01A31162BD5E473D4977AC570DC5B86BB";
|
|
||||||
static const char EX_EI_BAD_TOKENS_KEY[] =
|
static const char EX_EI_BAD_TOKENS_KEY[] =
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
"MIGJAoGBAL7Z8tz45Tb4tnEFS2sAyjubBV/giSfZdmXRkDV8Jo4xqWqhWFJn7+zN\n"
|
"MIGJAoGBAMOlFKzgAdxLVePfB0epCUtq3v4vVptYdQNLpqtjhNVZaNwrYKcyO6Wd\n"
|
||||||
"AXBWBThGeVH2WXrpz5seNJXgZJPxMTMsrnSCGcRXZw0Npti2MkLuQ6+prZa+OPwE\n"
|
"115iHgAwbeh7Eva0qb/S3F1KKspiCoTNC2O54Yn8i3kIWfWXjDsdWEJ/CtOZumwH\n"
|
||||||
"OyC6jivtAaY/o9iYQjDC2avLXD3N4LvoygyF418KnNcjbzuFygffAgMBAAE=\n"
|
"DbcAQuczG0D8nTxxn42+QaoHFzTMo1sJ2c91qY7OV7kWYqMB++2VAgMBAAE=\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n";
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
|
;
|
||||||
static const char EX_EI_BAD_START[] =
|
static const char EX_EI_BAD_START[] =
|
||||||
"published 2014-10-05 20:07:00\n"
|
"identity-ed25519\n"
|
||||||
"extra-info bob 5CCCACE71A9BDB5E8E0C942AB3407452350434C0\n"
|
"-----BEGIN ED25519 CERT-----\n"
|
||||||
|
"AQQABstTAT5Axv+qhd0NtmmMe+AXThBG1h3cs559MPKDxbV5Y5TzAQAgBABOa2zh\n"
|
||||||
|
"7y8bgCx3/uQCJ+v9kxNGZDQu+soUPbXyd7OZEaUE/2S7+YtdmqEtQNaF5T+MfEe8\n"
|
||||||
|
"6zDRnfXeNQaQSVGM2mhrkvWGYJkKecOQzuBsnlUmicLqyDV3HY9iefo8Two=\n"
|
||||||
|
"-----END ED25519 CERT-----\n"
|
||||||
|
"published 2020-10-14 20:58:04\n"
|
||||||
|
"router-sig-ed25519 Q3p7pd9YoXRgrRJN9dVqmR382KLxsGQu0zBr0JrfFaqow2fmTwXHnKYJZb5SzQeeYIjnHG/uSRWMmAcQoHnrBw\n"
|
||||||
"router-signature\n"
|
"router-signature\n"
|
||||||
"-----BEGIN SIGNATURE-----\n"
|
"-----BEGIN SIGNATURE-----\n"
|
||||||
"BOiWgexqCAMZ8uyJ7jwBwRkz7Ox8cT4BImkmkV3bQiZgcWvPiYA3EnCm2ye48Ldg\n"
|
"mk0iHF8QMUfJUCjFWXihHQQjFflulpFDYeBgvCwUqrnIlbufuzLdoKEnrio0HCMq\n"
|
||||||
"zBST2p6zJM5o4MEDYGMxfViS86Abj/z7DOY1gtLhjmAaVjIIpXc3koxEZtzCecqy\n"
|
"VcJ+84iAW0likR4qflmerDobhbEpeA21pZx1zCkLdi4KzV1u79xvY5qHKHxWBbeY\n"
|
||||||
"JQz6xEg9/KoEuoT0DRrfYQ+KtQfzBDWrotfOvEa1rvc=\n"
|
"W8yDErz6jVoGEqGOlg9Whlo6QSukttdKK974ugebVTw=\n"
|
||||||
"-----END SIGNATURE-----\n"
|
"-----END SIGNATURE-----\n"
|
||||||
;
|
;
|
||||||
|
ATTR_UNUSED static const char EX_EI_BAD_START_FP[] = "0B6D931123DA9B41F901D6EFCCD64CFBB89C6010";
|
||||||
static const char EX_EI_BAD_START_FP[] = "5CCCACE71A9BDB5E8E0C942AB3407452350434C0";
|
ATTR_UNUSED
|
||||||
static const char EX_EI_BAD_START_KEY[] =
|
static const char EX_EI_BAD_START_KEY[] =
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
"MIGJAoGBAK2OCIfM6Cin/lq99Z3w9tl6HeyGlkBZu9MQEPHxqGIHTq78lIC1UkrC\n"
|
"MIGJAoGBAMfN4ZtcZcKFtmMakKEghsW4SWYPlxg5DTtSD3OSbarO0mucpQqsQnkx\n"
|
||||||
"6NTqlrHBV9dmfzdwJn4GgMWsCZafL0FPIH3HNyNKUxLgyjixyKljHx2rfErSfOxI\n"
|
"Nr4yFOGHmJiZxkKbqVwAq78ZUfFzWVW+I2TaPCWKvCdEib6SlMXueufgcsW2eQLz\n"
|
||||||
"bMoOGBKv7m1EZZ0O5uG9ly9MBiNGdJyLdlnVvH7wSCnYciizpO4lAgMBAAE=\n"
|
"URbswEArwivNzY2wcnweGI6fdoN1FZloE1pk6YR9aZLI91RaWhHNAgMBAAE=\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n";
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
|
;
|
||||||
static const char EX_EI_BAD_PUBLISHED[] =
|
static const char EX_EI_BAD_PUBLISHED[] =
|
||||||
"extra-info bob E67C477E3536BDE348BD407426D9679E5AE0BC16\n"
|
"extra-info HomersRelay 94C608B2CB50E5D488D345A0F54D1C78D13C69E1\n"
|
||||||
"published 2014-99-05 20:07:00\n"
|
"identity-ed25519\n"
|
||||||
|
"-----BEGIN ED25519 CERT-----\n"
|
||||||
|
"AQQABstTAUUzHVvllaO8HwZE3nF9kV7fqSK3WzuS3GvWRF69YHJ3AQAgBACUuECr\n"
|
||||||
|
"PwY0R1fw7rzTgcYuoWCeHhAbePuO6SNk39cQYsI26HPCQakL3yK4258tXsxC4LGN\n"
|
||||||
|
"DzH21SnS5gopeyg17C3ME6LtV1AAUz3Ytmf+2iNHIEJG9FHruZUeX7vCmA0=\n"
|
||||||
|
"-----END ED25519 CERT-----\n"
|
||||||
|
"published 2020-99-14 20:58:04\n"
|
||||||
|
"router-sig-ed25519 9AtZy5azhX81mxtY/ujFfZvoR3biUDtkZnnFMMLg25A2zmjou6WAQeoRQkPH/lN7sBN68NSiJ9+qF2Ef9m+qCQ\n"
|
||||||
"router-signature\n"
|
"router-signature\n"
|
||||||
"-----BEGIN SIGNATURE-----\n"
|
"-----BEGIN SIGNATURE-----\n"
|
||||||
"l45IziBaXRKIjPAIUogMFNjQgH6k6Vm0+6r5+oByr4sP+B3ufNdUA6+WqBs43F0Z\n"
|
"eBc/YKRfl2OLethfPnK+rp6WF4Q//dCEI63eYMesUuLomAiOWdvPjW8Ispl9auPx\n"
|
||||||
"IqcJiT9nFn0DuNd/liOyOCixppDLx5h5NrhoGqcT3ySADEEXhzjlmc35TI3YBNVO\n"
|
"DLw5BQR4bYuO2oTNWS0fGyh7sykepCkuuvfcxRMDuGDGz9KmfJezKOiHgPENpzD+\n"
|
||||||
"v98fotmwIEg9YRWVGPg6XuIn2PRyiboFyjUpaYGCV0Q=\n"
|
"hlTqtTKRwD1TP3hJtHSxYi8ZTR9XuR0MuZ/uQxVSwW8=\n"
|
||||||
"-----END SIGNATURE-----\n"
|
"-----END SIGNATURE-----\n"
|
||||||
;
|
;
|
||||||
|
ATTR_UNUSED static const char EX_EI_BAD_PUBLISHED_FP[] = "94C608B2CB50E5D488D345A0F54D1C78D13C69E1";
|
||||||
static const char EX_EI_BAD_PUBLISHED_FP[] = "E67C477E3536BDE348BD407426D9679E5AE0BC16";
|
ATTR_UNUSED
|
||||||
static const char EX_EI_BAD_PUBLISHED_KEY[] =
|
static const char EX_EI_BAD_PUBLISHED_KEY[] =
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
"MIGJAoGBAL7q8GEI18iv8Fo0QbNHmFatQ2FNacalPldpmKUdMJYEVZtdOR0nhcrY\n"
|
"MIGJAoGBALSDc0v0jfhvfcx7rxGQhCGzBGPZepZoJQY/dQrjBlMo0EqZg3KjYXiv\n"
|
||||||
"BvG6303md3INygg+KP49RvWEJR/cU4RZ9QfHpORxH2OocMyRedw2rLex2E7jNNSi\n"
|
"JpukXfXMgbiTyTv2Kknsbhjx1WhVTwNs+smdea6RryQJX/PbO7HzriaCm99XFO/b\n"
|
||||||
"52yd1sHFYI8ZQ4aff+ZHUjJUGKRyqpbc8okVbq/Rl7vug0dd12eHAgMBAAE=\n"
|
"IlJ918osvoU1VIhiPTzTJPUT6hmP4RNHXJe2ZTjDACGa/Kk16SLlAgMBAAE=\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n";
|
|
||||||
|
|
||||||
static const char EX_EI_GOOD_ED_EI[] =
|
|
||||||
"extra-info emma A692FE045C32B5E3A54B52882EF678A9DAC46A73\n"
|
|
||||||
"identity-ed25519\n"
|
|
||||||
"-----BEGIN ED25519 CERT-----\n"
|
|
||||||
"AQQABf55AYgHn/OKR8GHBlscN5VkO73wA9jSci8QgTM30615ZT44AQAgBAC08woT\n"
|
|
||||||
"MBZpKzRcaoEJhEG7+RmuYtnB2+nODk9IRIs8ZoyYPTZ6dLzI+MLMmtzUuo/Wmvw0\n"
|
|
||||||
"PflTyCb2RlWitOEhAErWH3Z9UmYGnzM/COId0Fe3ScSriyvRoFnJY1+GVAQ=\n"
|
|
||||||
"-----END ED25519 CERT-----\n"
|
|
||||||
"published 2014-10-05 20:07:00\n"
|
|
||||||
"router-sig-ed25519 a7K8nwfg+HrdlSGQwr9rnLBq0qozkyZZs6d6aiLEiXGdhV1r9KJncmlQ5SNoY/zMQlyQm8EV5rCyBiVliKQ1Bw\n"
|
|
||||||
"router-signature\n"
|
|
||||||
"-----BEGIN SIGNATURE-----\n"
|
|
||||||
"GvmCmIGgbC1DeawRyRuChy62VmBOG0EviryG/a2qSZiFy0iPPwqSp5ZyZDQEIEId\n"
|
|
||||||
"kkk1zPzK1+S3fmgOAXyXGH0r4YFkoLGnhMk07BoEwi6HEXzjJsabmcNkOHfaOWgs\n"
|
|
||||||
"/5nvnLfcmxL4c6FstZ7t9VQpE06y3GU0zwBeIy1qjp0=\n"
|
|
||||||
"-----END SIGNATURE-----\n"
|
|
||||||
"\n"
|
|
||||||
"\n"
|
|
||||||
;
|
|
||||||
static const char EX_EI_GOOD_ED_EI_FP[] =
|
|
||||||
"A692FE045C32B5E3A54B52882EF678A9DAC46A73";
|
|
||||||
static const char EX_EI_GOOD_ED_EI_KEY[] =
|
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
|
||||||
"MIGJAoGBAM3jdYwjwGxDWYj/vyFkQT7RgeCNIn89Ei6D2+L/fdtFnqrMXOreFFHL\n"
|
|
||||||
"C7CK2v2uN3v+uXxfb5lADz3NcalxJrCfGTGtaBk7PwMZraTSh2luFKOvSRBQCmB1\n"
|
|
||||||
"yD5N0QqnIhBJoGr6NITpbWyiTKWvYLjl9PZd9af8e8jQCAa5P1j1AgMBAAE=\n"
|
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
;
|
;
|
||||||
|
|
||||||
static const char EX_EI_ED_MISSING_SIG[] =
|
static const char EX_EI_ED_MISSING_SIG[] =
|
||||||
"extra-info rachel 2A7521497B91A8437021515308A47491164EDBA1\n"
|
"extra-info HomersRelay 961B50E8433A0ECDAFFB51FBC951B869BD89A7E5\n"
|
||||||
"identity-ed25519\n"
|
"identity-ed25519\n"
|
||||||
"-----BEGIN ED25519 CERT-----\n"
|
"-----BEGIN ED25519 CERT-----\n"
|
||||||
"AQQABf55AT2/T71LFYHiI1ppwNiuaewIu2Hq+GWWQ85O8gpWcUxeAQAgBAC2dgYu\n"
|
"AQQABstTAWCgrsRHajn+P0SbnvG/WcI46/wS061O1ImRCajjJY8WAQAgBADH8/EZ\n"
|
||||||
"moxhtuip7GVlthT9iomZKba1IllVa7uE1u2uO9BUYZQWXciFt7OnNzMH5mlffwxB\n"
|
"onxMi+CrbK3/xNGakEevRzyE2bFAF45l/y8SYeBhcvfzQuGaxuHgIt6D6UAFiVyV\n"
|
||||||
"1dWCl+G5nbOsV5jYLbfhrF5afZotf+EQTfob4cCH79AV223LPcySbTHTtQ4=\n"
|
"jM+vwjyLTrSicJAPFiVJkbu4tbDijcjr34IlwsAVV/NYX05bX8hVpaSSPQU=\n"
|
||||||
"-----END ED25519 CERT-----\n"
|
"-----END ED25519 CERT-----\n"
|
||||||
"published 2014-10-05 20:07:00\n"
|
"published 2020-10-14 20:58:04\n"
|
||||||
"router-signature\n"
|
"router-signature\n"
|
||||||
"-----BEGIN SIGNATURE-----\n"
|
"-----BEGIN SIGNATURE-----\n"
|
||||||
"oypRD2IZQ5EttOE8dvofrW80nnBfijSkvYzBrM6H4KVeayRYvWfmi96dYO6ybMqm\n"
|
"fcD3kYMeOBr4wwKKuRKz7KoHSDIInwYFVnm/kFAMKrSeU+z1MOqchobpp4AuN2p0\n"
|
||||||
"Yp7Gs3ngqeeNdfHtkRPuQVUXUGYZgBTvYItuagnFlFgRqaHy0knwUIVOL35eqWYx\n"
|
"BiOLYz621PcTxpURvagwoPcqulkIoWazng9fKyy+ZUk2z9QOjZ2A1PXZVnSKNLxm\n"
|
||||||
"xSbQKA7fglxEDMFs/RK7FRP4dWc731ZMt5wzzfJHZ8E=\n"
|
"P5nNO78Ev5qg6fsYcE40UppOu6mOAXKaKhwyl7ZEvNc=\n"
|
||||||
"-----END SIGNATURE-----\n"
|
"-----END SIGNATURE-----\n"
|
||||||
"\n"
|
|
||||||
"\n"
|
|
||||||
;
|
;
|
||||||
static const char EX_EI_ED_MISSING_SIG_FP[] =
|
ATTR_UNUSED static const char EX_EI_ED_MISSING_SIG_FP[] = "961B50E8433A0ECDAFFB51FBC951B869BD89A7E5";
|
||||||
"2A7521497B91A8437021515308A47491164EDBA1";
|
ATTR_UNUSED
|
||||||
static const char EX_EI_ED_MISSING_SIG_KEY[] =
|
static const char EX_EI_ED_MISSING_SIG_KEY[] =
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
"MIGJAoGBAOOB8ccxbtk2dB5FuKFhGndDcO6STNjB6KiG0b9X2QwKrOZMfmXSigto\n"
|
"MIGJAoGBALlAaT9rapqG8s8WuOI/wt9hdIMEZrjFyywelTuY3wDMvWMqKJUX0VCT\n"
|
||||||
"mtC1JfPTxECayRjLSiP/9UD8iTVvlcnc8mMWBGM12Pa/KoCZRn7McHI3JJ7n9lfn\n"
|
"TtRco0+Q0QiQcMmcbvWz+BknC7L457XAeBmKckLjSGhu8Ett1/nYiT/wKv4eCOtT\n"
|
||||||
"qw9+iZ9b/rBimzOb3W6k3uxzg9r8secdq4jJwTnwSjTObgxZtC8/AgMBAAE=\n"
|
"KxkSGkrJX4L9mgdrquwCY6Eq4pUXFHHA2OkE/w25wmbud5GiZ7stAgMBAAE=\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
;
|
;
|
||||||
|
|
||||||
static const char EX_EI_ED_MISSING_CERT[] =
|
static const char EX_EI_ED_MISSING_CERT[] =
|
||||||
"extra-info lynne E88E43E86015345A323D93D825C33E4AD1028F65\n"
|
"extra-info HomersRelay 65EE5370C2EFEC112E351206CF00C4DB89670356\n"
|
||||||
"published 2014-10-05 20:07:00\n"
|
"published 2020-10-14 20:58:04\n"
|
||||||
"router-sig-ed25519 H4gKIKm5K9Pfkriy7SlMUD6BdYVp6B5mXKzR/rTyYlpH0tEZ4Fx2hlHNfNNdWXJieXzKZQZo8e7SOVzvrAC3CQ\n"
|
"router-sig-ed25519 VaqCeYmnufCStWecAdhxAUs2tBY7DlWBVVtkduk1dJkBzRi9aDTi+7lU80wrYbH1Hb3lykXM+TI5GOabbO8uBQ\n"
|
||||||
"router-signature\n"
|
"router-signature\n"
|
||||||
"-----BEGIN SIGNATURE-----\n"
|
"-----BEGIN SIGNATURE-----\n"
|
||||||
"dIrbQjK5T9t5KM8CpsMF85hh2i060oPIxzYQMgE1q4j99dtb/n7SE8nhj1Sjij4D\n"
|
"Bum6OqCQ4asVALAzusLhkn9YgjazJo1Ta4Ff/qubOGcY7JqIC0f7oUfd6D+EhsZS\n"
|
||||||
"7JvTjGdLHi3bFSxXaSmla0wxD9PUYFN7VsBQmwSaDrqrzJFb1SGwZuzW1IEZ7BBi\n"
|
"nRuZjp3KS1jM3gLPaWDI1cGNIG2RwS7QoWjFhjsUAQuBtKVmfBNtdiS9syNLxIlw\n"
|
||||||
"H0czsxEteg5hcNRwISj5WVthuWmau9v13MijtZGSK40=\n"
|
"zxhm2sGMJ9gxhTIK2noGd36ur+XaQrRousdbkjpwiRk=\n"
|
||||||
"-----END SIGNATURE-----\n"
|
"-----END SIGNATURE-----\n"
|
||||||
"\n"
|
|
||||||
"\n"
|
|
||||||
"\n"
|
|
||||||
;
|
;
|
||||||
static const char EX_EI_ED_MISSING_CERT_FP[] =
|
ATTR_UNUSED static const char EX_EI_ED_MISSING_CERT_FP[] = "65EE5370C2EFEC112E351206CF00C4DB89670356";
|
||||||
"E88E43E86015345A323D93D825C33E4AD1028F65";
|
ATTR_UNUSED
|
||||||
static const char EX_EI_ED_MISSING_CERT_KEY[] =
|
static const char EX_EI_ED_MISSING_CERT_KEY[] =
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
"MIGJAoGBALjA/geb0TR9rp/UPvLhABQpB0XUDYuZAnLkrv+i7AAV7FemTDveEGnc\n"
|
"MIGJAoGBALir3RWzz5UpiEP+kV4qPtsKzt3C2cwZ0c/k/UusCnszyCVRFJSRa/Iw\n"
|
||||||
"XdXNSusO1mHOquvr0YYKPhwauInxD56S8QOzLYiWWajGq8XHARQ33b4/9K2TUrAx\n"
|
"Er59Y+Qe/r8ehHts7KXlv9r4CIKGUlXv2YKMI6Dernxnl8e68F3sUyy+GY4a0UJd\n"
|
||||||
"W9HTHV1U1zrPlCJtrkbjxsYoHpUg5ljzM7FGYGY5xuvyHu18SQvzAgMBAAE=\n"
|
"sQyMwWcVlOkD6kSUPT4ryAGw3wlL8MAA2xllNl+7Lexpb7VficZLAgMBAAE=\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
;
|
;
|
||||||
static const char EX_EI_ED_BAD_CERT1[] =
|
static const char EX_EI_ED_BAD_CERT1[] =
|
||||||
"extra-info marcie F78D8A655607D32281D02144817A4F1D26AE520F\n"
|
"extra-info HomersRelay 82D64A389FBADE8BB38C8F7027EE15B34BBA0CB3\n"
|
||||||
"identity-ed25519\n"
|
"identity-ed25519\n"
|
||||||
"-----BEGIN PLAGICAL SPELL-----\n"
|
"-----BEGIN PLAGICAL SPELL-----\n"
|
||||||
"aaaa\n"
|
"aaaa\n"
|
||||||
"-----END PLAGICAL SPELL\n"
|
"-----END PLAGICAL SPELL-----\n"
|
||||||
"published 2014-10-05 20:07:00\n"
|
"published 2020-10-14 20:58:04\n"
|
||||||
"router-sig-ed25519 KQJ+2AH7EkkjrD0RtDtUAIr+Vc7wndwILYnoUxFLSJiTP+5fMi54eFF/f1OgkG8gYyTh8phMij9WOxK/dsOpBg\n"
|
"router-sig-ed25519 q0SZRiMpJ4CG7rebOJk6HzR/TNEmsU7wXDjFYxLMdJgvkQZf9ynsyEIvS9buInsY09czmAFQOUnY2poCBkHeCw\n"
|
||||||
"router-signature\n"
|
"router-signature\n"
|
||||||
"-----BEGIN SIGNATURE-----\n"
|
"-----BEGIN SIGNATURE-----\n"
|
||||||
"XWD+P25AH6moi79j20Si3hqKGcJDws+FORL1MTu+GeJLV1mp5CR9N83UH4ffulcL\n"
|
"OlhdHgl8dxV4+GRqjsE45qk8QlBYL4+hqSdf4biQGgVGpQv+kbUqzioS8jmiMC4e\n"
|
||||||
"CpSSBDL/j74HqapzW7QvBx3FilaNT55GvcobZDFK4TKkCEyEmcuWKpEceBS7JTTV\n"
|
"VzeFBwEbHxD4OI6C/LWjgOk33uZ3Re7yWnlMqnnWKZOLAEX1/BD4SuTSwlTlzci8\n"
|
||||||
"SvwZeOObTjWPafELbsc/gI9Rh5Idwu7mZt3ZVntCGaQ=\n"
|
"48mzwzTnjh3I1j7ChMm5r/QIpgiC1iwrgw7oVK7mvE8=\n"
|
||||||
"-----END SIGNATURE-----\n"
|
"-----END SIGNATURE-----\n"
|
||||||
"\n"
|
|
||||||
;
|
;
|
||||||
static const char EX_EI_ED_BAD_CERT1_FP[] =
|
ATTR_UNUSED static const char EX_EI_ED_BAD_CERT1_FP[] = "82D64A389FBADE8BB38C8F7027EE15B34BBA0CB3";
|
||||||
"F78D8A655607D32281D02144817A4F1D26AE520F";
|
ATTR_UNUSED
|
||||||
static const char EX_EI_ED_BAD_CERT1_KEY[] =
|
static const char EX_EI_ED_BAD_CERT1_KEY[] =
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
"MIGJAoGBAMlR46JhxsCmWYtmIB/JjTV2TUYIhJLmHy+X7FfkK3ZVQvvl9/3GSXFL\n"
|
"MIGJAoGBAMBDm5sHAbst7tvS5k9sCh6/7b3fEMW9cpARKuK5VR5PdcNJDkxWPTPr\n"
|
||||||
"3USfyf3j34XLh8An7pJBi9LAHkIXgnRbglCud7dXoexabmC+c2mSbw5RnuxDGEwz\n"
|
"J/Jy0xTqnWrUD0njXpsdE7PKIspn6a5dnk775GmpH8Z8KnRcCrx7AX1Rd0evg4+s\n"
|
||||||
"krXUph/r2b+2UY1CgEt28nFigaHrIQbCmF4szFX/2GPYCLi5SrRNAgMBAAE=\n"
|
"nCPASoD8RlfduLuJ2ZtdGZ8fWOYc2pQmLLYzy0BxoLKC0P9+/CwBAgMBAAE=\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
;
|
;
|
||||||
static const char EX_EI_ED_BAD_CERT2[] =
|
static const char EX_EI_ED_BAD_CERT2[] =
|
||||||
"extra-info jaeger 7C2B42E783C4E0EB0CC3BDB37385D16737BACFBD\n"
|
"extra-info HomersRelay 590FDF3A7684E2F9FCC29CFC7941D73570AF5457\n"
|
||||||
"identity-ed25519\n"
|
"identity-ed25519\n"
|
||||||
"-----BEGIN ED25519 CERT-----\n"
|
"-----BEGIN ED25519 CERT-----\n"
|
||||||
"AQoABf55Acpw27GZBdwGCgawCj2F/DPadt8F/9DnEWywEew1Yi3qAOtLpCB8KXL7\n"
|
"AQoABf55Acpw27GZBdwGCgawCj2F/DPadt8F/9DnEWywEew1Yi3qAOtLpCB8KXL7\n"
|
||||||
"4w5deFW2RBg8qTondNSUvAmwYLbLjNXMmgA3+nkoJOP3fcmQMHz1jm5xzgs2lCVP\n"
|
"4w5deFW2RBg8qTondNSUvAmwYLbLjNXMmgA3+nkoJOP3fcmQMHz1jm5xzgs2lCVP\n"
|
||||||
"t5txApaBIA4=\n"
|
"t5txApaBIA4=\n"
|
||||||
"-----END ED25519 CERT-----\n"
|
"-----END ED25519 CERT-----\n"
|
||||||
"published 2014-10-05 20:07:00\n"
|
"published 2020-10-14 20:58:04\n"
|
||||||
"router-sig-ed25519 DRQ4MLOGosBbW8M+17klNu8uWVkPxErmmEYoSo6OuH2Tzrcs6sUY+8Xi2qLoV1SbOugJ214Htl0I+6ceag+vBA\n"
|
"router-sig-ed25519 3vgrf5SH8v7s6BNlXH/+RckQExrLwkY9mCgxewnXqvefYzyORy3GAiUQ9Iu0TbldP/Vtf+UgqnaZVbTERCoRBA\n"
|
||||||
"router-signature\n"
|
"router-signature\n"
|
||||||
"-----BEGIN SIGNATURE-----\n"
|
"-----BEGIN SIGNATURE-----\n"
|
||||||
"DfdA+DbuN9nVJNujuSY5wNCDLk7Hfzkrde/sK0hVmZRvivtpF/Fy/dVQHHGNFY5i\n"
|
"IKKNccP7/3owyYgAC0fnnsyx22Yc7yHqQFMVXwcqV9XH43yhN8KUrbzoZH2pkZzA\n"
|
||||||
"L1cESAgq9HLdbHU+hcc08XXxTIaGwvoklcJClcG3ENVBWkTXbJNT+ifr7chEagIi\n"
|
"0Mn47I82FCd+yQyCmURmWFSAVRQGH8rmBzl+lG9TiRdlBdZfp7YaazQGOVpE6BcM\n"
|
||||||
"cVrtU6RVmzldSbyir8V/Z4S/Cm67gYAgjM5gfoFUqDs=\n"
|
"N4Rh1XY1zV1c82mdQW/JgJ9qDCvflILm597sADqdfyI=\n"
|
||||||
"-----END SIGNATURE-----\n"
|
"-----END SIGNATURE-----\n"
|
||||||
;
|
;
|
||||||
static const char EX_EI_ED_BAD_CERT2_FP[] =
|
ATTR_UNUSED static const char EX_EI_ED_BAD_CERT2_FP[] = "590FDF3A7684E2F9FCC29CFC7941D73570AF5457";
|
||||||
"7C2B42E783C4E0EB0CC3BDB37385D16737BACFBD";
|
ATTR_UNUSED
|
||||||
static const char EX_EI_ED_BAD_CERT2_KEY[] =
|
static const char EX_EI_ED_BAD_CERT2_KEY[] =
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
"MIGJAoGBALAM1F/0XJEsbxIQqb3+ObX/yGVnq9of8Q9sLsmxffD6hwVpCqnV3lTg\n"
|
"MIGJAoGBAK5yV8+I/GiI+Vz6ob7Oecf7TpuLoBPEppLzY3RLv9GqwrIyAhWR7oQk\n"
|
||||||
"iC6+xZ/bSlTGLPi0k8QLCaTmYxgKwmlMPpbQZ4kpZUrsb9flKdChMN7w8hd48pY9\n"
|
"qrImJE3U+QPdf/Sw/+LG6fIuZPQAyHx8E7FtUBrT6X9gmel+H/4bj40OQhs6nynV\n"
|
||||||
"lu8QiAEgErsl5rCCJIHHjrxxM/Cnd0TnedRnj/Z2YqpNx/ggsmsRAgMBAAE=\n"
|
"XKnq0tsaNnQrb5ofdFrlCcG+a+ij7gqq1gd9JzITGK7tEdGIMKprAgMBAAE=\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
;
|
;
|
||||||
static const char EX_EI_ED_BAD_SIG1[] =
|
|
||||||
"extra-info vary 5AC3A538FEEFC6F9FCC5FA0CE64704396C30D62A\n"
|
|
||||||
"identity-ed25519\n"
|
|
||||||
"-----BEGIN ED25519 CERT-----\n"
|
|
||||||
"AQQABf55AbPp++GrRb6WphSu+PkMaYsqY/beiLBmtiV3YP5i2JkKAQAgBABKXjg1\n"
|
|
||||||
"aiz2JfQpNOG308i2EojnUAZEk0C0x9g2BAAXGL63sv3eO/qrlytsG1x2hkcamxFn\n"
|
|
||||||
"LmfZBb/prqe1Vy4wABuhqWHAUtM29vXR6lpiCJeddt9Pa8XVy/tgWLX6TAw=\n"
|
|
||||||
"-----END ED25519 CERT-----\n"
|
|
||||||
"published 2014-10-05 20:07:00\n"
|
|
||||||
"router-sig-ed25519 a7K8nwfg+HrdlSGQwr9rnLBq0qozkyZZs6d6aiLEiXGdhV1r9KJncmlQ5SNoY/zMQlyQm8EV5rCyBiVliKQ1Bw\n"
|
|
||||||
"router-signature\n"
|
|
||||||
"-----BEGIN SIGNATURE-----\n"
|
|
||||||
"xhZX8Qmgft51NJ7eMd4vrESzf/VdxDrBz7hgn8K+5bLtZUksG0s6s7IyGRYWQtp4\n"
|
|
||||||
"/7oc9sYe3lcQiUN2K7DkeBDlL8Pcsl8aIlKuujWomCE3j0TIu+8XK6oJeo7eYic+\n"
|
|
||||||
"IA7EwVbdZsKsW5/eJVzbX2eO0a5zyJ5RIYotFNYNCSE=\n"
|
|
||||||
"-----END SIGNATURE-----\n"
|
|
||||||
"\n"
|
|
||||||
;
|
|
||||||
static const char EX_EI_ED_BAD_SIG1_FP[] =
|
|
||||||
"5AC3A538FEEFC6F9FCC5FA0CE64704396C30D62A";
|
|
||||||
static const char EX_EI_ED_BAD_SIG1_KEY[] =
|
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
|
||||||
"MIGJAoGBAMvb6SuoIkPfBkJgQuo5aQDepAs1kEETZ9VXotMlhB0JJikrqBrAAz+7\n"
|
|
||||||
"rjIJ4JsBaeQuN0Z5ksXk2ebxtef7oMIUs37NfekLQHbNR0VsXkFXPEGmOAqpZjW0\n"
|
|
||||||
"P524eHqybWYZTckvZtUvKI3xYGD6kEEkz4qmV6dcExU1OiAYO9jrAgMBAAE=\n"
|
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
|
||||||
;
|
|
||||||
static const char EX_EI_ED_BAD_SIG2[] =
|
|
||||||
"extra-info coward 7F1D4DD477E340C6D6B389FAC26EDC746113082F\n"
|
|
||||||
"identity-ed25519\n"
|
|
||||||
"-----BEGIN ED25519 CERT-----\n"
|
|
||||||
"AQQABf56AZkSDiFZ1QaiLJhcKdFDE5Kei/sPaPEIEoPMGP4BvOVXAQAgBAAlRLzx\n"
|
|
||||||
"U029tgIL9BRe47MVgcPJGy48db6ntzhjil7iOnWKT70z2LorUD5CZoLJs72TjB6r\n"
|
|
||||||
"8+HYNyFLEM6dvytWZf9NA5gLdhogbFcUk/R3gbNepmCF7XoZjbhPIp8zOwg=\n"
|
|
||||||
"-----END ED25519 CERT-----\n"
|
|
||||||
"published 2014-10-05 20:07:00\n"
|
|
||||||
"router-sig-ed25519 yfV+GySMIP1fw1oVa1C1de4XOWBqT4pUtEmSHq1h+WrLBNCh3/HZWvNC/denf2YVntuQrMLCJEv5ZaFKU+AIDQ\n"
|
|
||||||
"router-signature\n"
|
|
||||||
"-----BEGIN SIGNATURE-----\n"
|
|
||||||
"g+BWq69i9CP19va2cYMAXCQ6jK3IG0VmNYspjjUFgmFpJKGG6bHeOkuy1GXp47fG\n"
|
|
||||||
"LzZ3OPfJLptxU5AOQDUUYf25hu9uSl6gyknCzsszFs5n6ticuNejvcpzw6UfO1LP\n"
|
|
||||||
"5u+mGJlgpcMtmSraImDZrRipmZ3oRWvEULltlvzGQcQ=\n"
|
|
||||||
"-----END SIGNATURE-----\n"
|
|
||||||
"\n"
|
|
||||||
;
|
|
||||||
static const char EX_EI_ED_BAD_SIG2_FP[] =
|
|
||||||
"7F1D4DD477E340C6D6B389FAC26EDC746113082F";
|
|
||||||
static const char EX_EI_ED_BAD_SIG2_KEY[] =
|
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
|
||||||
"MIGJAoGBALzOyfCEUZnvCyhlyMctPkdXg/XRE3Cr6QgyzdKf5kQbUiu2n0FgSHOX\n"
|
|
||||||
"iP5gfq8sO9eVeTPZtjE7/+KiR8aQJECy+eoye+lpsfm3tXpLxnpOIgL4DlURxlo/\n"
|
|
||||||
"rfCyv30SYBN9j62qgU9m6U2ydI0tH7/9Ep8yIY/QL8me8VAjLbf/AgMBAAE=\n"
|
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
|
||||||
;
|
|
||||||
|
|
||||||
static const char EX_EI_ED_MISPLACED_CERT[] =
|
static const char EX_EI_ED_MISPLACED_CERT[] =
|
||||||
"extra-info msselene 3B788BD0CE348BC5CED48313307C78175EB6D0F3\n"
|
"extra-info HomersRelay 8CEBCF8A15C8C1F0537C31C4286E56BDFD710235\n"
|
||||||
"published 2014-10-05 20:07:00\n"
|
"published 2020-10-14 20:58:04\n"
|
||||||
"identity-ed25519\n"
|
"identity-ed25519\n"
|
||||||
"-----BEGIN ED25519 CERT-----\n"
|
"-----BEGIN ED25519 CERT-----\n"
|
||||||
"AQQABf55AWBcqjzLESDuLNGsqQ/tHn32XueXwj2fDlgEy/kQNVf/AQAgBAAFOegg\n"
|
"AQQABstTAe3zhxsBmvrWABOzif60p/X+9bZrLiRVcYhAMELIWvSwAQAgBAAAyj9D\n"
|
||||||
"XY1LR82xE9ohAYJxYpwJJw0YfXsBhGHqfakEoBtSgFJ3cQAUXZQX4lX6G8IxAlQB\n"
|
"q/oQQN8BgmK0cUk1kNsnpNOvCNZ9BorUZY+EtFHiND/PYtDe0SNmODVcA4eBvdXy\n"
|
||||||
"7Rj7dPQuQRUmqD1yyKb/ScBgCa8esxlhNlATz47kRNR38A3TcoJ4c1Zv6AE=\n"
|
"v5/0QI2S8roW7h1X8V0QVRguZ/3WwJpFE/qLHJ7LWu7kDPqzCjXHE5hQgQw=\n"
|
||||||
"-----END ED25519 CERT-----\n"
|
"-----END ED25519 CERT-----\n"
|
||||||
"router-sig-ed25519 Q52JKH9/iMsr1jIPlWHHxakSBvyqjT1gzL944vad4OhzCZuNuAYGWyWSGzTb1DVmBqqbAUq73TiZKAz77YLNCQ\n"
|
"router-sig-ed25519 beLJb1fZrhBz4t6pBCnJl1UGX6QWFoKzbwRwxLUTUHUDyGpPIIbIEdxxem/RPcaYiqXti45lW57v0CEgYktcBw\n"
|
||||||
"router-signature\n"
|
"router-signature\n"
|
||||||
"-----BEGIN SIGNATURE-----\n"
|
"-----BEGIN SIGNATURE-----\n"
|
||||||
"YplvAIwExGf5/L8AoroVQXtGm+26EffrxKBArMKn0zS1NOOie1p0oF/+qJg+rNWU\n"
|
"BfdqDEu4Qk0SxBTelpzTqjlj1B3Yd0rQO0dftyGLtQmp3gVhUQqiFrW5/R1nTJKc\n"
|
||||||
"6cv3Anf188EXGlkUOddavgVH8CQbvve2nHSfIAPxjgEX9QNXbM5CiaMwgpCewXnF\n"
|
"uOn9o/Te93+OOBLn0joJZ7JpHQJHjcHgW4kCoc2cAYUBEwgCHAa+eV5+jAVQHIm9\n"
|
||||||
"UoNBVo5tydeLHVns15MBg/JNIxUQMd6svMoPp2WqmaE=\n"
|
"YHGkwZNaQct0ZiYnzWtnWzDVLB8ZpJltvYecflLTq88=\n"
|
||||||
"-----END SIGNATURE-----\n"
|
"-----END SIGNATURE-----\n"
|
||||||
"\n"
|
|
||||||
;
|
;
|
||||||
static const char EX_EI_ED_MISPLACED_CERT_FP[] =
|
ATTR_UNUSED static const char EX_EI_ED_MISPLACED_CERT_FP[] = "8CEBCF8A15C8C1F0537C31C4286E56BDFD710235";
|
||||||
"3B788BD0CE348BC5CED48313307C78175EB6D0F3";
|
ATTR_UNUSED
|
||||||
static const char EX_EI_ED_MISPLACED_CERT_KEY[] =
|
static const char EX_EI_ED_MISPLACED_CERT_KEY[] =
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
"MIGJAoGBALTwNqhTprg1oC6bEbDqwIYBoER6prqUXQFbwbFDn+ekXhZj8vltgGwp\n"
|
"MIGJAoGBAK0gXKx7t/EMu82I7+XV+/D7zuaZdzInBi/ieys1iiKpYqfSsvIS3hBu\n"
|
||||||
"aDGl9ceZWDKfi+reR6rZXjAJGctmv0VHkfe7maUX4FC/d2T8N8DvS+3IvJzFMpbT\n"
|
"TEWeuCUds9O81RMOqgGRktHPGu+6D863BGlzL+Ib+iih5ceclmYAJ6WvZF7w9enc\n"
|
||||||
"O0fFrDTrCSnPikqFfQWnlP8yoF5vO7wo0jRRY432fLRXg9WqVzdrAgMBAAE=\n"
|
"JGjP+wwJGWQVKTltlt9y/S/KM7KEGnCf5Biy1ZqJb9V3Fjp8R8DtAgMBAAE=\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
;
|
;
|
||||||
static const char EX_EI_ED_MISPLACED_SIG[] =
|
static const char EX_EI_ED_MISPLACED_SIG[] =
|
||||||
"extra-info grazie 384E40A5DEED4AB1D8A74F1FCBDB18B7C24A8284\n"
|
"extra-info HomersRelay 3D9E654300A20118E237361CBBBBCFC71CA34BAD\n"
|
||||||
"identity-ed25519\n"
|
"identity-ed25519\n"
|
||||||
"-----BEGIN ED25519 CERT-----\n"
|
"-----BEGIN ED25519 CERT-----\n"
|
||||||
"AQQABf55AcGuIBoa6TBqD8Gg5atcwp/+r9ThxIBkULmPv9OSGhv+AQAgBACXH13y\n"
|
"AQQABstTAfBKg56c9SNv+Hhf8VjMX2h9s7MS1jPh5WIbHfJ+JgLuAQAgBADdptx9\n"
|
||||||
"mUvdpcN6oRN1nX6mnH40LyfYR5um8xogJZk3oINse5cRNrfMgVWiBpDlJZAwlDDa\n"
|
"uqI1om7gmESf4MImZeK+wKjgv0gttLYUyFu39dcjvDoAWdzQXjJMtR5Q2WlEqqPC\n"
|
||||||
"lx99hzuZBong+CiOcnEvLMsBaVJmNTm5mpdetYclZpl0g8QEXznXXeRBMgM=\n"
|
"Fe41S7M6zYz6O5dbLp4vdDtdr6ZM5gWZwfdxqAfxWKwIsu8IOFOpjAkgVAQ=\n"
|
||||||
"-----END ED25519 CERT-----\n"
|
"-----END ED25519 CERT-----\n"
|
||||||
"router-sig-ed25519 TxuO86dQ3pUaIY2raQ3hoDBmh4TTPC0OVgY98T5cf6Y+sHyiELCkkKQ3lqqXCjqnbTLr1/4riH980JoWPpR+Dw\n"
|
"router-sig-ed25519 re8w0o9hmBdpenf9ifhETkcWriJG9sWXDpkogyA4lyQ9MDDrlT7C1IJyGI666ZctCS4lT/btn9/t2Omal4Y7AQ\n"
|
||||||
"published 2014-10-05 20:07:00\n"
|
"published 2020-10-14 20:58:04\n"
|
||||||
"router-signature\n"
|
"router-signature\n"
|
||||||
"-----BEGIN SIGNATURE-----\n"
|
"-----BEGIN SIGNATURE-----\n"
|
||||||
"kV2CtArl1VF1nUSyHL00mO3nEdNxlQU5N7/hZNTd+45lej5Veb+6vb4ujelsFERJ\n"
|
"okoxxnCsf3+V7oKGbmIqiQf7uKDfHOFdamYFGXIFRysn8aZx+o0eMb3I7xlSQfyz\n"
|
||||||
"YoxwIs6SuKAR4orQytCL0e+GgZsrg8zGTveEtMX/+u//OcCwQBYEevR5duBZjVw/\n"
|
"eXdw7m7zHMerCsMLPuWsPBzt9ZPzQ3yvOJWNezzSGtZm8CW/3vLbaxOfI88teIZT\n"
|
||||||
"yzpEHwdIdB2PPyDBLkf1VKnP7uDj059tXiQRWl7LXgE=\n"
|
"GcqZzbrlvCspGvC2doxep6zQS3ApEdZWpF19/agq2kQ=\n"
|
||||||
"-----END SIGNATURE-----\n"
|
"-----END SIGNATURE-----\n"
|
||||||
"\n"
|
|
||||||
;
|
;
|
||||||
static const char EX_EI_ED_MISPLACED_SIG_FP[] =
|
ATTR_UNUSED static const char EX_EI_ED_MISPLACED_SIG_FP[] = "3D9E654300A20118E237361CBBBBCFC71CA34BAD";
|
||||||
"384E40A5DEED4AB1D8A74F1FCBDB18B7C24A8284";
|
ATTR_UNUSED
|
||||||
static const char EX_EI_ED_MISPLACED_SIG_KEY[] =
|
static const char EX_EI_ED_MISPLACED_SIG_KEY[] =
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
"MIGJAoGBAK0HgOCG/6433VCrwz/vhk3cKmyOfenCp0GZ4DIUwPWt4DeyP4nTbN6T\n"
|
"MIGJAoGBAMLLN1IOWTOw9I3FSQHW9YpDJu4Wdj51vZmXUS3bxxiPinMJo7caSMyy\n"
|
||||||
"1HJ1H8+hXC9bMuI4m43IWrzgLycQ9UaskUn372ZjHP9InPqHMJU6GQ7vZUe9Tgza\n"
|
"fyRmgWhzkRKxDXAchBDcLqylvfYRFryIg/fh0zFC6IBvdkHezrJ07KSK4t4TU22I\n"
|
||||||
"qnBdRPoxnrZzUOzlvatGrePt0hDiOZaMtDAkeEojFp9Wp2ZN7+tZAgMBAAE=\n"
|
"6luR5LdfNvcAxs3bbHhajvpPeD2iQCcENWdRl5efgtJ8gOeGo0znAgMBAAE=\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
;
|
;
|
||||||
|
|
||||||
|
182
src/test/example_extrainfo.template
Normal file
182
src/test/example_extrainfo.template
Normal file
@ -0,0 +1,182 @@
|
|||||||
|
:::comment=this file is to be used with the makedescs.py utility
|
||||||
|
:::name=minimal
|
||||||
|
:::type=ei
|
||||||
|
extra-info HomersRelay {d.RSA_FINGERPRINT_NOSPACE}
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
published 2020-10-14 20:58:04
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
|
||||||
|
:::name=maximal
|
||||||
|
:::type=ei
|
||||||
|
extra-info HomersRelay {d.RSA_FINGERPRINT_NOSPACE}
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
published 2020-10-14 20:58:04
|
||||||
|
opt foobarbaz
|
||||||
|
read-history 900 1,2,3
|
||||||
|
write-history 900 1,2,3
|
||||||
|
dirreq-v2-ips 1
|
||||||
|
dirreq-v3-ips 100
|
||||||
|
dirreq-v3-reqs blahblah
|
||||||
|
dirreq-v2-share blahblah
|
||||||
|
dirreq-v3-share blahblah
|
||||||
|
dirreq-v2-resp djfkdj
|
||||||
|
dirreq-v3-resp djfkdj
|
||||||
|
dirreq-v2-direct-dl djfkdj
|
||||||
|
dirreq-v3-direct-dl djfkdj
|
||||||
|
dirreq-v2-tunneled-dl djfkdj
|
||||||
|
dirreq-v3-tunneled-dl djfkdj
|
||||||
|
dirreq-stats-end foobar
|
||||||
|
entry-ips jfsdfds
|
||||||
|
entry-stats-end ksdflkjfdkf
|
||||||
|
cell-stats-end FOO
|
||||||
|
cell-processed-cells FOO
|
||||||
|
cell-queued-cells FOO
|
||||||
|
cell-time-in-queue FOO
|
||||||
|
cell-circuits-per-decile FOO
|
||||||
|
exit-stats-end FOO
|
||||||
|
exit-kibibytes-written FOO
|
||||||
|
exit-kibibytes-read FOO
|
||||||
|
exit-streams-opened FOO
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
|
||||||
|
:::name=bad_sig1
|
||||||
|
:::type=ei
|
||||||
|
extra-info HomersRelay {d.RSA_FINGERPRINT_NOSPACE}
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
published 2020-10-14 20:58:04
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
-----BEGIN SIGNATURE-----
|
||||||
|
V3l9u1uUdGiUPOl8j+hXXw4z/ODeCj/24r2+L32MTjyfUhK49Ld2IlK9iZKlgKYi
|
||||||
|
zyoatxdAjU8Xc5WPX692HO4/R9CGLsUfYcEEFU2R3EA=
|
||||||
|
-----END SIGNATURE-----
|
||||||
|
|
||||||
|
:::name=bad_sig2
|
||||||
|
:::type=ei
|
||||||
|
extra-info HomersRelay {d.RSA_FINGERPRINT_NOSPACE}
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
published 2020-10-14 20:58:04
|
||||||
|
router-sig-ed25519 X{d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
|
||||||
|
:::name=bad_nickname
|
||||||
|
:::type=ei
|
||||||
|
extra-info bobhasaverylongnameandidontthinkweshouldlethim {d.RSA_FINGERPRINT_NOSPACE}
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
published 2020-10-14 20:58:04
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
|
||||||
|
:::name=bad_tokens
|
||||||
|
:::type=ei
|
||||||
|
extra-info HomersRelay {d.RSA_FINGERPRINT_NOSPACE}
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
published 2020-10-14 20:58:04
|
||||||
|
published 2020-10-14 20:58:04
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
|
||||||
|
:::name=bad_start
|
||||||
|
:::type=ei
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
published 2020-10-14 20:58:04
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
:::name=bad_published
|
||||||
|
:::type=ei
|
||||||
|
extra-info HomersRelay {d.RSA_FINGERPRINT_NOSPACE}
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
published 2020-99-14 20:58:04
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
:::name=ed_missing_sig
|
||||||
|
:::type=ei
|
||||||
|
extra-info HomersRelay {d.RSA_FINGERPRINT_NOSPACE}
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
published 2020-10-14 20:58:04
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
|
||||||
|
:::name=ed_missing_cert
|
||||||
|
:::type=ei
|
||||||
|
extra-info HomersRelay {d.RSA_FINGERPRINT_NOSPACE}
|
||||||
|
published 2020-10-14 20:58:04
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
:::name=ed_bad_cert1
|
||||||
|
:::type=ei
|
||||||
|
extra-info HomersRelay {d.RSA_FINGERPRINT_NOSPACE}
|
||||||
|
identity-ed25519
|
||||||
|
-----BEGIN PLAGICAL SPELL-----
|
||||||
|
aaaa
|
||||||
|
-----END PLAGICAL SPELL-----
|
||||||
|
published 2020-10-14 20:58:04
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
:::name=ed_bad_cert2
|
||||||
|
:::type=ei
|
||||||
|
extra-info HomersRelay {d.RSA_FINGERPRINT_NOSPACE}
|
||||||
|
identity-ed25519
|
||||||
|
-----BEGIN ED25519 CERT-----
|
||||||
|
AQoABf55Acpw27GZBdwGCgawCj2F/DPadt8F/9DnEWywEew1Yi3qAOtLpCB8KXL7
|
||||||
|
4w5deFW2RBg8qTondNSUvAmwYLbLjNXMmgA3+nkoJOP3fcmQMHz1jm5xzgs2lCVP
|
||||||
|
t5txApaBIA4=
|
||||||
|
-----END ED25519 CERT-----
|
||||||
|
published 2020-10-14 20:58:04
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
|
||||||
|
:::name=ed_misplaced_cert
|
||||||
|
:::type=ei
|
||||||
|
extra-info HomersRelay {d.RSA_FINGERPRINT_NOSPACE}
|
||||||
|
published 2020-10-14 20:58:04
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
|
||||||
|
:::name=ed_misplaced_sig
|
||||||
|
:::type=ei
|
||||||
|
extra-info HomersRelay {d.RSA_FINGERPRINT_NOSPACE}
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
published 2020-10-14 20:58:04
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
File diff suppressed because it is too large
Load Diff
812
src/test/failing_routerdescs.template
Normal file
812
src/test/failing_routerdescs.template
Normal file
@ -0,0 +1,812 @@
|
|||||||
|
:::comment=this file is to be used with the makedescs.py utility
|
||||||
|
:::name=MINIMAL
|
||||||
|
:::type=ri
|
||||||
|
router fred 127.0.0.1 9001 0 9002
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert {d.NTOR_CROSSCERT_SIGN}
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth 1000 1000 1000
|
||||||
|
proto Link=5
|
||||||
|
reject *:*
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
:::name=MAXIMAL
|
||||||
|
:::type=ri
|
||||||
|
router fred 127.0.0.1 9001 0 9002
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert {d.NTOR_CROSSCERT_SIGN}
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth 1000 1000 1000
|
||||||
|
proto Link=5
|
||||||
|
reject 127.0.0.1:*
|
||||||
|
accept *:80
|
||||||
|
reject *:*
|
||||||
|
ipv6-policy accept 80,100,101
|
||||||
|
uptime 1000
|
||||||
|
hibernating 0
|
||||||
|
unrecognized-keywords are just dandy in this format
|
||||||
|
platform Tor 0.2.4.23 on a Banana PC Jr 6000 Series
|
||||||
|
contact O.W.Jones
|
||||||
|
fingerprint {d.RSA_FINGERPRINT}
|
||||||
|
read-history 900 1,2,3,4
|
||||||
|
write-history 900 1,2,3,4
|
||||||
|
extra-info-digest AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
hidden-service-dir
|
||||||
|
allow-single-hop-exits
|
||||||
|
family $AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA $BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
|
||||||
|
caches-extra-info
|
||||||
|
or-address [::1:2:3:4]:9999
|
||||||
|
or-address 127.0.0.99:10000
|
||||||
|
opt fred is a fine router
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
:::comment=this one has somebody else's signature.
|
||||||
|
:::name=BAD_SIG1
|
||||||
|
:::type=ri
|
||||||
|
router fred 127.0.0.1 9001 0 9002
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert {d.NTOR_CROSSCERT_SIGN}
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth 1000 1000 1000
|
||||||
|
proto Link=5
|
||||||
|
reject *:*
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
-----BEGIN SIGNATURE-----
|
||||||
|
aV5gqy5fTtsrdntTPRPGdeN376lXK+blHJuqbAL0WQ7XaMB4r+F8/whFu0cObOqD
|
||||||
|
AqAhxkcMu721iYCkUNQvhc3FDou2i1mBJFDrhZEtux/2aXODIMG+OPdDUCyBqeQR
|
||||||
|
oYLLfLR4ZZic1tlBFRRNdtXGF2SHeIM052F7PbeJz2A=
|
||||||
|
-----END SIGNATURE-----
|
||||||
|
|
||||||
|
|
||||||
|
:::name=bad_tokens
|
||||||
|
:::type=ri
|
||||||
|
router bob
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert {d.NTOR_CROSSCERT_SIGN}
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth 1000 1000 1000
|
||||||
|
proto Link=5
|
||||||
|
reject *:*
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
:::name=bad_published
|
||||||
|
:::type=ri
|
||||||
|
router fred 127.0.0.1 9001 0 9002
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert {d.NTOR_CROSSCERT_SIGN}
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
published 2014-10-05 99:00:00
|
||||||
|
bandwidth 1000 1000 1000
|
||||||
|
proto Link=5
|
||||||
|
reject *:*
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
:::name=bad_bandwidth
|
||||||
|
:::type=ri
|
||||||
|
router fred 127.0.0.1 9001 0 9002
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert {d.NTOR_CROSSCERT_SIGN}
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth why hello there
|
||||||
|
proto Link=5
|
||||||
|
reject *:*
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
|
||||||
|
:::name=bad_onionkey
|
||||||
|
:::type=ri
|
||||||
|
router fred 127.0.0.1 9001 0 9002
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
-----BEGIN RSA PUBLIC KEY-----
|
||||||
|
MIGHAoGBANBKlyoqApWzG7UzmXcxhXM4T370FbN1edPbw4WAczBDXJslXCU9Xk1r
|
||||||
|
fKfoi/+WiTGvH7RcZWPm7wnThq2u2EAO/IPPcLE9cshLBkK28EvDg5K/WsYedbY9
|
||||||
|
1Gou+7ZSwMEPv2b13c7eWnSW1YvFa64pVDKu2sKnIjX6Bm0HZGbXAgED=
|
||||||
|
-----END RSA PUBLIC KEY-----
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert {d.NTOR_CROSSCERT_SIGN}
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth 1000 1000 1000
|
||||||
|
proto Link=5
|
||||||
|
reject *:*
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
:::name=bad_ports
|
||||||
|
:::type=ri
|
||||||
|
router fred 127.0.0.1 900001 0 9002
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert {d.NTOR_CROSSCERT_SIGN}
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth 1000 1000 1000
|
||||||
|
proto Link=5
|
||||||
|
reject *:*
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
:::name=neg_bandwidth
|
||||||
|
:::type=ri
|
||||||
|
router fred 127.0.0.1 9001 0 9002
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert {d.NTOR_CROSSCERT_SIGN}
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth 1000 -1000 1000
|
||||||
|
proto Link=5
|
||||||
|
reject *:*
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
|
||||||
|
:::name=bad_ip
|
||||||
|
:::type=ri
|
||||||
|
router fred 100.127.0.0.1 9001 0 9002
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert {d.NTOR_CROSSCERT_SIGN}
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth 1000 1000 1000
|
||||||
|
proto Link=5
|
||||||
|
reject *:*
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
:::name=bad_dirport
|
||||||
|
:::type=ri
|
||||||
|
router fred 127.0.0.1 9001 0 bob
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert {d.NTOR_CROSSCERT_SIGN}
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth 1000 1000 1000
|
||||||
|
proto Link=5
|
||||||
|
reject *:*
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
:::name=bad_name2
|
||||||
|
:::type=ri
|
||||||
|
router verylongnamethatnevereverendsandgoesontoolong 127.0.0.1 9001 0 9002
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert {d.NTOR_CROSSCERT_SIGN}
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth 1000 1000 1000
|
||||||
|
proto Link=5
|
||||||
|
reject *:*
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
:::name=bad_bandwidth2
|
||||||
|
:::type=ri
|
||||||
|
router fred 127.0.0.1 9001 0 9002
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert {d.NTOR_CROSSCERT_SIGN}
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth 1000 hello 1000
|
||||||
|
proto Link=5
|
||||||
|
reject *:*
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
|
||||||
|
:::name=bad_uptime
|
||||||
|
:::type=ri
|
||||||
|
router fred 127.0.0.1 9001 0 9002
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert {d.NTOR_CROSSCERT_SIGN}
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
uptime forever-and-a-day
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth 1000 1000 1000
|
||||||
|
proto Link=5
|
||||||
|
reject *:*
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
:::name=bad_bandwidth3
|
||||||
|
:::type=ri
|
||||||
|
router fred 127.0.0.1 9001 0 9002
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert {d.NTOR_CROSSCERT_SIGN}
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth 1000 -1000 1000
|
||||||
|
proto Link=5
|
||||||
|
reject *:*
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
:::name=bad_ntor_key
|
||||||
|
:::type=ri
|
||||||
|
router fred 127.0.0.1 9001 0 9002
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key x{d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert {d.NTOR_CROSSCERT_SIGN}
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth 1000 1000 1000
|
||||||
|
proto Link=5
|
||||||
|
reject *:*
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
:::name=bad_fingerprint
|
||||||
|
:::type=ri
|
||||||
|
router fred 127.0.0.1 9001 0 9002
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert {d.NTOR_CROSSCERT_SIGN}
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth 1000 1000 1000
|
||||||
|
proto Link=5
|
||||||
|
fingerprint 5555
|
||||||
|
reject *:*
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
:::name=mismatched_fingerprint
|
||||||
|
:::type=ri
|
||||||
|
router fred 127.0.0.1 9001 0 9002
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert {d.NTOR_CROSSCERT_SIGN}
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth 1000 1000 1000
|
||||||
|
fingerprint CC43 DC8E 8C9E 3E6D 59CD 0399 2491 0C8C E1E4 50D2
|
||||||
|
proto Link=5
|
||||||
|
reject *:*
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
:::name=bad_has_accept6
|
||||||
|
:::type=ri
|
||||||
|
router fred 127.0.0.1 9001 0 9002
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert {d.NTOR_CROSSCERT_SIGN}
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth 1000 1000 1000
|
||||||
|
proto Link=5
|
||||||
|
reject *:*
|
||||||
|
accept6 *:80
|
||||||
|
reject6 *:*
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
:::name=bad_no_exit_policy
|
||||||
|
:::type=ri
|
||||||
|
router fred 127.0.0.1 9001 0 9002
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert {d.NTOR_CROSSCERT_SIGN}
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth 1000 1000 1000
|
||||||
|
proto Link=5
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
:::name=bad_ipv6_exit_policy
|
||||||
|
:::type=ri
|
||||||
|
router fred 127.0.0.1 9001 0 9002
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert {d.NTOR_CROSSCERT_SIGN}
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth 1000 1000 1000
|
||||||
|
proto Link=5
|
||||||
|
reject *:*
|
||||||
|
ipv6-policy kfdslfdfj sdjfk sdfjsdf
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
:::name=bad_family
|
||||||
|
:::type=ri
|
||||||
|
router fred 127.0.0.1 9001 0 9002
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert {d.NTOR_CROSSCERT_SIGN}
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth 1000 1000 1000
|
||||||
|
proto Link=5
|
||||||
|
family aaaa,bbbb
|
||||||
|
reject *:*
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
:::name=zero_orport
|
||||||
|
:::type=ri
|
||||||
|
router fred 127.0.0.1 0 0 9002
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert {d.NTOR_CROSSCERT_SIGN}
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth 1000 1000 1000
|
||||||
|
proto Link=5
|
||||||
|
reject *:*
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
:::name=ed_missing_crosscert
|
||||||
|
:::type=ri
|
||||||
|
router fred 127.0.0.1 9001 0 9002
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert {d.NTOR_CROSSCERT_SIGN}
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth 1000 1000 1000
|
||||||
|
proto Link=5
|
||||||
|
reject *:*
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
:::name=ed_missing_crosscert2
|
||||||
|
:::type=ri
|
||||||
|
router fred 127.0.0.1 9001 0 9002
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth 1000 1000 1000
|
||||||
|
proto Link=5
|
||||||
|
reject *:*
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
|
||||||
|
:::name=ed_missing_crosscert_sign
|
||||||
|
:::type=ri
|
||||||
|
router fred 127.0.0.1 9001 0 9002
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth 1000 1000 1000
|
||||||
|
proto Link=5
|
||||||
|
reject *:*
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
:::name=ed_bad_sig1
|
||||||
|
:::type=ri
|
||||||
|
router fred 127.0.0.1 9001 0 9002
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert {d.NTOR_CROSSCERT_SIGN}
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth 1000 1000 1000
|
||||||
|
proto Link=5
|
||||||
|
reject *:*
|
||||||
|
router-sig-ed25519 4DSdPePrToNx3WQ+4GfFelB8IyHu5Z9vTbbLZ02vfYEsCF9QeaeHbYagY/yjdt+9e71jmfM+W5MfRQd8FJ1+Dg
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
|
||||||
|
:::name=ed_bad_sig2
|
||||||
|
:::type=ri
|
||||||
|
router fred 127.0.0.1 9001 0 9002
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert {d.NTOR_CROSSCERT_SIGN}
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth 1000 1000 1000
|
||||||
|
proto Link=5
|
||||||
|
reject *:*
|
||||||
|
router-sig-ed25519 X{d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
|
||||||
|
:::name=ed_bad_sig3
|
||||||
|
:::type=ri
|
||||||
|
router fred 127.0.0.1 9001 0 9002
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert {d.NTOR_CROSSCERT_SIGN}
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth 1000 1000 1000
|
||||||
|
proto Link=5
|
||||||
|
reject *:*
|
||||||
|
router-sig-ed25519 lemondcustard
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
|
||||||
|
:::name=ed_bad_crosscert1
|
||||||
|
:::type=ri
|
||||||
|
router fred 127.0.0.1 9001 0 9002
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert 1
|
||||||
|
-----BEGIN ED25519 CERT-----
|
||||||
|
AQoABf55AXL4pAregsMa2ovmTBGaMCyWz/4LpICgAAuWXtTvA1IfAKo6ANUq+hi+
|
||||||
|
xb3J4aYafnszlj87oi/DR+SDf29wzwNw8gmaqGzJ5GbfISfABuTUCzlilZyVnLxi
|
||||||
|
BHcCH6PWiAQ=
|
||||||
|
-----END ED25519 CERT-----
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth 1000 1000 1000
|
||||||
|
proto Link=5
|
||||||
|
reject *:*
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
|
||||||
|
:::name=ed_misplaced1
|
||||||
|
:::type=ri
|
||||||
|
router fred 127.0.0.1 9001 0 9002
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert {d.NTOR_CROSSCERT_SIGN}
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth 1000 1000 1000
|
||||||
|
proto Link=5
|
||||||
|
reject *:*
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
|
||||||
|
:::name=ed_misplaced2
|
||||||
|
:::type=ri
|
||||||
|
router fred 127.0.0.1 9001 0 9002
|
||||||
|
identity-ed25519
|
||||||
|
{d.ED_CERT}
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert {d.NTOR_CROSSCERT_SIGN}
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth 1000 1000 1000
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
proto Link=5
|
||||||
|
reject *:*
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
||||||
|
|
||||||
|
|
||||||
|
:::name=ed_bad_cert1
|
||||||
|
:::type=ri
|
||||||
|
router fred 127.0.0.1 9001 0 9002
|
||||||
|
identity-ed25519
|
||||||
|
-----BEGIN ED25519 CERT-----
|
||||||
|
AQoABf55AYf+rX8a5rzdTBGPvLdQIP8XcElDDQnJIruGqfDTj+tjAP+3XOL2UTmn
|
||||||
|
Hu39PbLZV+m9DIj/DvG38M0hP4MmHUjP/iZG5PaCX6/aMe+nQSNuTl0IDGpIo1l8
|
||||||
|
dZToQTFSzAQ=
|
||||||
|
-----END ED25519 CERT-----
|
||||||
|
signing-key
|
||||||
|
{d.RSA_IDENTITY}
|
||||||
|
master-key-ed25519 {d.ED_IDENTITY}
|
||||||
|
onion-key
|
||||||
|
{d.RSA_ONION_KEY}
|
||||||
|
ntor-onion-key {d.NTOR_ONION_KEY}
|
||||||
|
ntor-onion-key-crosscert {d.NTOR_CROSSCERT_SIGN}
|
||||||
|
{d.NTOR_CROSSCERT}
|
||||||
|
onion-key-crosscert
|
||||||
|
{d.RSA_CROSSCERT_ED}
|
||||||
|
published 2014-10-05 12:00:00
|
||||||
|
bandwidth 1000 1000 1000
|
||||||
|
proto Link=5
|
||||||
|
reject *:*
|
||||||
|
router-sig-ed25519 {d.ED_SIGNATURE}
|
||||||
|
router-signature
|
||||||
|
{d.RSA_SIGNATURE}
|
@ -24,7 +24,7 @@ def H(m):
|
|||||||
|
|
||||||
def expmod(b,e,m):
|
def expmod(b,e,m):
|
||||||
if e == 0: return 1
|
if e == 0: return 1
|
||||||
t = expmod(b,e/2,m)**2 % m
|
t = expmod(b,e//2,m)**2 % m
|
||||||
if e & 1: t = (t*b) % m
|
if e & 1: t = (t*b) % m
|
||||||
return t
|
return t
|
||||||
|
|
||||||
@ -32,11 +32,11 @@ def inv(x):
|
|||||||
return expmod(x,q-2,q)
|
return expmod(x,q-2,q)
|
||||||
|
|
||||||
d = -121665 * inv(121666)
|
d = -121665 * inv(121666)
|
||||||
I = expmod(2,(q-1)/4,q)
|
I = expmod(2,(q-1)//4,q)
|
||||||
|
|
||||||
def xrecover(y):
|
def xrecover(y):
|
||||||
xx = (y*y-1) * inv(d*y*y+1)
|
xx = (y*y-1) * inv(d*y*y+1)
|
||||||
x = expmod(xx,(q+3)/8,q)
|
x = expmod(xx,(q+3)//8,q)
|
||||||
if (x*x - xx) % q != 0: x = (x*I) % q
|
if (x*x - xx) % q != 0: x = (x*I) % q
|
||||||
if x % 2 != 0: x = q-x
|
if x % 2 != 0: x = q-x
|
||||||
return x
|
return x
|
||||||
@ -56,23 +56,23 @@ def edwards(P,Q):
|
|||||||
|
|
||||||
def scalarmult(P,e):
|
def scalarmult(P,e):
|
||||||
if e == 0: return [0,1]
|
if e == 0: return [0,1]
|
||||||
Q = scalarmult(P,e/2)
|
Q = scalarmult(P,e//2)
|
||||||
Q = edwards(Q,Q)
|
Q = edwards(Q,Q)
|
||||||
if e & 1: Q = edwards(Q,P)
|
if e & 1: Q = edwards(Q,P)
|
||||||
return Q
|
return Q
|
||||||
|
|
||||||
def encodeint(y):
|
def encodeint(y):
|
||||||
bits = [(y >> i) & 1 for i in range(b)]
|
bits = [(y >> i) & 1 for i in range(b)]
|
||||||
return ''.join([chr(sum([bits[i * 8 + j] << j for j in range(8)])) for i in range(b/8)])
|
return bytes(sum([bits[i * 8 + j] << j for j in range(8)]) for i in range(b//8))
|
||||||
|
|
||||||
def encodepoint(P):
|
def encodepoint(P):
|
||||||
x = P[0]
|
x = P[0]
|
||||||
y = P[1]
|
y = P[1]
|
||||||
bits = [(y >> i) & 1 for i in range(b - 1)] + [x & 1]
|
bits = [(y >> i) & 1 for i in range(b - 1)] + [x & 1]
|
||||||
return ''.join([chr(sum([bits[i * 8 + j] << j for j in range(8)])) for i in range(b/8)])
|
return bytes([(sum([bits[i * 8 + j] << j for j in range(8)])) for i in range(b//8)])
|
||||||
|
|
||||||
def bit(h,i):
|
def bit(h,i):
|
||||||
return (ord(h[i/8]) >> (i%8)) & 1
|
return (h[i//8] >> (i%8)) & 1
|
||||||
|
|
||||||
def publickey(sk):
|
def publickey(sk):
|
||||||
h = H(sk)
|
h = H(sk)
|
||||||
@ -87,7 +87,7 @@ def Hint(m):
|
|||||||
def signature(m,sk,pk):
|
def signature(m,sk,pk):
|
||||||
h = H(sk)
|
h = H(sk)
|
||||||
a = 2**(b-2) + sum(2**i * bit(h,i) for i in range(3,b-2))
|
a = 2**(b-2) + sum(2**i * bit(h,i) for i in range(3,b-2))
|
||||||
r = Hint(''.join([h[i] for i in range(b/8,b/4)]) + m)
|
r = Hint(bytes([h[i] for i in range(b//8,b//4)]) + m)
|
||||||
R = scalarmult(B,r)
|
R = scalarmult(B,r)
|
||||||
S = (r + Hint(encodepoint(R) + pk + m) * a) % l
|
S = (r + Hint(encodepoint(R) + pk + m) * a) % l
|
||||||
return encodepoint(R) + encodeint(S)
|
return encodepoint(R) + encodeint(S)
|
||||||
@ -109,12 +109,11 @@ def decodepoint(s):
|
|||||||
return P
|
return P
|
||||||
|
|
||||||
def checkvalid(s,m,pk):
|
def checkvalid(s,m,pk):
|
||||||
if len(s) != b/4: raise Exception("signature length is wrong")
|
if len(s) != b//4: raise Exception("signature length is wrong")
|
||||||
if len(pk) != b/8: raise Exception("public-key length is wrong")
|
if len(pk) != b//8: raise Exception("public-key length is wrong")
|
||||||
R = decodepoint(s[0:b/8])
|
R = decodepoint(s[0:b//8])
|
||||||
A = decodepoint(pk)
|
A = decodepoint(pk)
|
||||||
S = decodeint(s[b/8:b/4])
|
S = decodeint(s[b//8:b//4])
|
||||||
h = Hint(encodepoint(R) + pk + m)
|
h = Hint(encodepoint(R) + pk + m)
|
||||||
if scalarmult(B,S) != edwards(R,scalarmult(A,h)):
|
if scalarmult(B,S) != edwards(R,scalarmult(A,h)):
|
||||||
raise Exception("signature does not pass verification")
|
raise Exception("signature does not pass verification")
|
||||||
|
|
||||||
|
@ -1,305 +1,431 @@
|
|||||||
const char TEST_DESCRIPTORS[] =
|
const char TEST_DESCRIPTORS[] =
|
||||||
"@uploaded-at 2014-06-08 19:20:11\n"
|
"@uploaded-at 2020-10-13 13:27:09\n"
|
||||||
"@source \"127.0.0.1\"\n"
|
"@source \"127.0.0.1\"\n"
|
||||||
"router test000a 127.0.0.1 5000 0 7000\n"
|
"router test001a 127.0.0.1 5001 0 7001\n"
|
||||||
"platform Tor 0.2.5.3-alpha-dev on Linux\n"
|
"identity-ed25519\n"
|
||||||
"protocols Link 1 2 Circuit 1\n"
|
"-----BEGIN ED25519 CERT-----\n"
|
||||||
"published 2014-06-08 19:20:11\n"
|
"AQQABs1eAaaOTHiF5TNABkcl/U1x6qvlb8dyNBjuezXxF2wFLgrRAQAgBAD/a0Xx\n"
|
||||||
"fingerprint C7E7 CCB8 179F 8CC3 7F5C 8A04 2B3A 180B 934B 14BA\n"
|
"SqkjrxcXc1h00vvkSqjNuGb4xYg1BZUoZnwegCQmxELY6fQ3m3EzYfSSl1tbP2u8\n"
|
||||||
"uptime 0\n"
|
"sN4SBJCsV7aRdoYebs80CnrsPiUecVdTwruODb+wAKqKSl3u7+qx8dd1yAI=\n"
|
||||||
"bandwidth 1073741824 1073741824 0\n"
|
"-----END ED25519 CERT-----\n"
|
||||||
"extra-info-digest 67A152A4C7686FB07664F872620635F194D76D95\n"
|
"master-key-ed25519 /2tF8UqpI68XF3NYdNL75Eqozbhm+MWINQWVKGZ8HoA\n"
|
||||||
"caches-extra-info\n"
|
"or-address [::]:5001\n"
|
||||||
"onion-key\n"
|
"platform Tor 0.4.5.0-alpha-dev on Linux\n"
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"proto Cons=1-2 Desc=1-2 DirCache=1-2 FlowCtrl=1 HSDir=1-2 HSIntro=3-5 HSRend=1-2 Link=1-5 LinkAuth=1,3 Microdesc=1-2 Padding=2 Relay=1-3\n"
|
||||||
"MIGJAoGBAOuBUIEBARMkkka/TGyaQNgUEDLP0KG7sy6KNQTNOlZHUresPr/vlVjo\n"
|
"published 2020-10-13 13:27:09\n"
|
||||||
"HPpLMfu9M2z18c51YX/muWwY9x4MyQooD56wI4+AqXQcJRwQfQlPn3Ay82uZViA9\n"
|
"fingerprint 2403 20EC F589 C1F4 DC0B 864B 28AF 8113 59CE FD86\n"
|
||||||
"DpBajRieLlKKkl145KjArpD7F5BVsqccvjErgFYXvhhjSrx7BVLnAgMBAAE=\n"
|
"uptime 324426\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"bandwidth 1073741824 1073741824 640416\n"
|
||||||
"signing-key\n"
|
"extra-info-digest FD0FEB6B7F99C2E9A3C98968F6FB2C61B1688760 FDt9yIgtRYfaANh+E7NV6MUAvOR7DcJIjjBkhGMN6Vs\n"
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"caches-extra-info\n"
|
||||||
"MIGJAoGBAN6NLnSxWQnFXxqZi5D3b0BMgV6y9NJLGjYQVP+eWtPZWgqyv4zeYsqv\n"
|
"onion-key\n"
|
||||||
"O9y6c5lvxyUxmNHfoAbe/s8f2Vf3/YaC17asAVSln4ktrr3e9iY74a9RMWHv1Gzk\n"
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
"3042nMcqj3PEhRN0PoLkcOZNjjmNbaqki6qy9bWWZDNTdo+uI44dAgMBAAE=\n"
|
"MIGJAoGBAOrByE3R1SqUkYLMDDB408uliYrBj860aKU0sbS9F9xmxFONB4xHP6uA\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"MyBgHQGL91N30yZxWKkdRiuKpCZafxLrflx20U/JTijJugNWPBcLXG7pTaJsL7LQ\n"
|
||||||
"hidden-service-dir\n"
|
"61WRwo7md8X5zRhSGd8Pisq2Ru2yDrd0DNfoxy2CSLJX0DN9aw4xAgMBAAE=\n"
|
||||||
"contact auth0@test.test\n"
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
"ntor-onion-key pK4bs08ERYN591jj7ca17Rn9Q02TIEfhnjR6hSq+fhU=\n"
|
"signing-key\n"
|
||||||
"reject *:*\n"
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
"router-signature\n"
|
"MIGJAoGBALb83qDqIq7U75NuDnzZL/A1YvxMp/YqoxtKd2GuCOMRpu+DLpEJfAkB\n"
|
||||||
"-----BEGIN SIGNATURE-----\n"
|
"0o9IP+CeCkT3JPP2irY+WEw8gLU9bx2VfdK4sm59Q7G0gWcfYsvn3wb3q43e0LOf\n"
|
||||||
"rx88DuM3Y7tODlHNDDEVzKpwh3csaG1or+T4l2Xs1oq3iHHyPEtB6QTLYrC60trG\n"
|
"KQ/HMkZ+sJwQ5sCteAhGqbr9XNBfRE0bT5pyEZGKNg3ufCd1c7MLAgMBAAE=\n"
|
||||||
"aAPsj3DEowGfjga1b248g2dtic8Ab+0exfjMm1RHXfDam5TXXZU3A0wMyoHjqHuf\n"
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
"eChGPgFNUvEc+5YtD27qEDcUjcinYztTs7/dzxBT4PE=\n"
|
"onion-key-crosscert\n"
|
||||||
"-----END SIGNATURE-----\n"
|
"-----BEGIN CROSSCERT-----\n"
|
||||||
"@uploaded-at 2014-06-08 19:20:11\n"
|
"Mr8P5CTgWB/J84yzF/zY4tnQixbFyNBXi+KXBVvRmFRKBKtRRf7NYKDlXpTWA+yv\n"
|
||||||
"@source \"127.0.0.1\"\n"
|
"lyVzzKyVlSreRIZbmS/VZrS0adj8EL8VAGVg3l/7ZumKFRB0JSiVpidd2yu0K8/2\n"
|
||||||
"router test001a 127.0.0.1 5001 0 7001\n"
|
"qENpmGQbFco+6tj8dsxr4HrPaV7UBDxwjDR/2HADiiI=\n"
|
||||||
"platform Tor 0.2.5.3-alpha-dev on Linux\n"
|
"-----END CROSSCERT-----\n"
|
||||||
"protocols Link 1 2 Circuit 1\n"
|
"ntor-onion-key-crosscert 0\n"
|
||||||
"published 2014-06-08 19:20:11\n"
|
"-----BEGIN ED25519 CERT-----\n"
|
||||||
"fingerprint 35DA 711C FC62 F88B C243 DE32 DC0B C28A 3F62 2610\n"
|
"AQoABs2OAf9rRfFKqSOvFxdzWHTS++RKqM24ZvjFiDUFlShmfB6AAFr/gG3LV3nx\n"
|
||||||
"uptime 0\n"
|
"pFWmVimT3w4a9RX4sihTdCQKtYIO2JTSUaBnBBCGWNKL/pgMq13Y+fUnrrltFprb\n"
|
||||||
"bandwidth 1073741824 1073741824 0\n"
|
"ts9KP+yi/QU=\n"
|
||||||
"extra-info-digest 9E12278D6CF7608071FE98CE9DCEE48FA264518A\n"
|
"-----END ED25519 CERT-----\n"
|
||||||
"caches-extra-info\n"
|
"hidden-service-dir\n"
|
||||||
"onion-key\n"
|
"contact auth1@test.test\n"
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"ntor-onion-key rrw3paBStz7xhguZJDdjl/Tcpqwgv4u37Zi1zJcVNFk\n"
|
||||||
"MIGJAoGBAPbyUrorqoXMW4oezqd307ZGxgobqvQs2nb3TdQyWrwsHtJmS3utdrJS\n"
|
"reject *:*\n"
|
||||||
"xJUZPNHOQ2hrDWW1VvevYqRTGeXGZr9TDZ3+t/gVUttqYRhuzzgEKVAZSsTo5ctO\n"
|
"tunnelled-dir-server\n"
|
||||||
"QNHnzJ6Xx/w/trhWqPTeJ7R0TCyAbWW7aE3KaKdwvZilRZp/oRUnAgMBAAE=\n"
|
"router-sig-ed25519 pVC4W6LarfI5xgQIjwoizvHiU6HXf0P9t7M4nWQfYduzNuIk3KPDVxZWfm+r3QDMBVDSBc9yAmFVmxFi4PfeAg\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"router-signature\n"
|
||||||
"signing-key\n"
|
"-----BEGIN SIGNATURE-----\n"
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"KHkPXBETKq3xyIckAS8BfL5Numjx2f3wLxkkDbDtsJt4nhXuL3CyWwtQGGQOqo10\n"
|
||||||
"MIGJAoGBALwOJ7XZHBnjJEuwF3Os6eashNbTH9YnH8TBZBdKgu3iFJYqDslcMIPX\n"
|
"HJfxeV2FktxHjlW08BGp8/EwnOcHsJkKg2yOlJodYXln8ATsHaMDS6inllyACIfC\n"
|
||||||
"gWCJ9apPHyh1+/8OLRWeEYlwoZzgGi0rjm/+BNeOOmJbjfyjk97DuB9/2O5zr1BM\n"
|
"680xs6LMJlUh/7qjPK3if7ayD+vPDCh+5IXq4n4Rn3k=\n"
|
||||||
"CvOHqQSzMD+vz1ebvfM039a2mO8lXruUFPZQaFVxk8371XP2khqhAgMBAAE=\n"
|
"-----END SIGNATURE-----\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"@uploaded-at 2020-10-13 13:27:10\n"
|
||||||
"hidden-service-dir\n"
|
"@source \"127.0.0.1\"\n"
|
||||||
"contact auth1@test.test\n"
|
"router test002a 127.0.0.1 5002 0 7002\n"
|
||||||
"ntor-onion-key t5bI1ksTdigOksMKRHUDwx/34ajEvDN1IpArOxIEWgk=\n"
|
"identity-ed25519\n"
|
||||||
"reject *:*\n"
|
"-----BEGIN ED25519 CERT-----\n"
|
||||||
"router-signature\n"
|
"AQQABs1eAW2RVTJizfLKok8vZjvtdSQfTkjJbwuBJJah89MpjJJ1AQAgBAD7AE/p\n"
|
||||||
"-----BEGIN SIGNATURE-----\n"
|
"ZVnOoor55N3BTseFvzTESbjQVJkMEw2jNMmkMUeolbJlRtsklLCMGjY9H79EFdY1\n"
|
||||||
"KtMW7A/pzu+np6aKJSy6d7drIb4yjz8SPCo+oQNxj2IqNHJir2O2nWu69xy+K0c1\n"
|
"QamhpTz5AR4IyKdruX5SD+h8ovvWQK/pvVD20rI7Em6Qbg8OVvEPaZwxQwo=\n"
|
||||||
"RL05KkcDaYzr5hC80FD1H+sTpGYD28SPkQkzPw+0pReSDl93pVXh0rU6Cdcm75FC\n"
|
"-----END ED25519 CERT-----\n"
|
||||||
"t0UZzDt4TsMuFB0ZYpM3phKcQPpiDG6aR0LskL/YUvY=\n"
|
"master-key-ed25519 +wBP6WVZzqKK+eTdwU7Hhb80xEm40FSZDBMNozTJpDE\n"
|
||||||
"-----END SIGNATURE-----\n"
|
"or-address [::]:5002\n"
|
||||||
"@uploaded-at 2014-06-08 19:20:11\n"
|
"platform Tor 0.4.5.0-alpha-dev on Linux\n"
|
||||||
"@source \"127.0.0.1\"\n"
|
"proto Cons=1-2 Desc=1-2 DirCache=1-2 FlowCtrl=1 HSDir=1-2 HSIntro=3-5 HSRend=1-2 Link=1-5 LinkAuth=1,3 Microdesc=1-2 Padding=2 Relay=1-3\n"
|
||||||
"router test004r 127.0.0.1 5004 0 7004\n"
|
"published 2020-10-13 13:27:10\n"
|
||||||
"platform Tor 0.2.5.3-alpha-dev on Linux\n"
|
"fingerprint 1849 2918 5A95 1CF2 DDA7 C3B0 1ACB 32D7 360C C4BF\n"
|
||||||
"protocols Link 1 2 Circuit 1\n"
|
"uptime 324427\n"
|
||||||
"published 2014-06-08 19:20:10\n"
|
"bandwidth 1073741824 1073741824 776649\n"
|
||||||
"fingerprint CC6A 48BD 52BD 9A2C 6670 5863 AC31 AE17 6E63 8B02\n"
|
"extra-info-digest 8CB745E0CD4FD3E7E22739124F8FE88840CAFF05 f+jRe7cLSC7bCBEQfHhVxWYZbu5MXsdqQbFRAFhUFNo\n"
|
||||||
"uptime 0\n"
|
"caches-extra-info\n"
|
||||||
"bandwidth 1073741824 1073741824 0\n"
|
"onion-key\n"
|
||||||
"extra-info-digest B5CC249CEF394B5AFCA0C77FA7D5605615FA487C\n"
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
"onion-key\n"
|
"MIGJAoGBALkdaGnfYPMk4Gb6tEM0VkAHvf52ETyxn/yz876JzmbBqhMRz7BGMUKX\n"
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"et6pLXZRrL0TbYbDkESCkWvOj9nq6pyxwoYcBTNBo/w3kdDk/RlVlc0egrvXQPgO\n"
|
||||||
"MIGJAoGBAMze36Hupy7HACcF3TMv5mJuZbx3d3cS0WYLl6vTeChBgpS5CEXq6zIu\n"
|
"O0XJ3qjfW88aCyW4pr1XPpiLedj7GAMkHLXKSjHptKvkMH8UBIWrAgMBAAE=\n"
|
||||||
"d31YmtUcxH6fOjDOudhbnXuoh1nH4CP+LocVHAdlGG1giAm7u8yZudVvVJiIqFgQ\n"
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
"wVDcWx8LbGCi5P9J/ZPKAIVsSyS7xkOqHjz3VMo/uYLbQCFAwfkdAgMBAAE=\n"
|
"signing-key\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
"signing-key\n"
|
"MIGJAoGBANf2NRv0Si2EBM/Bt055XgLdUAHJhAu+kI9/EOfZbHf/hXeV/NAA8QJB\n"
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"TsqoN/v1krBFTUUZmushA7SAYJk69SipJDzYEOg3ZaaPVGanrLh7hiMTemgKh5j1\n"
|
||||||
"MIGJAoGBAM/qGP365x6bH+ug7rKVy7V5lC9Ff2Jfk0wlTFIzzwn+DMSG6xDvulKe\n"
|
"6ABIbUfZz4GufalIUzyVxF7qUNF7xZgKBzmxR7eW3jSabrEFdrPFAgMBAAE=\n"
|
||||||
"wcIzgGNdQu7qlKlQUif3GPMr0KSS32cRsmoRQJcsm9+lGUK871NyZ8AyrHT+LhyF\n"
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
"cs718P0iN5yKF2FikNr727kEANCzvC1l9eP4qF5GGzsNtglbJ7bTAgMBAAE=\n"
|
"onion-key-crosscert\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"-----BEGIN CROSSCERT-----\n"
|
||||||
"hidden-service-dir\n"
|
"Q8rGB57opO5DQrRdIO4EoUphDbRNhIIYzs43UeZk+BDxYkMdMSMcmj7JqemH2AC1\n"
|
||||||
"ntor-onion-key a9Pavqnx7DFhMWUO0d17qF9Py8+iie4FnxTHaTgfIXY=\n"
|
"yjOKbjy14w1cVmGvlXzvOKAA3ylpF7c3UkLhaVurKBmiZKXtZaWLns744QSGUbog\n"
|
||||||
"reject *:25\n"
|
"erN+WT0syXaXXEZGr6pPDtK9NJld/nMBw8TBGwNL8nc=\n"
|
||||||
"reject *:119\n"
|
"-----END CROSSCERT-----\n"
|
||||||
"reject *:135-139\n"
|
"ntor-onion-key-crosscert 1\n"
|
||||||
"reject *:445\n"
|
"-----BEGIN ED25519 CERT-----\n"
|
||||||
"reject *:563\n"
|
"AQoABs2OAfsAT+llWc6iivnk3cFOx4W/NMRJuNBUmQwTDaM0yaQxANuEvTxfukyO\n"
|
||||||
"reject *:1214\n"
|
"lPKM02Lzm0hIvhFmbEqmekfwrqYG+avRmAeDc8eStlm8CQBw7LRJE++MJgAHWh9r\n"
|
||||||
"reject *:4661-4666\n"
|
"1tB3DcJxiQU=\n"
|
||||||
"reject *:6346-6429\n"
|
"-----END ED25519 CERT-----\n"
|
||||||
"reject *:6699\n"
|
"hidden-service-dir\n"
|
||||||
"reject *:6881-6999\n"
|
"contact auth2@test.test\n"
|
||||||
"accept *:*\n"
|
"ntor-onion-key /vAbEzRKRi0j/0mrhyKBdNMxR56xnzl6fQvtHT/QcAE\n"
|
||||||
"router-signature\n"
|
"reject *:*\n"
|
||||||
"-----BEGIN SIGNATURE-----\n"
|
"tunnelled-dir-server\n"
|
||||||
"HVW7kjBgEt+Qdvcrq+NQE1F9B8uV9D38KA2Bp6cYHLWCxL6N4GS8JQqbOEtnqaj7\n"
|
"router-sig-ed25519 yo7QljYNLR1qIYtRUO4j769qUiDAOk4ueL1XQWFWi+TIenwiBc55fgUFQZAg3wgEwPM37CUdMkAMWKA2CQgSCw\n"
|
||||||
"Vxrv7uy1Fzb15Zr+1sUVMxNv+LLRfr+JzfETMNYVkYDrNgr1cAAVEQzFWbIziond\n"
|
"router-signature\n"
|
||||||
"xMFp64yjEW9/I+82lb5GBZEiKdEd4QqWMmQosoYMTM8=\n"
|
"-----BEGIN SIGNATURE-----\n"
|
||||||
"-----END SIGNATURE-----\n"
|
"hYDgjk0GH3xiBOgAccLQntNTYWGmzEvjozZIfqh6IzJtAfZkqpg9O7xaEiMRmkwj\n"
|
||||||
"@uploaded-at 2014-06-08 19:20:12\n"
|
"+BHuMHiLj9BIHrMAP89pW9SoK+UfQdzKEI6VLFz/Z3c7H9F2OHse5HVc01X0Z6w7\n"
|
||||||
"@source \"127.0.0.1\"\n"
|
"eCPEOYUid7JJuVcABnJjs5PDo81LLOzY3089xRepC+c=\n"
|
||||||
"router test002a 127.0.0.1 5002 0 7002\n"
|
"-----END SIGNATURE-----\n"
|
||||||
"platform Tor 0.2.5.3-alpha-dev on Linux\n"
|
"@uploaded-at 2020-10-13 13:27:12\n"
|
||||||
"protocols Link 1 2 Circuit 1\n"
|
"@source \"127.0.0.1\"\n"
|
||||||
"published 2014-06-08 19:20:11\n"
|
"router test000a 127.0.0.1 5000 0 7000\n"
|
||||||
"fingerprint 29C7 BBB6 C437 32D5 BDF1 5671 F5C5 F1FB 6E36 4B47\n"
|
"identity-ed25519\n"
|
||||||
"uptime 0\n"
|
"-----BEGIN ED25519 CERT-----\n"
|
||||||
"bandwidth 1073741824 1073741824 0\n"
|
"AQQABs1eAX4HwKEhOktiFqMiJKxeCjj6o9/7Q/2+ssa3coYnhbYaAQAgBAAaycSq\n"
|
||||||
"extra-info-digest 9BB181EA86E0130680C3CC04AD7DE4C341ADC2C7\n"
|
"2pbQLnRy2Yn8wiUhsge+cD6Yq3e/Bgq8hgYgJzhFP3znXvYpZJ9dT1J+4G3ykeVE\n"
|
||||||
"caches-extra-info\n"
|
"RK0wTU8Utb/+2XfYbXoECmBlb0Hyb87gTsB20O/d1gBssxpIcrjXwyzh/wI=\n"
|
||||||
"onion-key\n"
|
"-----END ED25519 CERT-----\n"
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"master-key-ed25519 GsnEqtqW0C50ctmJ/MIlIbIHvnA+mKt3vwYKvIYGICc\n"
|
||||||
"MIGJAoGBALNH19oF8Ajf+djlH/g7L+enFBf5Wwjmf3bPwNKWZ9G+B+Lg8SpfhZiw\n"
|
"or-address [::]:5000\n"
|
||||||
"rUqi7h21f45BV/dN05dK6leWD8rj1T9kuM9TKBOEZxIWeq7zbXihyu4XPxP4FNTS\n"
|
"platform Tor 0.4.5.0-alpha-dev on Linux\n"
|
||||||
"+0G7BhdP4biALENmeyLhUCZaw5Ic/jFkHT4gV9S0iVZiEDwC9twXAgMBAAE=\n"
|
"proto Cons=1-2 Desc=1-2 DirCache=1-2 FlowCtrl=1 HSDir=1-2 HSIntro=3-5 HSRend=1-2 Link=1-5 LinkAuth=1,3 Microdesc=1-2 Padding=2 Relay=1-3\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"published 2020-10-13 13:27:12\n"
|
||||||
"signing-key\n"
|
"fingerprint F003 9DE0 BFF7 FCB9 F2AB BC3E 6936 9DC6 83B2 D429\n"
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"uptime 324429\n"
|
||||||
"MIGJAoGBALeyQGMQBHgTxpO/i30uHjflTm9MNi3ZBNcOKpvBXWYgY42qTqOZ7Uam\n"
|
"bandwidth 1073741824 1073741824 780830\n"
|
||||||
"c5pmZhTLrQ1W8XlGDw8Cl8ktZ0ylodLZyUNajBtJvSFWTb8iwdZsshW6Ahb8TyfI\n"
|
"extra-info-digest 6233C6BC8DAEE31AFBCD71C01C74B3EC7429F77F tEmOGBsYCTolEuqcAL6f4wpaVNn98Y/ONFyZUKxsRUY\n"
|
||||||
"Y7MwTlQ/7xw4mj1NEaui6bwGgEZUs18RTqhDrUc2Mcj1Yf61Rq+7AgMBAAE=\n"
|
"caches-extra-info\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"onion-key\n"
|
||||||
"hidden-service-dir\n"
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
"contact auth2@test.test\n"
|
"MIGJAoGBANLNgThrQ1xGSi/aV/pWQUwOe0uy/ITcU/MSng6orKp0yzzzXc8Ntjfi\n"
|
||||||
"ntor-onion-key ukR41RjtiZ69KO0SrFTvL0LoZK/ZTT01FQWmCXTCUlE=\n"
|
"EFXuD3aEk1lUgwOvRlO2xuiOoHAZNAmim6+h4OfBcFgTeRWbfSMOdaG6Fjvc62C8\n"
|
||||||
"reject *:*\n"
|
"JJ7kvQIsJoWyCN9QF9366dM8RWLGbzkJ1Ayq6FBcgx59zh6Du2w3AgMBAAE=\n"
|
||||||
"router-signature\n"
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
"-----BEGIN SIGNATURE-----\n"
|
"signing-key\n"
|
||||||
"IY2s/RY4tdahrgfGG+vW7lOvpfofoxxSo7guGpSKGxVApiroCQtumoYifnnJ88G2\n"
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
"K4IbxwEO8pgO8fnz1mibblUWw2vdDNjCifc1wtXJUE+ONA0UcLRlfQ94GbL8h2PG\n"
|
"MIGJAoGBAMR2w3ESy+Nifvpvzx0ZlIaHzVa/prZIonYdGS95ZsCL8ImDUvPFswAq\n"
|
||||||
"72z6i1+NN0QahXMk7MUbzI7bOXTJOiO8e2Zjk9vRnxI=\n"
|
"Xf0DLF8bYMfaXQhnNsDsdyH4hlfEVrTua8ww06LPQaEw1qhC9gYfUxoHQ6s4f9yC\n"
|
||||||
"-----END SIGNATURE-----\n"
|
"23KPMsw3MWnwdNspsVDjRgJlCH3JTWStNSB0TgHoRy3LYnKjzvldAgMBAAE=\n"
|
||||||
"@uploaded-at 2014-06-08 19:20:12\n"
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
"@source \"127.0.0.1\"\n"
|
"onion-key-crosscert\n"
|
||||||
"router test006r 127.0.0.1 5006 0 7006\n"
|
"-----BEGIN CROSSCERT-----\n"
|
||||||
"platform Tor 0.2.5.3-alpha-dev on Linux\n"
|
"A3PiP6XlMo9KAO+3Y9+znbqxSujOWNBJlgtQumqbTOCsnUp4tcZiqJx1Tnmd1pN5\n"
|
||||||
"protocols Link 1 2 Circuit 1\n"
|
"ZPpiHl9Q4gJ7OcsgyRvNKHE1t0q+CSie5U5n70Zr6ygymcsfLGoV5E/wonmbRRyW\n"
|
||||||
"published 2014-06-08 19:20:11\n"
|
"roEkTHQGXUtjZ6nWRGd6nhVcLCq/mfv2w7RWvkkEMyA=\n"
|
||||||
"fingerprint 829B 3FAA A42B 605A EB0B F380 8F32 8ED1 73E7 0D25\n"
|
"-----END CROSSCERT-----\n"
|
||||||
"uptime 0\n"
|
"ntor-onion-key-crosscert 1\n"
|
||||||
"bandwidth 1073741824 1073741824 0\n"
|
"-----BEGIN ED25519 CERT-----\n"
|
||||||
"extra-info-digest 7ECB757002EB9B5838B13AE6F2357A5E585131B8\n"
|
"AQoABs2OARrJxKraltAudHLZifzCJSGyB75wPpird78GCryGBiAnADqu/a1EDc8r\n"
|
||||||
"onion-key\n"
|
"SVN5RI6gC4nZRjPEg2kV4kPDTILGxTEDBfo8zwogr1gKWlclqFD4AVk/4W10hi+V\n"
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"SRNLYyQfzgk=\n"
|
||||||
"MIGJAoGBALsNBChcLVndlS4HNXL3hxBJVgXctATz6yXcJt3bkDB5cjv7Q9fqN3Ue\n"
|
"-----END ED25519 CERT-----\n"
|
||||||
"j3SI1OUBx4YrLcSLD/hELHVilLrrfbaraAFfAsydlRLjTVcMRx5FFlDd0E7TAadc\n"
|
"hidden-service-dir\n"
|
||||||
"71CkTipNnjwqz1mTRKkEFeepnh/JaFDidY9ER1rMBA5JRyBvqrD9AgMBAAE=\n"
|
"contact auth0@test.test\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"ntor-onion-key VLJF0ibPKRzAq/Qc9nCN9Eyv1JBk4EMBN9jQSQtxfGM\n"
|
||||||
"signing-key\n"
|
"reject *:*\n"
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"tunnelled-dir-server\n"
|
||||||
"MIGJAoGBAPgipA8yLj1kqrMlAH7cK7IQEdmqmfNHGXdkYQ+TKtfLh0zeEIvvh9yh\n"
|
"router-sig-ed25519 +wqG2xtPPfF3Qg/xEvjxOXLjMr5NCX7muDM+sVUEXiPYpPkxxN39Y6XcSMYJf6KgmO5AmlU+7csL5OdQeENlAQ\n"
|
||||||
"k+vKHS+HVoHo3tecB9QjJyDyyJTiETXCupSOY+ebG648JADAvv8v1WiE+KBXtjpl\n"
|
"router-signature\n"
|
||||||
"qgDTrDj5CwGuY6cvQdej5yg1UAVlMMZSg3thL3tCYtQbOq66lAlnAgMBAAE=\n"
|
"-----BEGIN SIGNATURE-----\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"q23Fmc55TMJhJW5bFN4BZKt5spInNdBtXIOj78WCpHheEY3LXs0LRiU5pOMQPIhR\n"
|
||||||
"hidden-service-dir\n"
|
"BZ8lhToo72hZr0BErZqP0AAR+7yrKdvNKFp49opwfBCQAdw+a5UxvmCxyy2zebaW\n"
|
||||||
"ntor-onion-key q02F3AQsCX7+zXNpfTqBF8O8lusPhRJpQVxOnBvbOwc=\n"
|
"UWHVtAUrohyct9Bd2Ji8mwohjRz/kxLAufUMtJVw1oE=\n"
|
||||||
"reject *:25\n"
|
"-----END SIGNATURE-----\n"
|
||||||
"reject *:119\n"
|
"@uploaded-at 2020-10-13 13:27:14\n"
|
||||||
"reject *:135-139\n"
|
"@source \"127.0.0.1\"\n"
|
||||||
"reject *:445\n"
|
"router test007r 127.0.0.1 5007 0 7007\n"
|
||||||
"reject *:563\n"
|
"identity-ed25519\n"
|
||||||
"reject *:1214\n"
|
"-----BEGIN ED25519 CERT-----\n"
|
||||||
"reject *:4661-4666\n"
|
"AQQABs1eAYJYgXIkzMMOaM6v7/IOs5NUaPdVHwPgYWDTZ/3ju2vnAQAgBAAHB+2c\n"
|
||||||
"reject *:6346-6429\n"
|
"K3h4v+X4dzLh1Cl8U1hwUKBSmgE6KSE+oWeM6iZ8lEFJlMPA90v9hc1xnTe9zjjS\n"
|
||||||
"reject *:6699\n"
|
"LkFWFIJcR3W54CJw56uTGcd0AcrCcJKph1tebIv+7y1Kz9i6SsZBpoWxcQI=\n"
|
||||||
"reject *:6881-6999\n"
|
"-----END ED25519 CERT-----\n"
|
||||||
"accept *:*\n"
|
"master-key-ed25519 BwftnCt4eL/l+Hcy4dQpfFNYcFCgUpoBOikhPqFnjOo\n"
|
||||||
"router-signature\n"
|
"or-address [::]:5007\n"
|
||||||
"-----BEGIN SIGNATURE-----\n"
|
"platform Tor 0.4.5.0-alpha-dev on Linux\n"
|
||||||
"L1fdgoN/eXgdzIIXO63W4yGoC9lRozMU+T0Fimhd/XFV8qxeUT83Vgf63vxLUHIb\n"
|
"proto Cons=1-2 Desc=1-2 DirCache=1-2 FlowCtrl=1 HSDir=1-2 HSIntro=3-5 HSRend=1-2 Link=1-5 LinkAuth=1,3 Microdesc=1-2 Padding=2 Relay=1-3\n"
|
||||||
"D4a80Wj7Pm4y5a766qLGXxlz2FYjCdkp070UpgZneB+VifUlFd/bNAjsiYTstBKM\n"
|
"published 2020-10-13 13:27:14\n"
|
||||||
"EI2L0mhl9d/7KK8vgtadHdX1z1u7QjyF6ccnzhfqeiY=\n"
|
"fingerprint 53F5 0783 5270 D39A 1E47 62C6 8F5E D21F C5F7 F7E9\n"
|
||||||
"-----END SIGNATURE-----\n"
|
"uptime 324431\n"
|
||||||
"@uploaded-at 2014-06-08 19:20:12\n"
|
"bandwidth 1073741824 1073741824 777802\n"
|
||||||
"@source \"127.0.0.1\"\n"
|
"extra-info-digest CC5F5C9F98FEE42D36C186052C88F4AF08ABCE19 q9AA03Hu526wTSvrdqNdWIzjCr+OzUREXfO6HKF6/9s\n"
|
||||||
"router test003r 127.0.0.1 5003 0 7003\n"
|
"onion-key\n"
|
||||||
"platform Tor 0.2.5.3-alpha-dev on Linux\n"
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
"protocols Link 1 2 Circuit 1\n"
|
"MIGJAoGBAKHxn6yov5enz1uNzpMOtk74kEpwLvlcSmEGd0gwi3VPs6V64a9X15Ku\n"
|
||||||
"published 2014-06-08 19:20:11\n"
|
"OD9TXWY4pcjXTGAUZ0IDEfLziAVpUUByVL7uMXD5Lm/5CoLEGgyBqsvAynK0JymR\n"
|
||||||
"fingerprint 71FD 3A35 F705 8020 D595 B711 D52A 9A0A 99BB B467\n"
|
"uLJKkdKosR589jGyQpgb9yEk6n/VtlJUsTutsOgYgO/KFh/dmP/5AgMBAAE=\n"
|
||||||
"uptime 0\n"
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
"bandwidth 1073741824 1073741824 0\n"
|
"signing-key\n"
|
||||||
"extra-info-digest 3796BE0A95B699595445DFD3453CA2074E75BCE8\n"
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
"onion-key\n"
|
"MIGJAoGBAL5sykSg1TVaP0WNbydIhdC2fwBNkIlPv+wR9DbZ7+4b18vGmrQz8sgJ\n"
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"ZpSyRmfe6jkZBOvPDPOLBCtU8+QptmPX6+w2AZhPXr8kpUfYRRrrnaWtMTzYKgmj\n"
|
||||||
"MIGJAoGBAL44ctIioIfCYFzMTYNfK5qFAPGGUpsAFmS8pThQEY/tJU14+frJDBrC\n"
|
"R/1lC29PWzDAl98TXid08H36jCUZwcbqrOmOBBQi6hzBOPz9syb7AgMBAAE=\n"
|
||||||
"BkLvBs05Bw7xOUb0f2geiYGowBA6028smiq5HzTO7Kaga8vfV7AnANPX+n9cfHCr\n"
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
"/2cMnKkT/GZzpdk0WbUw5Kc/G1ATIPFQHA8gZAi1fsSIDDn3GRV5AgMBAAE=\n"
|
"onion-key-crosscert\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"-----BEGIN CROSSCERT-----\n"
|
||||||
"signing-key\n"
|
"CVKyWa+nJnimA22PG9+NMklfgCwWF8EUIhgbLNZAlnC16RHvwQsnAUeEs6frstin\n"
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"UCZ84MXSntqn/Tore0Vs102BrSjv8uIFXaXEH8jRaLcDPeYJKyBXAOINtlVtc3Ze\n"
|
||||||
"MIGJAoGBALlPo5AI1mVTi+194yOSf40caoFlxSTfXt8KjGVa1dO/bpX7L3noOjYg\n"
|
"faMUiR7X3cxZsoGJPeAYjLEKghIbEj2sMfWDqfTUeYk=\n"
|
||||||
"goU4Aqim7BHmBWQDE/tZNTrchFoLQFHi9N4pv/0ND3sY904pzqGpe3FeTuU8P9Jg\n"
|
"-----END CROSSCERT-----\n"
|
||||||
"q2w3MeO3GwG8CJf4FOdSkgi8UKkJhOld4g4kViQbrFLXfdFvnT/zAgMBAAE=\n"
|
"ntor-onion-key-crosscert 1\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"-----BEGIN ED25519 CERT-----\n"
|
||||||
"hidden-service-dir\n"
|
"AQoABs2OAQcH7ZwreHi/5fh3MuHUKXxTWHBQoFKaATopIT6hZ4zqACWhqDvK437I\n"
|
||||||
"ntor-onion-key qluYCRrsesOTkavCLnNK6H1ToywyDquCyYeP0h/qol4=\n"
|
"OLfulZGKeyPcWCaMHjdYp9HByRW1xZhCV98maaTkpTCy7kGa0oaHGYl1hETMeIXN\n"
|
||||||
"reject *:25\n"
|
"1I8YTDv4pQM=\n"
|
||||||
"reject *:119\n"
|
"-----END ED25519 CERT-----\n"
|
||||||
"reject *:135-139\n"
|
"hidden-service-dir\n"
|
||||||
"reject *:445\n"
|
"ntor-onion-key vCYC3rCCj+emJh8uNnK3OcX2mRrgPWGgeka617QnGFM\n"
|
||||||
"reject *:563\n"
|
"accept *:*\n"
|
||||||
"reject *:1214\n"
|
"tunnelled-dir-server\n"
|
||||||
"reject *:4661-4666\n"
|
"router-sig-ed25519 PnDFvJl9otq2sXsDkm023L9+VAftkADmn8ocYVU8z5UcpwQ/2ZrZOUBthWOgt+j7SuiOb6rDw4KT5zWNwSusDw\n"
|
||||||
"reject *:6346-6429\n"
|
"router-signature\n"
|
||||||
"reject *:6699\n"
|
"-----BEGIN SIGNATURE-----\n"
|
||||||
"reject *:6881-6999\n"
|
"H+/0VaNq9cX7GGj8s1ZWaaoLEuocakqcvZOUB4XoL5qmN3TCPfLMUDGM56EMkrvx\n"
|
||||||
"accept *:*\n"
|
"bzR6/iUm8RAK5bVoPMynYm3iJW7xwvXg6W4qTSIxaTX9SnZh03+UfnyPE3uykkSa\n"
|
||||||
"router-signature\n"
|
"8+JZ6F9kqabWhi4yKsZtHt64A0/F+jyR5CvXl1kdt40=\n"
|
||||||
"-----BEGIN SIGNATURE-----\n"
|
"-----END SIGNATURE-----\n"
|
||||||
"d09K7rW/OpVzoUpfZXJuJW7a+P4pROCOZTgvDUIy/Nv+EAjcYqv95PlJ8cAMqnn3\n"
|
"@uploaded-at 2020-10-13 13:27:14\n"
|
||||||
"1oQibRmmQwn0OmG5cB8NaZiueaVIRheGzHEM8rndpHn5oFXdFvV7KKjScvfuBbTk\n"
|
"@source \"127.0.0.1\"\n"
|
||||||
"RYME8XyawRaqsEZnwirDDlZuiZOjdQs8bbGsko3grJE=\n"
|
"router test006r 127.0.0.1 5006 0 7006\n"
|
||||||
"-----END SIGNATURE-----\n"
|
"identity-ed25519\n"
|
||||||
"@uploaded-at 2014-06-08 19:20:12\n"
|
"-----BEGIN ED25519 CERT-----\n"
|
||||||
"@source \"127.0.0.1\"\n"
|
"AQQABs1eAaRBmBZIcRzdZXo2qSBLNy9nZXvSyCmVMTbs+SLH8ozAAQAgBAANeGA+\n"
|
||||||
"router test005r 127.0.0.1 5005 0 7005\n"
|
"qbvQAb9cMCjnGewaWlVp3xFaV2EWHV/IVnRmJodgXot9/W1v/eyGjzJ5mxTLLzDQ\n"
|
||||||
"platform Tor 0.2.5.3-alpha-dev on Linux\n"
|
"a68Ry1NrLeDBX3ERX9XjiZ8YUrQlqWz8HsSZYdMoH7fDpaBG7SONxuCVqAo=\n"
|
||||||
"protocols Link 1 2 Circuit 1\n"
|
"-----END ED25519 CERT-----\n"
|
||||||
"published 2014-06-08 19:20:11\n"
|
"master-key-ed25519 DXhgPqm70AG/XDAo5xnsGlpVad8RWldhFh1fyFZ0ZiY\n"
|
||||||
"fingerprint EB6E 42ED E6BF 5EE0 19F5 EFC1 53AD 094C 1327 7B76\n"
|
"or-address [::]:5006\n"
|
||||||
"uptime 0\n"
|
"platform Tor 0.4.5.0-alpha-dev on Linux\n"
|
||||||
"bandwidth 1073741824 1073741824 0\n"
|
"proto Cons=1-2 Desc=1-2 DirCache=1-2 FlowCtrl=1 HSDir=1-2 HSIntro=3-5 HSRend=1-2 Link=1-5 LinkAuth=1,3 Microdesc=1-2 Padding=2 Relay=1-3\n"
|
||||||
"extra-info-digest C031EE4E1AE826C1E3C4E21D81C961869E63F5D2\n"
|
"published 2020-10-13 13:27:14\n"
|
||||||
"onion-key\n"
|
"fingerprint A0E2 FA39 D23F BB97 0B56 0C53 3BD8 B16D 0E63 548B\n"
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"uptime 324431\n"
|
||||||
"MIGJAoGBAMd9Fm4KTSjFDzEABPZ1fwBCC2DNgee6nAmlde8FRbCVfcIHRiJyv9YG\n"
|
"bandwidth 1073741824 1073741824 347136\n"
|
||||||
"h530yUJal3hBfiWwy/SBA4LDz1flNCEwJm81s3waj4T9c676dAOLPcnOcJM5SbaQ\n"
|
"extra-info-digest BF56A5D6A1DB3090F4FE6AA37D0C4F97732AE49C B92bY5UKX7LVqvxvI4KZDlST1VQ+gy9IOO4SYIKdMnY\n"
|
||||||
"hYPDrIZLEZHAk+IoM+avKYYocwCJXwx6WTtsedF0wJBZ9mQAJERJAgMBAAE=\n"
|
"onion-key\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
"signing-key\n"
|
"MIGJAoGBALyNFEPoUDXHUprDPXMIKWoCeWDo4ztVh6yHJQE8v88tc3WiuBt7ExBP\n"
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"3Hjrh10/julakjsQWqB/8neJc7lJqdnQqFp0G8KhViwRaWgxiMAAfgq9kRB8UDPD\n"
|
||||||
"MIGJAoGBAKT7ldhV43S1CgoER/pU0Rigf0NzcSy25DQJrMRQnNmXnL03Dwuv/Iu7\n"
|
"GpgVGrvBB4mY9REnLlAeDjPK+rJ2ww5TSDe7GP5SYJh/5jBIAmShAgMBAAE=\n"
|
||||||
"dCjgg64odnvSkXHFhkbjGcg8aXikvfbMyZTbsD8NrrP6FS6pfgPgZD9W2TK7QdHI\n"
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
"QXwx1IYaaJK4nDUNfJhjrclydEdxmHbO1nLG1aS0ypn/G0EBpOSnAgMBAAE=\n"
|
"signing-key\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
"hidden-service-dir\n"
|
"MIGJAoGBANnUmF9BJ77e1Vc+sIN+gXO4FGb+NYeEkzg8yTjlUCu/8eQCmNLjwO2A\n"
|
||||||
"ntor-onion-key umFmyRPA0dIsi0CFYCbGIPe2+OUkyslTkKKDEohjQQg=\n"
|
"S9cnfeK8vD0l7EgiYQWRUZRR5aK06VLDDbLZ6O5Kbey4gibgRCkXj85SGBsV0upr\n"
|
||||||
"reject *:25\n"
|
"rmozECBg3RshdvD1nRrubUYIbDQd5rH+XTYn7O42QVRodHuBJP2DAgMBAAE=\n"
|
||||||
"reject *:119\n"
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
"reject *:135-139\n"
|
"onion-key-crosscert\n"
|
||||||
"reject *:445\n"
|
"-----BEGIN CROSSCERT-----\n"
|
||||||
"reject *:563\n"
|
"MsINH4fEw+GMWeLSxxmHfpSas1KEaX1RD0oo5GdyJjRs5Q2+ieDiW0T0VVN0auAp\n"
|
||||||
"reject *:1214\n"
|
"niJoPf8er4oDjuJPuUTzsfiZUxBjCiMgLigdwI7FLFhbL/7dgZFzF+2a/JoFKbGv\n"
|
||||||
"reject *:4661-4666\n"
|
"2LKrEl0B8DsyG5aoF5T45eY5cx6fFXOkQjvYDEJ8cyM=\n"
|
||||||
"reject *:6346-6429\n"
|
"-----END CROSSCERT-----\n"
|
||||||
"reject *:6699\n"
|
"ntor-onion-key-crosscert 0\n"
|
||||||
"reject *:6881-6999\n"
|
"-----BEGIN ED25519 CERT-----\n"
|
||||||
"accept *:*\n"
|
"AQoABs2OAQ14YD6pu9ABv1wwKOcZ7BpaVWnfEVpXYRYdX8hWdGYmANmc1AEsD0I4\n"
|
||||||
"router-signature\n"
|
"+PKxTbE3RgpP0aUxiRBaQ3GGIvWyNZsix1bE1As/Y4N1/Vtn57b0eMd2xLokeEvG\n"
|
||||||
"-----BEGIN SIGNATURE-----\n"
|
"JTGrTHoELA0=\n"
|
||||||
"JiXEbqPgDPWEb9DzCYINRXfmvMIc/IRtvshS8Vmmn7DW67TrTLKCEAnisGo92gMA\n"
|
"-----END ED25519 CERT-----\n"
|
||||||
"bhxGb9G5Mxq/8YqGoqdI2Vp6tfKlz/9AmjHzFAo01y42gafXIdr1oUS2RimA8jfF\n"
|
"hidden-service-dir\n"
|
||||||
"hwfQkbG0FYEsJrH3EUa8sMhcjsEaohK/kgklMR7OgQY=\n"
|
"ntor-onion-key 2OKE+7fTI/CKOZ4bzzfSuNaSBzsBNlyjg7PJhWaMMmw\n"
|
||||||
"-----END SIGNATURE-----\n"
|
"accept *:*\n"
|
||||||
"@uploaded-at 2014-06-08 19:20:12\n"
|
"tunnelled-dir-server\n"
|
||||||
"@source \"127.0.0.1\"\n"
|
"router-sig-ed25519 Ez2DIieIvjFe8tZt5P4yOGuNH5Nw2PO6dD0hLylGhnk/elmG4hxf+qBj6LHybos88TP2fAh0mwceomGoUQQZDg\n"
|
||||||
"router test007r 127.0.0.1 5007 0 7007\n"
|
"router-signature\n"
|
||||||
"platform Tor 0.2.5.3-alpha-dev on Linux\n"
|
"-----BEGIN SIGNATURE-----\n"
|
||||||
"protocols Link 1 2 Circuit 1\n"
|
"dxOuYd7waHjZjfWMQwKWhJxrFA/z1dKwkAZSVwglSHCCD8EmAcuerxhTiEzmKJm1\n"
|
||||||
"published 2014-06-08 19:20:11\n"
|
"areR0g1oNigVyQd8Y5gYam9lgLLM4vEyHVkRhgluzKBcWnwS1PAF4oYOvMxTqBuw\n"
|
||||||
"fingerprint DABD 2AAF 8C9F 3B71 7839 9C08 DCD8 CD9D 341D 0002\n"
|
"5dfhm58uU6h8/jeKL4J4VSNnYDwY6G4+YzOcQkU25sY=\n"
|
||||||
"uptime 0\n"
|
"-----END SIGNATURE-----\n"
|
||||||
"bandwidth 1073741824 1073741824 0\n"
|
"@uploaded-at 2020-10-13 13:27:14\n"
|
||||||
"extra-info-digest F80104A0DFFB4EB429325D41D1F71E5BF8C6C726\n"
|
"@source \"127.0.0.1\"\n"
|
||||||
"onion-key\n"
|
"router test004r 127.0.0.1 5004 0 7004\n"
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"identity-ed25519\n"
|
||||||
"MIGJAoGBAL42fYAriR/JeB/9NpVq5Y5EEHca+ugIpaSdRfbopWDtFjXLEk2jmO5A\n"
|
"-----BEGIN ED25519 CERT-----\n"
|
||||||
"KoAGIkTKDr7e9101x63H+0Nh/7w3uYs/WqTXEH8/1sHwe+0PY2HL0S6qhlOo6X54\n"
|
"AQQABs1eATTDPEX+F/fXy60oU+qlU3kFPYm11GLFpGIkXJ3+ULD1AQAgBADBcugt\n"
|
||||||
"EfK0nDDBAWFOpyiAMHRk8JVikKb56+FVIhCJgi1RIbLIiUQK2/kxAgMBAAE=\n"
|
"WlMsFJtdBOshhXHYNabLhZgnsHmlCrw6MR/qpwNL7TqsdPpsEvYKAuHSozOaof4V\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"4sy9Zd1NFvwOJLyp1QkErf4TXWDoMQUCir1AcPsj/AGDIGq48DFpZUZyego=\n"
|
||||||
"signing-key\n"
|
"-----END ED25519 CERT-----\n"
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"master-key-ed25519 wXLoLVpTLBSbXQTrIYVx2DWmy4WYJ7B5pQq8OjEf6qc\n"
|
||||||
"MIGJAoGBAKQj2U5hmB68V6NQBqD8DfIkJjovvM8t6nGfYpkT8ORsROnmgI5mjM38\n"
|
"or-address [::]:5004\n"
|
||||||
"cmh5GIjY9RgoOWolLmsWQ4SXtS0FvrPft1M61UMTSHzlrEeuod5KenV7vGlX2TxT\n"
|
"platform Tor 0.4.5.0-alpha-dev on Linux\n"
|
||||||
"0DoA5TL9yY7CmxCk8CNRCtN/g7WocgIiP4KCIiEZ4VE6LIb6sxUnAgMBAAE=\n"
|
"proto Cons=1-2 Desc=1-2 DirCache=1-2 FlowCtrl=1 HSDir=1-2 HSIntro=3-5 HSRend=1-2 Link=1-5 LinkAuth=1,3 Microdesc=1-2 Padding=2 Relay=1-3\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"published 2020-10-13 13:27:14\n"
|
||||||
"hidden-service-dir\n"
|
"fingerprint C763 47FA 498E 3929 F2AC 563C B958 1249 137F F656\n"
|
||||||
"ntor-onion-key 1UBS8rTlL39u9YxRJWhz+GTG1dS15VRi4au1i5qZOyI=\n"
|
"uptime 324431\n"
|
||||||
"reject *:25\n"
|
"bandwidth 1073741824 1073741824 640261\n"
|
||||||
"reject *:119\n"
|
"extra-info-digest 93E7E827FA057EEACE951B7D3F26A1E8FCCBC12B sHuKfKSpRmXKocb79/PgbMfM7z6UcGbbgW3aQvQIuRE\n"
|
||||||
"reject *:135-139\n"
|
"onion-key\n"
|
||||||
"reject *:445\n"
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
"reject *:563\n"
|
"MIGJAoGBAMFoSwvDavnsMuT8v5D9vcWATYziPOe6erYE1cWAKMLL6BIrqUhCKEIi\n"
|
||||||
"reject *:1214\n"
|
"g2hKE7XeGypQURhtV/mkvx43N1NwMTzPlbkEtL1LdDmb1kKKxsQ0kSpX75yc6g8y\n"
|
||||||
"reject *:4661-4666\n"
|
"5aKLVjPBMRDk5+eszo0qHs/lOO+Pn0M5zBurWv6Jk12iN9ETMT6XAgMBAAE=\n"
|
||||||
"reject *:6346-6429\n"
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
"reject *:6699\n"
|
"signing-key\n"
|
||||||
"reject *:6881-6999\n"
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
"accept *:*\n"
|
"MIGJAoGBAOLXEVTTTkEqg47/I/JqORoqg/2r1bCa4LjPMThE6HoyvNIJRhGIsS18\n"
|
||||||
"router-signature\n"
|
"37PZ3YGdkVY6bMdJWed4r4DGoqGu4I5p0hjv7CeONbGjIa19R4shkSKxGw8Prrr7\n"
|
||||||
"-----BEGIN SIGNATURE-----\n"
|
"jHHg4eaK2i6p2bRPpn6V5Z/dAmfKz70682uKakZSsCA5hUoBMVr5AgMBAAE=\n"
|
||||||
"m7xHh+XPdLN+qcMLz1dBAEAmcdCFrtdseMHCc0FyAP2kXdayxqe3o2IOOHN++bTH\n"
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
"Y5iHsZembsIJJ+D/d0YEKWKh42TUWCXBu0Gbfc4OcNuR6PFlTWO2wk7rDT3HOiFr\n"
|
"onion-key-crosscert\n"
|
||||||
"pe3wJqZYkLxlBDamROAlMMRe71iag89H/4EulC18opw=\n"
|
"-----BEGIN CROSSCERT-----\n"
|
||||||
"-----END SIGNATURE-----\n";
|
"ZO/f8nN9QYAm0O2SgaH5Zb9T6o5ibiKVC3N8nwzPzEA7xxli/OR81tCobHYoTDQt\n"
|
||||||
|
"ZYKZXLvH0LAmjdHVVOGYAyfQKR7Ig2djVQuB4VVf8ix31jpL8guUIG14IKI/XSnz\n"
|
||||||
|
"ZgHnGkAkhZC+Q+FHAc341DeSHBy9iZbwooXyuK+rfnM=\n"
|
||||||
|
"-----END CROSSCERT-----\n"
|
||||||
|
"ntor-onion-key-crosscert 0\n"
|
||||||
|
"-----BEGIN ED25519 CERT-----\n"
|
||||||
|
"AQoABs2OAcFy6C1aUywUm10E6yGFcdg1psuFmCeweaUKvDoxH+qnAJDQqV067Kgn\n"
|
||||||
|
"q56Hsi6zUgK87nX3ENuQuKtjl86uWq1QmpmMt259vMa/rouA61sglMDGsZ1YVgEC\n"
|
||||||
|
"yoUVkFxVkQM=\n"
|
||||||
|
"-----END ED25519 CERT-----\n"
|
||||||
|
"hidden-service-dir\n"
|
||||||
|
"ntor-onion-key XBpzf4GSuvJZ/PP0PM4ECNotP/VOtHcFimQ2COb+NGA\n"
|
||||||
|
"accept *:*\n"
|
||||||
|
"tunnelled-dir-server\n"
|
||||||
|
"router-sig-ed25519 fUGEaiokY5dyMBtQ7x6BWBKwsJC6MQVYfewSMiWagE+T8H2EY2Lww0yowQo0+40FIKSG4g6GNpSMvs1g0cYIAg\n"
|
||||||
|
"router-signature\n"
|
||||||
|
"-----BEGIN SIGNATURE-----\n"
|
||||||
|
"h/nND9oB+dIiHzm93xm2Fi9pemP4B5B5qJkyEJg/CcpitaXvugBIw1EOWMwqrsr2\n"
|
||||||
|
"x7ZyDz8gUp7WcXwhqbXlsLgSFT96RC4cBG6Qjvly0t+gvvcxG7RHV2ytJ7VlakyP\n"
|
||||||
|
"uENuwPYre230OfOjm5Jg+wFdlF6OMLphj2Yd7o48Xcw=\n"
|
||||||
|
"-----END SIGNATURE-----\n"
|
||||||
|
"@uploaded-at 2020-10-13 13:27:34\n"
|
||||||
|
"@source \"127.0.0.1\"\n"
|
||||||
|
"router test005r 127.0.0.1 5005 0 7005\n"
|
||||||
|
"identity-ed25519\n"
|
||||||
|
"-----BEGIN ED25519 CERT-----\n"
|
||||||
|
"AQQABs1eAfTuBhu6ypB5/9avDiY3qBzulkCvfYqbFN/ABk/o4xFcAQAgBAAnmWRG\n"
|
||||||
|
"rIvqpb4Kk3cThEiWAll4uDCO2Y46uNm9WG7AtPt4LG+XfktG3GAxv6aVQimwlyHc\n"
|
||||||
|
"1x2Lfm9KG3mWWj+hxnum4Z7873OE0B9l2Hg0YQZCW/PuHSWN0rspTvY5SgA=\n"
|
||||||
|
"-----END ED25519 CERT-----\n"
|
||||||
|
"master-key-ed25519 J5lkRqyL6qW+CpN3E4RIlgJZeLgwjtmOOrjZvVhuwLQ\n"
|
||||||
|
"or-address [::]:5005\n"
|
||||||
|
"platform Tor 0.4.5.0-alpha-dev on Linux\n"
|
||||||
|
"proto Cons=1-2 Desc=1-2 DirCache=1-2 FlowCtrl=1 HSDir=1-2 HSIntro=3-5 HSRend=1-2 Link=1-5 LinkAuth=1,3 Microdesc=1-2 Padding=2 Relay=1-3\n"
|
||||||
|
"published 2020-10-13 13:27:34\n"
|
||||||
|
"fingerprint D219 590A C951 3BCD EBBA 9AB7 2100 7A4C C01B BAE3\n"
|
||||||
|
"uptime 324451\n"
|
||||||
|
"bandwidth 1073741824 1073741824 637796\n"
|
||||||
|
"extra-info-digest 78E6D382BC826B95B4111554EEE7D541A32AAAA3 c61Onjpq+1S0TrdvoaOvGAxew6yfO+uHNhipbemQmgA\n"
|
||||||
|
"onion-key\n"
|
||||||
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
|
"MIGJAoGBAMvEJ/JVNK7I38PPWhQMuCgkET/ki4WIas4tj5Kmqfb9kHqxMR+EunRD\n"
|
||||||
|
"83k4pel1yB7QdV+iTd/4SZOI8RpZP+BO1KnOTWfpztAU1lDGr19/PwdwcHaILpBD\n"
|
||||||
|
"nNzm6otk4/bKUQ0vqpOfJljtg0DfAm4uMAQ6BMFy6uEAF7+JupuPAgMBAAE=\n"
|
||||||
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
|
"signing-key\n"
|
||||||
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
|
"MIGJAoGBANBzejGAwyPTPq2Gm03wpg3qICo0uDQau8opude2mW3eyxAqOqHzC8De\n"
|
||||||
|
"gRgbmn040vqe9gwvH4iaHpVeTxyDwQefbfULdq6bETmX3aSUj6LKBCqqcyuOJFQu\n"
|
||||||
|
"7M2QfNSfHtldUABpIaqFvEA3AV8qjOoUtauoFNJKMy7Wj2//S70VAgMBAAE=\n"
|
||||||
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
|
"onion-key-crosscert\n"
|
||||||
|
"-----BEGIN CROSSCERT-----\n"
|
||||||
|
"pD3Nkkunt8zP6PO6H3uHT0t7xnorC7cY/KfF75mFB+90pHCD9f0Xdu3Pjrur/q23\n"
|
||||||
|
"PIKV3hdtdsODoJuoh8LPGNAjS5rO6HMCtHNDNunNOs69bvfaO0jThnurXmOpY0sW\n"
|
||||||
|
"eRfBeYN2KNgrN0B1eDejfPSr03dkFY48yoUDROv9EJQ=\n"
|
||||||
|
"-----END CROSSCERT-----\n"
|
||||||
|
"ntor-onion-key-crosscert 0\n"
|
||||||
|
"-----BEGIN ED25519 CERT-----\n"
|
||||||
|
"AQoABs2OASeZZEasi+qlvgqTdxOESJYCWXi4MI7Zjjq42b1YbsC0AKc5y5qYUYvw\n"
|
||||||
|
"VATtWkV9DVIZbZSb9mQP5pmNaqmX+DbmINCYt8j7l+U7g3ftUyh0Wlrgevx0pFUI\n"
|
||||||
|
"RcIU0HKHZQA=\n"
|
||||||
|
"-----END ED25519 CERT-----\n"
|
||||||
|
"hidden-service-dir\n"
|
||||||
|
"ntor-onion-key FChIfm77vrWB7JsxQ+jMbN6VSSp1P0DYbw/2aqey4iA\n"
|
||||||
|
"accept *:*\n"
|
||||||
|
"tunnelled-dir-server\n"
|
||||||
|
"router-sig-ed25519 Xm56dYbo/hCHWyzcdUPmfTeZ4qly2TYf1/2Q1lXKQDMJyBti8ZE8R2TTYsYimr+UtAapbzBItccZLze505nhBw\n"
|
||||||
|
"router-signature\n"
|
||||||
|
"-----BEGIN SIGNATURE-----\n"
|
||||||
|
"bbeN0lq6nCfJQXGcKa1M9TQ6b2upig7clrlVXuzKeR0JhGwnDCXUAFxDtrw3vkVo\n"
|
||||||
|
"ExBXXvJeBPyustFOQkdiAEWHHSW5CwEgeVCBYZeEnaiySIgDVKuu+9B53ezFdC0Y\n"
|
||||||
|
"iFJkKxxDx7ksxX0zdl7aPT4ORFEuRhCYS6el7YJmoyg=\n"
|
||||||
|
"-----END SIGNATURE-----\n"
|
||||||
|
"@uploaded-at 2020-10-13 13:28:13\n"
|
||||||
|
"@source \"127.0.0.1\"\n"
|
||||||
|
"router test003r 127.0.0.1 5003 0 7003\n"
|
||||||
|
"identity-ed25519\n"
|
||||||
|
"-----BEGIN ED25519 CERT-----\n"
|
||||||
|
"AQQABs1eAUC9IBXmVO3yeYhG6VI5o6+uyPI8tNFBR38n8RDxW91MAQAgBAD6reoi\n"
|
||||||
|
"ucfyRvLfC++3TyajT1IHbggd8/D5Gp9DlzbDf4vRNbII2iCDxilKG60yNurDcDWA\n"
|
||||||
|
"W9H2JRwrZpiQgQvEzGQJRISaGHQIVlEKpER7RvjDZvQG9KtHyDdH0txcdgo=\n"
|
||||||
|
"-----END ED25519 CERT-----\n"
|
||||||
|
"master-key-ed25519 +q3qIrnH8kby3wvvt08mo09SB24IHfPw+RqfQ5c2w38\n"
|
||||||
|
"or-address [::]:5003\n"
|
||||||
|
"platform Tor 0.4.5.0-alpha-dev on Linux\n"
|
||||||
|
"proto Cons=1-2 Desc=1-2 DirCache=1-2 FlowCtrl=1 HSDir=1-2 HSIntro=3-5 HSRend=1-2 Link=1-5 LinkAuth=1,3 Microdesc=1-2 Padding=2 Relay=1-3\n"
|
||||||
|
"published 2020-10-13 13:28:13\n"
|
||||||
|
"fingerprint 09C5 1D0C D3F4 F3D5 8C73 D219 9BF3 F0FC 55F5 2965\n"
|
||||||
|
"uptime 324490\n"
|
||||||
|
"bandwidth 1073741824 1073741824 640359\n"
|
||||||
|
"extra-info-digest 64AD921120758875124DEBC83808AE282BEA76F6 6xEyhjSnACEk+bScEqhoTI43p4+bcnFh8E+9fvBdeow\n"
|
||||||
|
"onion-key\n"
|
||||||
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
|
"MIGJAoGBANQMTqT/mcGSnwA7MsqKrtmK0re+XsJesFNeRwozZLKLgsB0ARoHvlAp\n"
|
||||||
|
"iBb/9kU++GhRBUs3EsMaU7rHN+yahDzwrVlWgRm3YV17aj1guQnHm8RaTbDtKCii\n"
|
||||||
|
"G0aBo2quU1LqXot/XVOE2BCFO0DO+4tZE5mCChpnALy0AYs2Dj4HAgMBAAE=\n"
|
||||||
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
|
"signing-key\n"
|
||||||
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
|
"MIGJAoGBAJ2yCCvgp0/HYyvW+DIX+nMEZ8Q1Sjzke9oEVcx1UQKFDmCCRJA4cJA5\n"
|
||||||
|
"xx5hVedkIXug7DJ/2xkMR+QT+Cwqxij1K0jlJlOmnixsT/TnwyyhP6eIxNef0HuG\n"
|
||||||
|
"MAgptAEMltR9OqDEESvfGv0cz+U4fru6xHpfH9c/P4S3aeihUbSnAgMBAAE=\n"
|
||||||
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
|
"onion-key-crosscert\n"
|
||||||
|
"-----BEGIN CROSSCERT-----\n"
|
||||||
|
"UaR88eoWRuFJjYqns3RP92bgZv5AKYjxNrcm0SpZIOgDeayq/1mDA/jdVbDPa4de\n"
|
||||||
|
"KRJ9ezXCo+2O2zl6rhvsRsMgVwrZEr5Hz4+Zf1H6hpvk8NoOEBCb5g3jef6nMmGr\n"
|
||||||
|
"1p+NV/OULow266pKnWidPQCWLjc+ladBLQU8EJxT65Q=\n"
|
||||||
|
"-----END CROSSCERT-----\n"
|
||||||
|
"ntor-onion-key-crosscert 1\n"
|
||||||
|
"-----BEGIN ED25519 CERT-----\n"
|
||||||
|
"AQoABs2OAfqt6iK5x/JG8t8L77dPJqNPUgduCB3z8Pkan0OXNsN/AGVx0xPqhPuo\n"
|
||||||
|
"n9nnmtt+48y9Wkcdo43Si3Nrl96TxAiOMB0NKoTIk7++puAreR364CBPM8LM0TrT\n"
|
||||||
|
"AxIjl/GuMQE=\n"
|
||||||
|
"-----END ED25519 CERT-----\n"
|
||||||
|
"hidden-service-dir\n"
|
||||||
|
"ntor-onion-key bLeD2EdnozYyTnxk9PeRykzjPEw65lVLmlBhWk5+ATI\n"
|
||||||
|
"accept *:*\n"
|
||||||
|
"tunnelled-dir-server\n"
|
||||||
|
"router-sig-ed25519 wGsA4xlKdM0rzborPOil8cvAzUS2ImXvsm9PgTQDiosGf8ve3ucdDUjKLNOTd6iFVDIl4ESG2Y3eOsqAgQddBA\n"
|
||||||
|
"router-signature\n"
|
||||||
|
"-----BEGIN SIGNATURE-----\n"
|
||||||
|
"k8ndhNl9lCng7IfgeoYGWKnvmxgfo41M9Sq3754HUAVRJcVZ1RJm4OGI/Z/fw38I\n"
|
||||||
|
"ievnndu81y/L2cuHnSr+MTXY7B2pLXueOo8YpKlx799Wugn5dnfOhz9WHkFNhWQL\n"
|
||||||
|
"8iOty3iG3VIJVi0pU3qgj5Xc1zKVa3pZ/QQfs4k/g44=\n"
|
||||||
|
"-----END SIGNATURE-----\n";
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#include "lib/confmgt/confmgt.h"
|
#include "lib/confmgt/confmgt.h"
|
||||||
#include "core/mainloop/connection.h"
|
#include "core/mainloop/connection.h"
|
||||||
#include "core/or/relay.h"
|
#include "core/or/relay.h"
|
||||||
|
#include "core/or/protover.h"
|
||||||
#include "core/or/versions.h"
|
#include "core/or/versions.h"
|
||||||
#include "feature/client/bridges.h"
|
#include "feature/client/bridges.h"
|
||||||
#include "feature/client/entrynodes.h"
|
#include "feature/client/entrynodes.h"
|
||||||
@ -100,6 +101,14 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static void setup_ei_digests(void);
|
||||||
|
static uint8_t digest_ei_minimal[20];
|
||||||
|
static uint8_t digest_ei_bad_nickname[20];
|
||||||
|
static uint8_t digest_ei_maximal[20];
|
||||||
|
static uint8_t digest_ei_bad_tokens[20];
|
||||||
|
static uint8_t digest_ei_bad_sig2[20];
|
||||||
|
static uint8_t digest_ei_bad_published[20];
|
||||||
|
|
||||||
static networkstatus_t *
|
static networkstatus_t *
|
||||||
networkstatus_parse_vote_from_string_(const char *s,
|
networkstatus_parse_vote_from_string_(const char *s,
|
||||||
const char **eos_out,
|
const char **eos_out,
|
||||||
@ -216,6 +225,7 @@ basic_routerinfo_new(const char *nickname, uint32_t ipv4_addr,
|
|||||||
r1->bandwidthcapacity = bandwidthcapacity;
|
r1->bandwidthcapacity = bandwidthcapacity;
|
||||||
|
|
||||||
r1->cache_info.published_on = published_on;
|
r1->cache_info.published_on = published_on;
|
||||||
|
r1->protocol_list = tor_strdup(protover_get_supported_protocols());
|
||||||
|
|
||||||
if (rsa_onion_keypair_out) {
|
if (rsa_onion_keypair_out) {
|
||||||
*rsa_onion_keypair_out = pk1;
|
*rsa_onion_keypair_out = pk1;
|
||||||
@ -433,13 +443,6 @@ mock_get_configured_ports(void)
|
|||||||
return mocked_configured_ports;
|
return mocked_configured_ports;
|
||||||
}
|
}
|
||||||
|
|
||||||
static tor_cert_t *
|
|
||||||
mock_tor_cert_dup_null(const tor_cert_t *cert)
|
|
||||||
{
|
|
||||||
(void)cert;
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
static crypto_pk_t *mocked_server_identitykey = NULL;
|
static crypto_pk_t *mocked_server_identitykey = NULL;
|
||||||
|
|
||||||
/* Returns mocked_server_identitykey with no checks. */
|
/* Returns mocked_server_identitykey with no checks. */
|
||||||
@ -664,211 +667,6 @@ STMT_BEGIN \
|
|||||||
tt_str_op(e1->nickname, OP_EQ, r1->nickname); \
|
tt_str_op(e1->nickname, OP_EQ, r1->nickname); \
|
||||||
STMT_END
|
STMT_END
|
||||||
|
|
||||||
/** Run unit tests for router descriptor generation logic for a RSA-only
|
|
||||||
* router. Tor versions without ed25519 (0.2.6 and earlier) are no longer
|
|
||||||
* officially supported, but the authorities still accept their descriptors.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
test_dir_formats_rsa(void *arg)
|
|
||||||
{
|
|
||||||
char *buf = NULL;
|
|
||||||
char *buf2 = NULL;
|
|
||||||
char *cp = NULL;
|
|
||||||
|
|
||||||
uint8_t *rsa_cc = NULL;
|
|
||||||
|
|
||||||
routerinfo_t *r1 = NULL;
|
|
||||||
extrainfo_t *e1 = NULL;
|
|
||||||
routerinfo_t *rp1 = NULL;
|
|
||||||
extrainfo_t *ep1 = NULL;
|
|
||||||
|
|
||||||
smartlist_t *chunks = NULL;
|
|
||||||
const char *msg = NULL;
|
|
||||||
int rv = -1;
|
|
||||||
|
|
||||||
or_options_t *options = get_options_mutable();
|
|
||||||
setup_dir_formats_options((const char *)arg, options);
|
|
||||||
|
|
||||||
hibernate_set_state_for_testing_(HIBERNATE_STATE_LIVE);
|
|
||||||
|
|
||||||
/* r1 is a minimal, RSA-only descriptor, with DirPort and IPv6 */
|
|
||||||
r1 = basic_routerinfo_new("Magri", 0xc0a80001u /* 192.168.0.1 */,
|
|
||||||
9000, 9003,
|
|
||||||
1000, 5000, 10000,
|
|
||||||
0,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
/* Fake just enough of an ntor key to get by */
|
|
||||||
curve25519_keypair_t r1_onion_keypair;
|
|
||||||
curve25519_keypair_generate(&r1_onion_keypair, 0);
|
|
||||||
r1->onion_curve25519_pkey = tor_memdup(&r1_onion_keypair.pubkey,
|
|
||||||
sizeof(curve25519_public_key_t));
|
|
||||||
|
|
||||||
/* Now add IPv6 */
|
|
||||||
tor_addr_parse(&r1->ipv6_addr, "1:2:3:4::");
|
|
||||||
r1->ipv6_orport = 9999;
|
|
||||||
|
|
||||||
r1->exit_policy = NULL;
|
|
||||||
|
|
||||||
/* XXXX+++ router_dump_to_string should really take this from ri. */
|
|
||||||
options->ContactInfo = tor_strdup("Magri White "
|
|
||||||
"<magri@elsewhere.example.com>");
|
|
||||||
|
|
||||||
setup_mock_configured_ports(r1->ipv4_orport, r1->ipv4_dirport);
|
|
||||||
|
|
||||||
buf = router_dump_router_to_string(r1, r1->identity_pkey, NULL, NULL, NULL);
|
|
||||||
tt_assert(buf);
|
|
||||||
|
|
||||||
tor_free(options->ContactInfo);
|
|
||||||
cleanup_mock_configured_ports();
|
|
||||||
|
|
||||||
/* Synthesise a router descriptor, without the signature */
|
|
||||||
chunks = smartlist_new();
|
|
||||||
|
|
||||||
smartlist_add(chunks, get_new_router_line(r1));
|
|
||||||
smartlist_add_strdup(chunks, "or-address [1:2:3:4::]:9999\n");
|
|
||||||
|
|
||||||
smartlist_add(chunks, get_new_platform_line());
|
|
||||||
smartlist_add(chunks, get_new_published_line(r1));
|
|
||||||
smartlist_add(chunks, get_new_fingerprint_line(r1));
|
|
||||||
|
|
||||||
smartlist_add(chunks, get_new_uptime_line(0));
|
|
||||||
smartlist_add(chunks, get_new_bandwidth_line(r1));
|
|
||||||
|
|
||||||
smartlist_add(chunks, get_new_onion_key_block(r1));
|
|
||||||
smartlist_add(chunks, get_new_signing_key_block(r1));
|
|
||||||
|
|
||||||
smartlist_add_strdup(chunks, "hidden-service-dir\n");
|
|
||||||
|
|
||||||
smartlist_add_strdup(chunks, "contact Magri White "
|
|
||||||
"<magri@elsewhere.example.com>\n");
|
|
||||||
|
|
||||||
smartlist_add(chunks, get_new_bridge_distribution_request_line(options));
|
|
||||||
smartlist_add(chunks, get_new_ntor_onion_key_line(&r1_onion_keypair.pubkey));
|
|
||||||
smartlist_add_strdup(chunks, "reject *:*\n");
|
|
||||||
smartlist_add_strdup(chunks, "tunnelled-dir-server\n");
|
|
||||||
|
|
||||||
smartlist_add_strdup(chunks, "router-signature\n");
|
|
||||||
|
|
||||||
size_t len_out = 0;
|
|
||||||
buf2 = smartlist_join_strings(chunks, "", 0, &len_out);
|
|
||||||
SMARTLIST_FOREACH(chunks, char *, s, tor_free(s));
|
|
||||||
smartlist_free(chunks);
|
|
||||||
|
|
||||||
tt_assert(len_out > 0);
|
|
||||||
|
|
||||||
buf[strlen(buf2)] = '\0'; /* Don't compare the sig; it's never the same
|
|
||||||
* twice */
|
|
||||||
|
|
||||||
tt_str_op(buf,OP_EQ, buf2);
|
|
||||||
tor_free(buf);
|
|
||||||
|
|
||||||
setup_mock_configured_ports(r1->ipv4_orport, r1->ipv4_dirport);
|
|
||||||
|
|
||||||
buf = router_dump_router_to_string(r1, r1->identity_pkey, NULL, NULL, NULL);
|
|
||||||
tt_assert(buf);
|
|
||||||
|
|
||||||
cleanup_mock_configured_ports();
|
|
||||||
|
|
||||||
/* Now, try to parse buf */
|
|
||||||
cp = buf;
|
|
||||||
rp1 = router_parse_entry_from_string((const char*)cp,NULL,1,0,NULL,NULL);
|
|
||||||
|
|
||||||
CHECK_ROUTERINFO_CONSISTENCY(r1, rp1);
|
|
||||||
|
|
||||||
tt_assert(rp1->policy_is_reject_star);
|
|
||||||
|
|
||||||
tor_free(buf);
|
|
||||||
routerinfo_free(rp1);
|
|
||||||
|
|
||||||
/* Test extrainfo creation.
|
|
||||||
* We avoid calling router_build_fresh_unsigned_routerinfo(), because it's
|
|
||||||
* too complex. Instead, we re-use the manually-created routerinfos.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Set up standard mocks and data */
|
|
||||||
setup_mocks_for_fresh_descriptor(r1, NULL);
|
|
||||||
|
|
||||||
/* router_build_fresh_signed_extrainfo() passes the result of
|
|
||||||
* get_master_signing_key_cert() directly to tor_cert_dup(), which fails on
|
|
||||||
* NULL. But we want a NULL ei->cache_info.signing_key_cert to test the
|
|
||||||
* non-ed key path.
|
|
||||||
*/
|
|
||||||
MOCK(tor_cert_dup, mock_tor_cert_dup_null);
|
|
||||||
|
|
||||||
/* Fake just enough of an ORPort and DirPort to get by */
|
|
||||||
setup_mock_configured_ports(r1->ipv4_orport, r1->ipv4_dirport);
|
|
||||||
|
|
||||||
/* Test some of the low-level static functions. */
|
|
||||||
e1 = router_build_fresh_signed_extrainfo(r1);
|
|
||||||
tt_assert(e1);
|
|
||||||
router_update_routerinfo_from_extrainfo(r1, e1);
|
|
||||||
rv = router_dump_and_sign_routerinfo_descriptor_body(r1);
|
|
||||||
tt_assert(rv == 0);
|
|
||||||
msg = "";
|
|
||||||
rv = routerinfo_incompatible_with_extrainfo(r1->identity_pkey, e1,
|
|
||||||
&r1->cache_info, &msg);
|
|
||||||
/* If they are incompatible, fail and show the msg string */
|
|
||||||
tt_str_op(msg, OP_EQ, "");
|
|
||||||
tt_assert(rv == 0);
|
|
||||||
|
|
||||||
/* Now cleanup */
|
|
||||||
cleanup_mocks_for_fresh_descriptor();
|
|
||||||
|
|
||||||
UNMOCK(tor_cert_dup);
|
|
||||||
|
|
||||||
cleanup_mock_configured_ports();
|
|
||||||
|
|
||||||
CHECK_EXTRAINFO_CONSISTENCY(r1, e1);
|
|
||||||
|
|
||||||
/* Test that the signed ri is parseable */
|
|
||||||
tt_assert(r1->cache_info.signed_descriptor_body);
|
|
||||||
cp = r1->cache_info.signed_descriptor_body;
|
|
||||||
rp1 = router_parse_entry_from_string((const char*)cp,NULL,1,0,NULL,NULL);
|
|
||||||
|
|
||||||
CHECK_ROUTERINFO_CONSISTENCY(r1, rp1);
|
|
||||||
|
|
||||||
tt_assert(rp1->policy_is_reject_star);
|
|
||||||
|
|
||||||
routerinfo_free(rp1);
|
|
||||||
|
|
||||||
/* Test that the signed ei is parseable */
|
|
||||||
tt_assert(e1->cache_info.signed_descriptor_body);
|
|
||||||
cp = e1->cache_info.signed_descriptor_body;
|
|
||||||
ep1 = extrainfo_parse_entry_from_string((const char*)cp,NULL,1,NULL,NULL);
|
|
||||||
|
|
||||||
CHECK_EXTRAINFO_CONSISTENCY(r1, ep1);
|
|
||||||
|
|
||||||
/* In future tests, we could check the actual extrainfo statistics. */
|
|
||||||
|
|
||||||
extrainfo_free(ep1);
|
|
||||||
|
|
||||||
done:
|
|
||||||
dirserv_free_fingerprint_list();
|
|
||||||
|
|
||||||
tor_free(options->ContactInfo);
|
|
||||||
tor_free(options->Nickname);
|
|
||||||
|
|
||||||
cleanup_mock_configured_ports();
|
|
||||||
cleanup_mocks_for_fresh_descriptor();
|
|
||||||
|
|
||||||
if (chunks) {
|
|
||||||
SMARTLIST_FOREACH(chunks, char *, s, tor_free(s));
|
|
||||||
smartlist_free(chunks);
|
|
||||||
}
|
|
||||||
|
|
||||||
routerinfo_free(r1);
|
|
||||||
routerinfo_free(rp1);
|
|
||||||
|
|
||||||
extrainfo_free(e1);
|
|
||||||
extrainfo_free(ep1);
|
|
||||||
|
|
||||||
tor_free(rsa_cc);
|
|
||||||
|
|
||||||
tor_free(buf);
|
|
||||||
tor_free(buf2);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check that the exit policy in rp2 is as expected. */
|
/* Check that the exit policy in rp2 is as expected. */
|
||||||
#define CHECK_PARSED_EXIT_POLICY(rp2) \
|
#define CHECK_PARSED_EXIT_POLICY(rp2) \
|
||||||
STMT_BEGIN \
|
STMT_BEGIN \
|
||||||
@ -999,6 +797,8 @@ test_dir_formats_rsa_ed25519(void *arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
smartlist_add(chunks, get_new_platform_line());
|
smartlist_add(chunks, get_new_platform_line());
|
||||||
|
smartlist_add_asprintf(chunks,
|
||||||
|
"proto %s\n", protover_get_supported_protocols());
|
||||||
smartlist_add(chunks, get_new_published_line(r2));
|
smartlist_add(chunks, get_new_published_line(r2));
|
||||||
smartlist_add(chunks, get_new_fingerprint_line(r2));
|
smartlist_add(chunks, get_new_fingerprint_line(r2));
|
||||||
|
|
||||||
@ -1064,7 +864,9 @@ test_dir_formats_rsa_ed25519(void *arg)
|
|||||||
|
|
||||||
setup_mock_configured_ports(r2->ipv4_orport, 0);
|
setup_mock_configured_ports(r2->ipv4_orport, 0);
|
||||||
|
|
||||||
buf = router_dump_router_to_string(r2, r2->identity_pkey, NULL, NULL, NULL);
|
buf = router_dump_router_to_string(r2, r2->identity_pkey,
|
||||||
|
r2_onion_pkey,
|
||||||
|
&r2_onion_keypair, &kp2);
|
||||||
tt_assert(buf);
|
tt_assert(buf);
|
||||||
|
|
||||||
cleanup_mock_configured_ports();
|
cleanup_mock_configured_ports();
|
||||||
@ -1217,14 +1019,12 @@ test_dir_routerinfo_parsing(void *arg)
|
|||||||
again = 999; \
|
again = 999; \
|
||||||
ri = router_parse_entry_from_string((s), NULL, 0, 0, NULL, &again); \
|
ri = router_parse_entry_from_string((s), NULL, 0, 0, NULL, &again); \
|
||||||
tt_assert(ri == NULL); \
|
tt_assert(ri == NULL); \
|
||||||
tt_int_op(again, OP_EQ, (againval)); \
|
tt_int_op(again, OP_EQ, (againval)); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
CHECK_OK(EX_RI_MINIMAL);
|
CHECK_OK(EX_RI_MINIMAL);
|
||||||
CHECK_OK(EX_RI_MAXIMAL);
|
CHECK_OK(EX_RI_MAXIMAL);
|
||||||
|
|
||||||
CHECK_OK(EX_RI_MINIMAL_ED);
|
|
||||||
|
|
||||||
/* good annotations prepended */
|
/* good annotations prepended */
|
||||||
routerinfo_free(ri);
|
routerinfo_free(ri);
|
||||||
ri = router_parse_entry_from_string(EX_RI_MINIMAL, NULL, 0, 0,
|
ri = router_parse_entry_from_string(EX_RI_MINIMAL, NULL, 0, 0,
|
||||||
@ -1259,14 +1059,13 @@ test_dir_routerinfo_parsing(void *arg)
|
|||||||
tt_ptr_op(ri, OP_EQ, NULL);
|
tt_ptr_op(ri, OP_EQ, NULL);
|
||||||
|
|
||||||
CHECK_FAIL(EX_RI_BAD_SIG1, 1);
|
CHECK_FAIL(EX_RI_BAD_SIG1, 1);
|
||||||
CHECK_FAIL(EX_RI_BAD_SIG2, 1);
|
|
||||||
CHECK_FAIL(EX_RI_BAD_TOKENS, 0);
|
CHECK_FAIL(EX_RI_BAD_TOKENS, 0);
|
||||||
CHECK_FAIL(EX_RI_BAD_PUBLISHED, 0);
|
CHECK_FAIL(EX_RI_BAD_PUBLISHED, 0);
|
||||||
CHECK_FAIL(EX_RI_NEG_BANDWIDTH, 0);
|
CHECK_FAIL(EX_RI_NEG_BANDWIDTH, 0);
|
||||||
CHECK_FAIL(EX_RI_BAD_BANDWIDTH, 0);
|
CHECK_FAIL(EX_RI_BAD_BANDWIDTH, 0);
|
||||||
CHECK_FAIL(EX_RI_BAD_BANDWIDTH2, 0);
|
CHECK_FAIL(EX_RI_BAD_BANDWIDTH2, 0);
|
||||||
CHECK_FAIL(EX_RI_BAD_ONIONKEY1, 0);
|
CHECK_FAIL(EX_RI_BAD_BANDWIDTH3, 0);
|
||||||
CHECK_FAIL(EX_RI_BAD_ONIONKEY2, 0);
|
CHECK_FAIL(EX_RI_BAD_ONIONKEY, 0);
|
||||||
CHECK_FAIL(EX_RI_BAD_PORTS, 0);
|
CHECK_FAIL(EX_RI_BAD_PORTS, 0);
|
||||||
CHECK_FAIL(EX_RI_BAD_IP, 0);
|
CHECK_FAIL(EX_RI_BAD_IP, 0);
|
||||||
CHECK_FAIL(EX_RI_BAD_DIRPORT, 0);
|
CHECK_FAIL(EX_RI_BAD_DIRPORT, 0);
|
||||||
@ -1289,22 +1088,10 @@ test_dir_routerinfo_parsing(void *arg)
|
|||||||
CHECK_FAIL(EX_RI_ED_BAD_SIG1, 0);
|
CHECK_FAIL(EX_RI_ED_BAD_SIG1, 0);
|
||||||
CHECK_FAIL(EX_RI_ED_BAD_SIG2, 0);
|
CHECK_FAIL(EX_RI_ED_BAD_SIG2, 0);
|
||||||
CHECK_FAIL(EX_RI_ED_BAD_SIG3, 0);
|
CHECK_FAIL(EX_RI_ED_BAD_SIG3, 0);
|
||||||
CHECK_FAIL(EX_RI_ED_BAD_SIG4, 0);
|
|
||||||
CHECK_FAIL(EX_RI_ED_BAD_CROSSCERT1, 0);
|
CHECK_FAIL(EX_RI_ED_BAD_CROSSCERT1, 0);
|
||||||
CHECK_FAIL(EX_RI_ED_BAD_CROSSCERT3, 0);
|
|
||||||
CHECK_FAIL(EX_RI_ED_BAD_CROSSCERT4, 0);
|
|
||||||
CHECK_FAIL(EX_RI_ED_BAD_CROSSCERT5, 0);
|
|
||||||
CHECK_FAIL(EX_RI_ED_BAD_CROSSCERT6, 0);
|
|
||||||
CHECK_FAIL(EX_RI_ED_BAD_CROSSCERT7, 0);
|
|
||||||
CHECK_FAIL(EX_RI_ED_MISPLACED1, 0);
|
CHECK_FAIL(EX_RI_ED_MISPLACED1, 0);
|
||||||
CHECK_FAIL(EX_RI_ED_MISPLACED2, 0);
|
CHECK_FAIL(EX_RI_ED_MISPLACED2, 0);
|
||||||
CHECK_FAIL(EX_RI_ED_BAD_CERT1, 0);
|
CHECK_FAIL(EX_RI_ED_BAD_CERT1, 0);
|
||||||
CHECK_FAIL(EX_RI_ED_BAD_CERT2, 0);
|
|
||||||
CHECK_FAIL(EX_RI_ED_BAD_CERT3, 0);
|
|
||||||
|
|
||||||
/* This is allowed; we just ignore it. */
|
|
||||||
CHECK_OK(EX_RI_BAD_EI_DIGEST);
|
|
||||||
CHECK_OK(EX_RI_BAD_EI_DIGEST2);
|
|
||||||
|
|
||||||
#undef CHECK_FAIL
|
#undef CHECK_FAIL
|
||||||
#undef CHECK_OK
|
#undef CHECK_OK
|
||||||
@ -1360,14 +1147,10 @@ test_dir_extrainfo_parsing(void *arg)
|
|||||||
tt_assert(ei->pending_sig);
|
tt_assert(ei->pending_sig);
|
||||||
CHECK_OK(EX_EI_MAXIMAL);
|
CHECK_OK(EX_EI_MAXIMAL);
|
||||||
tt_assert(ei->pending_sig);
|
tt_assert(ei->pending_sig);
|
||||||
CHECK_OK(EX_EI_GOOD_ED_EI);
|
|
||||||
tt_assert(ei->pending_sig);
|
|
||||||
|
|
||||||
map = (struct digest_ri_map_t *)digestmap_new();
|
map = (struct digest_ri_map_t *)digestmap_new();
|
||||||
ADD(EX_EI_MINIMAL);
|
ADD(EX_EI_MINIMAL);
|
||||||
ADD(EX_EI_MAXIMAL);
|
ADD(EX_EI_MAXIMAL);
|
||||||
ADD(EX_EI_GOOD_ED_EI);
|
|
||||||
ADD(EX_EI_BAD_FP);
|
|
||||||
ADD(EX_EI_BAD_NICKNAME);
|
ADD(EX_EI_BAD_NICKNAME);
|
||||||
ADD(EX_EI_BAD_TOKENS);
|
ADD(EX_EI_BAD_TOKENS);
|
||||||
ADD(EX_EI_BAD_START);
|
ADD(EX_EI_BAD_START);
|
||||||
@ -1377,8 +1160,6 @@ test_dir_extrainfo_parsing(void *arg)
|
|||||||
ADD(EX_EI_ED_MISSING_CERT);
|
ADD(EX_EI_ED_MISSING_CERT);
|
||||||
ADD(EX_EI_ED_BAD_CERT1);
|
ADD(EX_EI_ED_BAD_CERT1);
|
||||||
ADD(EX_EI_ED_BAD_CERT2);
|
ADD(EX_EI_ED_BAD_CERT2);
|
||||||
ADD(EX_EI_ED_BAD_SIG1);
|
|
||||||
ADD(EX_EI_ED_BAD_SIG2);
|
|
||||||
ADD(EX_EI_ED_MISPLACED_CERT);
|
ADD(EX_EI_ED_MISPLACED_CERT);
|
||||||
ADD(EX_EI_ED_MISPLACED_SIG);
|
ADD(EX_EI_ED_MISPLACED_SIG);
|
||||||
|
|
||||||
@ -1386,13 +1167,9 @@ test_dir_extrainfo_parsing(void *arg)
|
|||||||
tt_ptr_op(ei->pending_sig, OP_EQ, NULL);
|
tt_ptr_op(ei->pending_sig, OP_EQ, NULL);
|
||||||
CHECK_OK(EX_EI_MAXIMAL);
|
CHECK_OK(EX_EI_MAXIMAL);
|
||||||
tt_ptr_op(ei->pending_sig, OP_EQ, NULL);
|
tt_ptr_op(ei->pending_sig, OP_EQ, NULL);
|
||||||
CHECK_OK(EX_EI_GOOD_ED_EI);
|
|
||||||
tt_ptr_op(ei->pending_sig, OP_EQ, NULL);
|
|
||||||
|
|
||||||
CHECK_FAIL(EX_EI_BAD_SIG1,1);
|
CHECK_FAIL(EX_EI_BAD_SIG1,1);
|
||||||
CHECK_FAIL(EX_EI_BAD_SIG2,1);
|
CHECK_FAIL(EX_EI_BAD_SIG2,0);
|
||||||
CHECK_FAIL(EX_EI_BAD_SIG3,1);
|
|
||||||
CHECK_FAIL(EX_EI_BAD_FP,0);
|
|
||||||
CHECK_FAIL(EX_EI_BAD_NICKNAME,0);
|
CHECK_FAIL(EX_EI_BAD_NICKNAME,0);
|
||||||
CHECK_FAIL(EX_EI_BAD_TOKENS,0);
|
CHECK_FAIL(EX_EI_BAD_TOKENS,0);
|
||||||
CHECK_FAIL(EX_EI_BAD_START,0);
|
CHECK_FAIL(EX_EI_BAD_START,0);
|
||||||
@ -1402,8 +1179,6 @@ test_dir_extrainfo_parsing(void *arg)
|
|||||||
CHECK_FAIL(EX_EI_ED_MISSING_CERT,0);
|
CHECK_FAIL(EX_EI_ED_MISSING_CERT,0);
|
||||||
CHECK_FAIL(EX_EI_ED_BAD_CERT1,0);
|
CHECK_FAIL(EX_EI_ED_BAD_CERT1,0);
|
||||||
CHECK_FAIL(EX_EI_ED_BAD_CERT2,0);
|
CHECK_FAIL(EX_EI_ED_BAD_CERT2,0);
|
||||||
CHECK_FAIL(EX_EI_ED_BAD_SIG1,0);
|
|
||||||
CHECK_FAIL(EX_EI_ED_BAD_SIG2,0);
|
|
||||||
CHECK_FAIL(EX_EI_ED_MISPLACED_CERT,0);
|
CHECK_FAIL(EX_EI_ED_MISPLACED_CERT,0);
|
||||||
CHECK_FAIL(EX_EI_ED_MISPLACED_SIG,0);
|
CHECK_FAIL(EX_EI_ED_MISPLACED_SIG,0);
|
||||||
|
|
||||||
@ -1460,11 +1235,14 @@ test_dir_parse_router_list(void *arg)
|
|||||||
tt_mem_op(r->cache_info.signed_descriptor_body, OP_EQ,
|
tt_mem_op(r->cache_info.signed_descriptor_body, OP_EQ,
|
||||||
EX_RI_MAXIMAL, strlen(EX_RI_MAXIMAL));
|
EX_RI_MAXIMAL, strlen(EX_RI_MAXIMAL));
|
||||||
|
|
||||||
|
setup_ei_digests();
|
||||||
|
|
||||||
tt_int_op(2, OP_EQ, smartlist_len(invalid));
|
tt_int_op(2, OP_EQ, smartlist_len(invalid));
|
||||||
|
|
||||||
test_memeq_hex(smartlist_get(invalid, 0),
|
test_memeq_hex(smartlist_get(invalid, 0),
|
||||||
"ab9eeaa95e7d45740185b4e519c76ead756277a9");
|
"10F951AF93AED0D3BC7FA5FFA232EB8C17747ACE");
|
||||||
test_memeq_hex(smartlist_get(invalid, 1),
|
test_memeq_hex(smartlist_get(invalid, 1),
|
||||||
"9a651ee03b64325959e8f1b46f2b689b30750b4c");
|
"41D8723CDD4B1AADCCE538C28CDE7F69828C73D0");
|
||||||
|
|
||||||
/* Now tidy up */
|
/* Now tidy up */
|
||||||
SMARTLIST_FOREACH(dest, routerinfo_t *, rinfo, routerinfo_free(rinfo));
|
SMARTLIST_FOREACH(dest, routerinfo_t *, rinfo, routerinfo_free(rinfo));
|
||||||
@ -1479,6 +1257,7 @@ test_dir_parse_router_list(void *arg)
|
|||||||
ADD(EX_EI_MAXIMAL);
|
ADD(EX_EI_MAXIMAL);
|
||||||
ADD(EX_EI_BAD_NICKNAME);
|
ADD(EX_EI_BAD_NICKNAME);
|
||||||
ADD(EX_EI_BAD_PUBLISHED);
|
ADD(EX_EI_BAD_PUBLISHED);
|
||||||
|
ADD(EX_EI_BAD_SIG2);
|
||||||
cp = list;
|
cp = list;
|
||||||
tt_int_op(0,OP_EQ,
|
tt_int_op(0,OP_EQ,
|
||||||
router_parse_list_from_string(&cp, NULL, dest, SAVED_NOWHERE,
|
router_parse_list_from_string(&cp, NULL, dest, SAVED_NOWHERE,
|
||||||
@ -1491,11 +1270,16 @@ test_dir_parse_router_list(void *arg)
|
|||||||
tt_mem_op(e->cache_info.signed_descriptor_body, OP_EQ,
|
tt_mem_op(e->cache_info.signed_descriptor_body, OP_EQ,
|
||||||
EX_EI_MINIMAL, strlen(EX_EI_MINIMAL));
|
EX_EI_MINIMAL, strlen(EX_EI_MINIMAL));
|
||||||
|
|
||||||
tt_int_op(2, OP_EQ, smartlist_len(invalid));
|
tt_int_op(3, OP_EQ, smartlist_len(invalid));
|
||||||
test_memeq_hex(smartlist_get(invalid, 0),
|
tt_mem_op(smartlist_get(invalid, 0),
|
||||||
"d5df4aa62ee9ffc9543d41150c9864908e0390af");
|
OP_EQ,
|
||||||
test_memeq_hex(smartlist_get(invalid, 1),
|
digest_ei_bad_sig2, DIGEST_LEN);
|
||||||
"f61efd2a7f4531f3687a9043e0de90a862ec64ba");
|
tt_mem_op(smartlist_get(invalid, 1),
|
||||||
|
OP_EQ,
|
||||||
|
digest_ei_bad_nickname, DIGEST_LEN);
|
||||||
|
tt_mem_op(smartlist_get(invalid, 2),
|
||||||
|
OP_EQ,
|
||||||
|
digest_ei_bad_published, DIGEST_LEN);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
tor_free(list);
|
tor_free(list);
|
||||||
@ -1522,10 +1306,34 @@ test_dir_parse_router_list(void *arg)
|
|||||||
static download_status_t dls_minimal;
|
static download_status_t dls_minimal;
|
||||||
static download_status_t dls_maximal;
|
static download_status_t dls_maximal;
|
||||||
static download_status_t dls_bad_fingerprint;
|
static download_status_t dls_bad_fingerprint;
|
||||||
static download_status_t dls_bad_sig2;
|
static download_status_t dls_bad_sig1;
|
||||||
static download_status_t dls_bad_ports;
|
static download_status_t dls_bad_ports;
|
||||||
static download_status_t dls_bad_tokens;
|
static download_status_t dls_bad_tokens;
|
||||||
|
|
||||||
|
static uint8_t digest_minimal[20];
|
||||||
|
static uint8_t digest_maximal[20];
|
||||||
|
static uint8_t digest_bad_fingerprint[20];
|
||||||
|
static uint8_t digest_bad_sig1[20];
|
||||||
|
static uint8_t digest_bad_ports[20];
|
||||||
|
static uint8_t digest_bad_tokens[20];
|
||||||
|
|
||||||
|
static void
|
||||||
|
setup_dls_digests(void)
|
||||||
|
{
|
||||||
|
#define SETUP(string, name) \
|
||||||
|
do { \
|
||||||
|
router_get_router_hash(string, strlen(string), (char*)digest_##name); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
SETUP(EX_RI_MINIMAL, minimal);
|
||||||
|
SETUP(EX_RI_MAXIMAL, maximal);
|
||||||
|
SETUP(EX_RI_BAD_FINGERPRINT, bad_fingerprint);
|
||||||
|
SETUP(EX_RI_BAD_SIG1, bad_sig1);
|
||||||
|
SETUP(EX_RI_BAD_PORTS, bad_ports);
|
||||||
|
SETUP(EX_RI_BAD_TOKENS, bad_tokens);
|
||||||
|
#undef SETUP
|
||||||
|
}
|
||||||
|
|
||||||
static int mock_router_get_dl_status_unrecognized = 0;
|
static int mock_router_get_dl_status_unrecognized = 0;
|
||||||
static int mock_router_get_dl_status_calls = 0;
|
static int mock_router_get_dl_status_calls = 0;
|
||||||
|
|
||||||
@ -1533,24 +1341,22 @@ static download_status_t *
|
|||||||
mock_router_get_dl_status(const char *d)
|
mock_router_get_dl_status(const char *d)
|
||||||
{
|
{
|
||||||
++mock_router_get_dl_status_calls;
|
++mock_router_get_dl_status_calls;
|
||||||
char hex[HEX_DIGEST_LEN+1];
|
#define CHECK(name) \
|
||||||
base16_encode(hex, sizeof(hex), d, DIGEST_LEN);
|
do { \
|
||||||
if (!strcmp(hex, "3E31D19A69EB719C00B02EC60D13356E3F7A3452")) {
|
if (fast_memeq(d, digest_##name, DIGEST_LEN)) \
|
||||||
return &dls_minimal;
|
return &dls_##name; \
|
||||||
} else if (!strcmp(hex, "581D8A368A0FA854ECDBFAB841D88B3F1B004038")) {
|
} while (0)
|
||||||
return &dls_maximal;
|
|
||||||
} else if (!strcmp(hex, "2578AE227C6116CDE29B3F0E95709B9872DEE5F1")) {
|
CHECK(minimal);
|
||||||
return &dls_bad_fingerprint;
|
CHECK(maximal);
|
||||||
} else if (!strcmp(hex, "16D387D3A58F7DB3CF46638F8D0B90C45C7D769C")) {
|
CHECK(bad_fingerprint);
|
||||||
return &dls_bad_sig2;
|
CHECK(bad_sig1);
|
||||||
} else if (!strcmp(hex, "AB9EEAA95E7D45740185B4E519C76EAD756277A9")) {
|
CHECK(bad_ports);
|
||||||
return &dls_bad_ports;
|
CHECK(bad_tokens);
|
||||||
} else if (!strcmp(hex, "A0CC2CEFAD59DBF19F468BFEE60E0868C804B422")) {
|
|
||||||
return &dls_bad_tokens;
|
++mock_router_get_dl_status_unrecognized;
|
||||||
} else {
|
return NULL;
|
||||||
++mock_router_get_dl_status_unrecognized;
|
#undef CHECK
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -1569,13 +1375,15 @@ test_dir_load_routers(void *arg)
|
|||||||
smartlist_add_strdup(wanted, hex_str(buf, DIGEST_LEN)); \
|
smartlist_add_strdup(wanted, hex_str(buf, DIGEST_LEN)); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
setup_dls_digests();
|
||||||
|
|
||||||
MOCK(router_get_dl_status_by_descriptor_digest, mock_router_get_dl_status);
|
MOCK(router_get_dl_status_by_descriptor_digest, mock_router_get_dl_status);
|
||||||
|
|
||||||
update_approx_time(1412510400);
|
update_approx_time(1412510400);
|
||||||
|
|
||||||
smartlist_add_strdup(chunks, EX_RI_MINIMAL);
|
smartlist_add_strdup(chunks, EX_RI_MINIMAL);
|
||||||
smartlist_add_strdup(chunks, EX_RI_BAD_FINGERPRINT);
|
smartlist_add_strdup(chunks, EX_RI_BAD_FINGERPRINT);
|
||||||
smartlist_add_strdup(chunks, EX_RI_BAD_SIG2);
|
smartlist_add_strdup(chunks, EX_RI_BAD_SIG1);
|
||||||
smartlist_add_strdup(chunks, EX_RI_MAXIMAL);
|
smartlist_add_strdup(chunks, EX_RI_MAXIMAL);
|
||||||
smartlist_add_strdup(chunks, EX_RI_BAD_PORTS);
|
smartlist_add_strdup(chunks, EX_RI_BAD_PORTS);
|
||||||
smartlist_add_strdup(chunks, EX_RI_BAD_TOKENS);
|
smartlist_add_strdup(chunks, EX_RI_BAD_TOKENS);
|
||||||
@ -1583,7 +1391,7 @@ test_dir_load_routers(void *arg)
|
|||||||
/* not ADDing MINIMIAL */
|
/* not ADDing MINIMIAL */
|
||||||
ADD(EX_RI_MAXIMAL);
|
ADD(EX_RI_MAXIMAL);
|
||||||
ADD(EX_RI_BAD_FINGERPRINT);
|
ADD(EX_RI_BAD_FINGERPRINT);
|
||||||
ADD(EX_RI_BAD_SIG2);
|
ADD(EX_RI_BAD_SIG1);
|
||||||
/* Not ADDing BAD_PORTS */
|
/* Not ADDing BAD_PORTS */
|
||||||
ADD(EX_RI_BAD_TOKENS);
|
ADD(EX_RI_BAD_TOKENS);
|
||||||
|
|
||||||
@ -1597,7 +1405,7 @@ test_dir_load_routers(void *arg)
|
|||||||
tt_int_op(smartlist_len(router_get_routerlist()->routers),OP_EQ,1);
|
tt_int_op(smartlist_len(router_get_routerlist()->routers),OP_EQ,1);
|
||||||
routerinfo_t *r = smartlist_get(router_get_routerlist()->routers, 0);
|
routerinfo_t *r = smartlist_get(router_get_routerlist()->routers, 0);
|
||||||
test_memeq_hex(r->cache_info.signed_descriptor_digest,
|
test_memeq_hex(r->cache_info.signed_descriptor_digest,
|
||||||
"581D8A368A0FA854ECDBFAB841D88B3F1B004038");
|
"1F437798ACD1FC9CBD1C3C04DBF80F7E9F819C3F");
|
||||||
tt_int_op(dls_minimal.n_download_failures, OP_EQ, 0);
|
tt_int_op(dls_minimal.n_download_failures, OP_EQ, 0);
|
||||||
tt_int_op(dls_maximal.n_download_failures, OP_EQ, 0);
|
tt_int_op(dls_maximal.n_download_failures, OP_EQ, 0);
|
||||||
|
|
||||||
@ -1610,13 +1418,12 @@ test_dir_load_routers(void *arg)
|
|||||||
|
|
||||||
/* bad_sig2 and bad ports" are retriable -- one since only the signature
|
/* bad_sig2 and bad ports" are retriable -- one since only the signature
|
||||||
* was bad, and one because we didn't ask for it. */
|
* was bad, and one because we didn't ask for it. */
|
||||||
tt_int_op(dls_bad_sig2.n_download_failures, OP_EQ, 0);
|
tt_int_op(dls_bad_sig1.n_download_failures, OP_EQ, 0);
|
||||||
tt_int_op(dls_bad_ports.n_download_failures, OP_EQ, 0);
|
tt_int_op(dls_bad_ports.n_download_failures, OP_EQ, 0);
|
||||||
|
|
||||||
/* Wanted still contains "BAD_SIG2" */
|
|
||||||
tt_int_op(smartlist_len(wanted), OP_EQ, 1);
|
tt_int_op(smartlist_len(wanted), OP_EQ, 1);
|
||||||
tt_str_op(smartlist_get(wanted, 0), OP_EQ,
|
tt_str_op(smartlist_get(wanted, 0), OP_EQ,
|
||||||
"E0A3753CEFD54128EAB239F294954121DB23D2EF");
|
"3BB7D03C1C4DBC1DDE840096FF3C330914757B77");
|
||||||
|
|
||||||
#undef ADD
|
#undef ADD
|
||||||
|
|
||||||
@ -1639,38 +1446,51 @@ static signed_descriptor_t sd_ei_maximal;
|
|||||||
static signed_descriptor_t sd_ei_bad_tokens;
|
static signed_descriptor_t sd_ei_bad_tokens;
|
||||||
static signed_descriptor_t sd_ei_bad_sig2;
|
static signed_descriptor_t sd_ei_bad_sig2;
|
||||||
|
|
||||||
|
static void
|
||||||
|
setup_ei_digests(void)
|
||||||
|
{
|
||||||
|
#define SETUP(string, name) \
|
||||||
|
do { \
|
||||||
|
router_get_extrainfo_hash(string, strlen(string), \
|
||||||
|
(char*)digest_ei_##name); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
SETUP(EX_EI_MINIMAL, minimal);
|
||||||
|
SETUP(EX_EI_MAXIMAL, maximal);
|
||||||
|
SETUP(EX_EI_BAD_NICKNAME, bad_nickname);
|
||||||
|
SETUP(EX_EI_BAD_TOKENS, bad_tokens);
|
||||||
|
SETUP(EX_EI_BAD_SIG2, bad_sig2);
|
||||||
|
SETUP(EX_EI_BAD_PUBLISHED, bad_published);
|
||||||
|
|
||||||
|
#undef SETUP
|
||||||
|
}
|
||||||
|
|
||||||
static signed_descriptor_t *
|
static signed_descriptor_t *
|
||||||
mock_get_by_ei_desc_digest(const char *d)
|
mock_get_by_ei_desc_digest(const char *d)
|
||||||
{
|
{
|
||||||
|
|
||||||
++mock_get_by_ei_dd_calls;
|
++mock_get_by_ei_dd_calls;
|
||||||
char hex[HEX_DIGEST_LEN+1];
|
#define CHECK(name) \
|
||||||
base16_encode(hex, sizeof(hex), d, DIGEST_LEN);
|
do { \
|
||||||
|
if (fast_memeq(d, digest_ei_##name, DIGEST_LEN)) \
|
||||||
|
return &sd_ei_##name; \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
if (!strcmp(hex, "11E0EDF526950739F7769810FCACAB8C882FAEEE")) {
|
CHECK(minimal);
|
||||||
return &sd_ei_minimal;
|
CHECK(maximal);
|
||||||
} else if (!strcmp(hex, "47803B02A0E70E9E8BDA226CB1D74DE354D67DFF")) {
|
CHECK(bad_nickname);
|
||||||
return &sd_ei_maximal;
|
CHECK(bad_sig2);
|
||||||
} else if (!strcmp(hex, "D5DF4AA62EE9FFC9543D41150C9864908E0390AF")) {
|
CHECK(bad_tokens);
|
||||||
return &sd_ei_bad_nickname;
|
++mock_get_by_ei_dd_unrecognized;
|
||||||
} else if (!strcmp(hex, "16D387D3A58F7DB3CF46638F8D0B90C45C7D769C")) {
|
return NULL;
|
||||||
return &sd_ei_bad_sig2;
|
#undef CHECK
|
||||||
} else if (!strcmp(hex, "9D90F8C42955BBC57D54FB05E54A3F083AF42E8B")) {
|
|
||||||
return &sd_ei_bad_tokens;
|
|
||||||
} else {
|
|
||||||
++mock_get_by_ei_dd_unrecognized;
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static signed_descriptor_t *
|
static signed_descriptor_t *
|
||||||
mock_ei_get_by_ei_digest(const char *d)
|
mock_ei_get_by_ei_digest(const char *d)
|
||||||
{
|
{
|
||||||
char hex[HEX_DIGEST_LEN+1];
|
|
||||||
base16_encode(hex, sizeof(hex), d, DIGEST_LEN);
|
|
||||||
signed_descriptor_t *sd = &sd_ei_minimal;
|
signed_descriptor_t *sd = &sd_ei_minimal;
|
||||||
|
|
||||||
if (!strcmp(hex, "11E0EDF526950739F7769810FCACAB8C882FAEEE")) {
|
if (fast_memeq(d, digest_ei_minimal, DIGEST_LEN)) {
|
||||||
sd->signed_descriptor_body = (char *)EX_EI_MINIMAL;
|
sd->signed_descriptor_body = (char *)EX_EI_MINIMAL;
|
||||||
sd->signed_descriptor_len = sizeof(EX_EI_MINIMAL);
|
sd->signed_descriptor_len = sizeof(EX_EI_MINIMAL);
|
||||||
sd->annotations_len = 0;
|
sd->annotations_len = 0;
|
||||||
@ -1706,6 +1526,7 @@ test_dir_load_extrainfo(void *arg)
|
|||||||
smartlist_add_strdup(wanted, hex_str(buf, DIGEST_LEN)); \
|
smartlist_add_strdup(wanted, hex_str(buf, DIGEST_LEN)); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
setup_ei_digests();
|
||||||
mock_ei_insert_list = smartlist_new();
|
mock_ei_insert_list = smartlist_new();
|
||||||
MOCK(router_get_by_extrainfo_digest, mock_get_by_ei_desc_digest);
|
MOCK(router_get_by_extrainfo_digest, mock_get_by_ei_desc_digest);
|
||||||
MOCK(extrainfo_insert, mock_ei_insert);
|
MOCK(extrainfo_insert, mock_ei_insert);
|
||||||
@ -1732,12 +1553,12 @@ test_dir_load_extrainfo(void *arg)
|
|||||||
tt_int_op(smartlist_len(mock_ei_insert_list),OP_EQ,2);
|
tt_int_op(smartlist_len(mock_ei_insert_list),OP_EQ,2);
|
||||||
|
|
||||||
extrainfo_t *e = smartlist_get(mock_ei_insert_list, 0);
|
extrainfo_t *e = smartlist_get(mock_ei_insert_list, 0);
|
||||||
test_memeq_hex(e->cache_info.signed_descriptor_digest,
|
tt_mem_op(e->cache_info.signed_descriptor_digest, OP_EQ,
|
||||||
"11E0EDF526950739F7769810FCACAB8C882FAEEE");
|
digest_ei_minimal, DIGEST_LEN);
|
||||||
|
|
||||||
e = smartlist_get(mock_ei_insert_list, 1);
|
e = smartlist_get(mock_ei_insert_list, 1);
|
||||||
test_memeq_hex(e->cache_info.signed_descriptor_digest,
|
tt_mem_op(e->cache_info.signed_descriptor_digest, OP_EQ,
|
||||||
"47803B02A0E70E9E8BDA226CB1D74DE354D67DFF");
|
digest_ei_maximal, DIGEST_LEN);
|
||||||
tt_int_op(dls_minimal.n_download_failures, OP_EQ, 0);
|
tt_int_op(dls_minimal.n_download_failures, OP_EQ, 0);
|
||||||
tt_int_op(dls_maximal.n_download_failures, OP_EQ, 0);
|
tt_int_op(dls_maximal.n_download_failures, OP_EQ, 0);
|
||||||
|
|
||||||
@ -1753,8 +1574,11 @@ test_dir_load_extrainfo(void *arg)
|
|||||||
|
|
||||||
/* Wanted still contains "BAD_SIG2" */
|
/* Wanted still contains "BAD_SIG2" */
|
||||||
tt_int_op(smartlist_len(wanted), OP_EQ, 1);
|
tt_int_op(smartlist_len(wanted), OP_EQ, 1);
|
||||||
tt_str_op(smartlist_get(wanted, 0), OP_EQ,
|
const char *got_wanted =smartlist_get(wanted, 0);
|
||||||
"16D387D3A58F7DB3CF46638F8D0B90C45C7D769C");
|
tt_int_op(strlen(got_wanted), OP_EQ, HEX_DIGEST_LEN);
|
||||||
|
char d[DIGEST_LEN];
|
||||||
|
base16_decode(d, DIGEST_LEN, got_wanted, strlen(got_wanted));
|
||||||
|
tt_mem_op(d, OP_EQ, digest_ei_bad_sig2, DIGEST_LEN);
|
||||||
|
|
||||||
#undef ADD
|
#undef ADD
|
||||||
|
|
||||||
@ -1774,12 +1598,17 @@ test_dir_getinfo_extra(void *arg)
|
|||||||
int r;
|
int r;
|
||||||
char *answer = NULL;
|
char *answer = NULL;
|
||||||
const char *errmsg = NULL;
|
const char *errmsg = NULL;
|
||||||
|
char buf[128];
|
||||||
|
char hexdigest[HEX_DIGEST_LEN+1];
|
||||||
(void)arg;
|
(void)arg;
|
||||||
|
|
||||||
|
setup_ei_digests();
|
||||||
|
base16_encode(hexdigest, sizeof(hexdigest),
|
||||||
|
(const char*)digest_ei_minimal, DIGEST_LEN);
|
||||||
|
tor_snprintf(buf, sizeof(buf), "extra-info/digest/%s", hexdigest);
|
||||||
|
|
||||||
MOCK(extrainfo_get_by_descriptor_digest, mock_ei_get_by_ei_digest);
|
MOCK(extrainfo_get_by_descriptor_digest, mock_ei_get_by_ei_digest);
|
||||||
r = getinfo_helper_dir(NULL, "extra-info/digest/"
|
r = getinfo_helper_dir(NULL, buf, &answer, &errmsg);
|
||||||
"11E0EDF526950739F7769810FCACAB8C882FAEEE", &answer,
|
|
||||||
&errmsg);
|
|
||||||
tt_int_op(0, OP_EQ, r);
|
tt_int_op(0, OP_EQ, r);
|
||||||
tt_ptr_op(NULL, OP_EQ, errmsg);
|
tt_ptr_op(NULL, OP_EQ, errmsg);
|
||||||
tt_str_op(answer, OP_EQ, EX_EI_MINIMAL);
|
tt_str_op(answer, OP_EQ, EX_EI_MINIMAL);
|
||||||
@ -4157,6 +3986,7 @@ gen_routerstatus_for_umbw(int idx, time_t now)
|
|||||||
vrs->has_measured_bw = 1;
|
vrs->has_measured_bw = 1;
|
||||||
rs->has_bandwidth = 1;
|
rs->has_bandwidth = 1;
|
||||||
vrs->measured_bw_kb = rs->bandwidth_kb = max_unmeasured_bw_kb / 2;
|
vrs->measured_bw_kb = rs->bandwidth_kb = max_unmeasured_bw_kb / 2;
|
||||||
|
vrs->protocols = tor_strdup("Link=2 Wombat=40");
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
/* Generate the second routerstatus. */
|
/* Generate the second routerstatus. */
|
||||||
@ -4183,6 +4013,7 @@ gen_routerstatus_for_umbw(int idx, time_t now)
|
|||||||
vrs->has_measured_bw = 1;
|
vrs->has_measured_bw = 1;
|
||||||
rs->has_bandwidth = 1;
|
rs->has_bandwidth = 1;
|
||||||
vrs->measured_bw_kb = rs->bandwidth_kb = 2 * max_unmeasured_bw_kb;
|
vrs->measured_bw_kb = rs->bandwidth_kb = 2 * max_unmeasured_bw_kb;
|
||||||
|
vrs->protocols = tor_strdup("Link=2 Wombat=40");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
/* Generate the third routerstatus. */
|
/* Generate the third routerstatus. */
|
||||||
@ -4208,6 +4039,7 @@ gen_routerstatus_for_umbw(int idx, time_t now)
|
|||||||
rs->has_bandwidth = 1;
|
rs->has_bandwidth = 1;
|
||||||
vrs->measured_bw_kb = 0;
|
vrs->measured_bw_kb = 0;
|
||||||
rs->bandwidth_kb = 2 * max_unmeasured_bw_kb;
|
rs->bandwidth_kb = 2 * max_unmeasured_bw_kb;
|
||||||
|
vrs->protocols = tor_strdup("Link=2 Wombat=40");
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
/* Generate a fourth routerstatus that is not running. */
|
/* Generate a fourth routerstatus that is not running. */
|
||||||
@ -4233,6 +4065,7 @@ gen_routerstatus_for_umbw(int idx, time_t now)
|
|||||||
rs->has_bandwidth = 1;
|
rs->has_bandwidth = 1;
|
||||||
vrs->measured_bw_kb = 0;
|
vrs->measured_bw_kb = 0;
|
||||||
rs->bandwidth_kb = max_unmeasured_bw_kb / 2;
|
rs->bandwidth_kb = max_unmeasured_bw_kb / 2;
|
||||||
|
vrs->protocols = tor_strdup("Link=2 Wombat=40");
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
/* No more for this test; return NULL */
|
/* No more for this test; return NULL */
|
||||||
@ -6906,7 +6739,8 @@ test_dir_matching_flags(void *arg)
|
|||||||
"r example hereiswhereyouridentitygoes 2015-08-30 12:00:00 "
|
"r example hereiswhereyouridentitygoes 2015-08-30 12:00:00 "
|
||||||
"192.168.0.1 9001 0\n"
|
"192.168.0.1 9001 0\n"
|
||||||
"m thisoneislongerbecauseitisa256bitmddigest33\n"
|
"m thisoneislongerbecauseitisa256bitmddigest33\n"
|
||||||
"s\n";
|
"s\n"
|
||||||
|
"pr Link=4\n";
|
||||||
const char *cp = ex_noflags;
|
const char *cp = ex_noflags;
|
||||||
rs_noflags = routerstatus_parse_entry_from_string(
|
rs_noflags = routerstatus_parse_entry_from_string(
|
||||||
area, &cp,
|
area, &cp,
|
||||||
@ -6920,6 +6754,7 @@ test_dir_matching_flags(void *arg)
|
|||||||
"r example hereiswhereyouridentitygoes 2015-08-30 12:00:00 " \
|
"r example hereiswhereyouridentitygoes 2015-08-30 12:00:00 " \
|
||||||
"192.168.0.1 9001 0\n" \
|
"192.168.0.1 9001 0\n" \
|
||||||
"m thisoneislongerbecauseitisa256bitmddigest33\n" \
|
"m thisoneislongerbecauseitisa256bitmddigest33\n" \
|
||||||
|
"pr Link=4\n" \
|
||||||
"s %s\n", string); \
|
"s %s\n", string); \
|
||||||
cp = s; \
|
cp = s; \
|
||||||
rs = routerstatus_parse_entry_from_string( \
|
rs = routerstatus_parse_entry_from_string( \
|
||||||
@ -6977,7 +6812,8 @@ test_dir_assumed_flags(void *arg)
|
|||||||
"r example hereiswhereyouridentitygoes 2015-08-30 12:00:00 "
|
"r example hereiswhereyouridentitygoes 2015-08-30 12:00:00 "
|
||||||
"192.168.0.1 9001 0\n"
|
"192.168.0.1 9001 0\n"
|
||||||
"m thisoneislongerbecauseitisa256bitmddigest33\n"
|
"m thisoneislongerbecauseitisa256bitmddigest33\n"
|
||||||
"s Fast Guard Stable\n";
|
"s Fast Guard Stable\n"
|
||||||
|
"pr Link=4\n";
|
||||||
const char *eos = str1 + strlen(str1);
|
const char *eos = str1 + strlen(str1);
|
||||||
|
|
||||||
const char *cp = str1;
|
const char *cp = str1;
|
||||||
@ -7439,20 +7275,14 @@ test_dir_dirserv_add_own_fingerprint(void *arg)
|
|||||||
struct testcase_t dir_tests[] = {
|
struct testcase_t dir_tests[] = {
|
||||||
DIR_LEGACY(nicknames),
|
DIR_LEGACY(nicknames),
|
||||||
/* extrainfo without any stats */
|
/* extrainfo without any stats */
|
||||||
DIR_ARG(formats_rsa, TT_FORK, ""),
|
|
||||||
DIR_ARG(formats_rsa_ed25519, TT_FORK, ""),
|
DIR_ARG(formats_rsa_ed25519, TT_FORK, ""),
|
||||||
/* on a bridge */
|
/* on a bridge */
|
||||||
DIR_ARG(formats_rsa, TT_FORK, "b"),
|
|
||||||
DIR_ARG(formats_rsa_ed25519, TT_FORK, "b"),
|
DIR_ARG(formats_rsa_ed25519, TT_FORK, "b"),
|
||||||
/* extrainfo with basic stats */
|
/* extrainfo with basic stats */
|
||||||
DIR_ARG(formats_rsa, TT_FORK, "e"),
|
|
||||||
DIR_ARG(formats_rsa_ed25519, TT_FORK, "e"),
|
DIR_ARG(formats_rsa_ed25519, TT_FORK, "e"),
|
||||||
DIR_ARG(formats_rsa, TT_FORK, "be"),
|
|
||||||
DIR_ARG(formats_rsa_ed25519, TT_FORK, "be"),
|
DIR_ARG(formats_rsa_ed25519, TT_FORK, "be"),
|
||||||
/* extrainfo with all stats */
|
/* extrainfo with all stats */
|
||||||
DIR_ARG(formats_rsa, TT_FORK, "es"),
|
|
||||||
DIR_ARG(formats_rsa_ed25519, TT_FORK, "es"),
|
DIR_ARG(formats_rsa_ed25519, TT_FORK, "es"),
|
||||||
DIR_ARG(formats_rsa, TT_FORK, "bes"),
|
|
||||||
DIR_ARG(formats_rsa_ed25519, TT_FORK, "bes"),
|
DIR_ARG(formats_rsa_ed25519, TT_FORK, "bes"),
|
||||||
DIR(routerinfo_parsing, 0),
|
DIR(routerinfo_parsing, 0),
|
||||||
DIR(extrainfo_parsing, 0),
|
DIR(extrainfo_parsing, 0),
|
||||||
|
@ -104,6 +104,7 @@ dir_common_gen_routerstatus_for_v3ns(int idx, time_t now)
|
|||||||
rs->is_flagged_running = 1;
|
rs->is_flagged_running = 1;
|
||||||
rs->is_v2_dir = 1;
|
rs->is_v2_dir = 1;
|
||||||
rs->is_valid = 1; /* xxxxx */
|
rs->is_valid = 1; /* xxxxx */
|
||||||
|
vrs->protocols = tor_strdup("Link=7 HSDir=3");
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
/* Generate the second routerstatus. */
|
/* Generate the second routerstatus. */
|
||||||
@ -122,6 +123,7 @@ dir_common_gen_routerstatus_for_v3ns(int idx, time_t now)
|
|||||||
rs->ipv6_orport = 4711;
|
rs->ipv6_orport = 4711;
|
||||||
rs->is_exit = rs->is_stable = rs->is_fast = rs->is_flagged_running =
|
rs->is_exit = rs->is_stable = rs->is_fast = rs->is_flagged_running =
|
||||||
rs->is_valid = rs->is_possible_guard = rs->is_v2_dir = 1;
|
rs->is_valid = rs->is_possible_guard = rs->is_v2_dir = 1;
|
||||||
|
vrs->protocols = tor_strdup("Link=3,4 HSDir=2,3");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
/* Generate the third routerstatus. */
|
/* Generate the third routerstatus. */
|
||||||
@ -138,6 +140,7 @@ dir_common_gen_routerstatus_for_v3ns(int idx, time_t now)
|
|||||||
rs->is_authority = rs->is_exit = rs->is_stable = rs->is_fast =
|
rs->is_authority = rs->is_exit = rs->is_stable = rs->is_fast =
|
||||||
rs->is_flagged_running = rs->is_valid = rs->is_v2_dir =
|
rs->is_flagged_running = rs->is_valid = rs->is_v2_dir =
|
||||||
rs->is_possible_guard = 1;
|
rs->is_possible_guard = 1;
|
||||||
|
vrs->protocols = tor_strdup("Link=3,4 HSDir=2,3");
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
/* Generate a fourth routerstatus that is not running. */
|
/* Generate a fourth routerstatus that is not running. */
|
||||||
@ -152,6 +155,7 @@ dir_common_gen_routerstatus_for_v3ns(int idx, time_t now)
|
|||||||
rs->ipv4_orport = 500;
|
rs->ipv4_orport = 500;
|
||||||
rs->ipv4_dirport = 1999;
|
rs->ipv4_dirport = 1999;
|
||||||
rs->is_v2_dir = 1;
|
rs->is_v2_dir = 1;
|
||||||
|
vrs->protocols = tor_strdup("Link=3,4 HSDir=3");
|
||||||
/* Running flag (and others) cleared */
|
/* Running flag (and others) cleared */
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include "feature/nodelist/nodelist.h"
|
#include "feature/nodelist/nodelist.h"
|
||||||
#include "feature/client/entrynodes.h"
|
#include "feature/client/entrynodes.h"
|
||||||
#include "feature/dirparse/authcert_parse.h"
|
#include "feature/dirparse/authcert_parse.h"
|
||||||
|
#include "feature/dirparse/sigcommon.h"
|
||||||
#include "feature/nodelist/networkstatus.h"
|
#include "feature/nodelist/networkstatus.h"
|
||||||
#include "core/proto/proto_http.h"
|
#include "core/proto/proto_http.h"
|
||||||
#include "lib/geoip/geoip.h"
|
#include "lib/geoip/geoip.h"
|
||||||
@ -73,6 +74,23 @@ ENABLE_GCC_WARNING("-Woverlength-strings")
|
|||||||
|
|
||||||
#define consdiffmgr_add_consensus consdiffmgr_add_consensus_nulterm
|
#define consdiffmgr_add_consensus consdiffmgr_add_consensus_nulterm
|
||||||
|
|
||||||
|
static int
|
||||||
|
mock_ignore_signature_token(const char *digest,
|
||||||
|
ssize_t digest_len,
|
||||||
|
struct directory_token_t *tok,
|
||||||
|
crypto_pk_t *pkey,
|
||||||
|
int flags,
|
||||||
|
const char *doctype)
|
||||||
|
{
|
||||||
|
(void)digest;
|
||||||
|
(void)digest_len;
|
||||||
|
(void)tok;
|
||||||
|
(void)pkey;
|
||||||
|
(void)flags;
|
||||||
|
(void)doctype;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static dir_connection_t *
|
static dir_connection_t *
|
||||||
new_dir_conn(void)
|
new_dir_conn(void)
|
||||||
{
|
{
|
||||||
@ -500,7 +518,8 @@ static const char microdesc[] =
|
|||||||
"MIGJAoGBAMjlHH/daN43cSVRaHBwgUfnszzAhg98EvivJ9Qxfv51mvQUxPjQ07es\n"
|
"MIGJAoGBAMjlHH/daN43cSVRaHBwgUfnszzAhg98EvivJ9Qxfv51mvQUxPjQ07es\n"
|
||||||
"gV/3n8fyh3Kqr/ehi9jxkdgSRfSnmF7giaHL1SLZ29kA7KtST+pBvmTpDtHa3ykX\n"
|
"gV/3n8fyh3Kqr/ehi9jxkdgSRfSnmF7giaHL1SLZ29kA7KtST+pBvmTpDtHa3ykX\n"
|
||||||
"Xorc7hJvIyTZoc1HU+5XSynj3gsBE5IGK1ZRzrNS688LnuZMVp1tAgMBAAE=\n"
|
"Xorc7hJvIyTZoc1HU+5XSynj3gsBE5IGK1ZRzrNS688LnuZMVp1tAgMBAAE=\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n";
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
|
"ntor-onion-key QlrOXAa8j3LD31LESsPm/lIKFBwevk2oXdqJcd9SEUc=\n";
|
||||||
|
|
||||||
static void
|
static void
|
||||||
test_dir_handle_get_micro_d(void *data)
|
test_dir_handle_get_micro_d(void *data)
|
||||||
@ -1976,7 +1995,8 @@ test_dir_handle_get_status_vote_current_not_found(void* data)
|
|||||||
tor_free(header);
|
tor_free(header);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define VOTE_DIGEST "312A4890D4D832597ABBD3089C782DBBFB81E48D"
|
/* What vote do we ask for, to get the vote in vote_descriptors.inc ? */
|
||||||
|
#define VOTE_DIGEST "78400095d8e834d87135cfc46235c909f0e99911"
|
||||||
|
|
||||||
static void
|
static void
|
||||||
status_vote_current_d_test(char **header, char **body, size_t *body_l)
|
status_vote_current_d_test(char **header, char **body, size_t *body_l)
|
||||||
@ -2058,6 +2078,7 @@ test_dir_handle_get_status_vote_d(void* data)
|
|||||||
const char digest[DIGEST_LEN] = "";
|
const char digest[DIGEST_LEN] = "";
|
||||||
(void) data;
|
(void) data;
|
||||||
|
|
||||||
|
MOCK(check_signature_token, mock_ignore_signature_token);
|
||||||
clear_dir_servers();
|
clear_dir_servers();
|
||||||
dirvote_free_all();
|
dirvote_free_all();
|
||||||
|
|
||||||
@ -2094,7 +2115,7 @@ test_dir_handle_get_status_vote_d(void* data)
|
|||||||
tt_ptr_op(strstr(header, "HTTP/1.0 200 OK\r\n"), OP_EQ, header);
|
tt_ptr_op(strstr(header, "HTTP/1.0 200 OK\r\n"), OP_EQ, header);
|
||||||
tt_assert(strstr(header, "Content-Type: text/plain\r\n"));
|
tt_assert(strstr(header, "Content-Type: text/plain\r\n"));
|
||||||
tt_assert(strstr(header, "Content-Encoding: identity\r\n"));
|
tt_assert(strstr(header, "Content-Encoding: identity\r\n"));
|
||||||
tt_assert(strstr(header, "Content-Length: 4135\r\n"));
|
tt_assert(strstr(header, "Content-Length: 4403\r\n"));
|
||||||
|
|
||||||
tt_str_op(VOTE_BODY_V3, OP_EQ, body);
|
tt_str_op(VOTE_BODY_V3, OP_EQ, body);
|
||||||
|
|
||||||
@ -2107,11 +2128,12 @@ test_dir_handle_get_status_vote_d(void* data)
|
|||||||
tt_ptr_op(strstr(header, "HTTP/1.0 200 OK\r\n"), OP_EQ, header);
|
tt_ptr_op(strstr(header, "HTTP/1.0 200 OK\r\n"), OP_EQ, header);
|
||||||
tt_assert(strstr(header, "Content-Type: text/plain\r\n"));
|
tt_assert(strstr(header, "Content-Type: text/plain\r\n"));
|
||||||
tt_assert(strstr(header, "Content-Encoding: identity\r\n"));
|
tt_assert(strstr(header, "Content-Encoding: identity\r\n"));
|
||||||
tt_assert(strstr(header, "Content-Length: 4135\r\n"));
|
tt_assert(strstr(header, "Content-Length: 4403\r\n"));
|
||||||
|
|
||||||
tt_str_op(VOTE_BODY_V3, OP_EQ, body);
|
tt_str_op(VOTE_BODY_V3, OP_EQ, body);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
UNMOCK(check_signature_token);
|
||||||
tor_free(header);
|
tor_free(header);
|
||||||
tor_free(body);
|
tor_free(body);
|
||||||
or_options_free(mock_options); mock_options = NULL;
|
or_options_free(mock_options); mock_options = NULL;
|
||||||
@ -2188,6 +2210,7 @@ test_dir_handle_get_status_vote_current_authority_not_found(void* data)
|
|||||||
(void) data;
|
(void) data;
|
||||||
|
|
||||||
MOCK(connection_write_to_buf_impl_, connection_write_to_buf_mock);
|
MOCK(connection_write_to_buf_impl_, connection_write_to_buf_mock);
|
||||||
|
MOCK(check_signature_token, mock_ignore_signature_token);
|
||||||
|
|
||||||
conn = new_dir_conn();
|
conn = new_dir_conn();
|
||||||
tt_int_op(0, OP_EQ, directory_handle_command_get(conn,
|
tt_int_op(0, OP_EQ, directory_handle_command_get(conn,
|
||||||
@ -2199,6 +2222,7 @@ test_dir_handle_get_status_vote_current_authority_not_found(void* data)
|
|||||||
tt_str_op(NOT_FOUND, OP_EQ, header);
|
tt_str_op(NOT_FOUND, OP_EQ, header);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
UNMOCK(check_signature_token);
|
||||||
UNMOCK(connection_write_to_buf_impl_);
|
UNMOCK(connection_write_to_buf_impl_);
|
||||||
connection_free_minimal(TO_CONN(conn));
|
connection_free_minimal(TO_CONN(conn));
|
||||||
tor_free(header);
|
tor_free(header);
|
||||||
@ -2212,6 +2236,7 @@ test_dir_handle_get_status_vote_next_authority_not_found(void* data)
|
|||||||
(void) data;
|
(void) data;
|
||||||
|
|
||||||
MOCK(connection_write_to_buf_impl_, connection_write_to_buf_mock);
|
MOCK(connection_write_to_buf_impl_, connection_write_to_buf_mock);
|
||||||
|
MOCK(check_signature_token, mock_ignore_signature_token);
|
||||||
|
|
||||||
conn = new_dir_conn();
|
conn = new_dir_conn();
|
||||||
tt_int_op(0, OP_EQ, directory_handle_command_get(conn,
|
tt_int_op(0, OP_EQ, directory_handle_command_get(conn,
|
||||||
@ -2223,6 +2248,7 @@ test_dir_handle_get_status_vote_next_authority_not_found(void* data)
|
|||||||
tt_str_op(NOT_FOUND, OP_EQ, header);
|
tt_str_op(NOT_FOUND, OP_EQ, header);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
UNMOCK(check_signature_token);
|
||||||
UNMOCK(connection_write_to_buf_impl_);
|
UNMOCK(connection_write_to_buf_impl_);
|
||||||
connection_free_minimal(TO_CONN(conn));
|
connection_free_minimal(TO_CONN(conn));
|
||||||
tor_free(header);
|
tor_free(header);
|
||||||
@ -2236,7 +2262,7 @@ test_dir_handle_get_status_vote_next_bandwidth_not_found(void* data)
|
|||||||
(void) data;
|
(void) data;
|
||||||
|
|
||||||
MOCK(connection_write_to_buf_impl_, connection_write_to_buf_mock);
|
MOCK(connection_write_to_buf_impl_, connection_write_to_buf_mock);
|
||||||
|
MOCK(check_signature_token, mock_ignore_signature_token);
|
||||||
conn = new_dir_conn();
|
conn = new_dir_conn();
|
||||||
|
|
||||||
tt_int_op(0, OP_EQ, directory_handle_command_get(conn,
|
tt_int_op(0, OP_EQ, directory_handle_command_get(conn,
|
||||||
@ -2248,6 +2274,7 @@ test_dir_handle_get_status_vote_next_bandwidth_not_found(void* data)
|
|||||||
tt_str_op(NOT_FOUND, OP_EQ, header);
|
tt_str_op(NOT_FOUND, OP_EQ, header);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
UNMOCK(check_signature_token);
|
||||||
UNMOCK(connection_write_to_buf_impl_);
|
UNMOCK(connection_write_to_buf_impl_);
|
||||||
connection_free_minimal(TO_CONN(conn));
|
connection_free_minimal(TO_CONN(conn));
|
||||||
tor_free(header);
|
tor_free(header);
|
||||||
@ -2428,6 +2455,7 @@ test_dir_handle_get_status_vote_next_authority(void* data)
|
|||||||
const char digest[DIGEST_LEN] = "";
|
const char digest[DIGEST_LEN] = "";
|
||||||
(void) data;
|
(void) data;
|
||||||
|
|
||||||
|
MOCK(check_signature_token, mock_ignore_signature_token);
|
||||||
clear_dir_servers();
|
clear_dir_servers();
|
||||||
routerlist_free_all();
|
routerlist_free_all();
|
||||||
dirvote_free_all();
|
dirvote_free_all();
|
||||||
@ -2477,11 +2505,12 @@ test_dir_handle_get_status_vote_next_authority(void* data)
|
|||||||
tt_ptr_op(strstr(header, "HTTP/1.0 200 OK\r\n"), OP_EQ, header);
|
tt_ptr_op(strstr(header, "HTTP/1.0 200 OK\r\n"), OP_EQ, header);
|
||||||
tt_assert(strstr(header, "Content-Type: text/plain\r\n"));
|
tt_assert(strstr(header, "Content-Type: text/plain\r\n"));
|
||||||
tt_assert(strstr(header, "Content-Encoding: identity\r\n"));
|
tt_assert(strstr(header, "Content-Encoding: identity\r\n"));
|
||||||
tt_assert(strstr(header, "Content-Length: 4135\r\n"));
|
tt_assert(strstr(header, "Content-Length: 4403\r\n"));
|
||||||
|
|
||||||
tt_str_op(VOTE_BODY_V3, OP_EQ, body);
|
tt_str_op(VOTE_BODY_V3, OP_EQ, body);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
UNMOCK(check_signature_token);
|
||||||
UNMOCK(connection_write_to_buf_impl_);
|
UNMOCK(connection_write_to_buf_impl_);
|
||||||
UNMOCK(get_my_v3_authority_cert);
|
UNMOCK(get_my_v3_authority_cert);
|
||||||
connection_free_minimal(TO_CONN(conn));
|
connection_free_minimal(TO_CONN(conn));
|
||||||
@ -2587,6 +2616,7 @@ test_dir_handle_get_status_vote_current_authority(void* data)
|
|||||||
dir_server_t *ds = NULL;
|
dir_server_t *ds = NULL;
|
||||||
(void) data;
|
(void) data;
|
||||||
|
|
||||||
|
MOCK(check_signature_token, mock_ignore_signature_token);
|
||||||
clear_dir_servers();
|
clear_dir_servers();
|
||||||
routerlist_free_all();
|
routerlist_free_all();
|
||||||
dirvote_free_all();
|
dirvote_free_all();
|
||||||
@ -2640,11 +2670,12 @@ test_dir_handle_get_status_vote_current_authority(void* data)
|
|||||||
tt_ptr_op(strstr(header, "HTTP/1.0 200 OK\r\n"), OP_EQ, header);
|
tt_ptr_op(strstr(header, "HTTP/1.0 200 OK\r\n"), OP_EQ, header);
|
||||||
tt_assert(strstr(header, "Content-Type: text/plain\r\n"));
|
tt_assert(strstr(header, "Content-Type: text/plain\r\n"));
|
||||||
tt_assert(strstr(header, "Content-Encoding: identity\r\n"));
|
tt_assert(strstr(header, "Content-Encoding: identity\r\n"));
|
||||||
tt_assert(strstr(header, "Content-Length: 4135\r\n"));
|
tt_assert(strstr(header, "Content-Length: 4403\r\n"));
|
||||||
|
|
||||||
tt_str_op(VOTE_BODY_V3, OP_EQ, body);
|
tt_str_op(VOTE_BODY_V3, OP_EQ, body);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
UNMOCK(check_signature_token);
|
||||||
UNMOCK(connection_write_to_buf_impl_);
|
UNMOCK(connection_write_to_buf_impl_);
|
||||||
UNMOCK(get_my_v3_authority_cert);
|
UNMOCK(get_my_v3_authority_cert);
|
||||||
connection_free_minimal(TO_CONN(conn));
|
connection_free_minimal(TO_CONN(conn));
|
||||||
@ -2672,6 +2703,7 @@ test_dir_handle_get_status_vote_too_late(void* data)
|
|||||||
dir_server_t *ds = NULL;
|
dir_server_t *ds = NULL;
|
||||||
const char* mode = (const char *)data;
|
const char* mode = (const char *)data;
|
||||||
|
|
||||||
|
MOCK(check_signature_token, mock_ignore_signature_token);
|
||||||
clear_dir_servers();
|
clear_dir_servers();
|
||||||
routerlist_free_all();
|
routerlist_free_all();
|
||||||
dirvote_free_all();
|
dirvote_free_all();
|
||||||
@ -2817,11 +2849,12 @@ test_dir_handle_get_status_vote_too_late(void* data)
|
|||||||
tt_ptr_op(strstr(header, "HTTP/1.0 200 OK\r\n"), OP_EQ, header);
|
tt_ptr_op(strstr(header, "HTTP/1.0 200 OK\r\n"), OP_EQ, header);
|
||||||
tt_assert(strstr(header, "Content-Type: text/plain\r\n"));
|
tt_assert(strstr(header, "Content-Type: text/plain\r\n"));
|
||||||
tt_assert(strstr(header, "Content-Encoding: identity\r\n"));
|
tt_assert(strstr(header, "Content-Encoding: identity\r\n"));
|
||||||
tt_assert(strstr(header, "Content-Length: 4135\r\n"));
|
tt_assert(strstr(header, "Content-Length: 4403\r\n"));
|
||||||
|
|
||||||
tt_str_op(VOTE_BODY_V3, OP_EQ, body);
|
tt_str_op(VOTE_BODY_V3, OP_EQ, body);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
UNMOCK(check_signature_token);
|
||||||
UNMOCK(connection_write_to_buf_impl_);
|
UNMOCK(connection_write_to_buf_impl_);
|
||||||
UNMOCK(get_my_v3_authority_cert);
|
UNMOCK(get_my_v3_authority_cert);
|
||||||
connection_free_minimal(TO_CONN(conn));
|
connection_free_minimal(TO_CONN(conn));
|
||||||
|
@ -40,7 +40,8 @@ static const char test_md1[] =
|
|||||||
"MIGJAoGBAMjlHH/daN43cSVRaHBwgUfnszzAhg98EvivJ9Qxfv51mvQUxPjQ07es\n"
|
"MIGJAoGBAMjlHH/daN43cSVRaHBwgUfnszzAhg98EvivJ9Qxfv51mvQUxPjQ07es\n"
|
||||||
"gV/3n8fyh3Kqr/ehi9jxkdgSRfSnmF7giaHL1SLZ29kA7KtST+pBvmTpDtHa3ykX\n"
|
"gV/3n8fyh3Kqr/ehi9jxkdgSRfSnmF7giaHL1SLZ29kA7KtST+pBvmTpDtHa3ykX\n"
|
||||||
"Xorc7hJvIyTZoc1HU+5XSynj3gsBE5IGK1ZRzrNS688LnuZMVp1tAgMBAAE=\n"
|
"Xorc7hJvIyTZoc1HU+5XSynj3gsBE5IGK1ZRzrNS688LnuZMVp1tAgMBAAE=\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n";
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
|
"ntor-onion-key AppBt6CSeb1kKid/36ototmFA24ddfW5JpjWPLuoJgs=\n";
|
||||||
|
|
||||||
static const char test_md2[] =
|
static const char test_md2[] =
|
||||||
"onion-key\n"
|
"onion-key\n"
|
||||||
@ -48,7 +49,8 @@ static const char test_md2[] =
|
|||||||
"MIGJAoGBAMIixIowh2DyPmDNMDwBX2DHcYcqdcH1zdIQJZkyV6c6rQHnvbcaDoSg\n"
|
"MIGJAoGBAMIixIowh2DyPmDNMDwBX2DHcYcqdcH1zdIQJZkyV6c6rQHnvbcaDoSg\n"
|
||||||
"jgFSLJKpnGmh71FVRqep+yVB0zI1JY43kuEnXry2HbZCD9UDo3d3n7t015X5S7ON\n"
|
"jgFSLJKpnGmh71FVRqep+yVB0zI1JY43kuEnXry2HbZCD9UDo3d3n7t015X5S7ON\n"
|
||||||
"bSSYtQGPwOr6Epf96IF6DoQxy4iDnPUAlejuhAG51s1y6/rZQ3zxAgMBAAE=\n"
|
"bSSYtQGPwOr6Epf96IF6DoQxy4iDnPUAlejuhAG51s1y6/rZQ3zxAgMBAAE=\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n";
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
|
"ntor-onion-key AppBt6CSeb1kKid/36ototmFA24ddfW5JpjWPLuoJgs=\n";
|
||||||
|
|
||||||
static const char test_md3[] =
|
static const char test_md3[] =
|
||||||
"@last-listed 2009-06-22\n"
|
"@last-listed 2009-06-22\n"
|
||||||
@ -58,6 +60,7 @@ static const char test_md3[] =
|
|||||||
"qj2fRZzfxlc88G/tmiaHshmdtEpklZ740OFqaaJVj4LjPMKFNE+J7Xc1142BE9Ci\n"
|
"qj2fRZzfxlc88G/tmiaHshmdtEpklZ740OFqaaJVj4LjPMKFNE+J7Xc1142BE9Ci\n"
|
||||||
"KgsbjGYe2RY261aADRWLetJ8T9QDMm+JngL4288hc8pq1uB/3TAbAgMBAAE=\n"
|
"KgsbjGYe2RY261aADRWLetJ8T9QDMm+JngL4288hc8pq1uB/3TAbAgMBAAE=\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
|
"ntor-onion-key AppBt6CSeb1kKid/36ototmFA24ddfW5JpjWPLuoJgs=\n"
|
||||||
"p accept 1-700,800-1000\n"
|
"p accept 1-700,800-1000\n"
|
||||||
"family nodeX nodeY nodeZ\n";
|
"family nodeX nodeY nodeZ\n";
|
||||||
|
|
||||||
@ -309,140 +312,94 @@ test_md_cache_broken(void *data)
|
|||||||
/* Generated by chutney. */
|
/* Generated by chutney. */
|
||||||
static const char test_ri[] =
|
static const char test_ri[] =
|
||||||
"router test005r 127.0.0.1 5005 0 7005\n"
|
"router test005r 127.0.0.1 5005 0 7005\n"
|
||||||
"platform Tor 0.2.5.4-alpha-dev on Linux\n"
|
|
||||||
"protocols Link 1 2 Circuit 1\n"
|
|
||||||
"published 2014-05-06 22:57:55\n"
|
|
||||||
"fingerprint 09DE 3BA2 48C2 1C3F 3760 6CD3 8460 43A6 D5EC F59E\n"
|
|
||||||
"uptime 0\n"
|
|
||||||
"bandwidth 1073741824 1073741824 0\n"
|
|
||||||
"extra-info-digest 361F9428F9FA4DD854C03DDBCC159D0D9FA996C9\n"
|
|
||||||
"onion-key\n"
|
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
|
||||||
"MIGJAoGBANBJz8Vldl12aFeSMPLiA4nOetLDN0oxU8bB1SDhO7Uu2zdWYVYAF5J0\n"
|
|
||||||
"st7WvrVy/jA9v/fsezNAPskBanecHRSkdMTpkcgRPMHE7CTGEwIy1Yp1X4bPgDlC\n"
|
|
||||||
"VCnbs5Pcts5HnWEYNK7qHDAUn+IlmjOO+pTUY8uyq+GQVz6H9wFlAgMBAAE=\n"
|
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
|
||||||
"signing-key\n"
|
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
|
||||||
"MIGJAoGBANbGUC4802Ke6C3nOVxN0U0HhIRrs32cQFEL4v+UUMJPgjbistHBvOax\n"
|
|
||||||
"CWVR/sMXM2kKJeGThJ9ZUs2p9dDG4WHPUXgkMqzTTEeeFa7pQKU0brgbmLaJq0Pi\n"
|
|
||||||
"mxmqC5RkTHa5bQvq6QlSFprAEoovV27cWqBM9jVdV9hyc//6kwPzAgMBAAE=\n"
|
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
|
||||||
"hidden-service-dir\n"
|
|
||||||
"ntor-onion-key Gg73xH7+kTfT6bi1uNVx9gwQdQas9pROIfmc4NpAdC4=\n"
|
|
||||||
"reject *:25\n"
|
|
||||||
"reject *:119\n"
|
|
||||||
"reject *:135-139\n"
|
|
||||||
"reject *:445\n"
|
|
||||||
"reject *:563\n"
|
|
||||||
"reject *:1214\n"
|
|
||||||
"reject *:4661-4666\n"
|
|
||||||
"reject *:6346-6429\n"
|
|
||||||
"reject *:6699\n"
|
|
||||||
"reject *:6881-6999\n"
|
|
||||||
"accept *:*\n"
|
|
||||||
"router-signature\n"
|
|
||||||
"-----BEGIN SIGNATURE-----\n"
|
|
||||||
"ImzX5PF2vRCrG1YzGToyjoxYhgh1vtHEDjmP+tIS/iil1DSnHZNpHSuHp0L1jE9S\n"
|
|
||||||
"yZyrtKaqpBE/aecAM3j4CWCn/ipnAAQkHcyRLin1bYvqBtRzyopVCRlUhF+uWrLq\n"
|
|
||||||
"t0xkIE39ss/EwmQr7iIgkdVH4oRIMsjYnFFJBG26nYY=\n"
|
|
||||||
"-----END SIGNATURE-----\n";
|
|
||||||
|
|
||||||
static const char test_ri2[] =
|
|
||||||
"router test001a 127.0.0.1 5001 0 7001\n"
|
|
||||||
"identity-ed25519\n"
|
"identity-ed25519\n"
|
||||||
"-----BEGIN ED25519 CERT-----\n"
|
"-----BEGIN ED25519 CERT-----\n"
|
||||||
"AQQABf/FAf5iDuKCZP2VxnAaQWdklilAh6kaEeFX4z8261Yx2T1/AQAgBADCp8vO\n"
|
"AQQABs1eAfTuBhu6ypB5/9avDiY3qBzulkCvfYqbFN/ABk/o4xFcAQAgBAAnmWRG\n"
|
||||||
"B8K1F9g2DzwuwvVCnPFLSK1qknVqPpNucHLH9DY7fuIYogBAdz4zHv1qC7RKaMNG\n"
|
"rIvqpb4Kk3cThEiWAll4uDCO2Y46uNm9WG7AtPt4LG+XfktG3GAxv6aVQimwlyHc\n"
|
||||||
"Jux/tMO2tzPcm62Ky5PjClMQplKUOnZNQ+RIpA3wYCIfUDy/cQnY7XWgNQ0=\n"
|
"1x2Lfm9KG3mWWj+hxnum4Z7873OE0B9l2Hg0YQZCW/PuHSWN0rspTvY5SgA=\n"
|
||||||
"-----END ED25519 CERT-----\n"
|
"-----END ED25519 CERT-----\n"
|
||||||
"platform Tor 0.2.6.0-alpha-dev on Darwin\n"
|
"master-key-ed25519 J5lkRqyL6qW+CpN3E4RIlgJZeLgwjtmOOrjZvVhuwLQ\n"
|
||||||
"protocols Link 1 2 Circuit 1\n"
|
"or-address [::]:5005\n"
|
||||||
"published 2014-10-08 12:58:04\n"
|
"platform Tor 0.4.5.0-alpha-dev on Linux\n"
|
||||||
"fingerprint B7E2 7F10 4213 C36F 13E7 E982 9182 845E 4959 97A0\n"
|
"proto Cons=1-2 Desc=1-2 DirCache=1-2 FlowCtrl=1 HSDir=1-2 HSIntro=3-5 "
|
||||||
"uptime 0\n"
|
"HSRend=1-2 Link=1-5 LinkAuth=1,3 Microdesc=1-2 Padding=2 Relay=1-3\n"
|
||||||
"bandwidth 1073741824 1073741824 0\n"
|
"published 2020-10-13 13:27:34\n"
|
||||||
"extra-info-digest 568F27331B6D8C73E7024F1EF5D097B90DFC7CDB\n"
|
"fingerprint D219 590A C951 3BCD EBBA 9AB7 2100 7A4C C01B BAE3\n"
|
||||||
"caches-extra-info\n"
|
"uptime 324451\n"
|
||||||
|
"bandwidth 1073741824 1073741824 637796\n"
|
||||||
|
"extra-info-digest 78E6D382BC826B95B4111554EEE7D541A32AAAA3 "
|
||||||
|
"c61Onjpq+1S0TrdvoaOvGAxew6yfO+uHNhipbemQmgA\n"
|
||||||
"onion-key\n"
|
"onion-key\n"
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
"MIGJAoGBAL2R8EfubUcahxha4u02P4VAR0llQIMwFAmrHPjzcK7apcQgDOf2ovOA\n"
|
"MIGJAoGBAMvEJ/JVNK7I38PPWhQMuCgkET/ki4WIas4tj5Kmqfb9kHqxMR+EunRD\n"
|
||||||
"+YQnJFxlpBmCoCZC6ssCi+9G0mqo650lFuTMP5I90BdtjotfzESfTykHLiChyvhd\n"
|
"83k4pel1yB7QdV+iTd/4SZOI8RpZP+BO1KnOTWfpztAU1lDGr19/PwdwcHaILpBD\n"
|
||||||
"l0dlqclb2SU/GKem/fLRXH16aNi72CdSUu/1slKs/70ILi34QixRAgMBAAE=\n"
|
"nNzm6otk4/bKUQ0vqpOfJljtg0DfAm4uMAQ6BMFy6uEAF7+JupuPAgMBAAE=\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
"signing-key\n"
|
"signing-key\n"
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
"MIGJAoGBAN8+78KUVlgHXdMMkYJxcwh1Zv2y+Gb5eWUyltUaQRajhrT9ij2T5JZs\n"
|
"MIGJAoGBANBzejGAwyPTPq2Gm03wpg3qICo0uDQau8opude2mW3eyxAqOqHzC8De\n"
|
||||||
"M0g85xTcuM3jNVVpV79+33hiTohdC6UZ+Bk4USQ7WBFzRbVFSXoVKLBJFkCOIexg\n"
|
"gRgbmn040vqe9gwvH4iaHpVeTxyDwQefbfULdq6bETmX3aSUj6LKBCqqcyuOJFQu\n"
|
||||||
"SMGNd5WEDtHWrXl58mizmPFu1eG6ZxHzt7RuLSol5cwBvawXPNkFAgMBAAE=\n"
|
"7M2QfNSfHtldUABpIaqFvEA3AV8qjOoUtauoFNJKMy7Wj2//S70VAgMBAAE=\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
"onion-key-crosscert\n"
|
"onion-key-crosscert\n"
|
||||||
"-----BEGIN CROSSCERT-----\n"
|
"-----BEGIN CROSSCERT-----\n"
|
||||||
"ETFDzU49bvNfoZnKK1j6JeBP2gDirgj6bBCgWpUYs663OO9ypbZRO0JwWANssKl6\n"
|
"pD3Nkkunt8zP6PO6H3uHT0t7xnorC7cY/KfF75mFB+90pHCD9f0Xdu3Pjrur/q23\n"
|
||||||
"oaq9vKTsKGRsaNnqnz/JGMhehymakjjNtqg7crWwsahe8+7Pw9GKmW+YjFtcOkUf\n"
|
"PIKV3hdtdsODoJuoh8LPGNAjS5rO6HMCtHNDNunNOs69bvfaO0jThnurXmOpY0sW\n"
|
||||||
"KfOn2bmKBa1FoJb4yW3oXzHcdlLSRuCciKqPn+Hky5o=\n"
|
"eRfBeYN2KNgrN0B1eDejfPSr03dkFY48yoUDROv9EJQ=\n"
|
||||||
"-----END CROSSCERT-----\n"
|
"-----END CROSSCERT-----\n"
|
||||||
"ntor-onion-key-crosscert 0\n"
|
"ntor-onion-key-crosscert 0\n"
|
||||||
"-----BEGIN ED25519 CERT-----\n"
|
"-----BEGIN ED25519 CERT-----\n"
|
||||||
"AQoABf2dAcKny84HwrUX2DYPPC7C9UKc8UtIrWqSdWo+k25wcsf0AFohutG+xI06\n"
|
"AQoABs2OASeZZEasi+qlvgqTdxOESJYCWXi4MI7Zjjq42b1YbsC0AKc5y5qYUYvw\n"
|
||||||
"Ef21c5Zl1j8Hw6DzHDjYyJevXLFuOneaL3zcH2Ldn4sjrG3kc5UuVvRfTvV120UO\n"
|
"VATtWkV9DVIZbZSb9mQP5pmNaqmX+DbmINCYt8j7l+U7g3ftUyh0Wlrgevx0pFUI\n"
|
||||||
"xk4f5s5LGwY=\n"
|
"RcIU0HKHZQA=\n"
|
||||||
"-----END ED25519 CERT-----\n"
|
"-----END ED25519 CERT-----\n"
|
||||||
"hidden-service-dir\n"
|
"hidden-service-dir\n"
|
||||||
"contact auth1@test.test\n"
|
"ntor-onion-key FChIfm77vrWB7JsxQ+jMbN6VSSp1P0DYbw/2aqey4iA\n"
|
||||||
"ntor-onion-key hbxdRnfVUJJY7+KcT4E3Rs7/zuClbN3hJrjSBiEGMgI=\n"
|
"accept *:*\n"
|
||||||
"reject *:*\n"
|
"tunnelled-dir-server\n"
|
||||||
"router-sig-ed25519 5aQXyTif7PExIuL2di37UvktmJECKnils2OWz2vDi"
|
"router-sig-ed25519 Xm56dYbo/hCHWyzcdUPmfTeZ4qly2TYf1/2Q1lXKQDMJyBti"
|
||||||
"hFxi+5TTAAPxYkS5clhc/Pjvw34itfjGmTKFic/8httAQ\n"
|
"8ZE8R2TTYsYimr+UtAapbzBItccZLze505nhBw\n"
|
||||||
"router-signature\n"
|
"router-signature\n"
|
||||||
"-----BEGIN SIGNATURE-----\n"
|
"-----BEGIN SIGNATURE-----\n"
|
||||||
"BaUB+aFPQbb3BwtdzKsKqV3+6cRlSqJF5bI3UTmwRoJk+Z5Pz+W5NWokNI0xArHM\n"
|
"bbeN0lq6nCfJQXGcKa1M9TQ6b2upig7clrlVXuzKeR0JhGwnDCXUAFxDtrw3vkVo\n"
|
||||||
"T4T5FZCCP9350jXsUCIvzyIyktU6aVRCGFt76rFlo1OETpN8GWkMnQU0w18cxvgS\n"
|
"ExBXXvJeBPyustFOQkdiAEWHHSW5CwEgeVCBYZeEnaiySIgDVKuu+9B53ezFdC0Y\n"
|
||||||
"cf34GXHv61XReJF3AlzNHFpbrPOYmowmhrTULKyMqow=\n"
|
"iFJkKxxDx7ksxX0zdl7aPT4ORFEuRhCYS6el7YJmoyg=\n"
|
||||||
"-----END SIGNATURE-----\n";
|
"-----END SIGNATURE-----\n";
|
||||||
|
|
||||||
static const char test_md_18[] =
|
static const char test_md2_25[] =
|
||||||
"onion-key\n"
|
"onion-key\n"
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
"MIGJAoGBANBJz8Vldl12aFeSMPLiA4nOetLDN0oxU8bB1SDhO7Uu2zdWYVYAF5J0\n"
|
"MIGJAoGBAMvEJ/JVNK7I38PPWhQMuCgkET/ki4WIas4tj5Kmqfb9kHqxMR+EunRD\n"
|
||||||
"st7WvrVy/jA9v/fsezNAPskBanecHRSkdMTpkcgRPMHE7CTGEwIy1Yp1X4bPgDlC\n"
|
"83k4pel1yB7QdV+iTd/4SZOI8RpZP+BO1KnOTWfpztAU1lDGr19/PwdwcHaILpBD\n"
|
||||||
"VCnbs5Pcts5HnWEYNK7qHDAUn+IlmjOO+pTUY8uyq+GQVz6H9wFlAgMBAAE=\n"
|
"nNzm6otk4/bKUQ0vqpOfJljtg0DfAm4uMAQ6BMFy6uEAF7+JupuPAgMBAAE=\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
"ntor-onion-key Gg73xH7+kTfT6bi1uNVx9gwQdQas9pROIfmc4NpAdC4=\n"
|
"ntor-onion-key FChIfm77vrWB7JsxQ+jMbN6VSSp1P0DYbw/2aqey4iA=\n"
|
||||||
"p reject 25,119,135-139,445,563,1214,4661-4666,6346-6429,6699,6881-6999\n"
|
"p accept 1-65535\n"
|
||||||
"id rsa1024 Cd47okjCHD83YGzThGBDptXs9Z4\n";
|
"id ed25519 J5lkRqyL6qW+CpN3E4RIlgJZeLgwjtmOOrjZvVhuwLQ\n";
|
||||||
|
|
||||||
static const char test_md2_21[] =
|
|
||||||
"onion-key\n"
|
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
|
||||||
"MIGJAoGBAL2R8EfubUcahxha4u02P4VAR0llQIMwFAmrHPjzcK7apcQgDOf2ovOA\n"
|
|
||||||
"+YQnJFxlpBmCoCZC6ssCi+9G0mqo650lFuTMP5I90BdtjotfzESfTykHLiChyvhd\n"
|
|
||||||
"l0dlqclb2SU/GKem/fLRXH16aNi72CdSUu/1slKs/70ILi34QixRAgMBAAE=\n"
|
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
|
||||||
"ntor-onion-key hbxdRnfVUJJY7+KcT4E3Rs7/zuClbN3hJrjSBiEGMgI=\n"
|
|
||||||
"id ed25519 wqfLzgfCtRfYNg88LsL1QpzxS0itapJ1aj6TbnByx/Q\n";
|
|
||||||
|
|
||||||
static const char test_md2_withfamily_28[] =
|
static const char test_md2_withfamily_28[] =
|
||||||
"onion-key\n"
|
"onion-key\n"
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
"MIGJAoGBAL2R8EfubUcahxha4u02P4VAR0llQIMwFAmrHPjzcK7apcQgDOf2ovOA\n"
|
"MIGJAoGBAMvEJ/JVNK7I38PPWhQMuCgkET/ki4WIas4tj5Kmqfb9kHqxMR+EunRD\n"
|
||||||
"+YQnJFxlpBmCoCZC6ssCi+9G0mqo650lFuTMP5I90BdtjotfzESfTykHLiChyvhd\n"
|
"83k4pel1yB7QdV+iTd/4SZOI8RpZP+BO1KnOTWfpztAU1lDGr19/PwdwcHaILpBD\n"
|
||||||
"l0dlqclb2SU/GKem/fLRXH16aNi72CdSUu/1slKs/70ILi34QixRAgMBAAE=\n"
|
"nNzm6otk4/bKUQ0vqpOfJljtg0DfAm4uMAQ6BMFy6uEAF7+JupuPAgMBAAE=\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
"ntor-onion-key hbxdRnfVUJJY7+KcT4E3Rs7/zuClbN3hJrjSBiEGMgI=\n"
|
"ntor-onion-key FChIfm77vrWB7JsxQ+jMbN6VSSp1P0DYbw/2aqey4iA=\n"
|
||||||
"family OtherNode !Strange\n"
|
"family OtherNode !Strange\n"
|
||||||
"id ed25519 wqfLzgfCtRfYNg88LsL1QpzxS0itapJ1aj6TbnByx/Q\n";
|
"p accept 1-65535\n"
|
||||||
|
"id ed25519 J5lkRqyL6qW+CpN3E4RIlgJZeLgwjtmOOrjZvVhuwLQ\n";
|
||||||
|
|
||||||
static const char test_md2_withfamily_29[] =
|
static const char test_md2_withfamily_29[] =
|
||||||
"onion-key\n"
|
"onion-key\n"
|
||||||
"-----BEGIN RSA PUBLIC KEY-----\n"
|
"-----BEGIN RSA PUBLIC KEY-----\n"
|
||||||
"MIGJAoGBAL2R8EfubUcahxha4u02P4VAR0llQIMwFAmrHPjzcK7apcQgDOf2ovOA\n"
|
"MIGJAoGBAMvEJ/JVNK7I38PPWhQMuCgkET/ki4WIas4tj5Kmqfb9kHqxMR+EunRD\n"
|
||||||
"+YQnJFxlpBmCoCZC6ssCi+9G0mqo650lFuTMP5I90BdtjotfzESfTykHLiChyvhd\n"
|
"83k4pel1yB7QdV+iTd/4SZOI8RpZP+BO1KnOTWfpztAU1lDGr19/PwdwcHaILpBD\n"
|
||||||
"l0dlqclb2SU/GKem/fLRXH16aNi72CdSUu/1slKs/70ILi34QixRAgMBAAE=\n"
|
"nNzm6otk4/bKUQ0vqpOfJljtg0DfAm4uMAQ6BMFy6uEAF7+JupuPAgMBAAE=\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
"ntor-onion-key hbxdRnfVUJJY7+KcT4E3Rs7/zuClbN3hJrjSBiEGMgI=\n"
|
"ntor-onion-key FChIfm77vrWB7JsxQ+jMbN6VSSp1P0DYbw/2aqey4iA=\n"
|
||||||
"family !Strange $B7E27F104213C36F13E7E9829182845E495997A0 othernode\n"
|
"family !Strange $D219590AC9513BCDEBBA9AB721007A4CC01BBAE3 othernode\n"
|
||||||
"id ed25519 wqfLzgfCtRfYNg88LsL1QpzxS0itapJ1aj6TbnByx/Q\n";
|
"p accept 1-65535\n"
|
||||||
|
"id ed25519 J5lkRqyL6qW+CpN3E4RIlgJZeLgwjtmOOrjZvVhuwLQ\n";
|
||||||
|
|
||||||
static void
|
static void
|
||||||
test_md_generate(void *arg)
|
test_md_generate(void *arg)
|
||||||
@ -454,23 +411,8 @@ test_md_generate(void *arg)
|
|||||||
ri = router_parse_entry_from_string(test_ri, NULL, 0, 0, NULL, NULL);
|
ri = router_parse_entry_from_string(test_ri, NULL, 0, 0, NULL, NULL);
|
||||||
tt_assert(ri);
|
tt_assert(ri);
|
||||||
|
|
||||||
microdesc_free(md);
|
md = dirvote_create_microdescriptor(ri, 25);
|
||||||
md = NULL;
|
tt_str_op(md->body, OP_EQ, test_md2_25);
|
||||||
md = dirvote_create_microdescriptor(ri, 18);
|
|
||||||
tt_str_op(md->body, OP_EQ, test_md_18);
|
|
||||||
|
|
||||||
microdesc_free(md);
|
|
||||||
md = NULL;
|
|
||||||
md = dirvote_create_microdescriptor(ri, 21);
|
|
||||||
tt_str_op(md->body, OP_EQ, test_md_18);
|
|
||||||
|
|
||||||
routerinfo_free(ri);
|
|
||||||
ri = router_parse_entry_from_string(test_ri2, NULL, 0, 0, NULL, NULL);
|
|
||||||
|
|
||||||
microdesc_free(md);
|
|
||||||
md = NULL;
|
|
||||||
md = dirvote_create_microdescriptor(ri, 21);
|
|
||||||
tt_str_op(md->body, OP_EQ, test_md2_21);
|
|
||||||
tt_assert(ed25519_pubkey_eq(md->ed25519_identity_pkey,
|
tt_assert(ed25519_pubkey_eq(md->ed25519_identity_pkey,
|
||||||
&ri->cache_info.signing_key_cert->signing_key));
|
&ri->cache_info.signing_key_cert->signing_key));
|
||||||
|
|
||||||
@ -505,6 +447,7 @@ static const char MD_PARSE_TEST_DATA[] =
|
|||||||
"DBr/ij6+JqgVFeriuiMzHKREytzjdaTuKsKBFFpLwb+Ppcjr5nMIH/AR6/aHO8hW\n"
|
"DBr/ij6+JqgVFeriuiMzHKREytzjdaTuKsKBFFpLwb+Ppcjr5nMIH/AR6/aHO8hW\n"
|
||||||
"T3B9lx5T6Kl7CqZ4yqXxYRHzn50EPTIZuz0y9se4J4gi9mLmL+pHAgMBAAE=\n"
|
"T3B9lx5T6Kl7CqZ4yqXxYRHzn50EPTIZuz0y9se4J4gi9mLmL+pHAgMBAAE=\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
|
"ntor-onion-key AppBt6CSeb1kKid/36ototmFA24ddfW5JpjWPLuoJgs=\n"
|
||||||
"p accept 20-23,43,53,79-81,88,110,143,194,220,443,464,531,543-544\n"
|
"p accept 20-23,43,53,79-81,88,110,143,194,220,443,464,531,543-544\n"
|
||||||
"id rsa1024 GEo59/iR1GWSIWZDzXTd5QxtqnU\n"
|
"id rsa1024 GEo59/iR1GWSIWZDzXTd5QxtqnU\n"
|
||||||
/* Bad 0: I've messed with the onion-key in the second one. */
|
/* Bad 0: I've messed with the onion-key in the second one. */
|
||||||
@ -564,6 +507,7 @@ static const char MD_PARSE_TEST_DATA[] =
|
|||||||
"h8G5OJZHRarJQyCIf7vpZQAi0oP0OkGGaCaDQsM+D8TnqhnU++RWGnMqY/cXxPrL\n"
|
"h8G5OJZHRarJQyCIf7vpZQAi0oP0OkGGaCaDQsM+D8TnqhnU++RWGnMqY/cXxPrL\n"
|
||||||
"MEq+n6aGiLmzkO7ah8yorZpoREk4GqLUIN89/tHHGOhJL3c4CPGjAgMBAAE=\n"
|
"MEq+n6aGiLmzkO7ah8yorZpoREk4GqLUIN89/tHHGOhJL3c4CPGjAgMBAAE=\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
|
"ntor-onion-key AppBt6CSeb1kKid/36ototmFA24ddfW5JpjWPLuoJgs=\n"
|
||||||
"p reject 25,119,135-139,445,563,1214,4661-4666,6346-6429,6699,6881-6999\n"
|
"p reject 25,119,135-139,445,563,1214,4661-4666,6346-6429,6699,6881-6999\n"
|
||||||
"id rsa1234 jlqAKFD2E7uMKv+8TmKSeo7NBho\n"
|
"id rsa1234 jlqAKFD2E7uMKv+8TmKSeo7NBho\n"
|
||||||
/* Good 5: Extra id type. */
|
/* Good 5: Extra id type. */
|
||||||
@ -785,6 +729,7 @@ test_md_parse_id_ed25519(void *arg)
|
|||||||
"sgdN1wJpWpTQMXJ2DssfSgmOVXETP7qJuZyRprxalQhaEATMDNJA/66Ml1jSO9mZ\n"
|
"sgdN1wJpWpTQMXJ2DssfSgmOVXETP7qJuZyRprxalQhaEATMDNJA/66Ml1jSO9mZ\n"
|
||||||
"+8Xb7m/4q778lNtkSbsvMaYD2Dq6k2QQ3kMhr9z8oUtX0XA23+pfAgMBAAE=\n"
|
"+8Xb7m/4q778lNtkSbsvMaYD2Dq6k2QQ3kMhr9z8oUtX0XA23+pfAgMBAAE=\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
|
"ntor-onion-key AppBt6CSeb1kKid/36ototmFA24ddfW5JpjWPLuoJgs=\n"
|
||||||
"id ed25519 VGhpcyBpc24ndCBhY3R1YWxseSBhIHB1YmxpYyBrZXk\n"
|
"id ed25519 VGhpcyBpc24ndCBhY3R1YWxseSBhIHB1YmxpYyBrZXk\n"
|
||||||
"id wumpus dodecahedron\n";
|
"id wumpus dodecahedron\n";
|
||||||
|
|
||||||
@ -809,6 +754,7 @@ test_md_parse_id_ed25519(void *arg)
|
|||||||
"sgdN1wJpWpTQMXJ2DssfSgmOVXETP7qJuZyRprxalQhaEATMDNJA/66Ml1jSO9mZ\n"
|
"sgdN1wJpWpTQMXJ2DssfSgmOVXETP7qJuZyRprxalQhaEATMDNJA/66Ml1jSO9mZ\n"
|
||||||
"+8Xb7m/4q778lNtkSbsvMaYD2Dq6k2QQ3kMhr9z8oUtX0XA23+pfAgMBAAE=\n"
|
"+8Xb7m/4q778lNtkSbsvMaYD2Dq6k2QQ3kMhr9z8oUtX0XA23+pfAgMBAAE=\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
|
"ntor-onion-key AppBt6CSeb1kKid/36ototmFA24ddfW5JpjWPLuoJgs\n"
|
||||||
"id ed25519 VGhpcyBpc24ndCBhY3R1YWxseSBhIHB1YmxpYyBrZXk\n"
|
"id ed25519 VGhpcyBpc24ndCBhY3R1YWxseSBhIHB1YmxpYyBrZXk\n"
|
||||||
"id ed25519 VGhpcyBpc24ndCBhY3R1YWxseSBhIHB1YmxpYyBrZXk\n";
|
"id ed25519 VGhpcyBpc24ndCBhY3R1YWxseSBhIHB1YmxpYyBrZXk\n";
|
||||||
|
|
||||||
@ -829,6 +775,7 @@ test_md_parse_id_ed25519(void *arg)
|
|||||||
"sgdN1wJpWpTQMXJ2DssfSgmOVXETP7qJuZyRprxalQhaEATMDNJA/66Ml1jSO9mZ\n"
|
"sgdN1wJpWpTQMXJ2DssfSgmOVXETP7qJuZyRprxalQhaEATMDNJA/66Ml1jSO9mZ\n"
|
||||||
"+8Xb7m/4q778lNtkSbsvMaYD2Dq6k2QQ3kMhr9z8oUtX0XA23+pfAgMBAAE=\n"
|
"+8Xb7m/4q778lNtkSbsvMaYD2Dq6k2QQ3kMhr9z8oUtX0XA23+pfAgMBAAE=\n"
|
||||||
"-----END RSA PUBLIC KEY-----\n"
|
"-----END RSA PUBLIC KEY-----\n"
|
||||||
|
"ntor-onion-key AppBt6CSeb1kKid/36ototmFA24ddfW5JpjWPLuoJgs\n"
|
||||||
"id ed25519 VGhpcyBpc24ndCBhY3R1YWxseSBhIHB1YmxpYyZZZZZZZZZZZ\n";
|
"id ed25519 VGhpcyBpc24ndCBhY3R1YWxseSBhIHB1YmxpYyZZZZZZZZZZZ\n";
|
||||||
|
|
||||||
mds = microdescs_parse_from_string(BOGUS_KEY,
|
mds = microdescs_parse_from_string(BOGUS_KEY,
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "feature/nodelist/routerinfo_st.h"
|
#include "feature/nodelist/routerinfo_st.h"
|
||||||
#include "feature/nodelist/routerlist.h"
|
#include "feature/nodelist/routerlist.h"
|
||||||
#include "feature/nodelist/routerstatus_st.h"
|
#include "feature/nodelist/routerstatus_st.h"
|
||||||
|
#include "feature/nodelist/torcert.h"
|
||||||
#include "feature/relay/router.h"
|
#include "feature/relay/router.h"
|
||||||
#include "feature/stats/bwhist.h"
|
#include "feature/stats/bwhist.h"
|
||||||
#include "lib/crypt_ops/crypto_curve25519.h"
|
#include "lib/crypt_ops/crypto_curve25519.h"
|
||||||
@ -35,44 +36,34 @@
|
|||||||
#include "test/test.h"
|
#include "test/test.h"
|
||||||
#include "test/log_test_helpers.h"
|
#include "test/log_test_helpers.h"
|
||||||
|
|
||||||
static const routerinfo_t * rtr_tests_router_get_my_routerinfo(void);
|
static routerinfo_t *
|
||||||
ATTR_UNUSED static int rtr_tests_router_get_my_routerinfo_called = 0;
|
rtr_tests_gen_routerinfo(crypto_pk_t *ident_key, crypto_pk_t *tap_key)
|
||||||
|
|
||||||
static routerinfo_t* mock_routerinfo;
|
|
||||||
|
|
||||||
static const routerinfo_t*
|
|
||||||
rtr_tests_router_get_my_routerinfo(void)
|
|
||||||
{
|
{
|
||||||
crypto_pk_t* ident_key;
|
|
||||||
crypto_pk_t* tap_key;
|
|
||||||
time_t now;
|
time_t now;
|
||||||
|
|
||||||
if (!mock_routerinfo) {
|
routerinfo_t *mock_routerinfo;
|
||||||
/* Mock the published timestamp, otherwise router_dump_router_to_string()
|
|
||||||
* will poop its pants. */
|
|
||||||
time(&now);
|
|
||||||
|
|
||||||
/* We'll need keys, or router_dump_router_to_string() would return NULL. */
|
/* Mock the published timestamp, otherwise router_dump_router_to_string()
|
||||||
ident_key = pk_generate(0);
|
* will poop its pants. */
|
||||||
tap_key = pk_generate(0);
|
time(&now);
|
||||||
|
|
||||||
tor_assert(ident_key != NULL);
|
/* We'll need keys, or router_dump_router_to_string() would return NULL. */
|
||||||
tor_assert(tap_key != NULL);
|
tor_assert(ident_key != NULL);
|
||||||
|
tor_assert(tap_key != NULL);
|
||||||
|
|
||||||
mock_routerinfo = tor_malloc_zero(sizeof(routerinfo_t));
|
mock_routerinfo = tor_malloc_zero(sizeof(routerinfo_t));
|
||||||
mock_routerinfo->nickname = tor_strdup("ConlonNancarrow");
|
mock_routerinfo->nickname = tor_strdup("ConlonNancarrow");
|
||||||
tor_addr_from_ipv4h(&mock_routerinfo->ipv4_addr, 123456789);
|
tor_addr_from_ipv4h(&mock_routerinfo->ipv4_addr, 123456789);
|
||||||
mock_routerinfo->ipv4_orport = 443;
|
mock_routerinfo->ipv4_orport = 443;
|
||||||
mock_routerinfo->platform = tor_strdup("unittest");
|
mock_routerinfo->platform = tor_strdup("unittest");
|
||||||
mock_routerinfo->cache_info.published_on = now;
|
mock_routerinfo->cache_info.published_on = now;
|
||||||
mock_routerinfo->identity_pkey = crypto_pk_dup_key(ident_key);
|
mock_routerinfo->identity_pkey = crypto_pk_dup_key(ident_key);
|
||||||
router_set_rsa_onion_pkey(tap_key, &mock_routerinfo->onion_pkey,
|
mock_routerinfo->protocol_list =
|
||||||
&mock_routerinfo->onion_pkey_len);
|
tor_strdup("Cons=1-2 Desc=1-2 DirCache=1-2");
|
||||||
mock_routerinfo->bandwidthrate = 9001;
|
router_set_rsa_onion_pkey(tap_key, &mock_routerinfo->onion_pkey,
|
||||||
mock_routerinfo->bandwidthburst = 9002;
|
&mock_routerinfo->onion_pkey_len);
|
||||||
crypto_pk_free(ident_key);
|
mock_routerinfo->bandwidthrate = 9001;
|
||||||
crypto_pk_free(tap_key);
|
mock_routerinfo->bandwidthburst = 9002;
|
||||||
}
|
|
||||||
|
|
||||||
return mock_routerinfo;
|
return mock_routerinfo;
|
||||||
}
|
}
|
||||||
@ -87,12 +78,12 @@ test_router_dump_router_to_string_no_bridge_distribution_method(void *arg)
|
|||||||
routerinfo_t* router = NULL;
|
routerinfo_t* router = NULL;
|
||||||
curve25519_keypair_t ntor_keypair;
|
curve25519_keypair_t ntor_keypair;
|
||||||
ed25519_keypair_t signing_keypair;
|
ed25519_keypair_t signing_keypair;
|
||||||
|
ed25519_keypair_t identity_keypair;
|
||||||
char* desc = NULL;
|
char* desc = NULL;
|
||||||
char* found = NULL;
|
char* found = NULL;
|
||||||
(void)arg;
|
(void)arg;
|
||||||
|
crypto_pk_t *ident_key = pk_generate(0);
|
||||||
MOCK(router_get_my_routerinfo,
|
crypto_pk_t *tap_key = pk_generate(0);
|
||||||
rtr_tests_router_get_my_routerinfo);
|
|
||||||
|
|
||||||
options->ORPort_set = 1;
|
options->ORPort_set = 1;
|
||||||
options->BridgeRelay = 1;
|
options->BridgeRelay = 1;
|
||||||
@ -100,12 +91,21 @@ test_router_dump_router_to_string_no_bridge_distribution_method(void *arg)
|
|||||||
/* Generate keys which router_dump_router_to_string() expects to exist. */
|
/* Generate keys which router_dump_router_to_string() expects to exist. */
|
||||||
tt_int_op(0, OP_EQ, curve25519_keypair_generate(&ntor_keypair, 0));
|
tt_int_op(0, OP_EQ, curve25519_keypair_generate(&ntor_keypair, 0));
|
||||||
tt_int_op(0, OP_EQ, ed25519_keypair_generate(&signing_keypair, 0));
|
tt_int_op(0, OP_EQ, ed25519_keypair_generate(&signing_keypair, 0));
|
||||||
|
tt_int_op(0, OP_EQ, ed25519_keypair_generate(&identity_keypair, 0));
|
||||||
|
|
||||||
/* Set up part of our routerinfo_t so that we don't trigger any other
|
/* Set up part of our routerinfo_t so that we don't trigger any other
|
||||||
* assertions in router_dump_router_to_string(). */
|
* assertions in router_dump_router_to_string(). */
|
||||||
router = (routerinfo_t*)router_get_my_routerinfo();
|
router = rtr_tests_gen_routerinfo(ident_key, tap_key);
|
||||||
tt_ptr_op(router, OP_NE, NULL);
|
tt_ptr_op(router, OP_NE, NULL);
|
||||||
|
|
||||||
|
router->cache_info.signing_key_cert =
|
||||||
|
tor_cert_create_ed25519(&identity_keypair,
|
||||||
|
CERT_TYPE_ID_SIGNING,
|
||||||
|
&signing_keypair.pubkey,
|
||||||
|
time(NULL),
|
||||||
|
86400,
|
||||||
|
CERT_FLAG_INCLUDE_SIGNING_KEY);
|
||||||
|
|
||||||
/* The real router_get_my_routerinfo() looks up onion_curve25519_pkey using
|
/* The real router_get_my_routerinfo() looks up onion_curve25519_pkey using
|
||||||
* get_current_curve25519_keypair(), but we don't initialise static data in
|
* get_current_curve25519_keypair(), but we don't initialise static data in
|
||||||
* this test. */
|
* this test. */
|
||||||
@ -113,22 +113,22 @@ test_router_dump_router_to_string_no_bridge_distribution_method(void *arg)
|
|||||||
|
|
||||||
/* Generate our server descriptor and ensure that the substring
|
/* Generate our server descriptor and ensure that the substring
|
||||||
* "bridge-distribution-request any" occurs somewhere within it. */
|
* "bridge-distribution-request any" occurs somewhere within it. */
|
||||||
crypto_pk_t *onion_pkey = router_get_rsa_onion_pkey(router->onion_pkey,
|
|
||||||
router->onion_pkey_len);
|
|
||||||
desc = router_dump_router_to_string(router,
|
desc = router_dump_router_to_string(router,
|
||||||
router->identity_pkey,
|
ident_key,
|
||||||
onion_pkey,
|
tap_key,
|
||||||
&ntor_keypair,
|
&ntor_keypair,
|
||||||
&signing_keypair);
|
&signing_keypair);
|
||||||
crypto_pk_free(onion_pkey);
|
|
||||||
tt_ptr_op(desc, OP_NE, NULL);
|
tt_ptr_op(desc, OP_NE, NULL);
|
||||||
found = strstr(desc, needle);
|
found = strstr(desc, needle);
|
||||||
tt_ptr_op(found, OP_NE, NULL);
|
tt_ptr_op(found, OP_NE, NULL);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
UNMOCK(router_get_my_routerinfo);
|
if (router)
|
||||||
|
router->onion_curve25519_pkey = NULL; // avoid double-free
|
||||||
|
routerinfo_free(router);
|
||||||
tor_free(desc);
|
tor_free(desc);
|
||||||
|
crypto_pk_free(ident_key);
|
||||||
|
crypto_pk_free(tap_key);
|
||||||
}
|
}
|
||||||
|
|
||||||
static routerinfo_t *mock_router_get_my_routerinfo_result = NULL;
|
static routerinfo_t *mock_router_get_my_routerinfo_result = NULL;
|
||||||
|
@ -52,8 +52,6 @@
|
|||||||
#include "test/test_dir_common.h"
|
#include "test/test_dir_common.h"
|
||||||
#include "test/log_test_helpers.h"
|
#include "test/log_test_helpers.h"
|
||||||
|
|
||||||
void construct_consensus(char **consensus_text_md, time_t now);
|
|
||||||
|
|
||||||
static authority_cert_t *mock_cert;
|
static authority_cert_t *mock_cert;
|
||||||
|
|
||||||
static authority_cert_t *
|
static authority_cert_t *
|
||||||
@ -150,7 +148,7 @@ test_routerlist_launch_descriptor_downloads(void *arg)
|
|||||||
smartlist_free(downloadable);
|
smartlist_free(downloadable);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
construct_consensus(char **consensus_text_md, time_t now)
|
construct_consensus(char **consensus_text_md, time_t now)
|
||||||
{
|
{
|
||||||
networkstatus_t *vote = NULL;
|
networkstatus_t *vote = NULL;
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
/* Not sure where we got this; it appears to be hand-generated and signed.
|
||||||
|
* It's been edited so that the signature doesn't verify any more;
|
||||||
|
* you need to mock check_signature_token for this to work. */
|
||||||
static const char* VOTE_BODY_V3 =
|
static const char* VOTE_BODY_V3 =
|
||||||
"network-status-version 3\n"
|
"network-status-version 3\n"
|
||||||
"vote-status vote\n"
|
"vote-status vote\n"
|
||||||
@ -60,6 +63,7 @@ static const char* VOTE_BODY_V3 =
|
|||||||
"w Bandwidth=30 Measured=30\n"
|
"w Bandwidth=30 Measured=30\n"
|
||||||
"p reject 1-65535\n"
|
"p reject 1-65535\n"
|
||||||
"id ed25519 none\n"
|
"id ed25519 none\n"
|
||||||
|
"pr Cons=1-2 Desc=1-2 DirCache=1-2 FlowCtrl=1 HSDir=1-2 HSIntro=3-5\n"
|
||||||
"m 9,10,11,12,13,14,15,16,17 sha256=xyzajkldsdsajdadlsdjaslsdksdjlsdjsdaskdaaa0\n"
|
"m 9,10,11,12,13,14,15,16,17 sha256=xyzajkldsdsajdadlsdjaslsdksdjlsdjsdaskdaaa0\n"
|
||||||
"r router1 BQUFBQUFBQUFBQUFBQUFBQUFBQU TU1NTU1NTU1NTU1NTU1NTU1NTU0 2015-09-02 19:17:35 153.0.153.1 443 0\n"
|
"r router1 BQUFBQUFBQUFBQUFBQUFBQUFBQU TU1NTU1NTU1NTU1NTU1NTU1NTU0 2015-09-02 19:17:35 153.0.153.1 443 0\n"
|
||||||
"a [1:2:3::4]:4711\n"
|
"a [1:2:3::4]:4711\n"
|
||||||
@ -68,6 +72,7 @@ static const char* VOTE_BODY_V3 =
|
|||||||
"w Bandwidth=120 Measured=120\n"
|
"w Bandwidth=120 Measured=120\n"
|
||||||
"p reject 1-65535\n"
|
"p reject 1-65535\n"
|
||||||
"id ed25519 none\n"
|
"id ed25519 none\n"
|
||||||
|
"pr Cons=1-2 Desc=1-2 DirCache=1-2 FlowCtrl=1 HSDir=1-2 HSIntro=3-5\n"
|
||||||
"m 9,10,11,12,13,14,15,16,17 sha256=xyzajkldsdsajdadlsdjaslsdksdjlsdjsdaskdaaa1\n"
|
"m 9,10,11,12,13,14,15,16,17 sha256=xyzajkldsdsajdadlsdjaslsdksdjlsdjsdaskdaaa1\n"
|
||||||
"r router3 MzMzMzMzMzMzMzMzMzMzMzMzMzM T09PT09PT09PT09PT09PT09PT08 2015-09-02 19:17:35 170.0.153.1 400 9999\n"
|
"r router3 MzMzMzMzMzMzMzMzMzMzMzMzMzM T09PT09PT09PT09PT09PT09PT08 2015-09-02 19:17:35 170.0.153.1 400 9999\n"
|
||||||
"s Authority Exit Fast Guard Running Stable V2Dir Valid\n"
|
"s Authority Exit Fast Guard Running Stable V2Dir Valid\n"
|
||||||
@ -75,6 +80,7 @@ static const char* VOTE_BODY_V3 =
|
|||||||
"w Bandwidth=120\n"
|
"w Bandwidth=120\n"
|
||||||
"p reject 1-65535\n"
|
"p reject 1-65535\n"
|
||||||
"id ed25519 none\n"
|
"id ed25519 none\n"
|
||||||
|
"pr Cons=1-2 Desc=1-2 DirCache=1-2 FlowCtrl=1 HSDir=1-2 HSIntro=3-5\n"
|
||||||
"m 9,10,11,12,13,14,15,16,17 "
|
"m 9,10,11,12,13,14,15,16,17 "
|
||||||
"sha256=xyzajkldsdsajdadlsdjaslsdksdjlsdjsdaskdaaa2\n"
|
"sha256=xyzajkldsdsajdadlsdjaslsdksdjlsdjsdaskdaaa2\n"
|
||||||
"r router4 NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ Ly8vLy8vLy8vLy8vLy8vLy8vLy8 2015-09-02 19:17:35 192.0.2.3 500 1999\n"
|
"r router4 NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ Ly8vLy8vLy8vLy8vLy8vLy8vLy8 2015-09-02 19:17:35 192.0.2.3 500 1999\n"
|
||||||
@ -83,6 +89,7 @@ static const char* VOTE_BODY_V3 =
|
|||||||
"w Bandwidth=30\n"
|
"w Bandwidth=30\n"
|
||||||
"p reject 1-65535\n"
|
"p reject 1-65535\n"
|
||||||
"id ed25519 none\n"
|
"id ed25519 none\n"
|
||||||
|
"pr Cons=1-2 Desc=1-2 DirCache=1-2 FlowCtrl=1 HSDir=1-2 HSIntro=3-5\n"
|
||||||
"m 9,10,11,12,13,14,15,16,17 sha256=xyzajkldsdsajdadlsdjaslsdksdjlsdjsdaskdaaa3\n"
|
"m 9,10,11,12,13,14,15,16,17 sha256=xyzajkldsdsajdadlsdjaslsdksdjlsdjsdaskdaaa3\n"
|
||||||
"directory-footer\n"
|
"directory-footer\n"
|
||||||
"directory-signature D867ACF56A9D229B35C25F0090BC9867E906BE69 CBF56A83368A5150F1A9AAADAFB4D77F8C4170E2\n"
|
"directory-signature D867ACF56A9D229B35C25F0090BC9867E906BE69 CBF56A83368A5150F1A9AAADAFB4D77F8C4170E2\n"
|
||||||
@ -91,4 +98,3 @@ static const char* VOTE_BODY_V3 =
|
|||||||
"TXQWGUq9Z7jdSVnzWT3xqPA4zjw6eZkj+DKUtwq+oEDZGlf8eHTFmr0NAWfwZbk9\n"
|
"TXQWGUq9Z7jdSVnzWT3xqPA4zjw6eZkj+DKUtwq+oEDZGlf8eHTFmr0NAWfwZbk9\n"
|
||||||
"NAjbMTUXUP37N2XAZwkoCWwFCrrfMwXrL7OhZbj7ifo=\n"
|
"NAjbMTUXUP37N2XAZwkoCWwFCrrfMwXrL7OhZbj7ifo=\n"
|
||||||
"-----END SIGNATURE-----\n";
|
"-----END SIGNATURE-----\n";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user