The function is used to establish secure connections using SSL (Secure Sockets Layer), which is a security protocol that provides privacy, authentication, and integrity to Internet communications.
The DigiCertGlobalRootCA.crt.pem file is a text-based file that contains a certificate, a private key, and any associated certificates.
The PEM file format is used by many different applications, including OpenSSL, PuTTY, and Thunderbird.
A CRT file is a binary file that contains only the certificate.
By default, Azure Database for MySQL enforces SSL connections between your server and your client applications to protect against MITM (man in the middle) attacks.
The syntax is as follows:
mysqli_ssl_set( connection, key, cert, ca, capath, cipher )
Parameter
Description
connection
Required. Specifies the MySQL connection to use.
key
Required. Specifies the path name to the key file.
cert
Required. Specifies the path name to the certificate file.
ca
Required. Specifies the path name to the certificate authority file.
capath
Required. Specifies the pathname to a directory that contains trusted SSL CA certificates in PEM format.
cipher
Required. Specifies a list of allowable ciphers to use for SSL encryption.