I am struggling to implement a feature for my certificates. I am generating my certificates with OPENSSL 1.1.1.
I want to allow only TLSv1.2 and TLSv1.3. The other protocols should not be possible (TLSv1.0 / TLS1.1 / ...). The goal is to generate certificates for multiple websites and authorize only TLSv1.2 and TLSv1.3 with specific Ciphers. I don’t want to modify my webservers configuration (I know it is easily possible to restrict the protocols on Apache or NGINX but I want to go deeper in the openssl experience).
I have the following command line :
openssl req -new -nodes -x509 -config certrequest.cnf -keyout myserver.key -out myserver.pem
My “certrequest.cnf” file looks like this :
[req]
default_bits = 2048
prompt = no
default_md = sha256
req_extensions = req_ext
distinguished_name = dn
[ dn ]
C=US
ST=State
L=City
O=TEST
OU=HELLO WORLD
[email protected]
CN = mydomain.example.com
[ req_ext ]
subjectAltName = @alt_names
[ alt_names ]
DNS.1 = mydomain.example.com
IP.1 = 127.0.0.1
What have tried so far where it is closer to the openssl documentation :
[system_default_sect]
Protocol = -SSLv3, -TLSv1, -TLSv1.1, TLSv1.2, TLSv1.3
MinProtocol = TLSv1.2
I have tried so many solution and I still can’t restrict the protocols. Regarding the documentation of openssl, it seems like possible, but I am failing to implement it correctly.
I am testing my protocols/cipher with the following command :
nmap --script ssl-enum-ciphers -p 443 mydomain.example.com
On the output of the NMAP, I have all protocols and ciphers with the indication “cipher preference: client”. Maybe forcing the server could be a good way.
Could you please help me to find the solution ?
Have a great day !