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

Side by Side Diff: webrtc/p2p/base/transportchannel.h

Issue 1269843005: Added DtlsCertificate, a ref counted object owning an SSLIdentity (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Merge with master Created 5 years, 4 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 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 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
11 #ifndef WEBRTC_P2P_BASE_TRANSPORTCHANNEL_H_ 11 #ifndef WEBRTC_P2P_BASE_TRANSPORTCHANNEL_H_
12 #define WEBRTC_P2P_BASE_TRANSPORTCHANNEL_H_ 12 #define WEBRTC_P2P_BASE_TRANSPORTCHANNEL_H_
13 13
14 #include <string> 14 #include <string>
15 #include <vector> 15 #include <vector>
16 16
17 #include "talk/app/webrtc/dtlscertificate.h"
17 #include "webrtc/p2p/base/candidate.h" 18 #include "webrtc/p2p/base/candidate.h"
18 #include "webrtc/p2p/base/transport.h" 19 #include "webrtc/p2p/base/transport.h"
19 #include "webrtc/p2p/base/transportdescription.h" 20 #include "webrtc/p2p/base/transportdescription.h"
20 #include "webrtc/base/asyncpacketsocket.h" 21 #include "webrtc/base/asyncpacketsocket.h"
21 #include "webrtc/base/basictypes.h" 22 #include "webrtc/base/basictypes.h"
22 #include "webrtc/base/dscp.h" 23 #include "webrtc/base/dscp.h"
23 #include "webrtc/base/sigslot.h" 24 #include "webrtc/base/sigslot.h"
24 #include "webrtc/base/socket.h" 25 #include "webrtc/base/socket.h"
25 #include "webrtc/base/sslidentity.h"
26 #include "webrtc/base/sslstreamadapter.h" 26 #include "webrtc/base/sslstreamadapter.h"
27 27
28 namespace cricket { 28 namespace cricket {
29 29
30 class Candidate; 30 class Candidate;
31 31
32 // Flags for SendPacket/SignalReadPacket. 32 // Flags for SendPacket/SignalReadPacket.
33 enum PacketFlags { 33 enum PacketFlags {
34 PF_NORMAL = 0x00, // A normal packet. 34 PF_NORMAL = 0x00, // A normal packet.
35 PF_SRTP_BYPASS = 0x01, // An encrypted SRTP packet; bypass any additional 35 PF_SRTP_BYPASS = 0x01, // An encrypted SRTP packet; bypass any additional
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 // Sets up the ciphers to use for DTLS-SRTP. 102 // Sets up the ciphers to use for DTLS-SRTP.
103 virtual bool SetSrtpCiphers(const std::vector<std::string>& ciphers) = 0; 103 virtual bool SetSrtpCiphers(const std::vector<std::string>& ciphers) = 0;
104 104
105 // Finds out which DTLS-SRTP cipher was negotiated. 105 // Finds out which DTLS-SRTP cipher was negotiated.
106 virtual bool GetSrtpCipher(std::string* cipher) = 0; 106 virtual bool GetSrtpCipher(std::string* cipher) = 0;
107 107
108 // Finds out which DTLS cipher was negotiated. 108 // Finds out which DTLS cipher was negotiated.
109 virtual bool GetSslCipher(std::string* cipher) = 0; 109 virtual bool GetSslCipher(std::string* cipher) = 0;
110 110
111 // Gets a copy of the local SSL identity, owned by the caller. 111 // Gets a a reference to the local DtlsCertificate.
112 virtual bool GetLocalIdentity(rtc::SSLIdentity** identity) const = 0; 112 virtual bool GetLocalCertificate(
113 rtc::scoped_refptr<webrtc::DtlsCertificate>* certificate) const = 0;
113 114
114 // Gets a copy of the remote side's SSL certificate, owned by the caller. 115 // Gets a copy of the remote side's SSL certificate, owned by the caller.
115 virtual bool GetRemoteCertificate(rtc::SSLCertificate** cert) const = 0; 116 virtual bool GetRemoteCertificate(rtc::SSLCertificate** cert) const = 0;
116 117
117 // Allows key material to be extracted for external encryption. 118 // Allows key material to be extracted for external encryption.
118 virtual bool ExportKeyingMaterial(const std::string& label, 119 virtual bool ExportKeyingMaterial(const std::string& label,
119 const uint8* context, 120 const uint8* context,
120 size_t context_len, 121 size_t context_len,
121 bool use_context, 122 bool use_context,
122 uint8* result, 123 uint8* result,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 bool readable_; 156 bool readable_;
156 bool writable_; 157 bool writable_;
157 bool receiving_; 158 bool receiving_;
158 159
159 DISALLOW_COPY_AND_ASSIGN(TransportChannel); 160 DISALLOW_COPY_AND_ASSIGN(TransportChannel);
160 }; 161 };
161 162
162 } // namespace cricket 163 } // namespace cricket
163 164
164 #endif // WEBRTC_P2P_BASE_TRANSPORTCHANNEL_H_ 165 #endif // WEBRTC_P2P_BASE_TRANSPORTCHANNEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698