cryptoservices/certificateandkeymgmt/tpkcs10/tpkcs10negatives.h
changeset 0 2c201484c85f
child 8 35751d3474b7
equal deleted inserted replaced
-1:000000000000 0:2c201484c85f
       
     1 /*
       
     2 * Copyright (c) 2002-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 * Declares test step classes for negative cases of PKCS#10 tests.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 /**
       
    23  @file
       
    24  @internalTechnology
       
    25 */
       
    26 
       
    27 #include <f32file.h> 
       
    28 #include <x500dn.h>
       
    29 #include <pkcs10.h>  
       
    30 #include <pkcs10attr.h>
       
    31 #include <pkcs9attr.h>
       
    32 #include <unifiedkeystore.h>
       
    33 
       
    34 #if (!defined __PKCS10NEGATIVE_STEP_H__)
       
    35 #define __PKCS10NEGATIVE_STEP_H__
       
    36 #include <testexecutestepbase.h>
       
    37 #include "tpkcs10stepbasev2.h"
       
    38 #include "tcertrequeststep.h"
       
    39 
       
    40 // Test steps
       
    41 _LIT(KPKCS10NegPKCS10GenericAttr,			"PKCS10NegPKCS10GenericAttr");
       
    42 _LIT(KPKCS10NegPKCS9ChallengePasswordAttr,	"PKCS10NegPKCS9ChPwdAttr");
       
    43 _LIT(KPKCS10NegPKCS9ExtensionRequestAttr,	"PKCS10NegPKCS9ExtReqAttr");
       
    44 _LIT(KPKCS10NegPKCS10Attributes,			"PKCS10NegPKCS10Attributes");
       
    45 _LIT(KPKCS10NegPKCS10Request,				"PKCS10NegPKCS10Request");
       
    46 
       
    47 // Forward declarations
       
    48 class CCertificateRequestStep;
       
    49 class CPKCS10Request;
       
    50 
       
    51 // Helper active object to import key
       
    52 class CPKCS10NegTesterActive : public CActive
       
    53 	{
       
    54 public:
       
    55 	CPKCS10NegTesterActive(CTestExecuteLogger& aLogger);
       
    56 	~CPKCS10NegTesterActive();
       
    57 
       
    58 	CCTKeyInfo* doImportKeyL(CCertificateRequestStep *aStep);
       
    59 
       
    60 	// from CActive
       
    61 	void DoCancel() { return; };
       
    62 	void RunL();
       
    63 	TInt RunError(TInt aError);
       
    64 
       
    65 private:
       
    66 
       
    67 	CTestExecuteLogger& Logger(){return iLogger;}
       
    68 
       
    69 private:
       
    70 	// Log buffer
       
    71 	TBuf<150> 					iLogInfo;
       
    72 	RFs 						iFs;
       
    73   	CUnifiedKeyStore*			iKeyStore;
       
    74   	CCTKeyInfo*					iKeyInfo;
       
    75     CTestExecuteLogger& 		iLogger;
       
    76 	TBool						iKeyImportStarted;
       
    77 	TInt						iError;
       
    78 	HBufC8*						iKeyData;
       
    79 	CCertificateRequestStep*	iStep;
       
    80 	};
       
    81 
       
    82 class CPKCS10NegPKCS10GenericAttr : public CCertificateRequestStep
       
    83 	{
       
    84 public:
       
    85 	TVerdict doTestStepL();
       
    86 	};
       
    87 
       
    88 class CPKCS10NegPKCS9ChallengePasswordAttr : public CCertificateRequestStep
       
    89 	{
       
    90 public:
       
    91 	TVerdict doTestStepL();
       
    92 	};
       
    93 
       
    94 class CPKCS10NegPKCS9ExtensionRequestAttr : public CCertificateRequestStep
       
    95 	{
       
    96 public:
       
    97 	TVerdict doTestStepL();
       
    98 	};
       
    99 
       
   100 class CPKCS10NegPKCS10Attributes : public CCertificateRequestStep
       
   101 	{
       
   102 public:
       
   103 	TVerdict doTestStepL();
       
   104 	};
       
   105 
       
   106 class CPKCS10NegPKCS10Request : public CCertificateRequestStep
       
   107 	{
       
   108 public:
       
   109 	TVerdict doTestStepL();
       
   110 	};
       
   111 
       
   112 #endif