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 »
Incubator Q&A

Welcome to the staging ground for new communities! Each proposal has a description in the "Descriptions" category and a body of questions and answers in "Incubator Q&A". You can ask questions (and get answers, we hope!) right away, and start new proposals.

Are you here to participate in a specific proposal? Click on the proposal tag (with the dark outline) to see only posts about that proposal and not all of the others that are in progress. Tags are at the bottom of each post.

Proper way to create your own TLS certificates Question

+2
−0

What exactly are the steps to creating your own TLS certificates such that they create minimal error messages for users?

For example, a simple self-signed certificate will trigger a lot of errors in many cases, and every time the certificate is rotated a new exception will need to be created.

A better approach would be to create your own root CA certificate, and use this to sign the certificates you actually use. You would ask users to install the root CA as a one time step, and all browsers and programs should thereafter treat it as a "proper" certificate just like the real ones on the internet, with green checkmark on the lock icon and no nagging about TLS errors. You could also rotate the server cert without having to ask users to reinstall anything.

What exactly are the steps for creating your own TLS certificate for a server (ie. without using any real CA organization), that will result in a smooth user experience?

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

1 answer

+1
−0

On sandboxes

For sandboxed development and test environments, I have found mkcert to be pretty helpful. It creates a root CA and happily creates certificates for whatever DNS you want.

mkcert warns you not to use it in production. Also, be aware that if you install the root CA to your local computer directly (i.e. not in a carefully partitioned VM or container), someone with access to the private key can mint a certificate for anything and your computer will happily believe it.[1]

Just use Let's Encrypt

The network admin answer is to own a domain name, pick a subdomain (e.g. local.example.com), put your local network on that, and make sure DNS lookups inside the network go to the appropriate place. Then communicate with LetsEncrypt via your DNS for certbot renewals.

One possible downside is that the IP of the computer running the certbot requests will be permanently included in certificate transparency logs. I don't mean to scare anyone, but you should know.

You don't own a domain name

Not a problem. A comment thread below suggests using a public DNS service[2] to be the domain name, and you get to be a subdomain of it. (You can then choose whether your local network's public suffix is one level deeper or the subdomain itself.)

So you really want to be a CA?

The "real" answer ideally involves some kind of HSM to own the key. Then you issue some openssl signing requests. OpenSSL is unfortunately not the most intuitive program to use.


  1. I think this is why you're asking the question in the first place. ↩︎

  2. I don't personally endorse any. The comment thread mentions afraid, and I have also heard of no-ip, dyn, and duck. ↩︎

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

3 comment threads

LE doesn't work for local (4 comments)
I do want production (3 comments)
Root CA mitigation (1 comment)

Sign up to answer this question »