3 # Make S/MIME cert and a root that signs it. Import the subject cert and
4 # its private key into keychain specified by argv[2]. Email address
5 # of subject cert specified in argv[1]. Root cert written to ssRootCert.cer.
6 # which should be imported into the system root DB via KCA.
9 echo Usage
: makeSmimeCert emailAddrs keychain
14 # const names shared with signerAndSubjTp
15 set subjCertFile
=ssSubjCert.cer
16 set subjKeyFile
=ssSubjKey.der
17 set rootCertFile
=ssRootCert.cer
19 # args from command line
21 set emailAddr
=$argv[1]
26 echo creating certs and keys...
27 set cmd
="signerAndSubjTp w e=$emailAddr"
31 echo Importing subject cert and private key into
$kcName...
32 set cmd
="certtool i $subjCertFile k=$kcName r=$subjKeyFile f=8 d"
37 echo Remember to import
$rootCertFile into X509Anchors.