A
A
Aryeh Leonid R.2018-12-25 12:50:52
JavaScript
Aryeh Leonid R., 2018-12-25 12:50:52

How to debug https certificate validation in a server written in express.js + https?

I am writing my first server with REST-API on express.js + https
While http is used, everything works fine.

app.listen(port, function () {
        console.log('MySrv HTTP: listening on port ' + port);

Now I replace http with https.
https.createServer(opts, app).listen(port, function () {
        console.log('MySrv HTTPS: listening on port ' + port);

If I turn off the verification of all certificates - it's also normal.
Those. certificates are requested, transmitted, but the verification results are ignored.
If you enable server certificate checking, then the client (Postman) gives an error.
If you enable client certificate verification, the server will throw an error. It is impossible to understand anything.
All certificates are self-signed. Apparently there is a problem with them, although I'm not sure.
And now the question is: how to enable logging of the https protocol in order to understand what certificates do not suit?
Additional question: Is there another way to debug https besides logging?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem, 2018-12-25
@ulkoart

These things are best left to nginx.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question