| |

How to Make Chrome Accept Self-Signed Certificates on Linux

If your website uses a self-signed certificates, Chrome will show a warning every time and you need clicks to continue. In this post, I will introduce how to make Chrome accept self-signed certificates for sites on Linux.

This post is made short on purpose and you need to search the Web and learn if you want to understand the stuff.

You will need libnss3-tools package on Debian/Ubuntu/Linux Mint or nss-tools on CentOS/Fedora/RHEL. Then use this script (add-cert.bash):

#!/bin/bash

if [ $# -lt 1 ]; then
    echo "Usage: $0 hostname"
    exit 1
fi

hostname=$1

echo QUIT \
| openssl s_client -servername $hostname -connect $hostname:443 -showcerts 2>null \
| sed -ne '/BEGIN CERT/,/END CERT/p' \
>/tmp/cert-$hostname

certutil -d sql:$HOME/.pki/nssdb -A -t "P,," -n $hostname -i /tmp/cert-$hostname

certutil -d sql:$HOME/.pki/nssdb -L

like

bash add-cert.bash your.web.site

After the certificate is added, restart Chrome and you should find no warnings any more.

Similar Posts

  • Syntactical difference among OCaml, Scala, F# and Haskell

    What’s the syntactical difference among OCaml, Scala, F# and Haskell. This page gives a side-by-side reference among OCaml, F#, Scala and Haskell: ML Dialects and Friends: OCaml, F#, Scala, Haskell Read more: How to install Scala from the official Scala distribution How to make Alt-Tab switch among windows instead of applications in Gnome 3? What’s…

  • How to write paper reviews?

    Sometimes, we need to write paper reviews after read many papers which belong to a specific area (like information retrieval). I have found some useful links which are as follows. http://www.uwlax.edu/biology/communication/ReviewPapers.htmlhttps://users.ece.utexas.edu/~miryung/teaching/EE382V-Fall2009/review.html Read more: How to convert A4 paper format to read on Kindle 5 How to resume a printing job on HP printer if the…

  • How to repair a MySQL table?

    After a server crash and restarting, MyBB reports a SQL Error as follows: MyBB SQL Error MyBB has experienced an internal SQL error and cannot continue. SQL Error: 145 – Table ‘./mybb/mybb_sessions’ is marked as crashed and should be repaired Query: SELECT * FROM mybb_sessions WHERE sid=’40021925bd0494ea31…’ AND ip=’x.x.x.x’ LIMIT 1 The dababase is MySQL….

  • Cryptocurrency 101

    A cryptocurrency (or Blockchain networks for secure and transparent transactions. Blockchains play a crucial role in maintaining the integrity and immutability of transactional data for cryptocurrencies, making them a reliable and efficient medium of exchange. Decentralized blockchain networks form the backbone of many cryptocurrencies, ensuring a high level of security and preventing fraudulent activities such…

  • How to set up MySQL replication

    How to set up MySQL replication. And for debugging purpose, it will be great if I can run multiple MySQL instances on a single host. To set up MySQL replication, check these tutorials: MySQL Replication MySQL replication setup You can Setup multiple MySQL instances on single server. Read more: How to set the data replication…

4 Comments

  1. It seems that the Github gives a free education pack to the student, which includes a free SSL certificate for one year.
    I just apply it yesterday, and use it on https://chetui.org & https://www.chetui.org (which is used for reverse proxy of google).

    If your github account is already certified as a student account of HKUST, then you can also apply it. Finaly, your https website would not show warnning to visitor for at least one year.

    1. Sounds good. But I guess you need to pay after the first year. The https services for my sites are mainly for my own usage for security transfer over the Web. Readers visit by http still. If https is enabled and later disabled, it will look strange while I am not ready to pay for the certificate manually yet.

Leave a Reply

Your email address will not be published. Required fields are marked *