os/security/cryptomgmtlibs/securitytestfw/testcertificates/certman/tpkixcert_tef/makecert.bat
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/security/cryptomgmtlibs/securitytestfw/testcertificates/certman/tpkixcert_tef/makecert.bat Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,137 @@
1.4 +@rem
1.5 +@rem Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
1.6 +@rem All rights reserved.
1.7 +@rem This component and the accompanying materials are made available
1.8 +@rem under the terms of the License "Eclipse Public License v1.0"
1.9 +@rem which accompanies this distribution, and is available
1.10 +@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +@rem
1.12 +@rem Initial Contributors:
1.13 +@rem Nokia Corporation - initial contribution.
1.14 +@rem
1.15 +@rem Contributors:
1.16 +@rem
1.17 +@rem Description:
1.18 +@rem
1.19 +
1.20 +REM days default is 30 and generated on 13/03/2008
1.21 +
1.22 +REM *** SEC-CERTMAN-DATETIME-001 ***
1.23 +REM - Root Cert
1.24 +
1.25 +openssl req -newkey rsa:1024 -keyform PEM -keyout datetime_0001_root_key.pem -subj "/O=Symbian/CN=datetime_0001_root" -nodes -config openssl.cfg -out datetime_0001_root_req.pem -outform PEM
1.26 +openssl x509 -req -inform PEM -in datetime_0001_root_req.pem -signkey datetime_0001_root_key.pem -outform PEM -out datetime_0001_root.pem -days 60
1.27 +openssl x509 -inform PEM -in datetime_0001_root.pem -outform DER -out datetime_0001_root.der
1.28 +
1.29 +
1.30 +
1.31 +REM - End Entity
1.32 +
1.33 +openssl req -newkey rsa:1024 -keyform PEM -keyout datetime_0001_endentity_key.pem -subj "/O=Symbian/CN=datetime_0001_ee" -nodes -config openssl.cfg -out datetime_0001_endentity_req.pem -outform PEM
1.34 +openssl x509 -req -inform PEM -in datetime_0001_endentity_req.pem -CA datetime_0001_root.pem -CAkey datetime_0001_root_key.pem -CAcreateserial -outform PEM -out datetime_0001_endentity.pem
1.35 +openssl x509 -inform PEM -in datetime_0001_endentity.pem -outform DER -out datetime_0001_endentity.der
1.36 +
1.37 +
1.38 +
1.39 +REM *** SEC-CERTMAN-CRITEXT-001 ***
1.40 +REM - Root Cert
1.41 +
1.42 +openssl req -newkey rsa:512 -nodes -out 001_rc.pem -keyout 001_rc.key.pem -config 001_rc.cfg -days 3650
1.43 +openssl x509 -req -days 3650 -in 001_rc.pem -signkey 001_rc.key.pem -out 001_rc.pem -extfile 001_rc.cfg -extensions v3_ca
1.44 +openssl x509 -inform PEM -in 001_rc.pem -outform DER -out 001_rc.der
1.45 +
1.46 +
1.47 +REM - Intermediate 2 Cert
1.48 +
1.49 +openssl req -newkey rsa:512 -nodes -out 001_im2.pem -keyout 001_im2.key.pem -config 001_im2.cfg -days 3650
1.50 +openssl x509 -req -in 001_im2.pem -out 001_im2.pem -CA 001_rc.pem -CAkey 001_rc.key.pem -days 3650 -CAserial 001_rc.srl -CAcreateserial -extfile 001_im2.cfg -extensions v3_ca
1.51 +openssl x509 -inform PEM -in 001_im2.pem -outform DER -out 001_im2.der
1.52 +
1.53 +
1.54 +REM - Intermediate 1 Cert
1.55 +
1.56 +openssl req -newkey rsa:512 -nodes -out 001_im1.pem -keyout 001_im1.key.pem -config 001_im1.cfg -days 3650
1.57 +openssl x509 -req -in 001_im1.pem -out 001_im1.pem -CA 001_im2.pem -CAkey 001_im2.key.pem -days 3650 -extfile 001_im1.cfg -extensions v3_ca -CAserial 001_im2.srl -CAcreateserial
1.58 +openssl x509 -inform PEM -in 001_im1.pem -outform DER -out 001_im1.der
1.59 +
1.60 +
1.61 +REM - End Entity Cert
1.62 +
1.63 +openssl req -newkey rsa:512 -nodes -out 001_ee.pem -keyout 001_ee.key.pem -config 001_ee.cfg -days 3650
1.64 +openssl x509 -req -in 001_ee.pem -out 001_ee.pem -CA 001_im1.pem -CAkey 001_im1.key.pem -days 3650 -extfile 001_ee.cfg -extensions v3_ca -CAserial 001_im1.srl -CAcreateserial
1.65 +openssl x509 -inform PEM -in 001_ee.pem -outform DER -out 001_ee.der
1.66 +
1.67 +
1.68 +REM *** SEC-CERTMAN-CRITEXT-002 ***
1.69 +REM - Root Cert 1
1.70 +
1.71 +openssl req -newkey rsa:512 -nodes -out 002_rc1.pem -keyout 002_rc1.key.pem -config 002_rc1.cfg -days 3650
1.72 +openssl x509 -req -days 3650 -in 002_rc1.pem -signkey 002_rc1.key.pem -out 002_rc1.pem
1.73 +openssl x509 -inform PEM -in 002_rc1.pem -outform DER -out 002_rc1.der
1.74 +
1.75 +
1.76 +REM - Root Cert 2
1.77 +
1.78 +openssl req -newkey rsa:512 -nodes -out 002_rc2.pem -keyout 002_rc2.key.pem -config 002_rc2.cfg -days 3650
1.79 +openssl x509 -req -days 3650 -in 002_rc2.pem -out 002_rc2.pem -CA 002_rc1.pem -CAkey 002_rc1.key.pem -days 3650 -CAserial 002_rc1.srl -CAcreateserial -extfile 002_rc2.cfg -extensions v3_ca
1.80 +openssl x509 -inform PEM -in 002_rc2.pem -outform DER -out 002_rc2.der
1.81 +
1.82 +
1.83 +REM - Intermediate 2 Cert
1.84 +
1.85 +openssl req -newkey rsa:512 -nodes -out 002_im2.pem -keyout 002_im2.key.pem -config 002_im2.cfg -days 3650
1.86 +openssl x509 -req -in 002_im2.pem -out 002_im2.pem -CA 002_rc2.pem -CAkey 002_rc2.key.pem -days 3650 -CAserial 002_rc2.srl -CAcreateserial -extfile 002_im2.cfg -extensions v3_ca
1.87 +openssl x509 -inform PEM -in 002_im2.pem -outform DER -out 002_im2.der
1.88 +
1.89 +
1.90 +REM - Intermediate 1 Cert
1.91 +
1.92 +openssl req -newkey rsa:512 -nodes -out 002_im1.pem -keyout 002_im1.key.pem -config 002_im1.cfg -days 3650
1.93 +openssl x509 -req -in 002_im1.pem -out 002_im1.pem -CA 002_im2.pem -CAkey 002_im2.key.pem -days 3650 -extfile 002_im1.cfg -extensions v3_ca -CAserial 002_im2.srl -CAcreateserial
1.94 +openssl x509 -inform PEM -in 002_im1.pem -outform DER -out 002_im1.der
1.95 +
1.96 +
1.97 +REM - End Entity Cert
1.98 +
1.99 +openssl req -newkey rsa:512 -nodes -out 002_ee.pem -keyout 002_ee.key.pem -config 002_ee.cfg -days 3650
1.100 +openssl x509 -req -in 002_ee.pem -out 002_ee.pem -CA 002_im1.pem -CAkey 002_im1.key.pem -days 3650 -extfile 002_ee.cfg -extensions v3_ca -CAserial 002_im1.srl -CAcreateserial
1.101 +openssl x509 -inform PEM -in 002_ee.pem -outform DER -out 002_ee.der
1.102 +
1.103 +
1.104 +REM *** SEC-CERTMAN-CRITEXT-003 ***
1.105 +REM - Root Cert
1.106 +
1.107 +openssl req -newkey rsa:512 -nodes -out 003_rc.pem -keyout 003_rc.key.pem -config 003_rc.cfg -days 3650
1.108 +openssl x509 -req -days 3650 -in 003_rc.pem -signkey 003_rc.key.pem -out 003_rc.pem -extfile 003_rc.cfg -extensions v3_ca
1.109 +openssl x509 -inform PEM -in 003_rc.pem -outform DER -out 003_rc.der
1.110 +
1.111 +
1.112 +REM - End Entity Cert
1.113 +
1.114 +openssl req -newkey rsa:512 -nodes -out 003_ee.pem -keyout 003_ee.key.pem -config 003_ee.cfg -days 3650
1.115 +openssl x509 -req -in 003_ee.pem -out 003_ee.pem -CA 003_rc.pem -CAkey 003_rc.key.pem -days 3650 -extfile 003_ee.cfg -extensions v3_ca -CAserial 003_rc.srl -CAcreateserial
1.116 +openssl x509 -inform PEM -in 003_ee.pem -outform DER -out 003_ee.der
1.117 +
1.118 +
1.119 +REM *** SEC-CERTMAN-CRITEXT-004 ***
1.120 +REM - using Root Cert from 003
1.121 +REM - End Entity Cert
1.122 +
1.123 +openssl req -newkey rsa:512 -nodes -out 004_ee.pem -keyout 004_ee.key.pem -config 004_ee.cfg -days 3650
1.124 +openssl x509 -req -in 004_ee.pem -out 004_ee.pem -CA 003_rc.pem -CAkey 003_rc.key.pem -days 3650 -extfile 004_ee.cfg -extensions v3_ca -CAserial 003_rc.srl -CAcreateserial
1.125 +openssl x509 -inform PEM -in 004_ee.pem -outform DER -out 004_ee.der
1.126 +
1.127 +
1.128 +REM *** SEC-CERTMAN-CRITEXT-009 to 022 ***
1.129 +REM - Root Cert
1.130 +
1.131 +openssl req -newkey rsa:512 -nodes -out 009_rc.pem -keyout 009_rc.key.pem -config 009_rc.cfg -days 3650
1.132 +openssl x509 -req -days 3650 -in 009_rc.pem -signkey 009_rc.key.pem -out 009_rc.pem
1.133 +openssl x509 -inform PEM -in 009_rc.pem -outform DER -out 009_rc.der
1.134 +
1.135 +
1.136 +REM - End Entity Cert
1.137 +
1.138 +openssl req -newkey rsa:512 -nodes -out 009_ee.pem -keyout 009_ee.key.pem -config 009_ee.cfg -days 3650
1.139 +openssl x509 -req -in 009_ee.pem -out 009_ee.pem -CA 009_rc.pem -CAkey 009_rc.key.pem -days 3650 -extfile 009_ee.cfg -extensions v3_ca -CAserial 009_rc.srl -CAcreateserial
1.140 +openssl x509 -inform PEM -in 009_ee.pem -outform DER -out 009_ee.der