Hot answers tagged

31 votes
Accepted

How do I install GnuTLS for Emacs 25.1 on Windows?

@StuartHickinbottom explained what I was doing wrong: using libgnutls-28.dll when Emacs 25.1 requires the newer and incompatible libgnutls-30.dll. Then it was a matter of finding binaries of libgnutls-...
  • 4,642
8 votes

How can I retrieve an HTTPS URL on Mac OS X without warnings about an untrusted authority?

Add /private/etc/ssl/cert.pem to gnutls-trustfiles: M-x customize-variable Customize variable: gnutls-trustfiles Select the last [INS] Bundle filename: /private/etc/ssl/cert.pem Select [ Apply and ...
  • 181
8 votes

How can I use ERC with an IRC offered over SSL?

Testing it this morning: (require 'erc) (erc-tls :server "irc.gitter.im" :port 6667) ;; M-x erc-tls -> irc.gitter.im -> accept default PORT. Then when prompted: NICK: jleechpe PASS: <...
7 votes
Accepted

How can I use ERC with an IRC offered over SSL?

However, I cannot find any mention of SSL in ERC's Info manual. I've found a mention of SSL here How can I specify that the connection should be secure? What about M-x erc-tls ?
  • 6,111
4 votes
Accepted

How can I retrieve an HTTPS URL on Mac OS X without warnings about an untrusted authority?

To solve this issue it seems sufficient to: Set gnutls-verify-error to t, and Add an appropriate trusted root certificate file to gnutls-trustfiles - the default setting for that list does not ...
  • 1,019
4 votes

The TLS connection was non-properly terminated

This appears to be a bug with the interaction of some versions of emacs with some versions of gnutls: https://github.com/nicferrier/elmarmalade/issues/55#issuecomment-75377455
4 votes
Accepted

TLS connection to Melpa.org hanging on prelude

I got around this by first starting emacs with emacs --insecure and once that worked and downloaded and what it needed, I was able to start emacs --daemon fine.
4 votes
Accepted

Emacs TLS check is still ill-configured

I found this reddit comment, which states that the problem is Emacs built-in TLS doesn't reject bad certificates. It proposes using external TLS like this: (if (fboundp 'gnutls-available-p) (...
  • 156
3 votes

Send email with gnus via ssl port 465

I had the same problem. Could send mail from home but not at university. I struggle with it for days. I was already using but I was using the port 587. Then changing to port 465 did the job. So may ...
  • 732
3 votes
Accepted

How do I set `gnutls-verify-error` to not check if certain hostname matches the certificate?

As jabber.el started using the GnuTLS facility of Emacs before the variable gnutls-verify-error existed, it uses its own variable jabber-invalid-certificate-servers. That variable contains a list of ...
  • 5,924
2 votes
Accepted

EPA (EasyPG Assistant): How to select which private key to use when encrypting?

When encrypting, GPG uses the recipient's public key (so only she can decrypt it, with her private key). Your own keys are not used (neither private nor public). You private key is only used either ...
  • 25.5k
2 votes
Accepted

The TLS connection was non-properly terminated

I can no longer reproduce the issue after upgrading to the the latest stable Emacs (currently 24.5). C-h N shows that a number of changes have been made to package signatures in that version.
2 votes
Accepted

Accessing HTTPS sites with mac emacs 26.3

Your question is similar to the old one accessing MELPA/ELPA sites, also https - so there are two possible solutions to solve that: Upgrade to emacs version 26.3, this is solved there; - but seems to ...
  • 1,121
2 votes

Can't connect to package managers on multiple computers

This problem was solved by forcing emacs to use https instead of http. For some reason, emacs is using http as default instead of https. Steps to solve: (customize-variable RET package-archives) ...
1 vote

Emacs Contacting host: elpa.gnu.org:80 possibly related to TLS shenanigans

This worked for me. Thank-you. Specifically, I added the line (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3") to my init.el. Actually a better way to set variables is with this ...
  • 11
1 vote
Accepted

Emacs Contacting host: elpa.gnu.org:80 possibly related to TLS shenanigans

I can't mark a comment as an answer, so I will copy the comment of phils to mark it as a solution. "I believe you want https for both gnu and melpa, and furthermore that marmalade may no longer ...
  • 51
1 vote

Emacs Contacting host: elpa.gnu.org:80 possibly related to TLS shenanigans

I found I also needed the below: gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3" Edit: I have since lost the site that I have found this. When I would try and issue a package-list-packages ...
  • 11
1 vote

Cannot access ELPA from Emacs behind a corporate proxy (Mac)

Emacs package.el supports local package repo. So here is the solution, Create a local repo from your installed packages using https://github.com/redguardtoo/elpa-mirror Add local repo path to ...
  • 4,661
1 vote
Accepted

Cannot access ELPA from Emacs behind a corporate proxy (Mac)

I was able to work around this issue by using Squid as described here. Note that I still see the elpa.gnu.org/0 nodename nor servname provided, or not known error.
1 vote

Failed to update packages getting error "gnutls-error #<process elpa.gnu.org> -50" on Windows 10

I solved this by setting the variable gnutls-algorithm-priority to TLS-1.2. (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.2"). It's because on Windows or Windows Subsystem Linux (WSL) the ...
1 vote

Can't connect to package managers on multiple computers

When in doubt, simplify. Start your Emacs with emacs -Q to disable initialization. Then in the *scratch* buffer, evaluate the following lines by hitting Ctrl+j after each lisp line. Afterwards your *...
  • 2,368
1 vote

M-x list-package fails with error "certificate could not be verified"

After much digging, I believe a common cause of this is likely a combination of two things: elpa.gnu.org is misconfigured, sending its own certificate in duplicate before the issuer certificate - ...
1 vote

gnutls-negotiate: Certificate validation failed for [hostname] verification code 402

I tried gnutls-cli hostname -p 9001 to check if there actually was a problem with the cert (and not just my Emacs 25) and it turns out the certificate was expired. So it seems Emacs 24 didn't care ...
  • 1,055
1 vote

smtpmail.el: How to tell if gnutls has started

You have hopefully figured this out by now but I think you need (setq smtpmail-stream-type 'starttls). You've specified TLS directly which won't work if the service expects unencrypted connections at ...
  • 11
1 vote

Emacs mail - The TLS connection was non-properly terminated

Below are my settings for sending mail through GMail: (require 'nnir) (setq gnus-select-method '(nnimap "gmail" (nnimap-address "imap.gmail.com") (nnimap-server-...
  • 11k
1 vote

TLS connection to Melpa.org hanging on prelude

On Windows 10, I solved the problem by starting Emacs with the admin prompt (seems that admin rights matter). Also, you should check on whether gnutls is properly installed, following the instructions ...
1 vote
Accepted

GnuTLS / OpenSSL hangs on Windows when accessing Gmail

Thanks to comments posted by legoscia, it is functioning! Mainly, I had to remove tls-program definition. (setq tls-program '("c:/Progra~2/Git/bin/openssl.exe s_client -connect %h:%p -no_ssl2 -...
1 vote

crypto-newbie: how to securely sign outgoing email with `smtpmail` (or simplest alternative)?

You do not need to use a full Emacs email client like Gnus or mu4e (although I recommend it); message-mode should be sufficient to compose and send email, and to encrypt or sign outgoing messages. I ...
  • 5,236

Only top scored, non community-wiki answers of a minimum length are eligible