Commit 59bf524c authored by Ted Zlatanov's avatar Ted Zlatanov
Browse files

net/nsm.el: Use `gnutls-peer-status-warning-describe'.

* net/nsm.el (nsm-check-tls-connection, nsm-save-host)
(nsm-warnings-ok-p): Use `gnutls-peer-status-warning-describe'.
parent 8608c100
2014-11-25 Teodor Zlatanov <>
* net/nsm.el (nsm-check-tls-connection, nsm-save-host)
(nsm-warnings-ok-p): Use `gnutls-peer-status-warning-describe'.
2014-11-20 Nicolas Richard <> 2014-11-20 Nicolas Richard <>
* emacs-lisp/byte-run.el (function-put): Match argument names to * emacs-lisp/byte-run.el (function-put): Match argument names to
...@@ -169,7 +169,9 @@ unencrypted." ...@@ -169,7 +169,9 @@ unencrypted."
host port host port
(if (> (length warnings) 1) (if (> (length warnings) 1)
"s" "") "s" "")
(mapconcat 'cadr warnings "\n")))) (mapconcat #'gnutls-peer-status-warning-describe
(progn (progn
(delete-process process) (delete-process process)
nil) nil)
...@@ -298,7 +300,7 @@ unencrypted." ...@@ -298,7 +300,7 @@ unencrypted."
(nconc saved `(:conditions (:unencrypted)))) (nconc saved `(:conditions (:unencrypted))))
((plist-get status :warnings) ((plist-get status :warnings)
(nconc saved (nconc saved
`(:conditions ,(mapcar 'car (plist-get status :warnings))))))) `(:conditions ,(plist-get status :warnings))))))
(if (eq permanency 'always) (if (eq permanency 'always)
(progn (progn
(nsm-remove-temporary-setting id) (nsm-remove-temporary-setting id)
...@@ -340,12 +342,9 @@ unencrypted." ...@@ -340,12 +342,9 @@ unencrypted."
result)) result))
(defun nsm-warnings-ok-p (status settings) (defun nsm-warnings-ok-p (status settings)
(let ((not-ok nil) (null (cl-intersection
(conditions (plist-get settings :conditions))) (plist-get settings :conditions)
(dolist (warning (plist-get status :warnings)) (plist-get status :warnings))))
(when (memq (car warning) conditions)
(setq not-ok t)))
(defun nsm-remove-permanent-setting (id) (defun nsm-remove-permanent-setting (id)
(setq nsm-permanent-host-settings (setq nsm-permanent-host-settings
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment