Lambda SSL error UNABLE_TO_VERIFY_LEAF_SIGNATURE posted on forums by Shikasta_Kashti

0

Hi,

I'm trying to connect to my mail server from Lambda but when I do I get this error: UNABLE_TO_VERIFY_LEAF_SIGNATURE and it happens intermittently.

I found one post here in the AWS Lambda forums with same error and it indicates it was some DNS error. Here's the link to that post: https://forums.aws.amazon.com/message.jspa?messageID=608080

Any ideas as to what's wrong here? It was week fine until last week. I checked the SSL of the server with ssllabs.com and it doesn't indicate any issue with it.

Original: https://forums.aws.amazon.com/thread.jspa?threadID=235965

Pieter
gefragt vor 2 Jahren790 Aufrufe
1 Antwort
0

Found an article: https://levelup.gitconnected.com/how-to-resolve-certificate-errors-in-nodejs-app-involving-ssl-calls-781ce48daded

Suggestions are:

  1. Quick fix: Add rejectUnauthorized on request or ENVIRONMENT setting
  2. Add CA certificate to request

Add to request:

https.request({ 
      ....,
      rejectUnauthorized: false,
    },
...)

or environment variable:

NODE_TLS_REJECT_UNAUTHORIZED=0

Alternatively and safer solution is CA certificate:

   ca: [fs.readFileSync([certificate path])],
   rejectUnauthorized: true,
}```
Pieter
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen