send-email: squelch warning from Net::SMTP::SSL

Due to a recent change in the Net::SMTP::SSL module, send-email emits
the following ugly warning everytime a email is sent via SSL:

  *******************************************************************
   Using the default of SSL_verify_mode of SSL_VERIFY_NONE for client
   is deprecated! Please set SSL_verify_mode to SSL_VERIFY_PEER
   together with SSL_ca_file|SSL_ca_path for verification.
   If you really don't want to verify the certificate and keep the
   connection open to Man-In-The-Middle attacks please set
   SSL_verify_mode explicitly to SSL_VERIFY_NONE in your application.
  *******************************************************************

Hide this warning by explicitly specifying SSL_verify_mode =>
SSL_VERIFY_NONE in Net::SMTP::SSL->start_SSL().

We haven't been verifying the connection so far, so this change will
be a no-op from security point of view, which will be corrected in
follow-up patches.

Helped-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
send-email: introduce sendemail.smtpsslcertpath

Use the ca-certificates in /etc/ssl/certs by default (that's where most
distributions put it).  SSL_VERIFY_NONE is now the fallback mode.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
SQUASH??? send-email giving default value to ssl-cert-path with ||= assignment

Helped-by: Eric Sunshine <sunshine@sunshineco.com>
fixup! send-email: squelch warning from Net::SMTP::SSL

Helped-by: brian m. carlson <sandals@crustytoothpaste.net>
SQUASH??? send-email: cover both smtps and starttls cases

Also update the log message 2/2 to:

send-email: use SSL_VERIFY_PEER by default on SMTP over SSL connections

Always use SSL_VERIFY_PEER mode when talking SSL.

The CA certificates directory used for this is specified by the
"--smtp-ssl-cert-path" command line option, may be configured by
sendemail.smtpsslcertpath configuration variable, and defaults to
"/etc/ssl/certs" (which is the default on many distros) if not
specified.

If the CA certificate path does not exist, SSL_VERIFY_NONE is used
after issuing a warning.

We may want to give users a way to explicitly say "I do not want
verification because I know my server does not present valid
certificate, and I do not bother to fix it" (and do not even issue
the warning).
Merge branch 'rr/send-email-ssl-verify' into pu

* rr/send-email-ssl-verify:
  SQUASH??? send-email: cover both smtps and starttls cases
  fixup! send-email: squelch warning from Net::SMTP::SSL
  SQUASH??? send-email giving default value to ssl-cert-path with ||= assignment
  send-email: introduce sendemail.smtpsslcertpath
  send-email: squelch warning from Net::SMTP::SSL