aboutsummaryrefslogtreecommitdiffstats
path: root/src/libtls/tls_peer.h
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2013-02-28 11:39:55 +0100
committerMartin Willi <martin@revosec.ch>2013-02-28 16:46:08 +0100
commit2de481e32b95c558b96237c25a15bf2baa375e93 (patch)
treeab8ddcd59c677b5426c9e826ced48f540c061d9b /src/libtls/tls_peer.h
parent2ae0c9e6181421fc589798c64276a6310f13f1a2 (diff)
downloadstrongswan-2de481e32b95c558b96237c25a15bf2baa375e93.tar.bz2
strongswan-2de481e32b95c558b96237c25a15bf2baa375e93.tar.xz
Delegate tls_t.get_{peer,server}_id to handshake layer
This allows to get updated peer identities if the peer can't authenticate, or does when it is optional.
Diffstat (limited to 'src/libtls/tls_peer.h')
-rw-r--r--src/libtls/tls_peer.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libtls/tls_peer.h b/src/libtls/tls_peer.h
index f773ea72e..e4ff6f83c 100644
--- a/src/libtls/tls_peer.h
+++ b/src/libtls/tls_peer.h
@@ -41,11 +41,15 @@ struct tls_peer_t {
/**
* Create a tls_peer instance.
-*
+ *
+ * If a peer identity is given, but the client does not get requested or is
+ * otherwise unable to perform client authentication, NULL is returned in
+ * tls_handshake_t.get_peer_id() instead of the peer identity.
+ *
* @param tls TLS stack
* @param crypto TLS crypto helper
* @param alert TLS alert handler
- * @param peer peer identity
+ * @param peer peer identity, NULL to skip client authentication
* @param server server identity
*/
tls_peer_t *tls_peer_create(tls_t *tls, tls_crypto_t *crypto, tls_alert_t *alert,