SslSetEncryption Function

Action

Sets the Secure Socket Layer protocol version and the ciphers used when Silk Performer establishes a secure connection to the server.

Include file

WebAPI.bdh

Syntax

SslSetEncryption( in nVersion : number,
                  in sCiphers : string optional ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
nVersion Specifies the Secure Socket Layer protocol version used when Silk Performer establishes a secure connection to the server. Valid options are:
  • SSL_VERSION_AUTO
  • SSL_VERSION_SSL3
  • SSL_VERSION_TLS1
  • SSL_VERSION_TLS11
  • SSL_VERSION_TLS12
sCiphers Optional: Specifies the ciphers used when Silk Performer establishes a secure connection to the server. Valid options are:
  • SSL_CIPHERS_SSLv3. Use only SSL version 3 ciphers
  • SSL_CIPHERS_MEDIUM. Perform 128-bit encryption
  • SSL_CIPHERS_HIGH. Use triple DES

You can also specify any cipher as described on OpenSSL ciphers. If this parameter is omitted, Silk Performer uses its default ciphers.

The sCipher parameter can also be a string value with one or more cipher names, separated with a colon (:), or a combination of sets ("SSLv3", "MEDIUM" or "HIGH") and cipher names, or even with logical operators, for example "EXP:RC4-SHA:!HIGH".

For a list of available cipher names, visit OpenSSL ciphers.

Example

dcltrans
  transaction TSecureHTTP
  begin
    SslSetEncryption(SSL_VERSION_SSL3, SSL_CIPHERS_SSLv3);
    WebUrl("https://www.company.com");
  end TSecureHTTP; 

  transaction TSecureHTTP1
  begin
    SslSetEncryption(SSL_VERSION_SSL3, "EXP-RC4-MD5:EXP-DES-CBC-SHA");
    WebUrl("https://www.company.com");
  end TSecureHTTP1;

Sample scripts

WebSecure01.bdf, WebSecure02.bdf