connection specific data in sign provider

boknamail boknamail at protonmail.com
Sat Nov 11 12:48:01 UTC 2023


Hi all,

I implemented an Openssl signature provider that shall offload the signature into the user's code space via a callback that the user can define.
During the TLS handshake I already get the function OSSL_FUNC_signature_digest_sign invoked. Inside this function I want to call the user defined callback.

My current approach is to create a provider context containing an empty callback, have the user get the provider context and set the callback and inside OSSL_FUNC_signature_digest_sign_init copy the callback from the provider context into the sign context.

The disadvantage of this is, that the callback is global to the provider.
I would rather want to have it connection specific.
Is there any way to handover data specific to the connection to the sign functions?
I was thinking about adding the callback to the ex_data of the SSL_CTX, but did not find a way to access the SSL_CTX or the SSL from inside the signature function.

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mta.openssl.org/pipermail/openssl-users/attachments/20231111/aa636e95/attachment.htm>


More information about the openssl-users mailing list