UniDAC

Encrypting Network Using Over-the-Wire (OTW)

Encrypting Network Using Over-the-Wire (OTW)

The InterBase provider 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 UniDAC-based application. The OTW encryption parameters can be set up at runtime as follows:

Delphi

var
  UniConnection1: TUniConnection;
begin
  UniConnection1 := TUniConnection.Create(nil);
  try
    UniConnection.ProviderName := 'InterBase';
    UniConnection1.Server := '127.0.0.1'; 
    UniConnection1.Database := 'database';
    UniConnection1.Username := 'username';
    UniConnection1.Password := 'password';
    UniConnection1.Port := 3050;
    UniConnection1.SpecificOptions.Values['ClientLibrary'] := 'gds32.dll';
    UniConnection1.LoginPrompt := False;
    // OTW encryption properties
    UniConnection1.SpecificOptions.Values['ClientCertFile'] := 'clientcert.pem';
    UniConnection1.SpecificOptions.Values['ClientPassPhrase'] := 'passphrase';
    UniConnection1.SpecificOptions.Values['ServerPublicFile'] := 'cacert.pem';
    UniConnection1.SpecificOptions.Values['UseSSL'] := 'True';
    UniConnection1.Open;
  finally
    UniConnection1.Free;
  end;
end;

C++ Builder

TUniConnection* UniConnnection = new TUniConnection(NULL);
try {
    UniConnection->ProviderName = "InterBase";
    UniConnection1->Server = "127.0.0.1"; 
    UniConnection1->Database = "database";
    UniConnection1->Username = "username";
    UniConnection1->Password = "password";
    UniConnection1->Port = 3050;
    UniConnection1->SpecificOptions->Values["ClientLibrary"] = "gds32.dll";
    UniConnection1->LoginPrompt = False;
    // OTW encryption properties
    UniConnection1->SpecificOptions->Values["ClientCertFile"] = "clientcert.pem";
    UniConnection1->SpecificOptions->Values["ClientPassPhrase"] = "passphrase";
    UniConnection1->SpecificOptions->Values["ServerPublicFile"] = "cacert.pem";
    UniConnection1->SpecificOptions->Values["UseSSL"] = "True";
    UniConnection1->Open;
}
__finally {
    UniConnection1->Free();
}

See Also

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