0%

How to generate an empty certificate with OpenSSL

Sometimes you want to generate a certificate that does not reveal any information. It’s quite easy to generate an completely empty certificate with OpenSSL. Here are the two commands you need:

1
2
openssl genrsa -out fake.key 2048
openssl req -new -x509 -key fake.key -out fake.pem -days 3650 -subj "/"

What’s important here is the “subject” of the certificate. Leave the subject completely empty would not work, so just begin with a / and do not write anything else.

It’s super easy, is it? When you visit the site, it would just show an “X509 Certificate” with no subjects.