|
1 /* |
|
2 * Copyright (c) 2003-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 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 /** |
|
22 @file |
|
23 @publishedPartner |
|
24 @released |
|
25 */ |
|
26 |
|
27 |
|
28 #ifndef __PKCS7_EXTENDED_CERTIFICATE_OR_CERTIFICATE_H__ |
|
29 #define __PKCS7_EXTENDED_CERTIFICATE_OR_CERTIFICATE_H__ |
|
30 |
|
31 #include <e32base.h> |
|
32 |
|
33 class CX509Certificate; |
|
34 class CASN1EncEncoding; |
|
35 |
|
36 |
|
37 /** |
|
38 An instance of a member of the RFC2315 ExtendedCertificatesAndCertificates. |
|
39 At present, only X509 certificates are supported. |
|
40 (not PKCS#6 extended certificates). |
|
41 @internalTechnology |
|
42 */ |
|
43 class CPKCS7ExtendedCertificateOrCertificate : public CBase |
|
44 { |
|
45 public: |
|
46 /** |
|
47 Creates an ExtendedCertificatesAndCertificates as defined in RFC2315. |
|
48 @param aRawData The encoded CertificateChoices object to be decoded. |
|
49 @return The fully constructed object. |
|
50 */ |
|
51 static CPKCS7ExtendedCertificateOrCertificate* NewL(const TDesC8& aRawData); |
|
52 |
|
53 /** |
|
54 Destructor |
|
55 */ |
|
56 ~CPKCS7ExtendedCertificateOrCertificate(); |
|
57 |
|
58 /** |
|
59 Returns the x509 certificate reference if the certificate is a X509 certificate. |
|
60 Callers need to check whether the certificate's type is X509 beforehand. |
|
61 @return The x509 certificate reference. |
|
62 */ |
|
63 IMPORT_C const CX509Certificate& Certificate(void) const; |
|
64 |
|
65 private: |
|
66 /** |
|
67 Default Constructor |
|
68 */ |
|
69 CPKCS7ExtendedCertificateOrCertificate(); |
|
70 |
|
71 /** |
|
72 Copy Constructor |
|
73 @param the source object to be copied |
|
74 */ |
|
75 CPKCS7ExtendedCertificateOrCertificate(const CPKCS7ExtendedCertificateOrCertificate&); |
|
76 |
|
77 /** |
|
78 Second phase constructor for decoding. |
|
79 @param aRawData the raw data to be decoded. |
|
80 */ |
|
81 void ConstructL(const TDesC8& aRawData); |
|
82 |
|
83 private: |
|
84 /** |
|
85 The X509 certificate pointer |
|
86 */ |
|
87 CX509Certificate* iCertificate; |
|
88 }; |
|
89 |
|
90 |
|
91 |
|
92 #endif |