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.
This commit is contained in:
Martin Willi
2013-02-28 16:46:08 +01:00
parent 2ae0c9e618
commit 2de481e32b
7 changed files with 78 additions and 29 deletions
+6 -2
View File
@@ -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,