Hello,

I've just noticed that SSL_set_psk_client_callback (that sets the callback for the client, when using a TLS/PSK cipher) does *not* take a "void *" argument.

Taking a "void *" value in the setter, and passing the same value when invoking the callback, is tremendously useful for users. (In my particular case, I would like to use it in order to distiguish which socket object the callback is being invoked for; different socket objects may share the same SSL / SSL_CTX).

For some reason OpenSSL provides such void * arguments in other APIs: for instance in the custom TLS extension handling functions (SSL_CTX_add_client_custom_ext and SSL_CTX_add_client_server_ext), with the indended purpose.

Was this an API mistake in SSL_set_psk_client_callback?

Thanks,
--
Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Software Engineer
KDAB (UK) Ltd., a KDAB Group company
Tel. UK +44-1738-450410, Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-independent software solutions

Attachment: smime.p7s
Description: Firma crittografica S/MIME

Reply via email to