os/security/cryptoservices/certificateandkeymgmt/tx509/Data/extensions/makecert.bat
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/security/cryptoservices/certificateandkeymgmt/tx509/Data/extensions/makecert.bat	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,24 @@
     1.4 +@rem
     1.5 +@rem Copyright (c) 2009 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 +@echo off
    1.20 +echo Create a certificate with the specified extension
    1.21 +
    1.22 +SET CERT_PATH=%SECURITYSOURCEDIR%\os\security\cryptomgmtlibs\securitytestfw\testcertificates\certman\tx509\Data\extensions
    1.23 +rem Create certificate request
    1.24 +openssl req -newkey rsa:1024 -keyout %CERT_PATH%\tmp\key.pem -out %CERT_PATH%\tmp\%1_req.pem -subj "/O=Symbian/CN=Entity Cert 1 (%1)" -nodes -config openssl.cfg
    1.25 +
    1.26 +rem Sign the request using the CA key and add the extension
    1.27 +openssl x509 -req -in %CERT_PATH%\tmp\%1_req.pem -inform pem -out %CERT_PATH%\certs\%1.der -outform DER -extfile ext\%1.cfg -CAkey %CERT_PATH%\ca1\private\cakey.pem -CA %CERT_PATH%\ca1\cacert.pem