|
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 // ocsp.h |
|
15 // Header specifying client interface to the OCSP module. |
|
16 // |
|
17 // |
|
18 |
|
19 /** |
|
20 @file |
|
21 @internalComponent |
|
22 */ |
|
23 |
|
24 #ifndef __OCSP_RESPONSEDECODER_H__ |
|
25 #define __OCSP_RESPONSEDECODER_H__ |
|
26 |
|
27 #include <e32base.h> |
|
28 |
|
29 class COCSPResponse; |
|
30 class TASN1DecGeneric; |
|
31 |
|
32 /** |
|
33 * Handles decoding an OCSP response and creating a COCSPResponse object. |
|
34 */ |
|
35 |
|
36 NONSHARABLE_CLASS(COCSPResponseDecoder) : public CBase |
|
37 { |
|
38 public: |
|
39 |
|
40 /** |
|
41 * Create a new decoder object and decoder an ocsp response. |
|
42 * Can leave with one of the OCSP::TStatus codes. |
|
43 */ |
|
44 |
|
45 static COCSPResponseDecoder* NewL(const TDesC8& aEncoding); |
|
46 |
|
47 ~COCSPResponseDecoder(); |
|
48 |
|
49 COCSPResponse* TakeResponse(); // Will return null if response was invalid |
|
50 |
|
51 private: |
|
52 |
|
53 COCSPResponseDecoder(); |
|
54 void ConstructL(const TDesC8& aEncoding); |
|
55 |
|
56 // Decoding methods |
|
57 void DecodeOCSPResponseL(const TDesC8& aEncoding); |
|
58 void DecodeResponseBytesL(const TDesC8& aEncoding); |
|
59 void DecodeBasicOCSPResponseL(const TDesC8& aEncoding); |
|
60 void DecodeResponseDataL(const TDesC8& aEncoding); |
|
61 void DecodeCertificatesL(const TDesC8& aEncoding); |
|
62 void DecodeResponseExtensionsL(const TDesC8& aEncoding); |
|
63 void DecodeResponseExtensionL(const TDesC8& aEncoding); |
|
64 void DecodeResponsesL(const TDesC8& aEncoding); |
|
65 void DecodeSingleResponseL(const TDesC8& aEncoding); |
|
66 |
|
67 CArrayPtr<TASN1DecGeneric>* DecodeSequenceLC(const TDesC8& aEncoding); |
|
68 CArrayPtr<TASN1DecGeneric>* DecodeSequenceLC(const TDesC8& aEncoding, |
|
69 const TInt aMinTerms, const TInt aMaxTerms); |
|
70 |
|
71 COCSPResponse* iResponse; |
|
72 }; |
|
73 |
|
74 #endif |