[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 11:03:26 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 marek):

 Replying to [comment:7 nickm]:
 > IMO it's okay to remove id_to_fp.c in 0.2.5 if it's not even compiled.

 I've updated the patch.

 > The "return -1" cases need to free the buffer if the buffer is non-NULL.

 Thanks. I got it wrong in one place, but except for that I disagree.
 Although the specific behaviour is undocumented, if I can read the openssl
 sources that's the relevant code:
 https://github.com/majek/openssl/blob/2f58cda4ce45c88f5c1d284eb155cbc9bcf4705f/crypto/asn1/tasn_enc.c#L111

 Which reads: `buf` will only be !=NULL If returned `len` >=0. IE: we don't
 need to free `buf` when `len` is -1.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/5170#comment:8>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list