Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Implementing Relay Descriptor verification
cf https://trac.torproject.org/projects/tor/ticket/5810 1) Implemented relay descriptor verification using the python-crypto lib. Code is only run if python-crypto can be imported. [cf stem.prereq.is_crypto_available()] NOTE: constructing a RelayDescriptor will now raise an exception if invalid descriptor content is used. 2) Refactored the digest() function in server_descriptor.py. 3) Added a function to the mocking lib to sign a descriptor with an auto-generated key 4) Add usage of new sign_descriptor_content() in unit tests where necessary. 5) Updated the non-ascii-descriptor file to be correctly signed. 6) Updated extra info descriptor test to use new fingerprint in non-ascii-descriptor file 7) Removed server descriptor tests that do not make sense if data is being generated dynamically. e.g. Removed test fingerprint valid test, since data now dynamically generated.
- Loading branch information
Showing
with
223 additions
and 78 deletions.
- +108 −36 stem/descriptor/server_descriptor.py
- +13 −10 stem/prereq.py
- +7 −7 test/integ/descriptor/data/non-ascii_descriptor
- +2 −2 test/integ/descriptor/server_descriptor.py
- +85 −0 test/mocking.py
- +3 −20 test/unit/descriptor/server_descriptor.py
- +5 −3 test/unit/tutorial.py
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Oops, something went wrong.