Skip to content

TLS error for self-signed certificates #24

@oproulx

Description

@oproulx

Started getting the following error:

Error: self-signed certificate
    at TLSSocket.onConnectSecure (node:_tls_wrap:1535:34)
    at TLSSocket.emit (node:events:513:28)
    at TLSSocket.emit (node:domain:489:12)
    at TLSSocket._finishInit (node:_tls_wrap:949:8)
    at ssl.onhandshakedone (node:_tls_wrap:733:12)

Looks like this is due to gmail having self-signed certificates.
The following fix solves the issue:

tls: {
      minVersion: 'TLSv1',
      rejectUnauthorized: false // This is required since google self-signs their cert
    }

However, it could be good for the module to have the tls settings configurable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions