os/security/cryptoservices/certificateandkeymgmt/tder/example/root5ca/makeall.bat
Update contrib.
2 @rem Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
3 @rem All rights reserved.
4 @rem This component and the accompanying materials are made available
5 @rem under the terms of the License "Eclipse Public License v1.0"
6 @rem which accompanies this distribution, and is available
7 @rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 @rem Initial Contributors:
10 @rem Nokia Corporation - initial contribution.
17 echo This script only needs to be run if you wish to modify this test data.
18 echo Press CTRL-C to exit
21 rem blank the existing CA
22 del index.txt rand serial *.old *.attr *.pem *.req *.pk8 /S /Q
26 set CERT_PATH=%SECURITYSOURCEDIR%\os\security\cryptomgmtlibs\securitytestfw\testcertificates\certman\tder\example\root5ca
28 rem create a key and request
30 rem revoke the signed certificate
32 openssl genrsa -out %CERT_PATH%\ee_key.pem
33 openssl req -config openssl_ee.config -newkey rsa:1024 -key %CERT_PATH%\ee_key.pem -out ee.req
34 openssl ca -config openssl.config -name Root5CA -in ee.req -extensions Signing_Extensions -extfile openssl.config -batch -out %CERT_PATH%\root5_ee.pem
35 openssl ca -config openssl.config -name Root5CA -revoke %CERT_PATH%\root5_ee.pem -crl_reason keyCompromise
36 openssl ca -config openssl.config -name Root5CA -gencrl -out %CERT_PATH%\root5crl.pem
38 rem convert everything to DER
39 openssl x509 -inform pem -outform der -in %CERT_PATH%\root5_ee.pem -out %CERT_PATH%\root5_ee.der
40 openssl rsa -inform pem -outform der -in %CERT_PATH%\ee_key.pem -out %CERT_PATH%\ee_key.der
41 openssl pkcs8 -topk8 -nocrypt -in ee_key.pem -outform der -out ee_key.pk8
42 openssl crl -inform pem -outform der -in %CERT_PATH%\root5crl.pem -out %CERT_PATH%\root5crl.der