restReqClientCertSet (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

ALL

Firmware version:

2.10.00


This function sets the client certificate on a request that will be sent to the server when calling restClientRequest.

Note that the certificate set with this function can not be read using the other restReqClientCert functions, as they only work on incoming requests.

 

Input:

req : SYSHANDLE

A handle to the request.

 

cert : STRING

The name of the client certificate. See Certificates for more details about how to work with the certificates.

 

key : STRING

The name of the private key for the client certificate. If not provided, the key must be included in the client certificate.

 

pass : STRING

The password for the private key, if needed.

 

 

Returns: INT

1


- Success

0


- Not supported

-1


- Invalid request

-5


- Request is read only.

-6


- Failed to find certificate or key.

 

Declaration:

FUNCTION restReqClientCertSet: INT;
VAR_INPUT
  req            : SYSHANDLE;
  cert           : STRING;
  key            : STRING;
  pass           : STRING;
END_VAR;

 

 

Example:

Please see the "Examples - REST Example"