commit | 46c9cc01901ecd3af0191872f9660b710d5fe757 | [log] [tgz] |
---|---|---|
author | Torbjorn Granlund <torbjorng@google.com> | Tue Dec 01 13:06:34 2015 +0100 |
committer | Torbjorn Granlund <torbjorng@google.com> | Tue Dec 01 12:06:46 2015 +0000 |
tree | ccd8652bbff445d0ac6a8bc1f9de492c8b0c8e7a | |
parent | ea07373a2eb46f2732a8b5acef06a9b5078f37f8 [diff] |
Provide method for returning certificate expiration time stamp. We convert ASN1 time via std::tm to int64_t representing milliseconds-since-epoch. We do not use time_t since that cannot store milliseconds, and expires for 32-bit platforms in 2038 also for seconds. Conversion via std::tm might might seem silly, but actually doesn't add any complexity. One would expect tm -> seconds-since-epoch to already exist on the standard library. There is mktime, but it uses localtime (and sets an environment variable, and has the 2038 problem). The ASN1 TIME parsing is limited to what is required by RFC 5280. BUG=webrtc:5150 R=hbos@webrtc.org, nisse@webrtc.org, tommi@webrtc.org Review URL: https://codereview.webrtc.org/1468273004 . Cr-Commit-Position: refs/heads/master@{#10854}
WebRTC is a free, open software project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. The WebRTC components have been optimized to best serve this purpose.
Our mission: To enable rich, high-quality RTC applications to be developed for the browser, mobile platforms, and IoT devices, and allow them all to communicate via a common set of protocols.
The WebRTC initiative is a project supported by Google, Mozilla and Opera, amongst others. This page is maintained by the Google Chrome team.
See http://www.webrtc.org/native-code/development for instructions on how to get started developing with the native code.