72
|
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 |
* trdavector.h
|
|
16 |
* Vector tests for RSA ciphers
|
|
17 |
*
|
|
18 |
*/
|
|
19 |
|
|
20 |
|
|
21 |
#ifndef __TDSAVECTOR_H__
|
|
22 |
#define __TDSAVECTOR_H__
|
|
23 |
|
|
24 |
#include "tvectortest.h"
|
|
25 |
#include "asymmetrickeys.h"
|
|
26 |
#include "tsignatureinput.h"
|
|
27 |
|
|
28 |
/**
|
|
29 |
* Runs DSA signing vectors.
|
|
30 |
*/
|
|
31 |
|
|
32 |
class CDSASignVector : public CVectorTest
|
|
33 |
{
|
|
34 |
public:
|
|
35 |
static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole,
|
|
36 |
Output& aOut, const TTestActionSpec& aTestActionSpec);
|
|
37 |
static CTestAction* NewLC(RFs& aFs, CConsoleBase& aConsole,
|
|
38 |
Output& aOut, const TTestActionSpec& aTestActionSpec);
|
|
39 |
virtual ~CDSASignVector();
|
|
40 |
virtual void DoCheckResult(TInt aError);
|
|
41 |
protected:
|
|
42 |
virtual void DoPerformActionL();
|
|
43 |
virtual void DoPerformanceTestActionL();
|
|
44 |
private:
|
|
45 |
CDSASignVector(RFs& aFs, CConsoleBase& aConsole, Output& aOut);
|
|
46 |
void ConstructL(const TTestActionSpec& aTestActionSpec);
|
|
47 |
|
|
48 |
CDSAPrivateKey* iPrivKey;
|
|
49 |
TPtrC8 iMessage;
|
|
50 |
HBufC8* iK;
|
|
51 |
CDSASignature* iSignature;
|
|
52 |
CSignatureInput* iSigInput;
|
|
53 |
};
|
|
54 |
|
|
55 |
/**
|
|
56 |
* Runs DSA verification vectors.
|
|
57 |
*/
|
|
58 |
|
|
59 |
class CDSAVerifyVector : public CVectorTest
|
|
60 |
{
|
|
61 |
public:
|
|
62 |
static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole,
|
|
63 |
Output& aOut, const TTestActionSpec& aTestActionSpec);
|
|
64 |
static CTestAction* NewLC(RFs& aFs, CConsoleBase& aConsole,
|
|
65 |
Output& aOut, const TTestActionSpec& aTestActionSpec);
|
|
66 |
virtual ~CDSAVerifyVector();
|
|
67 |
//virtual void PerformAction(TRequestStatus& aStatus);
|
|
68 |
virtual void DoCheckResult(TInt aError);
|
|
69 |
protected:
|
|
70 |
virtual void DoPerformActionL();
|
|
71 |
virtual void DoPerformanceTestActionL();
|
|
72 |
|
|
73 |
private:
|
|
74 |
CDSAVerifyVector(RFs& aFs, CConsoleBase& aConsole, Output& aOut);
|
|
75 |
void ConstructL(const TTestActionSpec& aTestActionSpec);
|
|
76 |
|
|
77 |
CDSAPublicKey* iPubKey;
|
|
78 |
HBufC8* iMessage;
|
|
79 |
CDSASignature* iSignature;
|
|
80 |
CSignatureInput* iSigInput;
|
|
81 |
};
|
|
82 |
|
|
83 |
#endif
|