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

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

Issue 1844313002: Rename some things SSL for style guide adherence (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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
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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 } 149 }
150 150
151 #if SSL_USE_OPENSSL 151 #if SSL_USE_OPENSSL
152 152
153 // static 153 // static
154 SSLCertificate* SSLCertificate::FromPEMString(const std::string& pem_string) { 154 SSLCertificate* SSLCertificate::FromPEMString(const std::string& pem_string) {
155 return OpenSSLCertificate::FromPEMString(pem_string); 155 return OpenSSLCertificate::FromPEMString(pem_string);
156 } 156 }
157 157
158 // static 158 // static
159 SSLIdentity* SSLIdentity::Generate(const std::string& common_name, 159 SSLIdentity* SSLIdentity::GenerateWithExpiration(const std::string& common_name,
160 const KeyParams& key_params, 160 const KeyParams& key_params,
161 time_t certificate_lifetime) { 161 time_t certificate_lifetime) {
162 return OpenSSLIdentity::Generate(common_name, key_params, 162 return OpenSSLIdentity::GenerateWithExpiration(common_name, key_params,
163 certificate_lifetime); 163 certificate_lifetime);
164 } 164 }
165 165
166 // static 166 // static
167 SSLIdentity* SSLIdentity::Generate(const std::string& common_name, 167 SSLIdentity* SSLIdentity::Generate(const std::string& common_name,
168 const KeyParams& key_params) { 168 const KeyParams& key_params) {
169 return OpenSSLIdentity::Generate(common_name, key_params, 169 return OpenSSLIdentity::GenerateWithExpiration(
170 kDefaultCertificateLifetime); 170 common_name, key_params, kDefaultCertificateLifetimeInSeconds);
171 } 171 }
172 172
173 // static 173 // static
174 SSLIdentity* SSLIdentity::Generate(const std::string& common_name, 174 SSLIdentity* SSLIdentity::Generate(const std::string& common_name,
175 KeyType key_type) { 175 KeyType key_type) {
176 return OpenSSLIdentity::Generate(common_name, KeyParams(key_type), 176 return OpenSSLIdentity::GenerateWithExpiration(
177 kDefaultCertificateLifetime); 177 common_name, KeyParams(key_type), kDefaultCertificateLifetimeInSeconds);
178 } 178 }
179 179
180 SSLIdentity* SSLIdentity::GenerateForTest(const SSLIdentityParams& params) { 180 SSLIdentity* SSLIdentity::GenerateForTest(const SSLIdentityParams& params) {
181 return OpenSSLIdentity::GenerateForTest(params); 181 return OpenSSLIdentity::GenerateForTest(params);
182 } 182 }
183 183
184 // static 184 // static
185 SSLIdentity* SSLIdentity::FromPEMStrings(const std::string& private_key, 185 SSLIdentity* SSLIdentity::FromPEMStrings(const std::string& private_key,
186 const std::string& certificate) { 186 const std::string& certificate) {
187 return OpenSSLIdentity::FromPEMStrings(private_key, certificate); 187 return OpenSSLIdentity::FromPEMStrings(private_key, certificate);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 257
258 if (bytes_left != 1) { 258 if (bytes_left != 1) {
259 // Now just Z should remain. Its existence was asserted above. 259 // Now just Z should remain. Its existence was asserted above.
260 return -1; 260 return -1;
261 } 261 }
262 262
263 return TmToSeconds(tm); 263 return TmToSeconds(tm);
264 } 264 }
265 265
266 } // namespace rtc 266 } // namespace rtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698