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

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

Issue 1701953002: Move SSLIdentity Generate() implementations from .h to .cc file. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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 | « webrtc/base/sslidentity.h ('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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 return OpenSSLCertificate::FromPEMString(pem_string); 158 return OpenSSLCertificate::FromPEMString(pem_string);
159 } 159 }
160 160
161 SSLIdentity* SSLIdentity::Generate(const std::string& common_name, 161 SSLIdentity* SSLIdentity::Generate(const std::string& common_name,
162 const KeyParams& key_params, 162 const KeyParams& key_params,
163 time_t certificate_lifetime) { 163 time_t certificate_lifetime) {
164 return OpenSSLIdentity::Generate(common_name, key_params, 164 return OpenSSLIdentity::Generate(common_name, key_params,
165 certificate_lifetime); 165 certificate_lifetime);
166 } 166 }
167 167
168 SSLIdentity* SSLIdentity::Generate(const std::string& common_name,
tommi 2016/02/16 12:00:17 fyi: typically we tag static methods in the .cc fi
torbjorng (webrtc) 2016/02/16 12:22:46 Done.
169 const KeyParams& key_params) {
170 return OpenSSLIdentity::Generate(common_name, key_params,
tommi 2016/02/16 12:00:17 why call into OpenSSLIdentity here and not the ab
torbjorng (webrtc) 2016/02/16 12:22:46 Mainly to shorten the call chains, but I think the
171 kDefaultCertificateLifetime);
172 }
173
174 SSLIdentity* SSLIdentity::Generate(const std::string& common_name,
175 KeyType key_type) {
176 return OpenSSLIdentity::Generate(common_name, KeyParams(key_type),
177 kDefaultCertificateLifetime);
178 }
hbos 2016/02/16 12:02:18 Suggestion: These should call the three-paramed SS
torbjorng (webrtc) 2016/02/16 12:22:46 Please see above reply.
179
168 SSLIdentity* SSLIdentity::GenerateForTest(const SSLIdentityParams& params) { 180 SSLIdentity* SSLIdentity::GenerateForTest(const SSLIdentityParams& params) {
169 return OpenSSLIdentity::GenerateForTest(params); 181 return OpenSSLIdentity::GenerateForTest(params);
170 } 182 }
171 183
172 SSLIdentity* SSLIdentity::FromPEMStrings(const std::string& private_key, 184 SSLIdentity* SSLIdentity::FromPEMStrings(const std::string& private_key,
173 const std::string& certificate) { 185 const std::string& certificate) {
174 return OpenSSLIdentity::FromPEMStrings(private_key, certificate); 186 return OpenSSLIdentity::FromPEMStrings(private_key, certificate);
175 } 187 }
176 188
177 #else // !SSL_USE_OPENSSL 189 #else // !SSL_USE_OPENSSL
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 256
245 if (bytes_left != 1) { 257 if (bytes_left != 1) {
246 // Now just Z should remain. Its existence was asserted above. 258 // Now just Z should remain. Its existence was asserted above.
247 return -1; 259 return -1;
248 } 260 }
249 261
250 return TmToSeconds(tm); 262 return TmToSeconds(tm);
251 } 263 }
252 264
253 } // namespace rtc 265 } // namespace rtc
OLDNEW
« no previous file with comments | « webrtc/base/sslidentity.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698