From: Simon Ruderich Date: Fri, 9 Aug 2013 15:44:24 +0000 (+0200) Subject: Ensure proxy-ca.pem contains only one CA. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=759d95a00bcd233ba186a3086db1a1d85af2e7af;p=tlsproxy%2Ftlsproxy.git Ensure proxy-ca.pem contains only one CA. --- diff --git a/src/connection.c b/src/connection.c index d69c2fa..2b0f5d5 100644 --- a/src/connection.c +++ b/src/connection.c @@ -406,6 +406,11 @@ static int initialize_tls_session_client(int peer_socket, PROXY_CA_PATH); gnutls_certificate_free_credentials(*x509_cred); return -1; + } else if (result != 1) { + /* Must contain only one CA, our proxy CA. */ + LOG(ERROR, "initialize_tls_session_client(): multiple CAs found"); + gnutls_certificate_free_credentials(*x509_cred); + return -1; } } /* If the invalid hostname was specified do nothing, we use a self-signed