Skip to content

Commit

Permalink
Make TLS error hack to work offline
Browse files Browse the repository at this point in the history
  • Loading branch information
syl20bnr committed Aug 21, 2019
1 parent dcfc6e4 commit 40024fe
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/core-emacs-backports.el
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
(version< emacs-version "26.3"))
;; Hack to prevent TLS error with Emacs 26.1 and 26.2 and gnutls 3.6.4 and above
;; see https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34341
(with-current-buffer (url-retrieve-synchronously "https://api.github.com/users/syl20bnr/repos")
(when (string-empty-p (buffer-string))
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3"))))
(ignore-errors
(with-current-buffer (url-retrieve-synchronously "https://api.github.com/users/syl20bnr/repos")
(when (string-empty-p (buffer-string))
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")))))

(provide 'core-emacs-backports)

0 comments on commit 40024fe

Please sign in to comment.