Support different authentication schemes for PT-TLS

This commit is contained in:
Martin Willi
2013-02-28 16:46:08 +01:00
parent 807f2facd0
commit 61f1693df1
5 changed files with 71 additions and 6 deletions
+17
View File
@@ -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
@@ -63,6 +64,22 @@ enum pt_tls_sasl_result_t {
PT_TLS_SASL_RESULT_MECH_FAILURE = 3,
};
/**
* 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.
*