mbrubeck / agate

Very simple server for the Gemini hypertext protocol
Apache License 2.0
583 stars 37 forks source link

"00 'TLS error' error:received corrupt message of type Handshake" #223

Closed TB7836 closed 1 year ago

TB7836 commented 1 year ago

I installed Agate 3.2.4 (from file agate.armv7-unknown-linux-gnueabihf.gz) on an offline test server running Raspberry Pi OS (Bullseye). When I ran Agate for the first time, it created its own certificates in the ".certificates" directory. When I tried to access my index.gmi page with Lagrange, it gave an error message saying, "TLS/SSL handshake failed", and at the same time Agate 3.2.4 said

00 'TLS error' error:received corrupt message of type Handshake

When I tried with AV-98, it said

DeprecationWarning: ssl.PROTOCOL_TLS is deprecated
  context = ssl.SSLContext(protocol)
ERROR: [SSL: TLSV1_ALERT_ACCESS_DENIED] tlsv1 alert access denied (_ssl.c:997)

and Agate says:

00 'TLS error' error:unexpected error: no server certificate chain resolved

Agate obviously knows where the certificates are because it put them there. What is going on?

Johann150 commented 1 year ago

no server certificate chain resolved

This may indicate no host name matched the installed certificates. Does the hostname you entered into the browser match the hostname you told agate?

TB7836 commented 1 year ago

Since it is an offline test server, the name is just the IP address on my local network. But even if I assign that IP address to the correct domain name using my /etc/hosts file (and test that I did so correctly by going to that domain name in a web browser), the problem persists.

Johann150 commented 1 year ago

I am not sure that I got you correctly. Could you please provide the following:

  1. command that starts agate (with all parameters)
  2. listing of everything beneath the certificate directory agate uses
  3. URI that you requested
Johann150 commented 1 year ago

closing this as stale