From fc9ed61a4357f766292d157ad89e0c1ffb1fa1e2 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Wed, 4 Sep 2019 23:43:56 +0200 Subject: [PATCH] Fix nsm for unencrypted connections When connecting using a cleartext connection, nsm was erroring out and tearing down the connection because it was trying to display nonexistent certificate information. * lisp/net/nsm.el (nsm-query-user): Only format certificate status when it is valid. (Bug#37221) --- lisp/net/nsm.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/net/nsm.el b/lisp/net/nsm.el index 5e8381075be..8750c19267a 100644 --- a/lisp/net/nsm.el +++ b/lisp/net/nsm.el @@ -823,7 +823,7 @@ protocol." ;; First format the certificate and warnings. (with-current-buffer-window buffer nil nil - (insert (nsm-format-certificate status)) + (when status (insert (nsm-format-certificate status))) (insert message) (goto-char (point-min)) ;; Fill the first line of the message, which usually -- 2.39.5