sl@0: @rem sl@0: @rem Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: @rem All rights reserved. sl@0: @rem This component and the accompanying materials are made available sl@0: @rem under the terms of the License "Eclipse Public License v1.0" sl@0: @rem which accompanies this distribution, and is available sl@0: @rem at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: @rem sl@0: @rem Initial Contributors: sl@0: @rem Nokia Corporation - initial contribution. sl@0: @rem sl@0: @rem Contributors: sl@0: @rem sl@0: @rem Description: sl@0: @rem sl@0: sl@0: echo This script only needs to be run if you wish to modify this test data. sl@0: echo Press CTRL-C to exit sl@0: pause sl@0: sl@0: rem blank the existing CA sl@0: del index.txt rand serial *.old *.attr *.pem *.req *.pk8 /S /Q sl@0: echo 01 > serial sl@0: type nul > index.txt sl@0: sl@0: set CERT_PATH=%SECURITYSOURCEDIR%\os\security\cryptomgmtlibs\securitytestfw\testcertificates\certman\tder\example\root5ca sl@0: sl@0: rem create a key and request sl@0: rem sign the request sl@0: rem revoke the signed certificate sl@0: rem generate a CRL sl@0: openssl genrsa -out %CERT_PATH%\ee_key.pem sl@0: openssl req -config openssl_ee.config -newkey rsa:1024 -key %CERT_PATH%\ee_key.pem -out ee.req sl@0: openssl ca -config openssl.config -name Root5CA -in ee.req -extensions Signing_Extensions -extfile openssl.config -batch -out %CERT_PATH%\root5_ee.pem sl@0: openssl ca -config openssl.config -name Root5CA -revoke %CERT_PATH%\root5_ee.pem -crl_reason keyCompromise sl@0: openssl ca -config openssl.config -name Root5CA -gencrl -out %CERT_PATH%\root5crl.pem sl@0: sl@0: rem convert everything to DER sl@0: openssl x509 -inform pem -outform der -in %CERT_PATH%\root5_ee.pem -out %CERT_PATH%\root5_ee.der sl@0: openssl rsa -inform pem -outform der -in %CERT_PATH%\ee_key.pem -out %CERT_PATH%\ee_key.der sl@0: openssl pkcs8 -topk8 -nocrypt -in ee_key.pem -outform der -out ee_key.pk8 sl@0: openssl crl -inform pem -outform der -in %CERT_PATH%\root5crl.pem -out %CERT_PATH%\root5crl.der