OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 }; | 91 }; |
92 | 92 |
93 class FakeSSLIdentity : public rtc::SSLIdentity { | 93 class FakeSSLIdentity : public rtc::SSLIdentity { |
94 public: | 94 public: |
95 explicit FakeSSLIdentity(const std::string& data) : cert_(data) {} | 95 explicit FakeSSLIdentity(const std::string& data) : cert_(data) {} |
96 explicit FakeSSLIdentity(const FakeSSLCertificate& cert) : cert_(cert) {} | 96 explicit FakeSSLIdentity(const FakeSSLCertificate& cert) : cert_(cert) {} |
97 virtual FakeSSLIdentity* GetReference() const { | 97 virtual FakeSSLIdentity* GetReference() const { |
98 return new FakeSSLIdentity(*this); | 98 return new FakeSSLIdentity(*this); |
99 } | 99 } |
100 virtual const FakeSSLCertificate& certificate() const { return cert_; } | 100 virtual const FakeSSLCertificate& certificate() const { return cert_; } |
| 101 virtual std::string PrivateKeyToPemString() const { |
| 102 // Not implemented. |
| 103 RTC_NOTREACHED(); |
| 104 return ""; |
| 105 } |
| 106 virtual bool operator==(const SSLIdentity& other) const { |
| 107 // Not implemented. |
| 108 RTC_NOTREACHED(); |
| 109 return false; |
| 110 } |
101 private: | 111 private: |
102 FakeSSLCertificate cert_; | 112 FakeSSLCertificate cert_; |
103 }; | 113 }; |
104 | 114 |
105 } // namespace rtc | 115 } // namespace rtc |
106 | 116 |
107 #endif // WEBRTC_BASE_FAKESSLIDENTITY_H_ | 117 #endif // WEBRTC_BASE_FAKESSLIDENTITY_H_ |
OLD | NEW |