1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-31 04:41:23 -08:00

Require key and cert when searching for client cert

* lisp/net/network-stream.el (network-stream-certificate):
Require :key and :cert when searching auth sources for a client
certificate.  (Bug#78189)
This commit is contained in:
Jens Schmidt 2025-05-05 13:47:17 +02:00 committed by Robert Pluim
parent b91efd401d
commit d11570d80e

View 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)