equal
deleted
inserted
replaced
|
1 // Copyright (c) 2001-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 // resign.cpp |
|
15 // App for resigning OCSP responses. |
|
16 // |
|
17 // |
|
18 |
|
19 #include <e32cons.h> |
|
20 #include <f32file.h> |
|
21 #include <asn1dec.h> |
|
22 #include <asn1enc.h> |
|
23 #include <x509cert.h> |
|
24 #include <signed.h> |
|
25 #include <bigint.h> |
|
26 #include <asymmetric.h> |
|
27 #include <hash.h> |
|
28 #include <bacline.h> |
|
29 |
|
30 #include "resign.h" |
|
31 |
|
32 static CConsoleBase* console; |
|
33 |
|
34 static void RunConsoleL() |
|
35 { |
|
36 __UHEAP_MARK; |
|
37 // Create console |
|
38 console = Console::NewL(_L("OCSP Response Resign Utility"), TSize(KDefaultConsWidth,KDefaultConsHeight)); |
|
39 CleanupStack::PushL(console); |
|
40 |
|
41 CResign* resign = CResign::NewLC(); |
|
42 // Next stage |
|
43 resign->ProcessCommandLineL(); |
|
44 |
|
45 CleanupStack::PopAndDestroy(resign); |
|
46 CleanupStack::PopAndDestroy(console); |
|
47 __UHEAP_MARKEND; |
|
48 } |
|
49 |
|
50 |
|
51 // Entry point |
|
52 GLDEF_C TInt E32Main() |
|
53 { |
|
54 __UHEAP_MARK; |
|
55 |
|
56 CTrapCleanup* cleanup=CTrapCleanup::New(); |
|
57 |
|
58 TRAPD(error, RunConsoleL()); |
|
59 |
|
60 __ASSERT_ALWAYS(!error, User::Panic(_L("TOCSP\\RESIGN ERROR"), error)); |
|
61 |
|
62 delete cleanup; |
|
63 |
|
64 __UHEAP_MARKEND; |
|
65 |
|
66 return KErrNone; |
|
67 } |