OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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 |
OLD | NEW |