aboutsummaryrefslogtreecommitdiff
path: root/lib/include
diff options
context:
space:
mode:
Diffstat (limited to 'lib/include')
-rw-r--r--lib/include/defs.h4
-rw-r--r--lib/include/net/stpsession.h13
2 files changed, 17 insertions, 0 deletions
diff --git a/lib/include/defs.h b/lib/include/defs.h
index 1a022f9..e621e71 100644
--- a/lib/include/defs.h
+++ b/lib/include/defs.h
@@ -49,6 +49,10 @@
#define PAP_BAD_PERMS 0x02 /* SPW provided needs more permissions */
#define PAP_RESOURCE 0x03 /* Server has insufficient resources */
+/* Session auth code defs */
+#define AUTH_SUCCESS 0x00 /* Successful auth */
+#define AUTH_BAD_PW 0x01 /* Bad password */
+
/* Fixed paths */
#define OSMORA_TRUST "/etc/ostp/trusted_users.osmt"
diff --git a/lib/include/net/stpsession.h b/lib/include/net/stpsession.h
index 773d57b..aeed9cb 100644
--- a/lib/include/net/stpsession.h
+++ b/lib/include/net/stpsession.h
@@ -41,6 +41,9 @@
*/
#define MESSAGE_SIZE (1 << 12)
+/* Session Request option bits */
+#define SESSION_REQ_USER BIT(0)
+
/*
* The Session Request is sent from the client to the
* server and contains a HOP (hash, options, pubkey)
@@ -81,6 +84,16 @@ struct session_request {
} PACKED;
/*
+ * Structure containing user information
+ * for password protected channels.
+ */
+struct session_auth {
+ char username[256];
+ char password[64];
+ uint8_t code;
+};
+
+/*
* OSTP Message Frame containing an IV, AES
* GCM tag, payload length and payload
* with encrypted data.