aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-08-23 19:01:37 (GMT)
committerJouni Malinen <j@w1.fi>2015-08-23 23:29:30 (GMT)
commitb3b8085ae8ff1eacad3f1815d13548d09976e910 (patch)
treeb0661c1af8431c0b3396f49b2a64873e9c6c2e0c
parent681e199dfba84e959ae898dba0d294604441a2ad (diff)
downloadhostap-b3b8085ae8ff1eacad3f1815d13548d09976e910.zip
hostap-b3b8085ae8ff1eacad3f1815d13548d09976e910.tar.gz
hostap-b3b8085ae8ff1eacad3f1815d13548d09976e910.tar.bz2
TLS: Add functions for managing cached session state
The new tls_connection_set_success_data(), tls_connection_set_success_data_resumed(), tls_connection_get_success_data(), and tls_connection_remove_session() functions can be used to mark cached sessions valid and to remove invalid cached sessions. This commit is only adding empty functions. The actual functionality will be implemented in followup commits. Signed-off-by: Jouni Malinen <j@w1.fi>
-rw-r--r--src/crypto/tls.h10
-rw-r--r--src/crypto/tls_gnutls.c23
-rw-r--r--src/crypto/tls_internal.c23
-rw-r--r--src/crypto/tls_none.c23
-rw-r--r--src/crypto/tls_openssl.c23
5 files changed, 102 insertions, 0 deletions
diff --git a/src/crypto/tls.h b/src/crypto/tls.h
index d2196dd..2e56233 100644
--- a/src/crypto/tls.h
+++ b/src/crypto/tls.h
@@ -575,4 +575,14 @@ void tls_connection_set_test_flags(struct tls_connection *conn, u32 flags);
int tls_get_library_version(char *buf, size_t buf_len);
+void tls_connection_set_success_data(struct tls_connection *conn,
+ struct wpabuf *data);
+
+void tls_connection_set_success_data_resumed(struct tls_connection *conn);
+
+const struct wpabuf *
+tls_connection_get_success_data(struct tls_connection *conn);
+
+void tls_connection_remove_session(struct tls_connection *conn);
+
#endif /* TLS_H */
diff --git a/src/crypto/tls_gnutls.c b/src/crypto/tls_gnutls.c
index 3c39e54..f994379 100644
--- a/src/crypto/tls_gnutls.c
+++ b/src/crypto/tls_gnutls.c
@@ -1498,3 +1498,26 @@ int tls_get_library_version(char *buf, size_t buf_len)
return os_snprintf(buf, buf_len, "GnuTLS build=%s run=%s",
GNUTLS_VERSION, gnutls_check_version(NULL));
}
+
+
+void tls_connection_set_success_data(struct tls_connection *conn,
+ struct wpabuf *data)
+{
+}
+
+
+void tls_connection_set_success_data_resumed(struct tls_connection *conn)
+{
+}
+
+
+const struct wpabuf *
+tls_connection_get_success_data(struct tls_connection *conn)
+{
+ return NULL;
+}
+
+
+void tls_connection_remove_session(struct tls_connection *conn)
+{
+}
diff --git a/src/crypto/tls_internal.c b/src/crypto/tls_internal.c
index 79f14a3..704751d 100644
--- a/src/crypto/tls_internal.c
+++ b/src/crypto/tls_internal.c
@@ -708,3 +708,26 @@ int tls_get_library_version(char *buf, size_t buf_len)
{
return os_snprintf(buf, buf_len, "internal");
}
+
+
+void tls_connection_set_success_data(struct tls_connection *conn,
+ struct wpabuf *data)
+{
+}
+
+
+void tls_connection_set_success_data_resumed(struct tls_connection *conn)
+{
+}
+
+
+const struct wpabuf *
+tls_connection_get_success_data(struct tls_connection *conn)
+{
+ return NULL;
+}
+
+
+void tls_connection_remove_session(struct tls_connection *conn)
+{
+}
diff --git a/src/crypto/tls_none.c b/src/crypto/tls_none.c
index 1f8c9b4..ae392ad 100644
--- a/src/crypto/tls_none.c
+++ b/src/crypto/tls_none.c
@@ -193,3 +193,26 @@ int tls_get_library_version(char *buf, size_t buf_len)
{
return os_snprintf(buf, buf_len, "none");
}
+
+
+void tls_connection_set_success_data(struct tls_connection *conn,
+ struct wpabuf *data)
+{
+}
+
+
+void tls_connection_set_success_data_resumed(struct tls_connection *conn)
+{
+}
+
+
+const struct wpabuf *
+tls_connection_get_success_data(struct tls_connection *conn)
+{
+ return NULL;
+}
+
+
+void tls_connection_remove_session(struct tls_connection *conn)
+{
+}
diff --git a/src/crypto/tls_openssl.c b/src/crypto/tls_openssl.c
index 62e18c8..d40eea6 100644
--- a/src/crypto/tls_openssl.c
+++ b/src/crypto/tls_openssl.c
@@ -4013,3 +4013,26 @@ int tls_get_library_version(char *buf, size_t buf_len)
OPENSSL_VERSION_TEXT,
SSLeay_version(SSLEAY_VERSION));
}
+
+
+void tls_connection_set_success_data(struct tls_connection *conn,
+ struct wpabuf *data)
+{
+}
+
+
+void tls_connection_set_success_data_resumed(struct tls_connection *conn)
+{
+}
+
+
+const struct wpabuf *
+tls_connection_get_success_data(struct tls_connection *conn)
+{
+ return NULL;
+}
+
+
+void tls_connection_remove_session(struct tls_connection *conn)
+{
+}