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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 void WebRtcIdentityRequestObserver::OnSuccess( | 75 void WebRtcIdentityRequestObserver::OnSuccess( |
76 const std::string& der_cert, const std::string& der_private_key) { | 76 const std::string& der_cert, const std::string& der_private_key) { |
77 std::string pem_cert = rtc::SSLIdentity::DerToPem( | 77 std::string pem_cert = rtc::SSLIdentity::DerToPem( |
78 rtc::kPemTypeCertificate, | 78 rtc::kPemTypeCertificate, |
79 reinterpret_cast<const unsigned char*>(der_cert.data()), | 79 reinterpret_cast<const unsigned char*>(der_cert.data()), |
80 der_cert.length()); | 80 der_cert.length()); |
81 std::string pem_key = rtc::SSLIdentity::DerToPem( | 81 std::string pem_key = rtc::SSLIdentity::DerToPem( |
82 rtc::kPemTypeRsaPrivateKey, | 82 rtc::kPemTypeRsaPrivateKey, |
83 reinterpret_cast<const unsigned char*>(der_private_key.data()), | 83 reinterpret_cast<const unsigned char*>(der_private_key.data()), |
84 der_private_key.length()); | 84 der_private_key.length()); |
85 rtc::scoped_ptr<rtc::SSLIdentity> identity( | 85 std::unique_ptr<rtc::SSLIdentity> identity( |
86 rtc::SSLIdentity::FromPEMStrings(pem_key, pem_cert)); | 86 rtc::SSLIdentity::FromPEMStrings(pem_key, pem_cert)); |
87 SignalCertificateReady(rtc::RTCCertificate::Create(std::move(identity))); | 87 SignalCertificateReady(rtc::RTCCertificate::Create(std::move(identity))); |
88 } | 88 } |
89 | 89 |
90 void WebRtcIdentityRequestObserver::OnSuccess( | 90 void WebRtcIdentityRequestObserver::OnSuccess( |
91 rtc::scoped_ptr<rtc::SSLIdentity> identity) { | 91 std::unique_ptr<rtc::SSLIdentity> identity) { |
92 SignalCertificateReady(rtc::RTCCertificate::Create(std::move(identity))); | 92 SignalCertificateReady(rtc::RTCCertificate::Create(std::move(identity))); |
93 } | 93 } |
94 | 94 |
95 // static | 95 // static |
96 void WebRtcSessionDescriptionFactory::CopyCandidatesFromSessionDescription( | 96 void WebRtcSessionDescriptionFactory::CopyCandidatesFromSessionDescription( |
97 const SessionDescriptionInterface* source_desc, | 97 const SessionDescriptionInterface* source_desc, |
98 const std::string& content_name, | 98 const std::string& content_name, |
99 SessionDescriptionInterface* dest_desc) { | 99 SessionDescriptionInterface* dest_desc) { |
100 if (!source_desc) { | 100 if (!source_desc) { |
101 return; | 101 return; |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 if (create_session_description_requests_.front().type == | 512 if (create_session_description_requests_.front().type == |
513 CreateSessionDescriptionRequest::kOffer) { | 513 CreateSessionDescriptionRequest::kOffer) { |
514 InternalCreateOffer(create_session_description_requests_.front()); | 514 InternalCreateOffer(create_session_description_requests_.front()); |
515 } else { | 515 } else { |
516 InternalCreateAnswer(create_session_description_requests_.front()); | 516 InternalCreateAnswer(create_session_description_requests_.front()); |
517 } | 517 } |
518 create_session_description_requests_.pop(); | 518 create_session_description_requests_.pop(); |
519 } | 519 } |
520 } | 520 } |
521 } // namespace webrtc | 521 } // namespace webrtc |
OLD | NEW |