IBDAC

Encrypting Network Using Over-the-Wire (OTW)

Encrypting Network Using Over-the-Wire (OTW)

IBDAC supports the Over-the-Wire (OTW) encryption feature of InterBase to encrypt data during the transmission process. InterBase OTW encryption uses SSL v3 and TLS v1 security protocols and supports AES and DES encryptions. Before setting up OTW encryption on the server and client side, you must obtain the necessary security certificates from a certificate authority (CA). Both the client and server must have the X.509 files in the PEM format installed to use OTW encryption. After configuring the OTW parameters on the server, set up the client side in your IBDAC-based application. The OTW encryption parameters can be set up at runtime as follows:

Delphi

var
  IBCConnection1: TIBCConnection;
begin
  IBCConnection1 := TIBCConnection.Create(nil);
  try
    IBCConnection1.Server := '127.0.0.1'; 
    IBCConnection1.Database := 'database';
    IBCConnection1.Username := 'username';
    IBCConnection1.Password := 'password';
    IBCConnection1.Port := 3050;
    IBCConnection1.ClientLibrary := 'gds32.dll';
    IBCConnection1.LoginPrompt := False;
    // OTW encryption properties
    IBCConnection1.SSLOptions.ClientCertFile := 'clientcert.pem';
    IBCConnection1.SSLOptions.ClientPassPhrase := 'passphrase';
    IBCConnection1.SSLOptions.ServerPublicFile := 'cacert.pem';
    IBCConnection1.SSLOptions.Enabled := True;
    IBCConnection1.Open;
  finally
    IBCConnection1.Free;
  end;
end;

C++ Builder

TIBCConnection* IBCConnection1 = new TIBCConnection(NULL);
try {
    IBCConnection1->Server = "127.0.0.1"; 
    IBCConnection1->Database = "database";
    IBCConnection1->Username = "username";
    IBCConnection1->Password = "password";
    IBCConnection1->Port = 3050;
    IBCConnection1->ClientLibrary = "gds32.dll";
    IBCConnection1->LoginPrompt = False;
    // OTW encryption properties
    IBCConnection1->SSLOptions->ClientCertFile = "clientcert.pem";
    IBCConnection1->SSLOptions->ClientPassPhrase = "passphrase";
    IBCConnection1->SSLOptions->ServerPublicFile = "cacert.pem";
    IBCConnection1->SSLOptions->Enabled = True;
    IBCConnection1->Open();
}
__finally {
    IBCConnection1->Free();
}

See Also

© 1997-2024 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback