Using Bouncy Castle to generate timestamps. I originally created the certificate using
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout private.key -out cert.crt
but got the error Certificate must have an ExtendedKeyUsage extension.
.
So following the instructions here and adding a config file, I got the error unable to find 'distinguished_name' in config - problems making Certificate Request
I tried the instructions here, but then got the error Error Loading extension section req
.
The simplest config I've used is this, but I've also tried others which including the organization such as a modified version of this one, but no luck.
[req]
distinguished_name = req_distinguished_name
The commands I've tried:
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout private.key -out cert.crt -config config.cnf
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout private.key -out cert.crt -extensions req
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout private.key -out cert.crt -config config.cnf -extensions req
some posts reference an -ext-file
switch, but this is not available.