|
1 /* |
|
2 * Copyright (c) 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CCMSX509IssuerSerial_H |
|
21 #define CCMSX509IssuerSerial_H |
|
22 |
|
23 #include "CCMSSequence.h" |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CCMSX509GeneralNames; |
|
27 |
|
28 // CLASS DECLARATION |
|
29 /** |
|
30 * X.509 IssuerSerial type module |
|
31 * |
|
32 * ASN.1 definition: |
|
33 * IssuerSerial ::= SEQUENCE { |
|
34 * issuer GeneralNames, |
|
35 * serial CertificateSerialNumber, |
|
36 * issuerUID UniqueIdentifier OPTIONAL |
|
37 * } |
|
38 * |
|
39 * CertificateSerialNumber ::= INTEGER |
|
40 * |
|
41 * UniqueIdentifier ::= BIT STRING |
|
42 * |
|
43 * @lib cms.lib |
|
44 * @since 2.8 |
|
45 */ |
|
46 class CCMSX509IssuerSerial : public CCMSSequence |
|
47 { |
|
48 public: // Constructors and destructor |
|
49 /** |
|
50 * Two-phased constructor. |
|
51 */ |
|
52 IMPORT_C static CCMSX509IssuerSerial* NewL(); |
|
53 |
|
54 /** |
|
55 * Two-phased constructor. Copies of the parameters are made. |
|
56 * |
|
57 * @param aIssuer X.509 GeneralNames value |
|
58 * @param aSerial X.509 CertificateSerialNumber value |
|
59 */ |
|
60 IMPORT_C static CCMSX509IssuerSerial* NewL( |
|
61 const CCMSX509GeneralNames& aIssuer, |
|
62 const TInt aSerial ); |
|
63 |
|
64 /** |
|
65 * Two-phased constructor. Copies of the parameters are made. |
|
66 * |
|
67 * @param aIssuer X.509 GeneralNames value |
|
68 * @param aSerial X.509 CertificateSerialNumber value |
|
69 * @param aIssuerUID X.509 UniqueIdentifier value |
|
70 */ |
|
71 IMPORT_C static CCMSX509IssuerSerial* NewL( |
|
72 const CCMSX509GeneralNames& aIssuer, |
|
73 const TInt aSerial, |
|
74 const TDesC8& aIssuerUID ); |
|
75 |
|
76 /** |
|
77 * Destructor. |
|
78 */ |
|
79 virtual ~CCMSX509IssuerSerial(); |
|
80 |
|
81 public: // New functions |
|
82 /** |
|
83 * Getter for Issuer. |
|
84 * @since 2.8 |
|
85 * @return GeneralNames value |
|
86 */ |
|
87 IMPORT_C const CCMSX509GeneralNames& Issuer() const; |
|
88 |
|
89 /** |
|
90 * Getter for Serial |
|
91 * @since 2.8 |
|
92 * @return CertificateSerialNumber value |
|
93 */ |
|
94 IMPORT_C TInt Serial() const; |
|
95 |
|
96 /** |
|
97 * Getter for IssuerUID |
|
98 * @since 2.8 |
|
99 * @return X.509 UniqueIdentifier value or NULL |
|
100 */ |
|
101 IMPORT_C const TDesC8* IssuerUID() const; |
|
102 |
|
103 /** |
|
104 * Setter for Issuer. Creates a copy of the parameters. |
|
105 * @since 2.8 |
|
106 * @param aIssuer GeneralNames value. |
|
107 */ |
|
108 IMPORT_C void SetIssuerL( |
|
109 const CCMSX509GeneralNames& aIssuer ); |
|
110 |
|
111 /** |
|
112 * Setter for Serial. |
|
113 * @since 2.8 |
|
114 * @param aSerial CertificateSerialNumber value. |
|
115 */ |
|
116 IMPORT_C void SetSerial( |
|
117 const TInt aSerial ); |
|
118 |
|
119 /** |
|
120 * Setter for IssuerUID. Creates a copy of the parameters. |
|
121 * @since 2.8 |
|
122 * @param aIssuerUID UniqueIdentifier value |
|
123 */ |
|
124 IMPORT_C void SetIssuerUIDL( |
|
125 const TDesC8& aIssuerUID ); |
|
126 |
|
127 |
|
128 public: // Functions from base classes |
|
129 |
|
130 /** |
|
131 * From MCMSModule |
|
132 * @since 2.8 |
|
133 * @param aRawData raw-data to be parsed in this instance |
|
134 */ |
|
135 void DecodeL( const TDesC8& aRawData ); |
|
136 |
|
137 /** |
|
138 * From MCMSModule |
|
139 * @since 2.8 |
|
140 * @return Returns ASN1 encoder and leaves it in CleanupStack |
|
141 */ |
|
142 CASN1EncBase* EncoderLC() const; |
|
143 |
|
144 protected: // New functions |
|
145 |
|
146 /** |
|
147 * Protected construction to allow derivation |
|
148 */ |
|
149 IMPORT_C void ConstructL( |
|
150 const CCMSX509GeneralNames& aIssuer ); |
|
151 |
|
152 /** |
|
153 * Protected construction to allow derivation |
|
154 */ |
|
155 IMPORT_C void ConstructL( |
|
156 const CCMSX509GeneralNames& aIssuer, |
|
157 const TDesC8& aIssuerUID ); |
|
158 |
|
159 /** |
|
160 * C++ default constructor. |
|
161 */ |
|
162 IMPORT_C CCMSX509IssuerSerial( const TInt aSerial ); |
|
163 |
|
164 private: // Data |
|
165 // Issuer, owned |
|
166 CCMSX509GeneralNames* iIssuer; |
|
167 // X.509 CertificateSerialNumber, owned |
|
168 TInt iSerial; |
|
169 // X.509 UniqueIdentifier, owned |
|
170 TDesC8* iIssuerUID; |
|
171 |
|
172 }; |
|
173 |
|
174 #endif // CCMSX509IssuerSerial_H |
|
175 |
|
176 // End of File |