|
1 // Copyright (c) 2003-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 // Header specifying class that encodes OCSP requests |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalComponent |
|
21 */ |
|
22 |
|
23 #ifndef __OCSP_REQUESTENCODER_H__ |
|
24 #define __OCSP_REQUESTENCODER_H__ |
|
25 |
|
26 #include <ocsp.h> |
|
27 #include "ocsprequestandresponse.h" |
|
28 /** |
|
29 * Constructs the ASN1 DER respresentation of an OCSP request. |
|
30 */ |
|
31 |
|
32 NONSHARABLE_CLASS(COCSPRequestEncoder) : public CBase |
|
33 { |
|
34 public: |
|
35 |
|
36 ~COCSPRequestEncoder(); |
|
37 |
|
38 /** |
|
39 * Create a new request encoder object. |
|
40 */ |
|
41 |
|
42 static COCSPRequestEncoder* NewL(const COCSPRequest& aRequest); |
|
43 |
|
44 /** |
|
45 * Get the encoding of the request. |
|
46 * The data is owned by this object. |
|
47 */ |
|
48 |
|
49 const TDesC8& Encoding() const; |
|
50 |
|
51 private: |
|
52 |
|
53 COCSPRequestEncoder(); |
|
54 void ConstructL(const COCSPRequest& aRequest); |
|
55 |
|
56 CASN1EncBase* MakeOCSPRequestEncLC(const COCSPRequest& aRequest); |
|
57 CASN1EncBase* MakeTBSRequestEncLC(const COCSPRequest& aRequest); |
|
58 CASN1EncBase* MakeRequestListEncLC(const COCSPRequest& aRequest); |
|
59 CASN1EncBase* MakeCertRequestEncLC(const COCSPCertID& aCertId); |
|
60 CASN1EncBase* MakeRequestExtensionsEncLC(const COCSPRequest& aRequest); |
|
61 CASN1EncBase* MakeResponseTypeExtnEncLC(); |
|
62 CASN1EncBase* MakeNonceExtnEncLC(const COCSPRequest& aRequest); |
|
63 |
|
64 static void AddAndPopChildL(CASN1EncContainer& aParent, CASN1EncBase* aChild); |
|
65 |
|
66 private: |
|
67 |
|
68 HBufC8* iEncoding; |
|
69 }; |
|
70 |
|
71 #endif |