TLS settings can be configured for individual initiator sessions before logon. The main settings are:
| Setting | Purpose |
|---|---|
| OnixS::FIX::Session::sslVerifyPeer | Enable verification of the counterparty's certificate. |
| OnixS::FIX::Session::sslCaFile | Supply the PEM file of trusted CA certificates. |
| OnixS::FIX::Session::sslCertificateFile | Supply the client's certificate when mutual TLS is required. |
| OnixS::FIX::Session::sslPrivateKeyFile | Supply the private key belonging to the client's certificate. |
| OnixS::FIX::Session::sslPrivateKeyPassword | Supply an application-provided OnixS::Cryptography::SecureString for an encrypted private key. |
| OnixS::FIX::Session::sslClientSni | Supply an SNI server name; with "*", the connection URL must be a DNS name, not an IP address. |
When a per-session CA file is unset, the Engine-level SSL.CaFile supplies the trust configuration. For example, an initiator can enable sslVerifyPeer(true) and use the CA file configured through OnixS::FIX::EngineSettings::sslCaFile without setting a per-session CA file.
Peer verification is enabled if either the session or Engine enables it. Setting the per-session option to false does not disable verification enabled globally. Both levels default to disabled. Check both levels when diagnosing certificate verification failures.
See What Peer Verification Checks for the distinction between certificate-chain verification and hostname matching, and Optional Client Credentials for Mutual TLS for encrypted private keys.
The following initiator sessions explicitly verify the server and also supply client credentials for mutual TLS. Replace the paths and connection settings with your counterparty's values. The example assumes unencrypted client keys; set sslPrivateKeyPassword before logon for encrypted keys. Configure trust and credentials before connecting each session.