emacs-circe / circe

Circe, a Client for IRC in Emacs
GNU General Public License v3.0
390 stars 51 forks source link

irc: defer to nsm to verify certificate errors #383

Closed stsquad closed 3 years ago

stsquad commented 3 years ago

Sometimes it is necessary to override the certificate checks for a given host. However this is only possible if the Network Security Manager gets to verify the connection which it will not of gnutls refused to complete the connection in the first place.

As a note for reference you can override nsm-temporary-host-settings with something like:

(let ((id (nsm-id "irc.badcert.host" 6697)))
  (setq nsm-temporary-host-settings
        (list (list :id id :conditions '(:no-host-match :expired :invalid :verify-cert)))))

This follows the same format as nsm-permanent-host-settings which is cached in ~/.emacs.d/network-security.data and is where things are set interactively when using browsers like eww or gnus.

wasamasa commented 3 years ago

Thank you!