goto end
:help
echo usage: op_cert command
echo.
echo commands:
echo dsaparam: generates DSA parameters
echo gencakey: generates the certificate authority's private and public keys
echo genmanager: generates the certificates used by the capture manager
echo help: displays this text
echo.
echo Certificate generation requires generating the DSA parameters first.
echo If the DSA parameter file (dsaparam.pem) already exists, there is no
echo need to generate a new DSA parameter file.
goto end
:dsaparam
openssl dsaparam -outform PEM -out dsaparam.pem 1024
goto end
:gencakey
ECHO.
ECHO ===========================================
ECHO Generating the private and public keys for the certificate authority. This operation only needs to be done once.
ECHO Enter the same passphrase three times.This passphrase should be kept secure.
ECHO ==============================================
ECHO.
echo [ req ] > openssl.cnf
echo default_bits = 1024 >> openssl.cnf
echo default_keyfile = privkey.pem >> openssl.cnf
echo distinguished_name = req_distinguished_name >> openssl.cnf
echo prompt = no >> openssl.cnf
echo [ req_distinguished_name ] >> openssl.cnf
echo C = %OP_CERT_COUNTRY% >> openssl.cnf
echo ST = %OP_CERT_STATE% >> openssl.cnf
echo L
:end
set OP_CERT_COUNTRY=
set OP_CERT_STATE=
set OP_CERT_LOCALITY=
set OP_CERT_ORG=
Partager