2 # openssl/certtool compatibility
4 # openssl file arguments
5 set CSR_FILE
=new.cert.csr
6 set PRIV_KEY_ENCR
=privkey.pem
7 set PRIV_RAW_KEY_PEM
=new.key.pem
8 set CERT_FILE_PEM
=new.cert.pem
9 set CERT_FILE_DER
=new.cert.der
11 echo Preparing to delete
$CSR_FILE $PRIV_KEY_ENCR $PRIV_RAW_KEY_PEM $CERT_FILE_PEM $CERT_FILE_DER
12 echo Ctl
-c to abort
, or....
14 rm -f $CSR_FILE $PRIV_KEY_ENCR $PRIV_RAW_KEY_PEM $CERT_FILE_PEM $CERT_FILE_DER
16 # 1. Create the key and request. This will require
17 # some user interaction.
19 set cmd
="openssl req -new"
20 echo $cmd \
> $CSR_FILE
21 $cmd > $CSR_FILE || exit(1)
22 echo ...
$PRIV_KEY_ENCR contains encrypted signing key
in PEM format.
24 # 2. Remove the passphrase from the key.
26 set cmd
="openssl rsa -in $PRIV_KEY_ENCR -out $PRIV_RAW_KEY_PEM"
29 echo ...
$PRIV_RAW_KEY_PEM contains raw signing key
in PEM format.
31 # 3. Convert request into signed cert.
33 set cmd
="openssl x509 -in $CSR_FILE -out $CERT_FILE_PEM -req -signkey $PRIV_RAW_KEY_PEM -days 365"
36 echo ...
$CERT_FILE_PEM contains signing cert
in PEM format.
38 # 4. convert cert to DER form for use by sslViewer
40 set cmd
="openssl x509 -inform PEM -outform DER -in $CERT_FILE_PEM -out $CERT_FILE_DER"
43 echo ...
$CERT_FILE_DER contains cert
in DER format.
45 echo preparing to run runServeView
script. Ctl
-c to abort
, or....
47 .
/runServeView
|| exit(1)