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