Skip to content

pop3 to pop.gmail.com invalid certificate #74

Open

Description

@rich-coe

Connecting to pop.gmail.com I get:
`The SSL certificate of pop.gmail.com cannot be verified by the following reason:
self signed certificate

Subject: /OU=No SNI provided - please fix your client./CN=invalid2.invalid
Issuer: /OU=No SNI provided - please fix your client./CN=invalid2.invalid
Issued date: Jun 8 09:42:35 2026 GMT
Expire date: Aug 31 09:42:34 2026 GMT

SHA1 fingerprint: DB:30:3E:72:34:08:FD:44:55:38:2E:BF:E1:F7:C7:65:E5:7B:01:33
MD5 fingerprint: 5C:37:EB:D7:02:86:7D:47:9F:27:C2:EA:F3:F4:85:1B`

Diagnosis reports:
The certificate error message "No SNI provided - please fix your client" means your email client is not sending the server name during the initial secure connection handshake.Google’s infrastructure hosts millions of services on shared IP addresses. It requires Server Name Indication (SNI) to know exactly which certificate (pop.gmail.com) to send back to your computer. When your client hides this information, Google deliberately serves an invalid, self-signed certificate (invalid2.invalid) to block the connection.

Activity

  1. rich-coe commented on Jun 25, 2026

    @rich-coe
    Author
    index 84139250..25488d9b 100644
    --- a/libsylph/ssl.c
    +++ b/libsylph/ssl.c
    @@ -258,7 +258,11 @@ gboolean ssl_init_socket_with_method(SockInfo *sockinfo, SSLMethod method)
                    return FALSE;
            }
     
    +        gchar *snihost = g_strconcat("://", sockinfo->hostname, NULL);
    +
            SSL_set_fd(sockinfo->ssl, sockinfo->sock);
    +        SSL_set_tlsext_host_name(sockinfo->ssl, snihost);
    +
            while ((ret = SSL_connect(sockinfo->ssl)) != 1) {
                    err = SSL_get_error(sockinfo->ssl, ret);
                    if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE) {
    @@ -268,8 +272,10 @@ gboolean ssl_init_socket_with_method(SockInfo *sockinfo, SSLMethod method)
                    }
                    g_warning("SSL_connect() failed with error %d, ret = %d (%s)\n",
                              err, ret, ERR_error_string(ERR_get_error(), NULL));
    +                g_free(snihost);
                    return FALSE;
            }
    +        g_free(snihost);
     
            /* Get the cipher */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions