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

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

Issue 1468273004: Provide method for returning certificate expiration timestamp. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Misc fixes. Created 5 years 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 2011 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2011 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 290
291 client_ssl_.reset(rtc::SSLStreamAdapter::Create(client_stream_)); 291 client_ssl_.reset(rtc::SSLStreamAdapter::Create(client_stream_));
292 server_ssl_.reset(rtc::SSLStreamAdapter::Create(server_stream_)); 292 server_ssl_.reset(rtc::SSLStreamAdapter::Create(server_stream_));
293 293
294 client_ssl_->SignalEvent.connect(this, &SSLStreamAdapterTestBase::OnEvent); 294 client_ssl_->SignalEvent.connect(this, &SSLStreamAdapterTestBase::OnEvent);
295 server_ssl_->SignalEvent.connect(this, &SSLStreamAdapterTestBase::OnEvent); 295 server_ssl_->SignalEvent.connect(this, &SSLStreamAdapterTestBase::OnEvent);
296 296
297 rtc::SSLIdentityParams client_params; 297 rtc::SSLIdentityParams client_params;
298 client_params.key_params = rtc::KeyParams(rtc::KT_DEFAULT); 298 client_params.key_params = rtc::KeyParams(rtc::KT_DEFAULT);
299 client_params.common_name = "client"; 299 client_params.common_name = "client";
300 client_params.absolute_time = false;
300 client_params.not_before = not_before; 301 client_params.not_before = not_before;
301 client_params.not_after = not_after; 302 client_params.not_after = not_after;
302 client_identity_ = rtc::SSLIdentity::GenerateForTest(client_params); 303 client_identity_ = rtc::SSLIdentity::GenerateForTest(client_params);
303 304
304 rtc::SSLIdentityParams server_params; 305 rtc::SSLIdentityParams server_params;
305 server_params.key_params = rtc::KeyParams(rtc::KT_DEFAULT); 306 server_params.key_params = rtc::KeyParams(rtc::KT_DEFAULT);
306 server_params.common_name = "server"; 307 server_params.common_name = "server";
308 server_params.absolute_time = false;
307 server_params.not_before = not_before; 309 server_params.not_before = not_before;
308 server_params.not_after = not_after; 310 server_params.not_after = not_after;
309 server_identity_ = rtc::SSLIdentity::GenerateForTest(server_params); 311 server_identity_ = rtc::SSLIdentity::GenerateForTest(server_params);
310 312
311 client_ssl_->SetIdentity(client_identity_); 313 client_ssl_->SetIdentity(client_identity_);
312 server_ssl_->SetIdentity(server_identity_); 314 server_ssl_->SetIdentity(server_identity_);
313 } 315 }
314 316
315 virtual void OnEvent(rtc::StreamInterface *stream, int sig, int err) { 317 virtual void OnEvent(rtc::StreamInterface *stream, int sig, int err) {
316 LOG(LS_INFO) << "SSLStreamAdapterTestBase::OnEvent sig=" << sig; 318 LOG(LS_INFO) << "SSLStreamAdapterTestBase::OnEvent sig=" << sig;
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 rtc::KeyParams::ECDSA(rtc::EC_NIST_P256)))); 1153 rtc::KeyParams::ECDSA(rtc::EC_NIST_P256))));
1152 INSTANTIATE_TEST_CASE_P( 1154 INSTANTIATE_TEST_CASE_P(
1153 SSLStreamAdapterTestsDTLS, 1155 SSLStreamAdapterTestsDTLS,
1154 SSLStreamAdapterTestDTLS, 1156 SSLStreamAdapterTestDTLS,
1155 Combine(Values(rtc::KeyParams::RSA(1024, 65537), 1157 Combine(Values(rtc::KeyParams::RSA(1024, 65537),
1156 rtc::KeyParams::RSA(1152, 65537), 1158 rtc::KeyParams::RSA(1152, 65537),
1157 rtc::KeyParams::ECDSA(rtc::EC_NIST_P256)), 1159 rtc::KeyParams::ECDSA(rtc::EC_NIST_P256)),
1158 Values(rtc::KeyParams::RSA(1024, 65537), 1160 Values(rtc::KeyParams::RSA(1024, 65537),
1159 rtc::KeyParams::RSA(1152, 65537), 1161 rtc::KeyParams::RSA(1152, 65537),
1160 rtc::KeyParams::ECDSA(rtc::EC_NIST_P256)))); 1162 rtc::KeyParams::ECDSA(rtc::EC_NIST_P256))));
OLDNEW
« webrtc/base/sslidentity.h ('K') | « webrtc/base/sslidentity_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698