On 16/04/2020 00:12, brandon.murphy1996 via openssl-users wrote: > Currently, the psk_use_session_cb_func() contains a hardcoded PSK and > identity value. However, I want to send an extra argument (preferably > a custom struct) to this callback that will contain the pre-shared > key and identity (ideally read from a config file). Is there any way > this can be achieved? You could store "ex_data" on the SSL object using SSL_set_ex_data(): https://www.openssl.org/docs/man1.1.1/man3/SSL_set_ex_data.html Matt