summaryrefslogtreecommitdiff
path: root/lib/tls.c
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2013-10-03 21:13:54 +0200
committerLinus Nordberg <linus@nordberg.se>2013-10-03 21:13:54 +0200
commit787ccb8ea4a0c384749338fb4665c790c42af665 (patch)
tree3d39cd4031034781b820192bc113ccce695a8bd2 /lib/tls.c
parenta6ea0fa54ab96f56333d5e660a4a7fd7c061dd3c (diff)
Implement disable_hostname_check config option.
Patch by Sam Hartman.
Diffstat (limited to 'lib/tls.c')
-rw-r--r--lib/tls.c2
1 files changed, 2 insertions, 0 deletions
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);