Chromium Code Reviews| 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 152 std::for_each(certs_.begin(), certs_.end(), DeleteCert); | 152 std::for_each(certs_.begin(), certs_.end(), DeleteCert); |
| 153 } | 153 } |
| 154 | 154 |
| 155 #if SSL_USE_OPENSSL | 155 #if SSL_USE_OPENSSL |
| 156 | 156 |
| 157 SSLCertificate* SSLCertificate::FromPEMString(const std::string& pem_string) { | 157 SSLCertificate* SSLCertificate::FromPEMString(const std::string& pem_string) { |
| 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 return OpenSSLIdentity::Generate(common_name, key_params); | 163 time_t certificate_lifetime) { |
| 164 return OpenSSLIdentity::Generate(common_name, key_params, | |
|
hbos
2016/02/12 11:40:12
I think DCHECKing that |certificate_lifetime| is n
torbjorng (webrtc)
2016/02/12 12:58:00
Which means test code cannot generate an expired c
| |
| 165 certificate_lifetime); | |
| 164 } | 166 } |
| 165 | 167 |
| 166 SSLIdentity* SSLIdentity::GenerateForTest(const SSLIdentityParams& params) { | 168 SSLIdentity* SSLIdentity::GenerateForTest(const SSLIdentityParams& params) { |
| 167 return OpenSSLIdentity::GenerateForTest(params); | 169 return OpenSSLIdentity::GenerateForTest(params); |
| 168 } | 170 } |
| 169 | 171 |
| 170 SSLIdentity* SSLIdentity::FromPEMStrings(const std::string& private_key, | 172 SSLIdentity* SSLIdentity::FromPEMStrings(const std::string& private_key, |
| 171 const std::string& certificate) { | 173 const std::string& certificate) { |
| 172 return OpenSSLIdentity::FromPEMStrings(private_key, certificate); | 174 return OpenSSLIdentity::FromPEMStrings(private_key, certificate); |
| 173 } | 175 } |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 242 | 244 |
| 243 if (bytes_left != 1) { | 245 if (bytes_left != 1) { |
| 244 // Now just Z should remain. Its existence was asserted above. | 246 // Now just Z should remain. Its existence was asserted above. |
| 245 return -1; | 247 return -1; |
| 246 } | 248 } |
| 247 | 249 |
| 248 return TmToSeconds(tm); | 250 return TmToSeconds(tm); |
| 249 } | 251 } |
| 250 | 252 |
| 251 } // namespace rtc | 253 } // namespace rtc |
| OLD | NEW |