Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright 2015 The WebRTC Project Authors. All rights reserved. | |
| 3 * | |
| 4 * Use of this source code is governed by a BSD-style license | |
| 5 * that can be found in the LICENSE file in the root of the source | |
| 6 * tree. An additional intellectual property rights grant can be found | |
| 7 * in the file PATENTS. All contributing project authors may | |
| 8 * be found in the AUTHORS file in the root of the source tree. | |
| 9 */ | |
| 10 | |
| 11 #include "webrtc/base/rtccertificate.h" | |
| 12 | |
| 13 #include "webrtc/base/checks.h" | |
| 14 | |
| 15 namespace rtc { | |
| 16 | |
| 17 scoped_refptr<RTCCertificate> RTCCertificate::Create( | |
| 18 scoped_ptr<SSLIdentity> identity) { | |
| 19 return new RefCountedObject<RTCCertificate>(identity.release()); | |
| 20 } | |
| 21 | |
| 22 RTCCertificate::RTCCertificate(SSLIdentity* identity) | |
| 23 : identity_(identity) { | |
| 24 DCHECK(identity_); | |
| 25 } | |
| 26 | |
| 27 | |
| 28 uint64 RTCCertificate::expires_ns() const { | |
|
torbjorng (webrtc)
2015/08/19 15:23:19
Is "ns" here for nanoseconds? I believe a saved ex
hbos
2015/08/19 16:04:32
Yes ns for nanoseconds, but meant as a timestamp.
| |
| 29 // TODO(hbos): Update once SSLIdentity/SSLCertificate supports expires field. | |
| 30 return 0; | |
| 31 } | |
| 32 | |
| 33 const SSLCertificate& RTCCertificate::ssl_certificate() const { | |
|
torbjorng (webrtc)
2015/08/19 15:23:19
I suspect (but haven't checked) that we'd need acc
hbos
2015/08/19 16:04:32
Agreed.
The keypair would be an implementation-sp
| |
| 34 return identity_->certificate(); | |
| 35 } | |
| 36 | |
| 37 } // namespace rtc | |
| OLD | NEW |