libtls: Add getters for TLS handshake authentication details
[strongswan.git] / src / libtls / tls_eap.h
index ebda263..df41fc4 100644 (file)
@@ -62,6 +62,28 @@ struct tls_eap_t {
        chunk_t (*get_msk)(tls_eap_t *this);
 
        /**
+        * Get the current EAP identifier.
+        *
+        * @return                              identifier
+        */
+       uint8_t (*get_identifier)(tls_eap_t *this);
+
+       /**
+        * Set the EAP identifier to a deterministic value, overwriting
+        * the randomly initialized default value.
+        *
+        * @param identifier    EAP identifier
+        */
+       void (*set_identifier) (tls_eap_t *this, uint8_t identifier);
+
+       /**
+        * Get the authentication details after completing the handshake.
+        *
+        * @return                              authentication details, internal data
+        */
+       auth_cfg_t* (*get_auth)(tls_eap_t *this);
+
+       /**
         * Destroy a tls_eap_t.
         */
        void (*destroy)(tls_eap_t *this);
@@ -74,8 +96,9 @@ struct tls_eap_t {
  * @param tls                          TLS implementation
  * @param frag_size                    maximum size of a TLS fragment we send
  * @param max_msg_count                maximum number of processed messages
+ * @param include_length       if TRUE include length in non-fragmented packets
  */
 tls_eap_t *tls_eap_create(eap_type_t type, tls_t *tls, size_t frag_size,
-                                                 int max_msg_count);
+                                                 int max_msg_count, bool include_length);
 
 #endif /** TLS_EAP_H_ @}*/