antoinechalifour/memento

Unable to verify the first certificate

user753 opened this issue · 3 comments

  Error: unable to verify the first certificate
      at TLSSocket.onConnectSecure (_tls_wrap.js:1049:34)
      at TLSSocket.emit (events.js:182:13)
      at TLSSocket._finishInit (_tls_wrap.js:631:8)

I am trying to use api with https, maybe there is something wrong with certificate.
Is it possible to disable the verification of the certificate?

Hi! If the API is public, is it possible to send to your configuration file so that I can investigate this issue ?

If this is a bug, I can work on HTTPS support. If the certificates are not valid, you may try to disable security checks, although I cannot recommend it, using NODE_TLS_REJECT_UNAUTHORIZED=0 npx @antoinchalifour/memento

@antoinechalifour Thanks. NODE_TLS_REJECT_UNAUTHORIZED=0 works.
No, its our internal api.
Some feedback:
When this error occurs memento returns 500 error and it isn't obvious it's server response or memento error.
I think is this case memento should return error message like Memento cannot process this request
Also, Is it possible to use request urls inside .memento-cache instead of hashes? I would like to modify some responses for testing purposes and it would be easy to find these responses.

Glad it worked!

Yes memento should definitely send a message on internal server error.

Regarding the folder names, previous versions implemented this but I faced a issues regarding folder named and length so I decided to use the hash.
As an alternative, I am working on a new command memento edit which opens the response on your editor. Planning to release it in a few weeks!

Thanks for your feedback :)