1

I'm working on a mac (Catalina 10.15.1) and I've recently switched from Aquamacs to GNU Emacs (updated to 26.3 build 1). In Aquamacs, I had no issues accessing https sites, though I'm unable to do this in my current GNU Emacs set up. Whenever I try to open an https website through eww, I'm sent to yahoo.com, which I'm guessing is a default is something goes wrong. I'm able to open all other http websites without a problem.

I've gone through the discussions here on emacs.stackexchange but to little avail. I see that I might need to install GnuTLS for TLS/SSL support for newer versions of Emacs. I installed it through homebrew. Now, when I run M-: (gnutls-available-p), Emacs returns the following:

(ClientHello\ Padding Key\ Share Post\ Handshake\ Auth PSK\ Key\ Exchange\ Modes Cookie Supported\ Versions Early\ Data Pre\ Shared\ Key Session\ Ticket Record\ Size\ Limit Extended\ Master\ Secret Encrypt-then-MAC ...)

Which suggests it's up and running. Per suggestions below, I added the following to my custom file:

(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")

Checked with C-h v to make sure the variable was changed, but still getting the same results - all https sites go to yahoo.com.

I'm not terribly agile with programing in general and my question is whether there is some work around or a simple guide to help me figure out how to adjust things to access https sites. Any help would be much appreciated!

kozina-adjacent
  • 306
  • 1
  • 8

1 Answers1

2

Your question is similar to the old one accessing MELPA/ELPA sites, also https - so there are two possible solutions to solve that:

  1. Upgrade to emacs version 26.3, this is solved there; - but seems to need more work as revealed by @npostavs.
  2. If you still need version 26.2, then add to your custom file the following:

'(gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")

without any gnutls configuration/modification. Just the line above.

Ian
  • 1,321
  • 10
  • 12
  • Reportedly the workaround may still be needed on macOS, even with 26.3 and higher, [Bug#36017](https://debbugs.gnu.org/36017). – npostavs Dec 08 '19 at 15:33
  • Thanks for the quick response! So upgraded to 26.3 and still get the same result - any https site defaults to yahoo.com. Then added (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3") to my custom file per npostavs, checked the variable to make sure with ```C-h v```, and still get the same result. Any thoughts on moving forward? – kozina-adjacent Dec 08 '19 at 15:57
  • Try ```M-x eww``` and the mini buffer will ask you the url of the site to connect to. I just checked the site apple.stackexchange.com and it connects ok. Emacs 26.3 with the suggested line in custom.el file. Try to reset/restart your computer first. – Ian Dec 08 '19 at 16:04
  • Well look at that. You're correct. I can open https://emacs.stackexchange.com/ just fine now. (Awesome!) For some reason, however, https://www.wordreference.com/enit/hello does not want to budge. It still forces me back to yahoo.com and I have no idea why.... – kozina-adjacent Dec 08 '19 at 16:34
  • @kozina_adjacent, the wordreference site downloads and works very well for me - I do not know what /why you get yahoo. May depend on your configuration. I suggest to use emacs-plus (see the spacemacs site) - it has a built-in dependence on GnuTLS and other packages. – Ian Dec 09 '19 at 07:16
  • @Ian, thanks for all the help! I finally broke down and dismantled my custom file piece by piece until I found out where the problem was. I use mediawiki.el and there is a bug with it and new versions of emacs, which is solved by setting ```url-user-agent``` to an empty string. (The variable used to be string in earlier versions of emacs and mediawiki.el expects it to be so.) Removing that line of code allowed me to open https sites but I couldn't open my mediawiki site. My workaround was to set the variable to ```"FOO"```, which seems to make everyone happy. Thanks so much for the help! – kozina-adjacent Dec 09 '19 at 09:43