os/security/cryptoservices/certificateandkeymgmt/inc/pkcs7excert.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/security/cryptoservices/certificateandkeymgmt/inc/pkcs7excert.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,90 @@
     1.4 +/*
     1.5 +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of the License "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description: 
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +/**
    1.23 + @file
    1.24 + @internalTechnology
    1.25 + @released
    1.26 +*/
    1.27 +
    1.28 +
    1.29 +#ifndef __PKCS7_EXTENDED_CERTIFICATE_OR_CERTIFICATE_H__
    1.30 +#define __PKCS7_EXTENDED_CERTIFICATE_OR_CERTIFICATE_H__
    1.31 +
    1.32 +#include <e32base.h>
    1.33 +
    1.34 +class CX509Certificate;
    1.35 +class CASN1EncEncoding;
    1.36 +
    1.37 +
    1.38 +/**
    1.39 +An instance of a member of the RFC2315 ExtendedCertificatesAndCertificates.
    1.40 +At present, only X509 certificates are supported.
    1.41 +(not PKCS#6 extended certificates).
    1.42 +@internalTechnology
    1.43 +*/
    1.44 +class CPKCS7ExtendedCertificateOrCertificate : public CBase
    1.45 +	{
    1.46 +public:
    1.47 +	/**
    1.48 +	Creates an ExtendedCertificatesAndCertificates as defined in RFC2315.
    1.49 +	@param aRawData The encoded CertificateChoices object to be decoded.
    1.50 +	@return The fully constructed object.
    1.51 +	*/			
    1.52 +	static CPKCS7ExtendedCertificateOrCertificate* NewL(const TDesC8& aRawData);
    1.53 +	
    1.54 +	/**
    1.55 +	Destructor
    1.56 +	*/
    1.57 +	~CPKCS7ExtendedCertificateOrCertificate();
    1.58 +		
    1.59 +	/**
    1.60 +	Returns the x509 certificate reference if the certificate is a X509 certificate.
    1.61 +	Callers need to check whether the certificate's type is X509 beforehand.
    1.62 +	@return The x509 certificate reference.
    1.63 +	*/
    1.64 +	IMPORT_C const CX509Certificate& Certificate(void) const;
    1.65 +
    1.66 +private:
    1.67 +	/**
    1.68 +	Default Constructor
    1.69 +	*/
    1.70 +	CPKCS7ExtendedCertificateOrCertificate();
    1.71 +	
    1.72 +	/**
    1.73 +	Copy Constructor
    1.74 +	@param the source object to be copied
    1.75 +	*/	
    1.76 +	CPKCS7ExtendedCertificateOrCertificate(const CPKCS7ExtendedCertificateOrCertificate&);
    1.77 +	
    1.78 +	/**
    1.79 +	Second phase constructor for decoding.
    1.80 +	@param aRawData the raw data to be decoded.
    1.81 +	*/
    1.82 +	void ConstructL(const TDesC8& aRawData);
    1.83 +	
    1.84 +private:	
    1.85 +	/**
    1.86 +	The X509 certificate pointer
    1.87 +	*/
    1.88 +	CX509Certificate* iCertificate;
    1.89 +	};
    1.90 +
    1.91 +
    1.92 +	
    1.93 +#endif