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