mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Regenerate complete failing_routerdescs.inc and adjust tests accordingly.
This commit is contained in:
@@ -70,6 +70,26 @@ i2d_RSAPublicKey.argtypes = [
|
||||
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):
|
||||
buf = ctypes.create_string_buffer(2048)
|
||||
n = RSA_private_encrypt(len(msg), msg, buf, rsa, 1)
|
||||
@@ -354,7 +374,7 @@ def analyze(s):
|
||||
body = s[:idx].rstrip()
|
||||
s = s[idx:]
|
||||
else:
|
||||
body = s
|
||||
body = s.rstrip()
|
||||
s = ""
|
||||
|
||||
yield (fields, body)
|
||||
@@ -374,6 +394,11 @@ def emit_entry(fields, s):
|
||||
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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user