lrvtc_connect_ex

With the support of HTTPS and NTLM authentication, this function provides a way to specify parameters such as username and password, during or before connecting to the VTS server.

Tip: To enable HTTPS without authentication, you can use lrvtc_connect, prefixing the URL for the server name with HTTPS.

C Language

VTCERR2 lrvtc_connect_ex("param1=value1","param2=value2",LAST);

C# Language

vts.connect_ex(string[] argumentList);

Java Language

Lrvtc.connect_ex(String[] argumentList);

  

ExamplesGlobal Functions

Arguments

NameComments
Server

The name or IP address of the VTS server host.

HTTP is assumed by default, unless the URL begins with HTTPS.

PortThe port number.
UserNameThe user name.
PasswordThe password masked by the Password Encoder. A plain text password is also acceptable. For more information, see the Virtual User Generator Help Center (select the relevant version).
Domain

Domain name.

Applicable only when the server uses NTLM authentication.

Cert

Optional. The certificate chain in PEM format.

Required if server demands client authentication.

Note: Must be a valid relative or absolute file path, and can be specified in a format supported by the operating system. For example:

  • Linux: /path/to/file
  • Windows: c:/path/to/file or c:\path\to\file
Key

Optional private keys in PEM format.

Required if server demands client authentication.

Note: Must be a valid relative or absolute file path, and can be specified in a format supported by the operating system. For example:

  • Linux: /path/to/file
  • Windows: c:/path/to/file or c:\path\to\file
CA

Optional. Overrides the trusted CA certificates.

Required if client wants to verify server certificate.

Note: Must be a valid relative or absolute file path, and can be specified in a format supported by the operating system. For example:

  • Linux: /path/to/file
  • Windows: c:/path/to/file or c:\path\to\file

Return Values

C Language:   Returns zero on success or one of the Error Codes.

C# Language: Returns true on success.

Java Language:   Returns zero on success or one of the Error Codes.

Parameterization

All string input arguments can be passed using standard parameterization.

C Language Example

vuser_init()
{
	int   rc;
	lr_save_string("59eedbb995e42a1a","SandyPass");
	rc = lrvtc_connect_ex("Server=https://localhost",
				"Port=8883", 
				"UserName=sandy",
				"Password={sandyPass}",
				"Domain=mydomain.net",
				"CA=cacert_root.pem",
				"Cert=../cert_wolf.pem",
				"Key=../cert_wolf.pem",
				LAST );
	lr_log_message("Connect result rc=%d\n", rc);
	return 0;

}

C# Language Example

vts.connect_ex(new string[]{
	"Server=https://localhost",
	"Port=8883",
	"UserName=sandy",
	"Password={sandyPass}",
	"Domain=mydomain.net",
	"CA=cacert_root.pem",
	"Cert=../cert_wolf.pem",
	"Key=../cert_wolf.pem"
});

Java Language Example

Lrvtc.connect_ex(new String[]{
		"Server=https://localhost",
		"Port=8883",
		"UserName=sandy",
		"Password={sandyPass}",
		"Domain=mydomain.net",
		"CA=cacert_root.pem",
		"Cert=../cert_wolf.pem",
		"Key=../cert_wolf.pem"
});