|
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 // Declare certID object, representing the CertID data structure from the OCSP spec. |
|
20 // Used in cert info objects for requests and responses. |
|
21 |
|
22 #ifndef __OCSP_ROAP_CERTID_H__ |
|
23 #define __OCSP_ROAP_CERTID_H__ |
|
24 |
|
25 #include <hash.h> |
|
26 |
|
27 class CASN1EncBase; |
|
28 class CX509Certificate; |
|
29 |
|
30 // CertID, used in requests and responses |
|
31 class COCSPCertID : public CBase |
|
32 { |
|
33 public: |
|
34 // Make from certificates - subject mustn't be deleted in our lifetime |
|
35 static COCSPCertID* NewL(const CX509Certificate& aSubject, const CX509Certificate& aIssuer); |
|
36 |
|
37 // Make from binary data - which mustn't be deleted in our lifetime |
|
38 static COCSPCertID* NewL(const TDesC8& aBinaryData); |
|
39 |
|
40 // Construct ASN1 encoding object for the CertID data |
|
41 CASN1EncBase* EncoderLC() const; |
|
42 |
|
43 TPtrC8 SerialNumber() const; |
|
44 |
|
45 TBool operator==(const COCSPCertID& rhs) const; |
|
46 |
|
47 private: |
|
48 void ConstructL(const CX509Certificate& aSubject, const CX509Certificate& aIssuer); |
|
49 void ConstructL(const TDesC8& aBinaryData); |
|
50 |
|
51 private: |
|
52 TBuf8<SHA_HASH> iIssuerNameHash; |
|
53 TBuf8<SHA_HASH> iIssuerKeyHash; |
|
54 TPtrC8 iSerialNumber; // Refers to the input certificate or input binary data |
|
55 }; |
|
56 |
|
57 #endif // __OCSP_ROAP_CERTID_H__ |