@echo off
cls
rem set OPENSSL_CONF=C:\OpenSSL\ssl\openssl.cnfC:\OpenSSL\x64\bin\openssl genrsa -out server.key 4096C:\OpenSSL\x64\bin\openssl req -new -key server.key -out server.csr -sha256C:\OpenSSL\x64\bin\openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
rem openssl genrsa -des3 -out SisconeRest.key 2048
rem openssl req -new -key SisconeRest.key -out SisconeRest.csr

rem set Path=%Path%;D:\Work\Certificados\OpenSSL-3\Win-32
set CertificadoDir=D:\Work\Certificados
set ConfigDir=%CertificadoDir%\OpenSSL-3\SSL
set OpensslDir=%CertificadoDir%\OpenSSL-3\Win-32
set FileName=APLICACAO
set OPENSSL_CONF=%ConfigDir%\openssl.cnf
rem set OPENSSL_CONF=%ConfigDir%\openssl.cnf %OpensslDir%\openssl genrsa -out %CertificadoDir%\%FileName%.key 4096 %OpensslDir%\openssl req -new -key %CertificadoDir%\%FileName%.key -out %CertificadoDir%\%FileName%.csr -sha256 %OpensslDir%\openssl x509 -req -days 365 -in %CertificadoDir%\%FileName%.csr -signkey %CertificadoDir%\%FileName%.key -out %CertificadoDir%\%FileName%.crt

%OpensslDir%\openssl version -a

echo Gerando Certificado %FileName%.key...
%OpensslDir%\openssl genrsa -des3 -out %FileName%.key 2048
echo .
echo Gerando Certificado %FileName%.csr...
echo .
%OpensslDir%\openssl req -new -key %FileName%.key -out %FileName%.csr
