From 787ccb8ea4a0c384749338fb4665c790c42af665 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Thu, 3 Oct 2013 21:13:54 +0200 Subject: Implement disable_hostname_check config option. Patch by Sam Hartman. --- lib/tls.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/tls.c') diff --git a/lib/tls.c b/lib/tls.c index 62e219e..62b281f 100644 --- a/lib/tls.c +++ b/lib/tls.c @@ -225,6 +225,8 @@ tls_verify_cert (struct rs_connection *conn) if (!success) success = (cnregexp (peer_cert, hostname, NULL) == 1); + if (conn->realm->disable_hostname_check) + success = 1; if (!success) err = rs_err_conn_push (conn, RSE_CERT, "server certificate doesn't " "match configured hostname \"%s\"", hostname); -- cgit v1.1