os/security/cryptoservices/filebasedcertificateandkeystores/test/keytool/keytool_params.cpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 /*
     2 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of the License "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description: 
    15 *
    16 */
    17 
    18 
    19 #include "keytool_commands.h"
    20 
    21 #ifdef KEYTOOL
    22 _LIT(KDefaultKeyFile,"c:\\newkeys.dat");
    23 #endif // KEYTOOL
    24 CKeyToolParameters::CKeyToolParameters()
    25 	{	
    26 	}
    27 	
    28 CKeyToolParameters* CKeyToolParameters::NewLC()
    29 	{
    30 	CKeyToolParameters* self = new (ELeave) CKeyToolParameters;
    31 	CleanupStack::PushL(self);
    32 	self->ConstructL();
    33 	return self;	
    34 	}
    35 	
    36 CKeyToolParameters::~CKeyToolParameters()
    37 	{	
    38 	delete iDefault;
    39 	delete iLabel;
    40 	delete iPrivate;
    41 	delete iOwnerType;
    42 	delete iIsDeletable;
    43 	iUIDs.Close();
    44 	
    45 	
    46 	
    47 #ifdef KEYTOOL
    48 	delete iOldKeyFile;
    49 	delete iNewKeyFile;
    50 	delete iAuthExpression;
    51 	delete iPassphrase;	
    52 #endif // KEYTOOL
    53 	}
    54 	
    55 void CKeyToolParameters::ConstructL()
    56 	{
    57 	iAccess = CCTKeyInfo::EExtractable;
    58 	iUsage = EPKCS15UsageSign;
    59 	iCertstoreIndex = -1;
    60 	iKeystoreIndex = -1;
    61 	iPageWise = EFalse;
    62 	iRemoveKey = EFalse;
    63 	iPolicy = ENone;
    64 #ifdef KEYTOOL
    65 	iFreshness = -1;
    66 	iNewKeyFile = KDefaultKeyFile().AllocL();
    67 #endif // KEYTOOL
    68 	}
    69