--- a/cryptoservices/certificateandkeymgmt/pkcs7/pkcs7excert.cpp Tue Jul 21 01:04:32 2009 +0100
+++ b/cryptoservices/certificateandkeymgmt/pkcs7/pkcs7excert.cpp Thu Sep 10 14:01:51 2009 +0300
@@ -1,71 +1,74 @@
-/*
-* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-
-
-#include <pkcs7excert.h>
-#include "pkcs7asn1.h"
-#include <asn1dec.h>
-#include <x509cert.h>
-#include <asn1enc.h>
-
-//Implementation of PKCS7 Extended Certificate Set
-
-CPKCS7ExtendedCertificateOrCertificate* CPKCS7ExtendedCertificateOrCertificate::NewL(const TDesC8& aRawData)
- {
- CPKCS7ExtendedCertificateOrCertificate* self = new (ELeave) CPKCS7ExtendedCertificateOrCertificate();
- CleanupStack::PushL(self);
- self->ConstructL(aRawData);
- CleanupStack::Pop(self);
- return self;
- }
-
-CPKCS7ExtendedCertificateOrCertificate::~CPKCS7ExtendedCertificateOrCertificate()
- {
- delete iCertificate;
- }
-
-CPKCS7ExtendedCertificateOrCertificate::CPKCS7ExtendedCertificateOrCertificate()
- {
- }
-
-void CPKCS7ExtendedCertificateOrCertificate::ConstructL(const TDesC8& aRawData)
- {
- TASN1DecGeneric decGen(aRawData);
- decGen.InitL();
-
- if (decGen.Tag()==EASN1Sequence && decGen.Class()==EUniversal)
- {
- // x509 certificates
- iCertificate = CX509Certificate::NewL(aRawData);
- }
- else if (decGen.Tag()==0 && decGen.Class()==EContextSpecific)
- {
- // extended certificates not supported
- User::Leave(KErrNotSupported);
- }
- else
- {
- User::Leave(KErrArgument);
- }
- }
-
-EXPORT_C const CX509Certificate& CPKCS7ExtendedCertificateOrCertificate::Certificate(void) const
- {
- return *iCertificate;
- }
+/*
+* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#include <pkcs7excert.h>
+#include "pkcs7asn1.h"
+#include <asn1dec.h>
+#include <x509cert.h>
+#include <asn1enc.h>
+
+//Implementation of PKCS7 Extended Certificate Set
+
+CPKCS7ExtendedCertificateOrCertificate* CPKCS7ExtendedCertificateOrCertificate::NewL(const TDesC8& aRawData)
+ {
+ CPKCS7ExtendedCertificateOrCertificate* self = new (ELeave) CPKCS7ExtendedCertificateOrCertificate();
+ CleanupStack::PushL(self);
+ self->ConstructL(aRawData);
+ CleanupStack::Pop(self);
+ return self;
+ }
+
+CPKCS7ExtendedCertificateOrCertificate::~CPKCS7ExtendedCertificateOrCertificate()
+ {
+ delete iCertificate;
+ }
+
+CPKCS7ExtendedCertificateOrCertificate::CPKCS7ExtendedCertificateOrCertificate()
+ {
+ }
+
+void CPKCS7ExtendedCertificateOrCertificate::ConstructL(const TDesC8& aRawData)
+ {
+ TASN1DecGeneric decGen(aRawData);
+ decGen.InitL();
+
+ if (decGen.Tag()==EASN1Sequence && decGen.Class()==EUniversal)
+ {
+ // x509 certificates
+ iCertificate = CX509Certificate::NewL(aRawData);
+ }
+ else if (decGen.Tag()==0 && decGen.Class()==EContextSpecific)
+ {
+ // extended certificates not supported
+ User::Leave(KErrNotSupported);
+ }
+ else
+ {
+ User::Leave(KErrArgument);
+ }
+ }
+
+EXPORT_C const CX509Certificate& CPKCS7ExtendedCertificateOrCertificate::Certificate(void) const
+ {
+ return *iCertificate;
+ }
+
+
+
+
+