sl@0: /* sl@0: * Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: /** sl@0: @file sl@0: @internalTechnology sl@0: @released sl@0: */ sl@0: sl@0: sl@0: #ifndef __PKCS7_EXTENDED_CERTIFICATE_OR_CERTIFICATE_H__ sl@0: #define __PKCS7_EXTENDED_CERTIFICATE_OR_CERTIFICATE_H__ sl@0: sl@0: #include sl@0: sl@0: class CX509Certificate; sl@0: class CASN1EncEncoding; sl@0: sl@0: sl@0: /** sl@0: An instance of a member of the RFC2315 ExtendedCertificatesAndCertificates. sl@0: At present, only X509 certificates are supported. sl@0: (not PKCS#6 extended certificates). sl@0: @internalTechnology sl@0: */ sl@0: class CPKCS7ExtendedCertificateOrCertificate : public CBase sl@0: { sl@0: public: sl@0: /** sl@0: Creates an ExtendedCertificatesAndCertificates as defined in RFC2315. sl@0: @param aRawData The encoded CertificateChoices object to be decoded. sl@0: @return The fully constructed object. sl@0: */ sl@0: static CPKCS7ExtendedCertificateOrCertificate* NewL(const TDesC8& aRawData); sl@0: sl@0: /** sl@0: Destructor sl@0: */ sl@0: ~CPKCS7ExtendedCertificateOrCertificate(); sl@0: sl@0: /** sl@0: Returns the x509 certificate reference if the certificate is a X509 certificate. sl@0: Callers need to check whether the certificate's type is X509 beforehand. sl@0: @return The x509 certificate reference. sl@0: */ sl@0: IMPORT_C const CX509Certificate& Certificate(void) const; sl@0: sl@0: private: sl@0: /** sl@0: Default Constructor sl@0: */ sl@0: CPKCS7ExtendedCertificateOrCertificate(); sl@0: sl@0: /** sl@0: Copy Constructor sl@0: @param the source object to be copied sl@0: */ sl@0: CPKCS7ExtendedCertificateOrCertificate(const CPKCS7ExtendedCertificateOrCertificate&); sl@0: sl@0: /** sl@0: Second phase constructor for decoding. sl@0: @param aRawData the raw data to be decoded. sl@0: */ sl@0: void ConstructL(const TDesC8& aRawData); sl@0: sl@0: private: sl@0: /** sl@0: The X509 certificate pointer sl@0: */ sl@0: CX509Certificate* iCertificate; sl@0: }; sl@0: sl@0: sl@0: sl@0: #endif