summaryrefslogtreecommitdiff
path: root/src/libimcv/imv/imv_session.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libimcv/imv/imv_session.h')
-rw-r--r--src/libimcv/imv/imv_session.h80
1 files changed, 74 insertions, 6 deletions
diff --git a/src/libimcv/imv/imv_session.h b/src/libimcv/imv/imv_session.h
index 6b94523b8..42b9118a6 100644
--- a/src/libimcv/imv/imv_session.h
+++ b/src/libimcv/imv/imv_session.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 Andreas Steffen
+ * Copyright (C) 2013-2014 Andreas Steffen
* HSR Hochschule fuer Technik Rapperswil
*
* This program is free software; you can redistribute it and/or modify it
@@ -23,11 +23,13 @@
#define IMV_SESSION_H_
#include "imv_workitem.h"
+#include "imv_os_info.h"
#include <tncifimv.h>
-
#include <library.h>
+#include <time.h>
+
typedef struct imv_session_t imv_session_t;
/**
@@ -36,11 +38,22 @@ typedef struct imv_session_t imv_session_t;
struct imv_session_t {
/**
+ * Set unique session ID
+ *
+ * @param session_id primary key into sessions table
+ * @param pid primary key into products table
+ * @param did Primary key into devices table
+ */
+ void (*set_session_id)(imv_session_t *this, int session_id, int pid, int did);
+
+ /**
* Get unique session ID
*
- * @return Session ID
+ * @param pid primary key into products table
+ * @param did Primary key into devices table
+ * @return primary key into sessions table
*/
- int (*get_session_id)(imv_session_t *this);
+ int (*get_session_id)(imv_session_t *this, int *pid, int *did);
/**
* Get TNCCS Connection ID
@@ -50,6 +63,58 @@ struct imv_session_t {
TNC_ConnectionID (*get_connection_id)(imv_session_t *this);
/**
+ * Get session creation time
+ *
+ * @return Session creation time
+ */
+ time_t (*get_creation_time)(imv_session_t *this);
+
+ /**
+ * Get Access Requestor ID
+ *
+ * @param id_type Access Requestor TCG Standard ID Type
+ * @return Access Requestor TCG Standard ID Value
+ */
+ chunk_t (*get_ar_id)(imv_session_t *this, uint32_t *id_type);
+
+ /**
+ * Get OS Information
+ *
+ * @return OS info object
+ */
+ imv_os_info_t* (*get_os_info)(imv_session_t *this);
+
+ /**
+ * Set Device ID
+ *
+ * @param device_id Device ID
+ */
+ void (*set_device_id)(imv_session_t *this, chunk_t device_id);
+
+ /**
+ * Get Device ID
+ *
+ * @param device_id Device ID
+ * @return TRUE if Device ID has already been set
+ */
+ bool (*get_device_id)(imv_session_t *this, chunk_t *device_id);
+
+ /**
+ * Set trust into Device ID
+ *
+ * @param trusted TRUE if Device ID is trusted
+ */
+ void (*set_device_trust)(imv_session_t *this, bool trusted);
+
+
+ /**
+ * Get device ID trust (needed for TPM-based attestation)
+ *
+ * @return TRUE if Device ID is trusted
+ */
+ bool (*get_device_trust)(imv_session_t *this);
+
+ /**
* Set policy_started status
*
* @param start TRUE if policy started, FALSE if policy stopped
@@ -105,9 +170,12 @@ struct imv_session_t {
/**
* Create an imv_session_t instance
*
- * @param session_id Unique Session ID
* @param id Associated Connection ID
+ * @param created Session creation time
+ * @param ar_id_type Access Requestor ID type
+ * @param ar_id_value Access Requestor ID value
*/
-imv_session_t* imv_session_create(int session_id, TNC_ConnectionID id);
+imv_session_t* imv_session_create(TNC_ConnectionID id, time_t created,
+ uint32_t ar_id_type, chunk_t ar_id_value);
#endif /** IMV_SESSION_H_ @}*/