SSL_CLIENT_CONNECT Function
Initializes the OpenSSL library and establishes a connection with a remote HTTPS server.
Usage
connection = SSL_CLIENT_CONNECT(hostinfo)
Input Parameters
hostinfo—A PV-WAVE STRING containing the connection information for the target server. This should be an IP address or URL for the server followed by the port number to connect to, for example "www.random.org:443". Port 443 is the standard port on which HTTPS servers listen for SSL connections.
Returned Value
On success, a PV-WAVE named structure of type SSL_BIO_CTX containing the connection handles is returned for use by other SSL_connect routines. The SSL_BIO_CTX structure is defined by SSL_CONNECT_LOAD Procedure.
On failure, returns one of the following
*–1: Unable to load the local trust store.
*–2: Unable to connect to host.
*–3: Host validation failed.
Keywords
Trust—An optional STRING containing the full path to, and name of, the local client's 'trust store'. A trust store file (.pem) contains the root certificates for trusted Certificate Authorities (CA). If provided, the certificate provided by the server during the handshake process is validated against those in the trust store. If the certificate chain provided by the server resolves to the root certificate of a trusted CA, as indicated by its presence in the trust store, the connection is allowed. Typically, this keyword is not used when accessing a trusted, internal server. By default, the server is assumed to be trusted and no validation is performed.
Example
For more information and to see this process in use, see the file ssl_demo.pro in the SSL_connect lib directory.
See Also