(PECL getdns >= 0.10.0)
php_getdns_context_get_tls_authentication — Get the TLS server authentication mode.
This function can be used to get the mode for upstream server hostname authentication for TLS connections in stub mode. The stub resolver can require that a server provide a valid certificate (validated using the default CA repository) and that the hostname specified in the "tls_auth_name" field of the upstream dictionary matches the name in the certificate. The authentication setting is only enforced when the transport list contains only GETDNS_TRANSPORT_TLS, and in this case if authentication fails for all upstreams, queries will fail. If the transport list contains other clear text transports then opportunistic TLS will be performed which does not require authentication of the TLS connection.
The previously created DNS context that is to be used with this request.
The value to be retrieved. It will be either GETDNS_AUTHENTICATION_NONE (the default) or GETDNS_AUTHENTICATION_HOSTNAME to indicate that host name validation is set.
This function returns an integer response code. GETDNS_RETURN_GOOD indicates successful completion.