]> git.eshelyaron.com Git - emacs.git/commitdiff
Require key and cert when searching for client cert
authorJens Schmidt <jschmidt4gnu@vodafonemail.de>
Mon, 5 May 2025 11:47:17 +0000 (13:47 +0200)
committerEshel Yaron <me@eshelyaron.com>
Mon, 12 May 2025 19:55:57 +0000 (21:55 +0200)
* lisp/net/network-stream.el (network-stream-certificate):
Require :key and :cert when searching auth sources for a client
certificate.  (Bug#78189)

(cherry picked from commit d11570d80ee18932ffb0ceed552313ada2879bcb)

lisp/net/network-stream.el

index 1bd960025aaaf0b2d07552fba778ba07451cf06f..93f3682883a09667ac3fe5bf7f04b9956344beae 100644 (file)
@@ -249,7 +249,8 @@ gnutls-boot (as returned by `gnutls-boot-parameters')."
               (ignore-errors
                 (car (auth-source-search :max 1
                                          :host host
-                                         :port (format "%s" service)))))
+                                         :port (format "%s" service)
+                                         :require '(:key :cert)))))
             (key (plist-get auth-info :key))
             (cert (plist-get auth-info :cert)))
        (and key cert (file-readable-p key) (file-readable-p cert)