From: Robert Pluim Date: Fri, 13 Apr 2018 12:24:11 +0000 (+0200) Subject: Change gnutls-verify-error to be first-match X-Git-Tag: emacs-27.0.90~5259 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d5cf7330fa72a81b779628c14a0a19f3fc180f22;p=emacs.git Change gnutls-verify-error to be first-match * lisp/net/gnutls.el (gnutls-boot-parameters): Convert to first-match for gnutls-verify-error rather than any-match (bug#29977). --- diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el index 85c9308c0d2..cce4962758d 100644 --- a/lisp/net/gnutls.el +++ b/lisp/net/gnutls.el @@ -282,13 +282,9 @@ defaults to GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT." t) ;; if a list, look for hostname matches ((listp gnutls-verify-error) - (apply 'append - (mapcar - (lambda (check) - (when (string-match (nth 0 check) - hostname) - (nth 1 check))) - gnutls-verify-error))) + (cadr (cl-find-if #'(lambda (x) + (string-match (car x) hostname)) + gnutls-verify-error))) ;; else it's nil (t nil)))) (min-prime-bits (or min-prime-bits gnutls-min-prime-bits)))