 callback is set using the functions SSL_CTX_set_psk_server_callback() or SSL_set_psk_server_callback(). The callback function is given the connection in parameter <b>ssl</b>, <b>NUL</b>-terminated PSK identity sent by the client in parameter <b>identity</b>, and a buffer <b>psk</b> of length <b>max_psk_len</b> bytes where the pre-shared key is to be stored.</p>

<p>The callback for use in TLSv1.2 will also work in TLSv1.3 although it is recommended to use SSL_CTX_set_psk_find_session_callback() or SSL_set_