]> git.saurik.com Git - apple/security.git/blob - libsecurity_ssl/regressions/gencerts.sh
Security-55471.tar.gz
[apple/security.git] / libsecurity_ssl / regressions / gencerts.sh
1 #!/bin/sh -x -e
2 SUBJECT="/C=US/O=Apple Inc./OU=CoreOS Platform Security/CN=localhost"
3
4 openssl req -x509 -newkey rsa:1024 -sha1 -days 3650 -subj "$SUBJECT" -nodes -keyout privkey-1.pem -out cert-1.pem
5 openssl x509 -in cert-1.pem -out cert-1.der -outform DER
6 openssl rsa -in privkey-1.pem -out privkey-1.der -outform DER
7 openssl pkcs12 -export -passout pass:password -out identity-1.p12 -inkey privkey-1.pem -in cert-1.pem
8
9 xxd -i privkey-1.der privkey-1.h
10 xxd -i cert-1.der cert-1.h
11 xxd -i identity-1.p12 identity-1.h