Merge branch 'jk/send-email-ca-path'
authorJeff King <peff@peff.net>
Tue, 1 Dec 2015 23:54:54 +0000 (18:54 -0500)
committerJeff King <peff@peff.net>
Tue, 1 Dec 2015 23:54:54 +0000 (18:54 -0500)
Use a safer behavior when we hit errors verifying remote certificates.

* jk/send-email-ca-path:
send-email: die if CA path doesn't exist

1  2 
git-send-email.perl
diff --combined git-send-email.perl
index 719c7153607ce298e0ce9409587a32d9576f346a,0eb7a28c370b591514e1876f14254089532acee1..77cc2cc3712a61fc54926d40267336251136dcec
@@@ -239,6 -239,7 +239,6 @@@ my %config_settings = 
      "smtpserveroption" => \@smtp_server_options,
      "smtpuser" => \$smtp_authuser,
      "smtppass" => \$smtp_authpass,
 -    "smtpsslcertpath" => \$smtp_ssl_cert_path,
      "smtpdomain" => \$smtp_domain,
      "smtpauth" => \$smtp_auth,
      "to" => \@initial_to,
  
  my %config_path_settings = (
      "aliasesfile" => \@alias_files,
 +    "smtpsslcertpath" => \$smtp_ssl_cert_path,
  );
  
  # Handle Uncouth Termination
@@@ -1196,8 -1196,7 +1196,7 @@@ sub ssl_verify_params 
                return (SSL_verify_mode => SSL_VERIFY_PEER(),
                        SSL_ca_file => $smtp_ssl_cert_path);
        } else {
-               print STDERR "Not using SSL_VERIFY_PEER because the CA path does not exist.\n";
-               return (SSL_verify_mode => SSL_VERIFY_NONE());
+               die "CA path \"$smtp_ssl_cert_path\" does not exist";
        }
  }