[tor-bugs] #21420 [- Select a component]: Link certificate start date in the future

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Feb 8 22:16:10 UTC 2017


#21420: Link certificate start date in the future
--------------------------------------+-----------------
     Reporter:  mmcloughlin           |      Owner:
         Type:  defect                |     Status:  new
     Priority:  Medium                |  Milestone:
    Component:  - Select a component  |    Version:
     Severity:  Normal                |   Keywords:
Actual Points:                        |  Parent ID:
       Points:                        |   Reviewer:
      Sponsor:                        |
--------------------------------------+-----------------
 Some link certificates are generated with start dates in the future. Is
 this intentional, or a bug?

 These lines of code generate a start date for the link certificate. Why
 does this add two days?

 https://github.com/torproject/tor/blob/9a9f4ffdfa965e50de05a4f1bd8c4d68cfb95f12/src/common/tortls.c#L481-L487

 I confirmed this happens in the wild. This code connects to tor relays and
 inspects the link certificate. (Not beautiful code but it does the job.)

 https://github.com/mmcloughlin/torcerts

 It doesn't take too long to find an example. One I found just now:

 {{{
 addr=117.201.240.2:9001
 now=Wed Feb  8 22:05:15 UTC 2017
 notBefore=Feb 10 00:00:00 2017 GMT
 -----BEGIN CERTIFICATE-----
 MIIBtzCCASCgAwIBAgIJAOqgI76M4OOKMA0GCSqGSIb3DQEBBQUAMBsxGTAXBgNV
 BAMMEHd3dy5iamdpN2d0dS5jb20wHhcNMTcwMjEwMDAwMDAwWhcNMTcwMjE2MjM1
 OTU5WjAgMR4wHAYDVQQDDBV3d3cuM242bWNvaWp6Z3Jzai5uZXQwgZ8wDQYJKoZI
 hvcNAQEBBQADgY0AMIGJAoGBAKRkfrD4q5HNIkE9lglJjljlZoT15OE3VDE66GYT
 hZ/FsCMtGPw1TKj+EB6NyjEYSxP7+EgJOOVGzxb3ybmEs8wJSbVhue8NeavbgcVY
 X3UcVyPMFLSDGBKhOADrHztyznMRzDkmMx83OtJH5QpNZvNcMVP0H1QHCFB/YJMY
 iIVnAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAvPVq5VcF/s9TCknZaxzDNHT/c0SQ
 4UKQ0y1iZbMJeWlYeMqU3o1NwGnvJ7PEeVo+Cpst0A6accbStYpiXuhuuaFGcpFl
 ZJWMlMpr5GSK9uxrxwa82M69hukW4eVP4o7rZARN0o5/ilNLmy3r/vJkvFPNX5us
 80t7Euud8VkyVJU=
 -----END CERTIFICATE-----
 }}}

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


More information about the tor-bugs mailing list