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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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::KeyParams key_params, | 125 rtc::KeyParams key_params, |
126 rtc::Optional<uint64_t> expires, | 126 const rtc::Optional<uint64_t>& expires_ms, |
127 const rtc::scoped_refptr<DtlsIdentityRequestObserver>& observer) { | 127 const rtc::scoped_refptr<DtlsIdentityRequestObserver>& observer) { |
128 RTC_DCHECK(signaling_thread_->IsCurrent()); | 128 RTC_DCHECK(signaling_thread_->IsCurrent()); |
129 RTC_DCHECK(observer); | 129 RTC_DCHECK(observer); |
130 | 130 |
131 // Dropping parameterization and |expires|. | 131 // Dropping parameterization and |expires_ms|. |
132 // TODO(hbos,torbjorng): Use parameterizaton/expiration. webrtc:5092. | 132 // TODO(hbos,torbjorng): Use parameterizaton/expiration. webrtc:5092. |
133 GenerateIdentity(key_params.type(), observer); | 133 GenerateIdentity(key_params.type(), observer); |
134 } | 134 } |
135 | 135 |
136 void DtlsIdentityStoreImpl::OnMessage(rtc::Message* msg) { | 136 void DtlsIdentityStoreImpl::OnMessage(rtc::Message* msg) { |
137 RTC_DCHECK(signaling_thread_->IsCurrent()); | 137 RTC_DCHECK(signaling_thread_->IsCurrent()); |
138 switch (msg->message_id) { | 138 switch (msg->message_id) { |
139 case MSG_GENERATE_IDENTITY_RESULT: { | 139 case MSG_GENERATE_IDENTITY_RESULT: { |
140 rtc::scoped_ptr<IdentityResultMessageData> pdata( | 140 rtc::scoped_ptr<IdentityResultMessageData> pdata( |
141 static_cast<IdentityResultMessageData*>(msg->pdata)); | 141 static_cast<IdentityResultMessageData*>(msg->pdata)); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 key_type == rtc::KT_RSA && // Only necessary for RSA. | 227 key_type == rtc::KT_RSA && // Only necessary for RSA. |
228 !request_info_[key_type].free_identity_.get() && | 228 !request_info_[key_type].free_identity_.get() && |
229 request_info_[key_type].request_observers_.size() <= | 229 request_info_[key_type].request_observers_.size() <= |
230 request_info_[key_type].gen_in_progress_counts_) { | 230 request_info_[key_type].gen_in_progress_counts_) { |
231 GenerateIdentity(key_type, nullptr); | 231 GenerateIdentity(key_type, nullptr); |
232 } | 232 } |
233 } | 233 } |
234 } | 234 } |
235 | 235 |
236 } // namespace webrtc | 236 } // namespace webrtc |
OLD | NEW |