47694dc
From Mon Sep 17 00:00:00 2001
47694dc
From: Matt McCutchen <matt@mattmccutchen.net>
47694dc
Date: Wed, 26 Aug 2020 12:16:08 -0400
47694dc
47694dc
rsync-ssl: Verify the hostname in the certificate when using openssl.
47694dc
---
47694dc
 rsync-ssl | 2 +-
47694dc
 1 file changed, 1 insertion(+), 1 deletion(-)
47694dc
47694dc
diff --git a/rsync-ssl b/rsync-ssl
47694dc
index 8101975a..46701af1 100755
47694dc
--- a/rsync-ssl
47694dc
+++ b/rsync-ssl
47694dc
@@ -129,7 +129,7 @@ function rsync_ssl_helper {
47694dc
     fi
47694dc
 
47694dc
     if [[ $RSYNC_SSL_TYPE == openssl ]]; then
47694dc
-	exec $RSYNC_SSL_OPENSSL s_client $caopt $certopt -quiet -verify_quiet -servername $hostname -connect $hostname:$port
47694dc
+	exec $RSYNC_SSL_OPENSSL s_client $caopt $certopt -quiet -verify_quiet -servername $hostname -verify_hostname $hostname -connect $hostname:$port
47694dc
     elif [[ $RSYNC_SSL_TYPE == gnutls ]]; then
47694dc
 	exec $RSYNC_SSL_GNUTLS --logfile=/dev/null $gnutls_cert_opt $gnutls_opts $hostname:$port
47694dc
     else