make-ca-u50-u51 (1060B)
1 #!/bin/sh 2 # 3 # This Source Code Form is subject to the terms of the Mozilla Public 4 # License, v. 2.0. If a copy of the MPL was not distributed with this 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 6 7 mkdir tmp 8 cd tmp 9 dd if=/dev/urandom bs=512 count=1 of=noise 10 echo "" > pwfile 11 12 certutil -d . -N -f pwfile 13 14 certutil -S -z noise -g 1024 -d . -n ca -s "CN=NSS Test CA,O=BOGUS NSS,L=Mountain View,ST=California,C=US" -t C,C,C -x -m 1 -w -1 -v 600 -1 -2 -5 <<CERTSCRIPT 15 5 16 6 17 9 18 n 19 y 20 21 n 22 5 23 6 24 7 25 9 26 n 27 CERTSCRIPT 28 29 certutil -S -z noise -g 1024 -d . -n u50 -s "CN=TestUser50,E=TestUser50@example.com,O=BOGUS NSS,L=Mountain View,ST=California,C=US" -t ,, -c ca -m 50 -v 598 30 31 certutil -S -z noise -g 1024 -d . -n u51 -s "CN=TestUser51,E=TestUser51@example.com,O=BOGUS NSS,L=Mountain View,ST=California,C=US" -t ,, -c ca -m 51 -v 598 32 33 certutil -d . -L -n ca -r > TestCA.ca.cert 34 certutil -d . -L -n u50 -r > TestUser50.cert 35 certutil -d . -L -n u51 -r > TestUser51.cert 36 37 echo "Created multiple files in subdirectory tmp: TestCA.ca.cert TestUser50.cert TestUser51.cert"