SSL: Error following the ubuntu.com/server/docs/security-certificates#generating-a-csr
I'm running Ubuntu 20.04.3 LTS with the latest upgrade, on a just installed machine.
I'm following the guide to generate a csr. Everything has been fine, until I received an error.
The latest command was sudo openssl ca -in server.csr -config /etc/ssl/openssl.cnf
which returned
Using configuration from /etc/ssl/openssl.cnf
Enter pass phrase for /etc/ssl/private/cakey.pem:
140578226378048:error:02001002:system library:fopen:No such file or directory:../crypto/bio/bss_file.c:69:fopen('server.csr','r')
140578226378048:error:2006D080:BIO routines:BIO_new_file:no such file:../crypto/bio/bss_file.c:76:I wasn't able to find any suggestion on the internet.
11 Answer
Whatever guide you're following is for generating a CSR and signing it with your CA.
In 99% of all cases, that part is not going to be needed.
Instead, you should be referring to the numerous other guides out there (Digital Ocean's guides, etc.) for how to generate a certificate CSR for handing off to a real SSL certificate provider:
openssl req -new -key server.key -out server.csrThat creates the server.csr that you then provide to the certificate authority. GoDaddy, etc. all need the CSR, not the "CA" commands you were running.