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
preguntada hace 2 años791 visualizaciones
1 Respuesta
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
respondido hace 2 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas