]> git.eshelyaron.com Git - emacs.git/commitdiff
Change gnutls-verify-error to be first-match
authorRobert Pluim <rpluim@gmail.com>
Fri, 13 Apr 2018 12:24:11 +0000 (14:24 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 13 Apr 2018 12:24:11 +0000 (14:24 +0200)
* lisp/net/gnutls.el (gnutls-boot-parameters): Convert to
first-match for gnutls-verify-error rather than any-match
(bug#29977).

lisp/net/gnutls.el

index 85c9308c0d291b7b275a32e129e2a0b1339f3d18..cce4962758dcad79c75333078b99f6f766ce288e 100644 (file)
@@ -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)))