PHP openssl_get_cert_locations() Function Last Updated : 01 Sep, 2020 Comments Improve Suggest changes Like Article Like Report The openssl_get_cert_locations() function is an in-built function in PHP which is used to get certificate location. This function returns an array with information about the available certificate locations that will be searched for SSL certificates. Syntax: array openssl_get_cert_locations( void ) Parameters: This function does not accept any parameter. Return Value: This function returns an array with the available certificate locations. Below program illustrates the openssl_get_cert_locations() function in PHP: Example: PHP <?php var_dump(openssl_get_cert_locations()); // openssl get cert location represent in array return openssl_get_cert_locations(); ?> Output: array(8) { ["default_cert_file"]=> string(21) "/usr/lib/ssl/cert.pem" ["default_cert_file_env"]=> string(13) "SSL_CERT_FILE" ["default_cert_dir"]=> string(18) "/usr/lib/ssl/certs" ["default_cert_dir_env"]=> string(12) "SSL_CERT_DIR" ["default_private_dir"]=> string(20) "/usr/lib/ssl/private" ["default_default_cert_area"]=> string(12) "/usr/lib/ssl" ["ini_cafile"]=> string(0) "" ["ini_capath"]=> string(0) "" } Reference: https://www.php.net/manual/en/function.openssl-get-cert-locations.php Comment More infoAdvertise with us Next Article PHP openssl_get_cert_locations() Function S shubham_singh Follow Improve Article Tags : Web Technologies PHP PHP-function Similar Reads PHP openssl_get_curve_names() Function The openssl_get_curve_names() function is an inbuilt function in PHP which is used to curve names in Elliptic curve cryptography. The two most widely standardized or supported curves are prime256v1 (NIST P-256) and secp384r1 (NIST P-384). The curve names usually contain a number which is the number 2 min read PHP openssl_get_md_methods() Function The openssl_get_md_methods() function is an inbuilt function in PHP that is used to retrieve a list of available digest (message digest) methods supported by OpenSSL. Syntax: openssl_get_md_methods(bool $aliases = false): array Parameters: This function accepts one parameter which is described below 2 min read PHP openssl_cipher_key_length() Function The openssl_cipher_key_length() function is an inbuilt function in PHP that is used to retrieve the key length required for a given cipher algorithm. Syntax: openssl_cipher_key_length(string $cipher_algo): int|false Parameters: This function accepts only one parameter which is described below. $ciph 1 min read PHP openssl_digest() Function The openssl_digest() function is an inbuilt function in PHP that is used to compute a digest hash value for the given data using a given method and returns a raw or binary hex-encoded string. Syntax: openssl_digest( string $data, string $digest_algo, bool $binary = false): string|false Parameters: T 2 min read PHP openssl_pkey_export() Function The openssl_pkey_export() function is an inbuilt function in PHP which is used to view and manage private keys and public keys. It gets an exportable representation of a key into a string. It exports the key as a PEM encoded string and stores to pass by reference. Syntax: bool openssl_pkey_export( m 2 min read Like