[tor-bugs] #5170 [Tor]: crypto_pk_get_digest (et al.?) use i2d_RSAPublicKey obsoletely
Tor Bug Tracker & Wiki
blackhole at torproject.org
Thu Jun 6 18:13:33 UTC 2013
#5170: crypto_pk_get_digest (et al.?) use i2d_RSAPublicKey obsoletely
-----------------------------+----------------------------------------------
Reporter: rransom | Owner:
Type: defect | Status: needs_revision
Priority: trivial | Milestone: Tor: 0.2.5.x-final
Component: Tor | Version:
Keywords: easy tor-client | Parent:
Points: | Actualpoints:
-----------------------------+----------------------------------------------
Comment(by nickm):
crypto_pk_get_all_digests should be simple to write a test for: just add
one to src/test/test_crypto.c that takes a pregenerated key (you can use
the one encoded as AUTHORITY_SIGNKEY_1, or include another one as a static
string) and compares the output to a known-good values.
It should also be not too hard to write pkey_eq similarly -- for those,
you don't even need canned public keys. (If you want, you can rename it
and expose it, or use the "#ifdef FILENAME_PRIVATE" trick we do elsewhere
to make the identifier exposed for testing only.
tor_cert_new() will have the same static-function issue. For
crypto_store_dynamic_dh_modulus, the trick will be getting a filename --
in the unit tests, we do temporary filenames with the "get_fname()"
function.
Let me know if you have any other questions there
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/5170#comment:10>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list