summary refs log tree commit diff
path: root/fetch.c
diff options
context:
space:
mode:
Diffstat (limited to 'fetch.c')
-rw-r--r--fetch.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fetch.c b/fetch.c
index 5c3006c..a3aaec9 100644
--- a/fetch.c
+++ b/fetch.c
@@ -668,6 +668,10 @@ noslash:
 			fprintf(ttyout, "TLS handshake failure: %s\n", tls_error(tls));
 			goto cleanup_url_get;
 		}
+		if (tls_verify_hostname(tls, sslhost) != 0) {
+			fprintf(ttyout, "TLS hostname verification failed\n");
+			goto cleanup_url_get;
+		}
 		fin = funopen(tls, stdio_tls_read_wrapper,
 		    stdio_tls_write_wrapper, NULL, NULL);
 	} else {