/* Load proxy CA file, this CA "list" is send to the client. */
if (!use_invalid_cert) {
result = gnutls_certificate_set_x509_trust_file(*x509_cred,
/* Load proxy CA file, this CA "list" is send to the client. */
if (!use_invalid_cert) {
result = gnutls_certificate_set_x509_trust_file(*x509_cred,
/* And certificate for this website and proxy's private key. */
if (!use_invalid_cert) {
result = gnutls_certificate_set_x509_key_file(*x509_cred,
/* And certificate for this website and proxy's private key. */
if (!use_invalid_cert) {
result = gnutls_certificate_set_x509_key_file(*x509_cred,
GNUTLS_X509_FMT_PEM);
/* If the invalid hostname was specified load our special "invalid"
* certificate. */
} else {
result = gnutls_certificate_set_x509_key_file(*x509_cred,
GNUTLS_X509_FMT_PEM);
/* If the invalid hostname was specified load our special "invalid"
* certificate. */
} else {
result = gnutls_certificate_set_x509_key_file(*x509_cred,
GNUTLS_X509_FMT_PEM);
}
if (result != GNUTLS_E_SUCCESS) {
LOG(ERROR,
"initialize_tls_session_client(): "
"can't read server certificate ('%s') or key file ('%s'): %s",
GNUTLS_X509_FMT_PEM);
}
if (result != GNUTLS_E_SUCCESS) {
LOG(ERROR,
"initialize_tls_session_client(): "
"can't read server certificate ('%s') or key file ('%s'): %s",