Index: webrtc/base/rtccertificate.cc |
diff --git a/webrtc/base/rtccertificate.cc b/webrtc/base/rtccertificate.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..47b08fd45e6dee2c95818b32f9859f10b03a4117 |
--- /dev/null |
+++ b/webrtc/base/rtccertificate.cc |
@@ -0,0 +1,37 @@ |
+/* |
+ * Copyright 2015 The WebRTC Project Authors. All rights reserved. |
+ * |
+ * Use of this source code is governed by a BSD-style license |
+ * that can be found in the LICENSE file in the root of the source |
+ * tree. An additional intellectual property rights grant can be found |
+ * in the file PATENTS. All contributing project authors may |
+ * be found in the AUTHORS file in the root of the source tree. |
+ */ |
+ |
+#include "webrtc/base/rtccertificate.h" |
+ |
+#include "webrtc/base/checks.h" |
+ |
+namespace rtc { |
+ |
+scoped_refptr<RTCCertificate> RTCCertificate::Create( |
+ scoped_ptr<SSLIdentity> identity) { |
+ return new RefCountedObject<RTCCertificate>(identity.release()); |
+} |
+ |
+RTCCertificate::RTCCertificate(SSLIdentity* identity) |
+ : identity_(identity) { |
+ DCHECK(identity_); |
+} |
+ |
+ |
+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.
|
+ // TODO(hbos): Update once SSLIdentity/SSLCertificate supports expires field. |
+ return 0; |
+} |
+ |
+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
|
+ return identity_->certificate(); |
+} |
+ |
+} // namespace rtc |