--- /dev/null
--- /dev/null
++From 47583d9d9a27fe9fa4fe96a932501497dc27af56 Mon Sep 17 00:00:00 2001
++From: Rob Browning <rlb@defaultvalue.org>
++Date: Sat, 22 Apr 2017 12:02:00 -0500
++Subject: Don't provide openssl s_client as an option for ssl connections
++
++openssl s_client is no longer a default for ssl connections
++
++"s_client is a debug tool, it does not set up a secure connection, it
++ignores all errors and just continues. It also doesn't do checks it
++should be doing. This is all documented behaviour." -- Kurt Roeckx
++
++Bug-Debian: https://bugs.debian.org/766397
++---
++ lisp/net/tls.el | 15 +++++----------
++ 1 file changed, 5 insertions(+), 10 deletions(-)
++
++diff --git a/lisp/net/tls.el b/lisp/net/tls.el
++index 2273d1345d5..91a3f0b5739 100644
++--- a/lisp/net/tls.el
+++++ b/lisp/net/tls.el
++@@ -78,8 +78,7 @@ tls-end-of-info
++
++ (defcustom tls-program
++ '("gnutls-cli --x509cafile %t -p %p %h"
++- "gnutls-cli --x509cafile %t -p %p %h --protocols ssl3"
++- "openssl s_client -connect %h:%p -no_ssl2 -ign_eof")
+++ "gnutls-cli --x509cafile %t -p %p %h --protocols ssl3")
++ "List of strings containing commands to start TLS stream to a host.
++ Each entry in the list is tried until a connection is successful.
++ %h is replaced with the server hostname, %p with the port to
++@@ -94,20 +93,17 @@ tls-program
++ '(choice
++ (const :tag "Default list of commands"
++ ("gnutls-cli --x509cafile %t -p %p %h"
++- "gnutls-cli --x509cafile %t -p %p %h --protocols ssl3"
++- "openssl s_client -CAfile %t -connect %h:%p -no_ssl2 -ign_eof"))
+++ "gnutls-cli --x509cafile %t -p %p %h --protocols ssl3"))
++ (list :tag "Choose commands"
++ :value
++ ("gnutls-cli --x509cafile %t -p %p %h"
++- "gnutls-cli --x509cafile %t -p %p %h --protocols ssl3"
++- "openssl s_client -connect %h:%p -no_ssl2 -ign_eof")
+++ "gnutls-cli --x509cafile %t -p %p %h --protocols ssl3")
++ (set :inline t
++ ;; FIXME: add brief `:tag "..."' descriptions.
++ ;; (repeat :inline t :tag "Other" (string))
++ ;; No trust check:
++ (const "gnutls-cli --insecure -p %p %h")
++- (const "gnutls-cli --insecure -p %p %h --protocols ssl3")
++- (const "openssl s_client -connect %h:%p -no_ssl2 -ign_eof"))
+++ (const "gnutls-cli --insecure -p %p %h --protocols ssl3"))
++ (repeat :inline t :tag "Other" (string)))
++ (list :tag "List of commands"
++ (repeat :tag "Command" (string))))
++@@ -138,8 +134,7 @@ tls-checktrust
++
++ \(setq tls-program
++ \\='(\"gnutls-cli --x509cafile /etc/ssl/certs/ca-certificates.crt -p %p %h\"
++- \"gnutls-cli --x509cafile /etc/ssl/certs/ca-certificates.crt -p %p %h --protocols ssl3\"
++- \"openssl s_client -connect %h:%p -CAfile /etc/ssl/certs/ca-certificates.crt -no_ssl2 -ign_eof\"))"
+++ \"gnutls-cli --x509cafile /etc/ssl/certs/ca-certificates.crt -p %p %h --protocols ssl3\"))"
++ :type '(choice (const :tag "Always" t)
++ (const :tag "Never" nil)
++ (const :tag "Ask" ask))