pkiutilities/DeviceToken/Src/KeyStore/Server/DevTokenPWManager.cpp
changeset 0 164170e6151a
equal deleted inserted replaced
-1:000000000000 0:164170e6151a
       
     1 /*
       
     2 * Copyright (c) 2007 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 "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:   Implementation of DevToken Password manager
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #include "DevTokenPWManager.h"
       
    21 #include "DevTokenDialog.h"
       
    22 #include <pbedata.h>
       
    23 #include <mctauthobject.h>
       
    24 #include <securityerr.h>
       
    25 
       
    26 //CONST
       
    27 _LIT( KKeyStoreImportKeyLabel, "Passphrase of the imported key file" );
       
    28 
       
    29 void TDevTokenPWManager::GetPassword( TPINValue& aValue, 
       
    30 									  TRequestStatus& aStatus,
       
    31 									  TBool aRetry)
       
    32     {
       
    33 	  TPINParams params;
       
    34     //CTSecDlg will check the key label to decide the show-up dialog
       
    35 	  params.iPINLabel.Copy(KKeyStoreImportKeyLabel);
       
    36 	  params.iMinLength = 0;
       
    37 	  params.iMaxLength = KMaxPINLength;
       
    38 	  
       
    39 	  DevTokenDialog::Dialog()->EnterPIN(params, aRetry, aValue, aStatus);
       
    40 	  }
       
    41 
       
    42 	
       
    43 void TDevTokenPWManager::ImportPassword(TPINValue& aValue, 
       
    44 												 TRequestStatus& aStatus)
       
    45 	  {
       
    46 	  GetPassword( aValue, aStatus );
       
    47 	  }
       
    48 	  
       
    49 
       
    50 void TDevTokenPWManager::Cancel()
       
    51       {
       
    52 	  DevTokenDialog::Dialog()->Cancel();
       
    53 	  }
       
    54 
       
    55 //EOF
       
    56 
       
    57