Skip to content

Commit

Permalink
Let-bind gnutls-verify-error for nsm.el to work
Browse files Browse the repository at this point in the history
Closes #405
  • Loading branch information
wasamasa committed May 26, 2022
1 parent 710f057 commit 41cdc11
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion irc.el
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ COMMAND conn sender args... -- An IRC command message was received"
:keepalive t)))
(when (and (plist-get keywords :tls)
(fboundp 'nsm-verify-connection))
(setq proc (nsm-verify-connection proc host service))
;; gnutls-verify-error must be nil for nsm to work, otherwise
;; keep it at the default value (see #405)
(let (gnutls-verify-error)
(setq proc (nsm-verify-connection proc host service)))
(when (not proc)
(error "nsm verification failed")))
;; When we used `make-network-process' without :nowait, the
Expand Down
5 changes: 5 additions & 0 deletions tests/manual/test-nsm.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
;; see #405
(require 'circe)
(setq gnutls-verify-error t)

(irc-connect :host "expired.badssl.com" :service 443 :tls t)

0 comments on commit 41cdc11

Please # to comment.