libtls: Add getters for TLS handshake authentication details
[strongswan.git] / src / libtls / tls_peer.c
index 1bee436..08e36de 100644 (file)
@@ -1154,6 +1154,12 @@ METHOD(tls_handshake_t, get_server_id, identification_t*,
        return this->server;
 }
 
+METHOD(tls_handshake_t, get_auth, auth_cfg_t*,
+       private_tls_peer_t *this)
+{
+       return this->server_auth;
+}
+
 METHOD(tls_handshake_t, destroy, void,
        private_tls_peer_t *this)
 {
@@ -1187,6 +1193,7 @@ tls_peer_t *tls_peer_create(tls_t *tls, tls_crypto_t *crypto, tls_alert_t *alert
                                .finished = _finished,
                                .get_peer_id = _get_peer_id,
                                .get_server_id = _get_server_id,
+                               .get_auth = _get_auth,
                                .destroy = _destroy,
                        },
                },