MastersThesis/PQ_PROJECT_SSL_TLS/CERIFICATEs/PQ/gen_PQ_cert.bat
2024-05-12 18:20:02 +02:00

31 lines
983 B
Batchfile

:: JS 2024-02-19
:: Skript na generovanie PQ certifikatov
:: Dostupne PQ algoritmy, ktore je mozne doplnat za prepinac -algorithm, sa nachadzaju v README
rem myCA
rem .....
openssl genpkey -algorithm mldsa65 -out myCA.key
openssl req -x509 -config certificate-authority-options.conf -new -nodes -key myCA.key -sha256 -days 1825 -out myCA.pem
rem server
rem ......
openssl genpkey -algorithm mldsa65 -out client.key
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
rem client
rem .......
openssl genpkey -algorithm mldsa65 -out server.key
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
openssl verify -CAfile ./myCA.pem ./client.pem
openssl verify -CAfile ./myCA.pem ./server.pem
del *.csr