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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 }; | 92 }; |
93 | 93 |
94 class FakeSSLIdentity : public rtc::SSLIdentity { | 94 class FakeSSLIdentity : public rtc::SSLIdentity { |
95 public: | 95 public: |
96 explicit FakeSSLIdentity(const std::string& data) : cert_(data) {} | 96 explicit FakeSSLIdentity(const std::string& data) : cert_(data) {} |
97 explicit FakeSSLIdentity(const FakeSSLCertificate& cert) : cert_(cert) {} | 97 explicit FakeSSLIdentity(const FakeSSLCertificate& cert) : cert_(cert) {} |
98 virtual FakeSSLIdentity* GetReference() const { | 98 virtual FakeSSLIdentity* GetReference() const { |
99 return new FakeSSLIdentity(*this); | 99 return new FakeSSLIdentity(*this); |
100 } | 100 } |
101 virtual const FakeSSLCertificate& certificate() const { return cert_; } | 101 virtual const FakeSSLCertificate& certificate() const { return cert_; } |
| 102 virtual std::string PrivateKeyToPEMString() const { |
| 103 RTC_NOTREACHED(); // Not implemented. |
| 104 return ""; |
| 105 } |
| 106 virtual std::string PublicKeyToPEMString() const { |
| 107 RTC_NOTREACHED(); // Not implemented. |
| 108 return ""; |
| 109 } |
| 110 virtual bool operator==(const SSLIdentity& other) const { |
| 111 RTC_NOTREACHED(); // Not implemented. |
| 112 return false; |
| 113 } |
102 private: | 114 private: |
103 FakeSSLCertificate cert_; | 115 FakeSSLCertificate cert_; |
104 }; | 116 }; |
105 | 117 |
106 } // namespace rtc | 118 } // namespace rtc |
107 | 119 |
108 #endif // WEBRTC_BASE_FAKESSLIDENTITY_H_ | 120 #endif // WEBRTC_BASE_FAKESSLIDENTITY_H_ |
OLD | NEW |