I have an API running with express
using https
. For testing, I've been using tinycert.org for the certificates, which work fine on my machine.
I'm using docker
to package up the app, and docker-machine
with docker-compose
to run it on a digital ocean server.
When I try to connect with Chrome, I get ERR_SSL_VERSION_OR_CIPHER_MISMATCH
. When running this with curl
, I get a handshake failure: curl: (35) SSL peer handshake failed, the server most likely requires a client certificate to connect
.
I tried to debug with Wireshark's SSL dissector, but it hasn't given me much more info: I can see the "Client Hello" and then the next frame is "Handshake Failure (40)".
I considered that maybe node on the docker container has no available ciphers, but it has a huge list, so it can't be that. I'm unsure as to what's going on and how to remedy it.
EDIT
Here's my createServer()
block:
let app = express();
let httpsOpts = {
key: fs.readFileSync("./secure/key.pem"),
cert: fs.readFileSync("./secure/cert.pem")
};
let port = 8080;
https.createServer(httpsOpts, app).listen(port);