Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to the Power Users community on Codidact!

Power Users is a Q&A site for questions about the usage of computer software and hardware. We are still a small site and would like to grow, so please consider joining our community. We are looking forward to your questions and answers; they are the building blocks of a repository of knowledge we are building together.

How to deal with self-signed certificates in household devices

+4
−0

Devices come to my house with pre-installed self-signed certificates that apply to their management web UIs. Chrome issues a dire warning and requires extra clicks every time I visit one.

My primary system for communicating with these puppies (a NAS, two printers and some switches) is a Mac.

I've dabbled with Let's Encrypt certificates, but their relatively short lifetimes makes this painful, since none of them officially support any way to automatically update the certs.

Is there anything resembling a consensus on the least bad solution here? I can imagine:

  • Adding the self-signed certs to the MacOS trust store.
  • Using a different browser
  • just living with the warning interstitial screens.
History

1 comment thread

Would sticking a reverse proxy, and using LE scripts on that work I wonder (1 comment)

1 answer

+3
−0

I use my personal certificate authority (CA) for this. Using easy-rsa it's easier than it sounds.

There are tons of tutorials for this, so I just summarize it:

  1. install easy-rsa, it comes with every package manager I know.
  2. create a directory that holds your CA
  3. run easyrsa init-pki
  4. run easyrsa build-ca

You will be asked some values and the necessary CA certificates are being generated.

You need to install the CA on all the devices you use to access other devices, computers, smartphones, tablets, etc, but you only need this once. The CA certificate should have a pretty long life span, 20 years by default IIRC. Note: Some programs, for example Firefox, have their own CA store, others use the OS store.

Now you can create certificate requests (csr) for it, one per device.

$ easyrsa gen-req myhost.example.com
Using SSL: openssl OpenSSL 1.1.1k  FIPS 25 Mar 2021
Generating a RSA private key
...........................+++++
............................................................................................+++++
writing new private key to '/etc/pki/easy-rsa/pki/easy-rsa-7555.JtHhWc/tmp.6lTbPU'
Enter PEM pass phrase:
Verifying - Enter PEM pass phrase:
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Common Name (eg: your user, host, or server name) [myhost.example.com]:

Keypair and certificate request completed. Your files are:
req: /etc/pki/easy-rsa/pki/reqs/myhost.example.com.req
key: /etc/pki/easy-rsa/pki/private/myhost.example.com.key

sign the CSR: easyrsa sign-req client myhost.example.com.ch

Now you have a certificate that you can import on your device, along with its key:

  • /etc/pki/easy-rsa/pki/issued/myhost.example.com.crt
  • /etc/pki/easy-rsa/pki/private/myhost.example.com.key

These certificates should be accepted as valid on all devices where you installed your CA certificates.


If you are really paranoid you can put the pki directory on an (encrypted) USB thumb drive, place it a a safe drawer and only take it out when you need to create a new certificate. You don't need it in the meantime.

History

0 comment threads

Sign up to answer this question »