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

Side by Side Diff: talk/app/webrtc/dtlsidentitystore.cc

Issue 1329493005: Provide RSA2048 as per RFC (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Allow full parameterization of RSA, curve id for ECDSA. Created 5 years, 2 months 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 * libjingle 2 * libjingle
3 * Copyright 2015 Google Inc. 3 * Copyright 2015 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 key_type_(key_type) { 60 key_type_(key_type) {
61 store_->SignalDestroyed.connect(this, &WorkerTask::OnStoreDestroyed); 61 store_->SignalDestroyed.connect(this, &WorkerTask::OnStoreDestroyed);
62 } 62 }
63 63
64 virtual ~WorkerTask() { RTC_DCHECK(signaling_thread_->IsCurrent()); } 64 virtual ~WorkerTask() { RTC_DCHECK(signaling_thread_->IsCurrent()); }
65 65
66 private: 66 private:
67 void GenerateIdentity_w() { 67 void GenerateIdentity_w() {
68 LOG(LS_INFO) << "Generating identity, using keytype " << key_type_; 68 LOG(LS_INFO) << "Generating identity, using keytype " << key_type_;
69 rtc::scoped_ptr<rtc::SSLIdentity> identity( 69 rtc::scoped_ptr<rtc::SSLIdentity> identity(
70 rtc::SSLIdentity::Generate(kIdentityName, key_type_)); 70 rtc::SSLIdentity::Generate(kIdentityName, rtc::KeyTypeFull(key_type_)));
71 71
72 // Posting to |this| avoids touching |store_| on threads other than 72 // Posting to |this| avoids touching |store_| on threads other than
73 // |signaling_thread_| and thus avoids having to use locks. 73 // |signaling_thread_| and thus avoids having to use locks.
74 IdentityResultMessageData* msg = new IdentityResultMessageData( 74 IdentityResultMessageData* msg = new IdentityResultMessageData(
75 new IdentityResult(key_type_, identity.Pass())); 75 new IdentityResult(key_type_, identity.Pass()));
76 signaling_thread_->Post(this, MSG_GENERATE_IDENTITY_RESULT, msg); 76 signaling_thread_->Post(this, MSG_GENERATE_IDENTITY_RESULT, msg);
77 } 77 }
78 78
79 void OnMessage(rtc::Message* msg) override { 79 void OnMessage(rtc::Message* msg) override {
80 switch (msg->message_id) { 80 switch (msg->message_id) {
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 key_type == rtc::KT_RSA && // Only necessary for RSA. 239 key_type == rtc::KT_RSA && // Only necessary for RSA.
240 !request_info_[key_type].free_identity_.get() && 240 !request_info_[key_type].free_identity_.get() &&
241 request_info_[key_type].request_observers_.size() <= 241 request_info_[key_type].request_observers_.size() <=
242 request_info_[key_type].gen_in_progress_counts_) { 242 request_info_[key_type].gen_in_progress_counts_) {
243 GenerateIdentity(key_type, nullptr); 243 GenerateIdentity(key_type, nullptr);
244 } 244 }
245 } 245 }
246 } 246 }
247 247
248 } // namespace webrtc 248 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | talk/app/webrtc/java/jni/peerconnection_jni.cc » ('j') | talk/app/webrtc/webrtcsession_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698