implement certificate verification API for OpenSSL

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
This commit is contained in:
Steffen Jaeckel
2021-10-26 14:11:16 +02:00
parent f23ac83c95
commit 12009a009d
3 changed files with 292 additions and 24 deletions

View File

@@ -160,3 +160,12 @@ void disconnect_mem_error(xmpp_conn_t *conn)
xmpp_error(conn->ctx, "xmpp", "Memory allocation error");
xmpp_disconnect(conn);
}
void hex_encode(char *writebuf, void *readbuf, size_t len)
{
size_t i;
for (i = 0; i < len; i++) {
sprintf(writebuf, "%02x", ((unsigned char *)readbuf)[i]);
writebuf += 2;
}
}