| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2013 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 msg_id = MSG_FAILURE; | 150 msg_id = MSG_FAILURE; |
| 151 } else if (key_params.type() == rtc::KT_RSA) { | 151 } else if (key_params.type() == rtc::KT_RSA) { |
| 152 RTC_DCHECK(key_params.rsa_params().mod_size == 1024 && | 152 RTC_DCHECK(key_params.rsa_params().mod_size == 1024 && |
| 153 key_params.rsa_params().pub_exp == 0x10001); | 153 key_params.rsa_params().pub_exp == 0x10001); |
| 154 msg_id = MSG_SUCCESS_RSA; | 154 msg_id = MSG_SUCCESS_RSA; |
| 155 } else { | 155 } else { |
| 156 RTC_DCHECK(key_params.type() == rtc::KT_ECDSA && | 156 RTC_DCHECK(key_params.type() == rtc::KT_ECDSA && |
| 157 key_params.ec_curve() == rtc::EC_NIST_P256); | 157 key_params.ec_curve() == rtc::EC_NIST_P256); |
| 158 msg_id = MSG_SUCCESS_ECDSA; | 158 msg_id = MSG_SUCCESS_ECDSA; |
| 159 } | 159 } |
| 160 rtc::Thread::Current()->Post(this, msg_id, msg); | 160 rtc::Thread::Current()->Post(RTC_FROM_HERE, this, msg_id, msg); |
| 161 } | 161 } |
| 162 | 162 |
| 163 static rtc::scoped_refptr<rtc::RTCCertificate> GenerateCertificate() { | 163 static rtc::scoped_refptr<rtc::RTCCertificate> GenerateCertificate() { |
| 164 switch (rtc::KT_DEFAULT) { | 164 switch (rtc::KT_DEFAULT) { |
| 165 case rtc::KT_RSA: | 165 case rtc::KT_RSA: |
| 166 return rtc::RTCCertificate::FromPEM(kRsaPems[0]); | 166 return rtc::RTCCertificate::FromPEM(kRsaPems[0]); |
| 167 case rtc::KT_ECDSA: | 167 case rtc::KT_ECDSA: |
| 168 return rtc::RTCCertificate::FromPEM(kEcdsaPems[0]); | 168 return rtc::RTCCertificate::FromPEM(kEcdsaPems[0]); |
| 169 default: | 169 default: |
| 170 RTC_NOTREACHED(); | 170 RTC_NOTREACHED(); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 break; | 218 break; |
| 219 } | 219 } |
| 220 delete message_data; | 220 delete message_data; |
| 221 } | 221 } |
| 222 | 222 |
| 223 bool should_fail_; | 223 bool should_fail_; |
| 224 int key_index_ = 0; | 224 int key_index_ = 0; |
| 225 }; | 225 }; |
| 226 | 226 |
| 227 #endif // WEBRTC_API_TEST_FAKERTCCERTIFICATEGENERATOR_H_ | 227 #endif // WEBRTC_API_TEST_FAKERTCCERTIFICATEGENERATOR_H_ |
| OLD | NEW |