X-Git-Url: https://ruderich.org/simon/gitweb/?p=tlsproxy%2Ftlsproxy.git;a=blobdiff_plain;f=src%2Fconnection.c;h=2b0f5d55c8ec3ea30cf499c2adaedde60d0a9169;hp=d69c2faf6c30874bb8f093ffeed0e260b2f7685a;hb=759d95a00bcd233ba186a3086db1a1d85af2e7af;hpb=df1daac85cc5baa6ded75040b36e2b1743ac4a19 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