SSL_psk_server_cb_func

PSK server callback that supplies the pre-shared key for a client identity.

Synopsis

Declared in <openssl/ssl.h>

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

Return Value

Length of the key written to psk, or 0 to abort the handshake.

Parameters

NameDescription
sslServer SSL connection negotiating PSK.
identityNUL-terminated PSK identity from the client, or NULL.
pskBuffer receiving up to max_psk_len key bytes.
max_psk_lenCapacity of psk in bytes.