OLD | NEW |
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 |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 // Do DTLS or TLS. | 149 // Do DTLS or TLS. |
150 virtual void SetMode(SSLMode mode) = 0; | 150 virtual void SetMode(SSLMode mode) = 0; |
151 | 151 |
152 // Set maximum supported protocol version. The highest version supported by | 152 // Set maximum supported protocol version. The highest version supported by |
153 // both ends will be used for the connection, i.e. if one party supports | 153 // both ends will be used for the connection, i.e. if one party supports |
154 // DTLS 1.0 and the other DTLS 1.2, DTLS 1.0 will be used. | 154 // DTLS 1.0 and the other DTLS 1.2, DTLS 1.0 will be used. |
155 // If requested version is not supported by underlying crypto library, the | 155 // If requested version is not supported by underlying crypto library, the |
156 // next lower will be used. | 156 // next lower will be used. |
157 virtual void SetMaxProtocolVersion(SSLProtocolVersion version) = 0; | 157 virtual void SetMaxProtocolVersion(SSLProtocolVersion version) = 0; |
158 | 158 |
159 // Set the initial retransmission timeout for DTLS messages. When the timeout | |
160 // expires, the message gets retransmitted and the timeout is exponentially | |
161 // increased. | |
162 // This should only be called before StartSSL(). | |
163 virtual void SetInitialRetransmissionTimeout(int timeout_ms) = 0; | |
164 | |
165 // StartSSL starts negotiation with a peer, whose certificate is verified | 159 // StartSSL starts negotiation with a peer, whose certificate is verified |
166 // using the certificate digest. Generally, SetIdentity() and possibly | 160 // using the certificate digest. Generally, SetIdentity() and possibly |
167 // SetServerRole() should have been called before this. | 161 // SetServerRole() should have been called before this. |
168 // SetPeerCertificateDigest() must also be called. It may be called after | 162 // SetPeerCertificateDigest() must also be called. It may be called after |
169 // StartSSLWithPeer() but must be called before the underlying stream opens. | 163 // StartSSLWithPeer() but must be called before the underlying stream opens. |
170 // | 164 // |
171 // Use of the stream prior to calling StartSSL will pass data in clear text. | 165 // Use of the stream prior to calling StartSSL will pass data in clear text. |
172 // Calling StartSSL causes SSL negotiation to begin as soon as possible: right | 166 // Calling StartSSL causes SSL negotiation to begin as soon as possible: right |
173 // away if the underlying wrapped stream is already opened, or else as soon as | 167 // away if the underlying wrapped stream is already opened, or else as soon as |
174 // it opens. | 168 // it opens. |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 | 257 |
264 // If true (default), the client is required to provide a certificate during | 258 // If true (default), the client is required to provide a certificate during |
265 // handshake. If no certificate is given, handshake fails. This applies to | 259 // handshake. If no certificate is given, handshake fails. This applies to |
266 // server mode only. | 260 // server mode only. |
267 bool client_auth_enabled_; | 261 bool client_auth_enabled_; |
268 }; | 262 }; |
269 | 263 |
270 } // namespace rtc | 264 } // namespace rtc |
271 | 265 |
272 #endif // WEBRTC_BASE_SSLSTREAMADAPTER_H_ | 266 #endif // WEBRTC_BASE_SSLSTREAMADAPTER_H_ |
OLD | NEW |