OnixS C++ FIX Engine 2.79.1.0
Using SSL Encryption in Session Connections

For security in FIX messaging, the OnixS C++ FIX Engine provides the ability to encrypt FIX connections with the SSL (Secure Sockets Layer) protocol.

Encrypting FIX Connections with SSL

To use SSL in FIX connectivity the following steps should be taken:

  1. If the counterparty requires client-side SSL certificate set both SSL.CertificateFile and SSL.PrivateKeyFile parameters in Engine configuration settings. They can refer to the same file if it contains both the SSL certificate and the private key.
  2. Call OnixS::FIX::Session::setEncryptionMethod method with OnixS::FIX::Session::SSL as newEncryptionMethod parameter value right after the creation of the OnixS::FIX::Session object.
  3. Establish the FIX Connection as usual.

Example

ISessionListener sessionListener;
Session session("Sender", "Target", FIX_42, &sessionListener);

session.setEncryptionMethod(Session::SSL);
                
session.logonAsInitiator("localhost", 443, true);

// Message exchange goes here..

session.logout("SSL connection is finished.");
session.shutdown();