Method HttpClient():setCertificateFromFile() Foundation

Binds a client certificate from a file.

Syntax
:setCertificateFromFile( <cFilename>[, cPassword] ) --> lSuccess
Parameters
<cFilename>
<cFilename> is a character string containing the name of the certificate file to be loaded.
<cPassword>
<cPassword> is the password required to decrypt the certificate file.
Return

The logical value true (.T.), if a client certificated is successfully loaded. Otherwise, the value false (.F.) is returned and the error code can be retrieved with FError() .

Description

The certificate file <cFilename> must be in PKCS #12 format (Personal Information Exchange Syntax v1.1) and usually has the file extension .pfx or .p12. A runtime error occurs if the format is not valid.

The method :setCertificateFromFile() binds a client certificate to this HTTP client object and allows client-side certificate authentication by the HTTP server.

If the certificate was created without a password, the parameter <cPassword> can be ignored. Otherwise, the password that was used to protect the certificate file must be passed in the parameter <cPassword>.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.