Skip to content

SSL Certificates

Web certificates facilitate traffic between a web browser and a web server to be encrypted, and ensure that only the server can read the contents of the traffic.

Lets Encrypt -- it's hard to beat the price: free Let's Encrypt

Local Certificates

During development, it helps to replicate encryption the way it will be used in production. However, for local services you won't have a certificate signed by a public certificate of authority provider (CA).

Let's Encrypt recommends the following: Certificates for localhost - Let's Encrypt

Unfortunately, in Chrome browsers, this leads to all sorts of issues.

Even when importing the certificates in Chrome -> Settings -> Security -> Manage Certificates linux - How to fix ‘Certificate Import Error: The Private Key for this Client Certificate is missing or invalid' error in the import certificate file - Stack Overflow


Testing with Cypress opens up a few additional challenges.

So far I have not been able to test a local service with a self-signed certificate using Chrome browsers. Firefox works.

I mounted the generated certificates so they are available within the Cypress container (in docker-compose.yml)

      - ./web/ssl:/etc/nginx/ssl
      - ./web/ssl:/etc/nginx/ssl

A long thread about getting Chrome to work -- wasn't able to get this working. 💤 cy.visit() results in ERR_SSL_VERSION_OR_CIPHER_MISMATCH · Issue #771 · cypress-io/cypress