SSL_psk_client_cb_func

Client callback that selects a PSK identity and pre-shared key for TLSv1.2 and below.

Synopsis

Declared in <openssl/ssl.h>

typedef unsigned int(* SSL_psk_client_cb_func)(SSL*, char const*, char*, unsigned int, unsigned char*, unsigned int);

Return Value

Length of the written PSK on success (> 0), or 0 to abort the handshake.

Parameters

NameDescription
sslSSL connection establishing the PSK.
hintNUL-terminated PSK identity hint from the server, or NULL.
identityBuffer that receives the NUL-terminated chosen identity.
max_identity_lenSize of identity including the NUL terminator.
pskBuffer that receives the pre-shared key bytes.
max_psk_lenCapacity of psk in bytes.