aboutsummaryrefslogtreecommitdiffstats
path: root/src/libpttls/pt_tls.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libpttls/pt_tls.h')
-rw-r--r--src/libpttls/pt_tls.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/libpttls/pt_tls.h b/src/libpttls/pt_tls.h
index 2300f8516..0031c1ebd 100644
--- a/src/libpttls/pt_tls.h
+++ b/src/libpttls/pt_tls.h
@@ -37,6 +37,7 @@
typedef enum pt_tls_message_type_t pt_tls_message_type_t;
typedef enum pt_tls_sasl_result_t pt_tls_sasl_result_t;
+typedef enum pt_tls_auth_t pt_tls_auth_t;
/**
* Message types, as defined by NEA PT-TLS
@@ -64,6 +65,22 @@ enum pt_tls_sasl_result_t {
};
/**
+ * Client authentication to require as PT-TLS server.
+ */
+enum pt_tls_auth_t {
+ /** don't require TLS client certificate or request SASL authentication */
+ PT_TLS_AUTH_NONE,
+ /** require TLS certificate authentication, no SASL */
+ PT_TLS_AUTH_TLS,
+ /** do SASL regardless of TLS certificate authentication */
+ PT_TLS_AUTH_SASL,
+ /* if client does not authenticate with a TLS certificate, request SASL */
+ PT_TLS_AUTH_TLS_OR_SASL,
+ /* require both, TLS certificate authentication and SASL */
+ PT_TLS_AUTH_TLS_AND_SASL,
+};
+
+/**
* Read a PT-TLS message, create reader over Message Value.
*
* @param tls TLS socket to read from