Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(614)

Side by Side Diff: webrtc/base/sslidentity.h

Issue 1288033009: RTCCertificates added to RTCConfiguration, used by WebRtcSession/-DescriptionFactory (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed torbjorng's comment and merged with master Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « talk/app/webrtc/webrtcsessiondescriptionfactory.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
139 // Construct an identity from a private key and a certificate. 139 // Construct an identity from a private key and a certificate.
140 static SSLIdentity* FromPEMStrings(const std::string& private_key, 140 static SSLIdentity* FromPEMStrings(const std::string& private_key,
141 const std::string& certificate); 141 const std::string& certificate);
142 142
143 virtual ~SSLIdentity() {} 143 virtual ~SSLIdentity() {}
144 144
145 // Returns a new SSLIdentity object instance wrapping the same 145 // Returns a new SSLIdentity object instance wrapping the same
146 // identity information. 146 // identity information.
147 // Caller is responsible for freeing the returned object. 147 // Caller is responsible for freeing the returned object.
148 // TODO(hbos,torbjorng): Rename to a less confusing name.
148 virtual SSLIdentity* GetReference() const = 0; 149 virtual SSLIdentity* GetReference() const = 0;
149 150
150 // Returns a temporary reference to the certificate. 151 // Returns a temporary reference to the certificate.
151 virtual const SSLCertificate& certificate() const = 0; 152 virtual const SSLCertificate& certificate() const = 0;
152 153
153 // Helpers for parsing converting between PEM and DER format. 154 // Helpers for parsing converting between PEM and DER format.
154 static bool PemToDer(const std::string& pem_type, 155 static bool PemToDer(const std::string& pem_type,
155 const std::string& pem_string, 156 const std::string& pem_string,
156 std::string* der); 157 std::string* der);
157 static std::string DerToPem(const std::string& pem_type, 158 static std::string DerToPem(const std::string& pem_type,
158 const unsigned char* data, 159 const unsigned char* data,
159 size_t length); 160 size_t length);
160 }; 161 };
161 162
162 extern const char kPemTypeCertificate[]; 163 extern const char kPemTypeCertificate[];
163 extern const char kPemTypeRsaPrivateKey[]; 164 extern const char kPemTypeRsaPrivateKey[];
164 extern const char kPemTypeEcPrivateKey[]; 165 extern const char kPemTypeEcPrivateKey[];
165 166
166 } // namespace rtc 167 } // namespace rtc
167 168
168 #endif // WEBRTC_BASE_SSLIDENTITY_H_ 169 #endif // WEBRTC_BASE_SSLIDENTITY_H_
OLDNEW
« no previous file with comments | « talk/app/webrtc/webrtcsessiondescriptionfactory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698