Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_SOCKET_SSL_SOCKET_H_ | 5 #ifndef NET_SOCKET_SSL_SOCKET_H_ |
| 6 #define NET_SOCKET_SSL_SOCKET_H_ | 6 #define NET_SOCKET_SSL_SOCKET_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/string_piece.h" | 9 #include "base/string_piece.h" |
| 10 #include "net/socket/stream_socket.h" | 10 #include "net/socket/stream_socket.h" |
| 11 | 11 |
| 12 namespace net { | 12 namespace net { |
| 13 | 13 |
| 14 // SSLSocket interface defines method that are common between client | 14 // SSLSocket interface defines method that are common between client |
| 15 // and server SSL sockets. | 15 // and server SSL sockets. |
| 16 class NET_EXPORT SSLSocket : public StreamSocket { | 16 class NET_EXPORT SSLSocket : public StreamSocket { |
| 17 public: | 17 public: |
| 18 virtual ~SSLSocket() {} | 18 virtual ~SSLSocket() {} |
| 19 | 19 |
| 20 // Exports data derived from the SSL master-secret (see RFC 5705). | 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 | 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 | 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 | 23 // the socket is not connected or the SSL implementation does not |
| 24 // support the operation. | 24 // support the operation. |
| 25 virtual int ExportKeyingMaterial(const base::StringPiece& label, | 25 virtual int ExportKeyingMaterial(const base::StringPiece& label, |
| 26 bool has_context, | 26 bool has_context, |
| 27 const base::StringPiece& context, | 27 const base::StringPiece& context, |
| 28 unsigned char* out, | 28 unsigned char* out, |
| 29 unsigned int outlen) = 0; | 29 unsigned int outlen) = 0; |
| 30 | |
| 31 // Returns the tls-unique channel bindings (see RFC 5929). | |
| 32 // At most, |outlen_max| bytes will be written to |out|. The | |
| 33 // actual number of bytes written will be set in |outlen|. | |
|
wtc
2012/07/30 20:05:08
Nit: remove the comma after "At most". Add '*' be
Ryan Hamilton
2012/07/30 21:37:58
Done.
| |
| 34 virtual int GetTlsUniqueChannelBinding(unsigned char* out, | |
|
wtc
2012/07/30 20:05:08
Please spell "TLS" in all caps.
History: our Styl
Ryan Hamilton
2012/07/30 21:37:58
Done.
| |
| 35 unsigned int *outlen, | |
| 36 unsigned int outlen_max) = 0; | |
|
wtc
2012/07/30 20:05:08
We probably should just use a
std::string* out
o
Ryan Hamilton
2012/07/30 21:37:58
Done.
| |
| 30 }; | 37 }; |
| 31 | 38 |
| 32 } // namespace net | 39 } // namespace net |
| 33 | 40 |
| 34 #endif // NET_SOCKET_SSL_SOCKET_H_ | 41 #endif // NET_SOCKET_SSL_SOCKET_H_ |
| OLD | NEW |