os/security/cryptoservices/certificateandkeymgmt/tpkcs10/tpkcs10negatives.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/security/cryptoservices/certificateandkeymgmt/tpkcs10/tpkcs10negatives.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,111 @@
     1.4 +/*
     1.5 +* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of the License "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description: 
    1.18 +* Declares test step classes for negative cases of PKCS#10 tests.
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +/**
    1.24 + @file
    1.25 + @internalTechnology
    1.26 +*/
    1.27 +
    1.28 +#include <f32file.h> 
    1.29 +#include <x500dn.h>
    1.30 +#include <pkcs10.h>  
    1.31 +#include <pkcs10attr.h>
    1.32 +#include <pkcs9attr.h>
    1.33 +#include <unifiedkeystore.h>
    1.34 +
    1.35 +#if (!defined __PKCS10NEGATIVE_STEP_H__)
    1.36 +#define __PKCS10NEGATIVE_STEP_H__
    1.37 +#include <test/testexecutestepbase.h>
    1.38 +#include "tpkcs10stepbasev2.h"
    1.39 +#include "tcertrequeststep.h"
    1.40 +
    1.41 +// Test steps
    1.42 +_LIT(KPKCS10NegPKCS10GenericAttr,			"PKCS10NegPKCS10GenericAttr");
    1.43 +_LIT(KPKCS10NegPKCS9ChallengePasswordAttr,	"PKCS10NegPKCS9ChPwdAttr");
    1.44 +_LIT(KPKCS10NegPKCS9ExtensionRequestAttr,	"PKCS10NegPKCS9ExtReqAttr");
    1.45 +_LIT(KPKCS10NegPKCS10Attributes,			"PKCS10NegPKCS10Attributes");
    1.46 +_LIT(KPKCS10NegPKCS10Request,				"PKCS10NegPKCS10Request");
    1.47 +
    1.48 +// Forward declarations
    1.49 +class CCertificateRequestStep;
    1.50 +class CPKCS10Request;
    1.51 +
    1.52 +// Helper active object to import key
    1.53 +class CPKCS10NegTesterActive : public CActive
    1.54 +	{
    1.55 +public:
    1.56 +	CPKCS10NegTesterActive(CTestExecuteLogger& aLogger);
    1.57 +	~CPKCS10NegTesterActive();
    1.58 +
    1.59 +	CCTKeyInfo* doImportKeyL(CCertificateRequestStep *aStep);
    1.60 +
    1.61 +	// from CActive
    1.62 +	void DoCancel() { return; };
    1.63 +	void RunL();
    1.64 +	TInt RunError(TInt aError);
    1.65 +
    1.66 +private:
    1.67 +
    1.68 +	CTestExecuteLogger& Logger(){return iLogger;}
    1.69 +
    1.70 +private:
    1.71 +	// Log buffer
    1.72 +	TBuf<150> 					iLogInfo;
    1.73 +	RFs 						iFs;
    1.74 +  	CUnifiedKeyStore*			iKeyStore;
    1.75 +  	CCTKeyInfo*					iKeyInfo;
    1.76 +    CTestExecuteLogger& 		iLogger;
    1.77 +	TBool						iKeyImportStarted;
    1.78 +	TInt						iError;
    1.79 +	HBufC8*						iKeyData;
    1.80 +	CCertificateRequestStep*	iStep;
    1.81 +	};
    1.82 +
    1.83 +class CPKCS10NegPKCS10GenericAttr : public CCertificateRequestStep
    1.84 +	{
    1.85 +public:
    1.86 +	TVerdict doTestStepL();
    1.87 +	};
    1.88 +
    1.89 +class CPKCS10NegPKCS9ChallengePasswordAttr : public CCertificateRequestStep
    1.90 +	{
    1.91 +public:
    1.92 +	TVerdict doTestStepL();
    1.93 +	};
    1.94 +
    1.95 +class CPKCS10NegPKCS9ExtensionRequestAttr : public CCertificateRequestStep
    1.96 +	{
    1.97 +public:
    1.98 +	TVerdict doTestStepL();
    1.99 +	};
   1.100 +
   1.101 +class CPKCS10NegPKCS10Attributes : public CCertificateRequestStep
   1.102 +	{
   1.103 +public:
   1.104 +	TVerdict doTestStepL();
   1.105 +	};
   1.106 +
   1.107 +class CPKCS10NegPKCS10Request : public CCertificateRequestStep
   1.108 +	{
   1.109 +public:
   1.110 +	TVerdict doTestStepL();
   1.111 +	};
   1.112 +
   1.113 +#endif
   1.114 +