Closed co7e closed 5 years ago
Hey @co7e, I tried reproducing this issue by following these steps:
localhost
following this guide: https://msol.io/blog/tech/create-a-self-signed-ecc-certificate/Created a simple Node.js server:
const https = require('https');
const fs = require('fs');
const options = {
key: fs.readFileSync('key.pem'),
cert: fs.readFileSync('certificate.pem')
};
https.createServer(options, (req, res) => {
res.writeHead(200, {
'content-type': 'text/html'
});
res.end('hello world\n');
}).listen(8000);
cy.visit('https://localhost:8000')
And this works for me. Can you share the complete DEBUG
logs from when you run Cypress and try to visit this application? You can gather them using these instructions.
Hi @flotwig ,
Thanks. Logs below (I've replaced the project, folder, and domain names in the log to "test").
May be it is something else about the certificate, I'll try and find out what. I thought the only difference between the certificate that works and doesn't is that one is ECC and one is RSA, but I may have overlooked something.
@co7e any updates on your side with this issue?
@jennifer-shehane , I've discovered the bug. It is when using the secp384r1 elliptic curve. I tried the same instructions (https://msol.io/blog/tech/create-a-self-signed-ecc-certificate/) as @flotwig and it worked for prime256v1 but not for secp384v1.
As I understand it, secp384r1 along with prime256v1 are the two most widely supported curves.
I think this is the bug you're running in to: nodejs/node#16196
Looks like certain ECC configurations are broken in our version of Node. The Electron upgrade (#4720) should resolve this issue.
The code for this is done in cypress-io/cypress#4720, but has yet to be released. We'll update this issue and reference the changelog when it's released.
Released in 3.5.0
.
Current behavior:
Using an ECC SSL certificate Cypress fails to load the website. The browser reports that the connection is insecure, so the certificate hasn't loaded correctly. However, then manually opening the website on one of the Cypress browser tabs (Chrome or Electron) it loads correctly.
This is the error that is reported in the test:
Desired behavior:
Tests to run successfully when ECC SSL certificates are being used for HTTPS.
Steps to reproduce: (app code and test code)
Install and use an ECC SSL certificate for an https based test.
Versions
3.3.1 OS: windows Browsers: Chrome 74 and Electron 61