pkiutilities/ocsp/test/resign/resign.h
changeset 0 164170e6151a
equal deleted inserted replaced
-1:000000000000 0:164170e6151a
       
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Tool for generating test response files to be used for testing ocsp module.
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file 
       
    20  @internalComponent
       
    21 */
       
    22 
       
    23 #ifndef __RESIGN_H
       
    24 #define __RESIGN_H
       
    25 
       
    26 class CCommandLineArguments;
       
    27 
       
    28 class CResign : public CBase
       
    29 	{
       
    30 	
       
    31 	enum TCommand
       
    32 		{
       
    33 		ENone,
       
    34 		EResign,
       
    35 		ECreate,
       
    36 		EExtract,
       
    37 		};
       
    38 
       
    39 	public:
       
    40 		static CResign* NewLC();
       
    41 		static CResign* NewL();
       
    42 		virtual ~CResign();
       
    43 		
       
    44 		void ProcessCommandLineL();
       
    45 		
       
    46 	protected:
       
    47 		CResign();
       
    48 	
       
    49 	private:
       
    50 		void ConstructL();
       
    51 		void ResignL( const TPtrC8& aSignedData,	 TPtr8& aSignature,
       
    52 				 	  RInteger& aModulus, const RInteger& /*aPublicExponent*/,
       
    53 				 	  RInteger& aPrivateExponent);
       
    54 		void DecodeDataL(TDes8& aResponse, const TDesC8& aKey);
       
    55 		void ResignFilesL();
       
    56 		void HandleCommandL(TCommand aCommand);
       
    57 		void CreateDatFileL();
       
    58 		void ExtractResponseL();
       
    59 		
       
    60 	private:
       
    61 		CCommandLineArguments* iArguments;
       
    62 		RFs iFs;
       
    63 	};
       
    64 	
       
    65 #endif //__RESIGN_H