[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [stem/master] Support signing server descriptors
commit 9a947c6f9aa7951f977dca2731353d564cb72381
Merge: 496d190 a41767c
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Tue Jun 20 09:03:46 2017 -0700
Support signing server descriptors
Fuck yeah, got it! Signing server descriptors we create.
Leekspin uses PyCrypto which is deprecated [1], so wasn't able to take
advantage of it as much as I hoped. On the upside cryptography is simpler than
what Isis had.
There was one rough bit though - cryptography embeds a constant indicating the
hashing algorithm it signs with. This required us to hack out part of its
internals. Hopefully upstream is amenable to adding a flag for this.
Thus far we only sign server descriptors. Gonna follow this up with other
descriptor types Leekspin supports so we can migrate BridgeDB's tests to use
this.
[1] https://github.com/dlitz/pycrypto/issues/173
stem/descriptor/__init__.py | 32 +++++++++++----
stem/descriptor/extrainfo_descriptor.py | 8 ++--
stem/descriptor/hidden_service_descriptor.py | 8 ++--
stem/descriptor/microdescriptor.py | 4 +-
stem/descriptor/networkstatus.py | 24 ++++++------
stem/descriptor/router_status_entry.py | 12 +++---
stem/descriptor/server_descriptor.py | 58 +++++++++++++++++++++++++---
stem/util/str_tools.py | 18 +++++++++
test/unit/descriptor/server_descriptor.py | 5 +++
test/unit/doctest.py | 1 +
test/unit/util/str_tools.py | 8 ++++
11 files changed, 136 insertions(+), 42 deletions(-)
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits