Update contrib.
2 * Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
25 #ifndef __PKCS7_ISSUER_AND_SERIAL_NUMBER_H__
26 #define __PKCS7_ISSUER_AND_SERIAL_NUMBER_H__
30 class CX500DistinguishedName;
31 class CX509SubjectKeyIdExt;
32 class CASN1EncSequence;
37 The issuer and serial number of a PKCS#7 signature.
39 class CPKCS7IssuerAndSerialNumber : public CBase
45 * Creates a CMS issuer and serial number object as defined in RFC2630
46 * @param aIssuerName The distinguished name of the issuer. Ownership of
47 * aIssuerName is transferred to the newly created object.
48 * If construction fails, ownership is not transferred. The caller needs to push
49 * aIssuerName onto the cleanup stack before calling this method and pop it off the
50 * cleanup stack after successful construction.
51 * @param aSerialNumber The serial number of the issuer.
52 * @return The fully constructed object.
54 static CPKCS7IssuerAndSerialNumber* NewL(CX500DistinguishedName* aIssuerName, const TDesC8& aSerialNumber);
59 * Creates a CMS issuer and serial number object as defined in RFC2630
60 * and leaves it on the cleanup stack.
61 * @param aIssuerName The distinguished name of the issuer. Ownership of
62 * aIssuerName is transferred to the newly created object.
63 * If construction fails, ownership is not transferred. The caller needs to push
64 * aIssuerName onto the cleanup stack before calling this method and pop it off the
65 * cleanup stack after successful construction.
66 * @param aSerialNumber The serial number of the issuer.
67 * @return The fully constructed object.
69 static CPKCS7IssuerAndSerialNumber* NewLC(CX500DistinguishedName* aIssuerName, const TDesC8& aSerialNumber);
74 * Creates a CMS issuer and serial number object as defined in RFC2630.
75 * @param aRawData A buffer which holds the encoded issuer and serial number.
76 * @return The fully constructed object.
78 static CPKCS7IssuerAndSerialNumber* NewL(const TDesC8& aRawData);
83 IMPORT_C ~CPKCS7IssuerAndSerialNumber();
86 Returns the issuer's distinguished name.
87 @return The issuer's distinguished name reference.
89 IMPORT_C const CX500DistinguishedName& IssuerName() const;
92 Returns the issuer's serial number.
93 @return The issuer's serial number reference.
95 IMPORT_C const TDesC8& SerialNumber() const;
100 * Creates the ASN1 DER sequence of the signer identifier object
101 * and leaves it on the cleanup stack.
102 * @return ASN1 DER sequence of this object.
104 CASN1EncSequence* EncodeASN1DERLC() const;
110 CPKCS7IssuerAndSerialNumber(void);
115 CPKCS7IssuerAndSerialNumber(const CPKCS7IssuerAndSerialNumber&);
118 Second phase constructor
119 @param aIssuerName the issuer name
120 @param aSerialNumber the serial number
122 void ConstructL(CX500DistinguishedName* aIssuerName, const TDesC8& aSerialNumber);
125 Second phase constructor
126 @param aRawData the raw data to be decoded.
128 void ConstructL(const TDesC8& aRawData);
132 Signer's distinguished name
134 CX500DistinguishedName* iIssuerName;
137 Signer's serial number
139 HBufC8* iSerialNumber;