Avi Drissman | 6459548 | 2022-09-14 20:52:29 | [diff] [blame] | 1 | // Copyright 2012 The Chromium Authors |
[email protected] | b70a4a2 | 2011-11-15 03:12:33 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. | ||||
4 | |||||
5 | #ifndef NET_SOCKET_SSL_SOCKET_H_ | ||||
6 | #define NET_SOCKET_SSL_SOCKET_H_ | ||||
7 | |||||
[email protected] | d069c11a | 2013-04-13 00:01:55 | [diff] [blame] | 8 | #include "base/strings/string_piece.h" |
bnc | 81c46c1f | 2016-10-04 16:25:59 | [diff] [blame] | 9 | #include "net/base/net_export.h" |
[email protected] | b70a4a2 | 2011-11-15 03:12:33 | [diff] [blame] | 10 | #include "net/socket/stream_socket.h" |
11 | |||||
[email protected] | b70a4a2 | 2011-11-15 03:12:33 | [diff] [blame] | 12 | namespace net { |
13 | |||||
14 | // SSLSocket interface defines method that are common between client | ||||
15 | // and server SSL sockets. | ||||
16 | class NET_EXPORT SSLSocket : public StreamSocket { | ||||
17 | public: | ||||
Tsuyoshi Horo | 07c3f0e | 2022-06-16 07:30:47 | [diff] [blame] | 18 | ~SSLSocket() override = default; |
[email protected] | b70a4a2 | 2011-11-15 03:12:33 | [diff] [blame] | 19 | |
Tsuyoshi Horo | 07c3f0e | 2022-06-16 07:30:47 | [diff] [blame] | 20 | // Exports data derived from the SSL master-secret (see RFC 5705). |
21 | // If |has_context| is false, uses the no-context construction from the | ||||
22 | // RFC and |context| is ignored. The call will fail with an error if | ||||
23 | // the socket is not connected or the SSL implementation does not | ||||
24 | // support the operation. | ||||
David Benjamin | b6c2dd16 | 2022-10-24 10:46:06 | [diff] [blame] | 25 | virtual int ExportKeyingMaterial(base::StringPiece label, |
Tsuyoshi Horo | 07c3f0e | 2022-06-16 07:30:47 | [diff] [blame] | 26 | bool has_context, |
David Benjamin | b6c2dd16 | 2022-10-24 10:46:06 | [diff] [blame] | 27 | base::StringPiece context, |
Tsuyoshi Horo | 07c3f0e | 2022-06-16 07:30:47 | [diff] [blame] | 28 | unsigned char* out, |
29 | unsigned int outlen) = 0; | ||||
[email protected] | b70a4a2 | 2011-11-15 03:12:33 | [diff] [blame] | 30 | }; |
31 | |||||
32 | } // namespace net | ||||
33 | |||||
34 | #endif // NET_SOCKET_SSL_SOCKET_H_ |