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

@@ -19,11 +19,11 @@
#include "test.h"
static int
password_callback(char *pw, size_t pw_max, const char *fname, void *userdata)
password_callback(char *pw, size_t pw_max, xmpp_conn_t *conn, void *userdata)
{
(void)pw_max;
(void)userdata;
(void)fname;
(void)conn;
memcpy(pw, "abc123", 7);
return 6;
}