Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches

◆ sslNewSessionCallback

std::function<void(SSLContextRef context, const std::string& adapterName)> Ice::SSL::SecureTransportServerAuthenticationOptions::sslNewSessionCallback

A callback invoked before initiating a new SSL handshake, providing an opportunity to customize the SSL parameters for the session based on specific server settings or requirements.

Parameters
contextAn opaque type that represents an SSL session context object.
adapterNameThe name of the object adapter that accepted the connection.

Example of setting sslNewSessionCallback:

communicator->createObjectAdapterWithEndpoints(
"Hello",
"ssl -h 127.0.0.1 -p 10000",
.sslNewSessionCallback = [](SSLContextRef context, const std::string&)
{
OSStatus status = SSLSetProtocolVersionMin(context, kTLSProtocol13);
if (status != noErr)
{
// Handle error
}
}});

Definition at line 137 of file ServerAuthenticationOptions.h.