Enabling SSL connections

To enable SSL for ASE ODBC Driver, add Encryption=ssl and TrustedFile=<filename> (where filename is the path to the trusted roots file) to the ConnectString. The ASE ODBC Driver then negotiates an SSL connection with the ASE server.

If you use SQLDriverConnect with the SQL_DRIVER_NOPROMPT, the ConnectString appears similar to the following:

char ConnectString[BUFSIZ];
strcpy(ConnectString, "Driver=Adaptive Server Enterprise;");
strcat(ConnectString, "UserID=sa;Password=;");
strcat(ConnectString, "Server=sampleserver;");
strcat(ConnectString, "Port=4100;Database=pubs2;");
strcat(ConnectString, "UseCursor=1;");
strcat(ConnectString, "Encryption=ssl;");
strcat(ConnectString, "TrustedFile=/opt/sybase/config/trusted.txt");

NoteASE must be configured to use SSL. For more information on SSL, see the Adaptive Server Enterprise System Administration Guide.