| Index: webrtc/base/rtccertificate.cc
|
| diff --git a/webrtc/base/rtccertificate.cc b/webrtc/base/rtccertificate.cc
|
| index 7b764bd72e66faa2a63afb49894f61414ca15d08..a176d9080b2cc02dacced71778f453d88b81a414 100644
|
| --- a/webrtc/base/rtccertificate.cc
|
| +++ b/webrtc/base/rtccertificate.cc
|
| @@ -11,6 +11,7 @@
|
| #include "webrtc/base/rtccertificate.h"
|
|
|
| #include "webrtc/base/checks.h"
|
| +#include "webrtc/base/timeutils.h"
|
|
|
| namespace rtc {
|
|
|
| @@ -27,16 +28,13 @@
|
| RTCCertificate::~RTCCertificate() {
|
| }
|
|
|
| -uint64_t RTCCertificate::Expires() const {
|
| - int64_t expires = ssl_certificate().CertificateExpirationTime();
|
| - if (expires != -1)
|
| - return static_cast<uint64_t>(expires) * kNumMillisecsPerSec;
|
| - // If the expiration time could not be retrieved return an expired timestamp.
|
| - return 0; // = 1970-01-01
|
| +uint64_t RTCCertificate::expires_timestamp_ns() const {
|
| + // TODO(hbos): Update once SSLIdentity/SSLCertificate supports expires field.
|
| + return 0;
|
| }
|
|
|
| -bool RTCCertificate::HasExpired(uint64_t now) const {
|
| - return Expires() <= now;
|
| +bool RTCCertificate::HasExpired() const {
|
| + return expires_timestamp_ns() <= TimeNanos();
|
| }
|
|
|
| const SSLCertificate& RTCCertificate::ssl_certificate() const {
|
|
|