summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/tls.h
diff options
context:
space:
mode:
authorMichael Brown2012-03-03 21:15:21 +0100
committerMichael Brown2012-03-03 21:15:21 +0100
commitb7f8d1bbfd657ecfcae6e74a62766e2e15abaa11 (patch)
treeefbd4626656721d7c874692ef1eb0bdaa780e7db /src/include/ipxe/tls.h
parent[tls] Support TLS version 1.1 (diff)
downloadipxe-b7f8d1bbfd657ecfcae6e74a62766e2e15abaa11.tar.gz
ipxe-b7f8d1bbfd657ecfcae6e74a62766e2e15abaa11.tar.xz
ipxe-b7f8d1bbfd657ecfcae6e74a62766e2e15abaa11.zip
[tls] Add support for Server Name Indication (SNI)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/tls.h')
-rw-r--r--src/include/ipxe/tls.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/include/ipxe/tls.h b/src/include/ipxe/tls.h
index c14e9210..90833781 100644
--- a/src/include/ipxe/tls.h
+++ b/src/include/ipxe/tls.h
@@ -74,6 +74,10 @@ struct tls_header {
#define TLS_RSA_WITH_AES_128_CBC_SHA 0x002f
#define TLS_RSA_WITH_AES_256_CBC_SHA 0x0035
+/* TLS extension types */
+#define TLS_SERVER_NAME 0
+#define TLS_SERVER_NAME_HOST_NAME 0
+
/** TLS RX state machine state */
enum tls_rx_state {
TLS_RX_HEADER = 0,
@@ -133,6 +137,8 @@ struct tls_session {
/** Reference counter */
struct refcnt refcnt;
+ /** Server name */
+ const char *name;
/** Plaintext stream */
struct interface plainstream;
/** Ciphertext stream */
@@ -183,7 +189,7 @@ struct tls_session {
void *rx_data;
};
-extern int add_tls ( struct interface *xfer,
+extern int add_tls ( struct interface *xfer, const char *name,
struct interface **next );
#endif /* _IPXE_TLS_H */