3 # Make up-to-date localcert, clientcert, and dsacert keychains and roots.
5 set BUILD_DIR
=$LOCAL_BUILD_DIR
7 echo === Creating certs and keychains
for SSL testing
===
11 set DSA_CT_INPUT
=dsaCertToolInput
26 echo Usage
: makeLocalCert \
[a\
(utorun\
)\
] \
[d\
(efault ACL\
)\
]
31 set ALL_KEYCHAINS
="$LOCAL_KC $CLIENT_KC $DSA_KC $P12_KC"
32 set ALL_CERTS
="$LOCAL_CERT $CLIENT_CERT $DSA_CERT"
34 if($AUTO_RUN == 1) then
35 echo deleting
$ALL_KEYCHAINS from
$KC_DIR
37 echo Preparing to delete
$ALL_KEYCHAINS from
$KC_DIR
38 echo Ctl
-c to abort
, or....
41 (cd $KC_DIR; rm -f $ALL_KEYCHAINS)
44 echo Creating
$LOCAL_KC and
$LOCAL_CERT...
45 set cmd
="certtool c k=$LOCAL_KC c Z o=$LOCAL_CERT d p=$LOCAL_KC_PWD $DEFAULT_ACL x=S"
49 echo Creating
$CLIENT_KC and
$CLIENT_CERT...
50 set cmd
="certtool c k=$CLIENT_KC c Z o=$CLIENT_CERT d p=$CLIENT_KC_PWD $DEFAULT_ACL x=s"
54 echo Creating
$DSA_KC and
$DSA_CERT...
55 set cmd
="certtool c k=$DSA_KC c o=$DSA_CERT p=$DSA_KC_PWD $DEFAULT_ACL d"
56 echo $cmd \
< $DSA_CT_INPUT \
> /dev
/null
57 $cmd < $DSA_CT_INPUT > /dev
/null
|| exit(1)
59 echo Creating
$P12_KC and root
$P12_ROOT_CERT via import of
$P12_PFX...
60 set cmd
="certtool y k=$P12_KC c p=$P12_KC_PWD"
62 $cmd > /dev
/null
|| exit(1)
63 set cmd
="security import $P12_PFX -k $P12_KC -P $P12_PFX_PWD"
66 set cmd
="$BUILD_DIR/certsFromDb $P12_KC_PATH f $P12_CERT_BASE"
69 echo P12 import complete.
71 echo === Finished creating certs and keychains
for SSL testing
===