Method HttpClient():setCertificateFromFile() Foundation

Binds a client certificate from a file.

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

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() .


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>.


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.