| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 GenerateIdentity(rtc::KT_RSA, nullptr); | 115 GenerateIdentity(rtc::KT_RSA, nullptr); |
| 116 } | 116 } |
| 117 } | 117 } |
| 118 | 118 |
| 119 DtlsIdentityStoreImpl::~DtlsIdentityStoreImpl() { | 119 DtlsIdentityStoreImpl::~DtlsIdentityStoreImpl() { |
| 120 RTC_DCHECK(signaling_thread_->IsCurrent()); | 120 RTC_DCHECK(signaling_thread_->IsCurrent()); |
| 121 SignalDestroyed(); | 121 SignalDestroyed(); |
| 122 } | 122 } |
| 123 | 123 |
| 124 void DtlsIdentityStoreImpl::RequestIdentity( | 124 void DtlsIdentityStoreImpl::RequestIdentity( |
| 125 rtc::KeyType key_type, | 125 rtc::KeyParams key_params, |
| 126 const rtc::scoped_refptr<webrtc::DtlsIdentityRequestObserver>& observer) { | 126 rtc::Optional<uint64_t> expires, |
| 127 const rtc::scoped_refptr<DtlsIdentityRequestObserver>& observer) { |
| 127 RTC_DCHECK(signaling_thread_->IsCurrent()); | 128 RTC_DCHECK(signaling_thread_->IsCurrent()); |
| 128 RTC_DCHECK(observer); | 129 RTC_DCHECK(observer); |
| 129 | 130 |
| 130 GenerateIdentity(key_type, observer); | 131 // Dropping parameterization and |expires|. |
| 132 // TODO(hbos,torbjorng): Use parameterizaton/expiration. webrtc:5092. |
| 133 GenerateIdentity(key_params.type(), observer); |
| 131 } | 134 } |
| 132 | 135 |
| 133 void DtlsIdentityStoreImpl::OnMessage(rtc::Message* msg) { | 136 void DtlsIdentityStoreImpl::OnMessage(rtc::Message* msg) { |
| 134 RTC_DCHECK(signaling_thread_->IsCurrent()); | 137 RTC_DCHECK(signaling_thread_->IsCurrent()); |
| 135 switch (msg->message_id) { | 138 switch (msg->message_id) { |
| 136 case MSG_GENERATE_IDENTITY_RESULT: { | 139 case MSG_GENERATE_IDENTITY_RESULT: { |
| 137 rtc::scoped_ptr<IdentityResultMessageData> pdata( | 140 rtc::scoped_ptr<IdentityResultMessageData> pdata( |
| 138 static_cast<IdentityResultMessageData*>(msg->pdata)); | 141 static_cast<IdentityResultMessageData*>(msg->pdata)); |
| 139 OnIdentityGenerated(pdata->data()->key_type_, | 142 OnIdentityGenerated(pdata->data()->key_type_, |
| 140 std::move(pdata->data()->identity_)); | 143 std::move(pdata->data()->identity_)); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 key_type == rtc::KT_RSA && // Only necessary for RSA. | 227 key_type == rtc::KT_RSA && // Only necessary for RSA. |
| 225 !request_info_[key_type].free_identity_.get() && | 228 !request_info_[key_type].free_identity_.get() && |
| 226 request_info_[key_type].request_observers_.size() <= | 229 request_info_[key_type].request_observers_.size() <= |
| 227 request_info_[key_type].gen_in_progress_counts_) { | 230 request_info_[key_type].gen_in_progress_counts_) { |
| 228 GenerateIdentity(key_type, nullptr); | 231 GenerateIdentity(key_type, nullptr); |
| 229 } | 232 } |
| 230 } | 233 } |
| 231 } | 234 } |
| 232 | 235 |
| 233 } // namespace webrtc | 236 } // namespace webrtc |
| OLD | NEW |