18

I have a local REST-API service based on node/express and MongoDB.

I am planning to switch over from http to https.

The Clients are running on Windows Server 2012 R2 (Terminal-Server).

The REST-API is hosted via Docker on Ubuntu 16.04 LTS Server.

I know:

  • I have to create a self signed certificate by using openSSL on the server hosting the API
  • Browsers have problems accepting self signed certificates

My Question:

  • Is it possible that Clients (Chrome) will accept the HTTPS connection using a self signed certificate?

1 Answer 1

8

Is it possible that Clients (Chrome) will accept the HTTPS connection using a self signed certificate?

Yes. You need to import the certificate into Chrome (after exporting it to a file, if you have not done that yet). You can import certificates in the certificate dialog, which you can reach via Settings / Advanced / Manage Certificates.

Some caveats:

  • Since Chrome 58, the self-signed certificate must have the right domain name in the Subject Alternative Name (SAN) field.
  • After importing the certificate, you need to restart Chrome.

For details, see for example this question on StackOverflow:

Getting Chrome to accept self-signed localhost certificate

5
  • Thanks for your reply, I had an problem with windows not accepting the import of the certificate. Its now fixed :) source: superuser.com/questions/145394/…
    – oldmayn
    Feb 20, 2018 at 10:49
  • 2
    Down vote, because these instructions only apply to legacy google-chrome. Somewhere before version 67 they completely disabled all of this self-signing functionality because illegal websites used this mechanism to distribute illegal data and datums. Your choices for now are to put up with no encryption, or to pay money to the certificate authorities so that the powers that be authorize you to have a website that works through the internet. Don't-be-evil has transformed into "just-a-little-bit-evil". Sep 24, 2018 at 16:32
  • 4
    @EricLeschinski: Thanks for the update. IMHO, if an answer is outdated, it should be edited, not downvoted - it's stil correct, just old.
    – sleske
    Sep 25, 2018 at 7:40
  • 2
    @EricLeschinski: And for the record, I just tested this with current Chrome (V69 on Windows), and it does work for me. However, you need to restart Chrome after importing the cert. Answer edited.
    – sleske
    Sep 25, 2018 at 7:42
  • 1
    Thank you @sieske. RESTART CHROME was the thing that made it all work.
    – Julian
    Nov 2, 2018 at 13:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.