MastersThesis/PQ_PROJECT_SSL_TLS/CERIFICATEs/RSA/gen_cert_RSA.bat
2024-04-19 14:16:07 +02:00

24 lines
982 B
Batchfile

:: JS 2024-02-08
:: Zmena velkosti klucov z 1024 ma 2048 podla novych standardov OpenSSL 3.2
:: OpenSSL 3.2: The default SSL/TLS security level has been changed from 1 to 2
:: https://www.openssl.org/docs/man3.1/man3/SSL_CTX_set_security_level.html
rem myCA
rem .....
openssl genrsa -out myCA.key 2048
openssl req -x509 -config certificate-authority-options.conf -new -nodes -key myCA.key -sha256 -days 1825 -out myCA.pem
rem server
rem ......
openssl genrsa -out server.key 2048
openssl req -config options.conf -new -key server.key -out server.csr
openssl x509 -req -in server.csr -CA myCA.pem -CAkey myCA.key -CAcreateserial -out server.pem -days 1825 -sha256 -extfile server.ext
rem client
rem .......
openssl genrsa -out client.key 2048
openssl req -config options.conf -new -key client.key -out client.csr
openssl x509 -req -in client.csr -CA myCA.pem -CAkey myCA.key -CAcreateserial -out client.pem -days 1825 -sha256 -extfile client.ext
del *.csr