move password cache into libstrophe

The cache is stored per connection object and is cleared on
* entry of wrong password
* release of connection object
* successful connection

It can be configured that libstrophe retries the password entry in case
the user entered a wrong password.

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
This commit is contained in:
Steffen Jaeckel
2022-02-22 14:41:09 +01:00
parent bddb80a192
commit 4b5e103d9c
11 changed files with 262 additions and 106 deletions

View File

@@ -825,6 +825,7 @@ static void _auth(xmpp_conn_t *conn)
static void _auth_success(xmpp_conn_t *conn)
{
tls_clear_password_cache(conn);
conn->authenticated = 1;
/* call connection handler */
conn->conn_handler(conn, XMPP_CONN_CONNECT, 0, NULL, conn->userdata);