--- a/vpnengine/utlpkcs10/src/pkcs10.cpp Tue Feb 02 00:53:00 2010 +0200
+++ b/vpnengine/utlpkcs10/src/pkcs10.cpp Fri Apr 16 16:02:48 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2003 - 2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2003 - 2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -27,6 +27,10 @@
#include "pkidefs.h"
#include "utlcrypto.h"
+EXPORT_C CPkcs10Req::CPkcs10Req()
+ {
+ }
+
//////////////////////////////////////////////////////////////////////////////
// Destructor
//////////////////////////////////////////////////////////////////////////////
@@ -1038,31 +1042,20 @@
CRInfoPtr += DERSetInteger(CRInfoPtr, 0); // version
// Copy component ders
- if(commonAttributes != NULL && commonAttributes->Length() > 0)
+ if(commonAttributes->Length() > 0)
CRInfoPtr += CPkcs10Req::ASNCopy(CRInfoPtr, CONST_CAST(TUint8 *, commonAttributes->Ptr()), commonAttributes->Length());
- if(pkiInfo != NULL && pkiInfo->Length() > 0)
+ if(pkiInfo->Length() > 0)
CRInfoPtr += CPkcs10Req::ASNCopy(CRInfoPtr, CONST_CAST(TUint8 *, pkiInfo->Ptr()), pkiInfo->Length());
- if(extendedAttributes != NULL && extendedAttributes->Length() > 0)
+ if(extendedAttributes->Length() > 0)
CRInfoPtr += CPkcs10Req::ASNCopy(CRInfoPtr, CONST_CAST(TUint8 *, extendedAttributes->Ptr()), extendedAttributes->Length());
}
- if(extendedAttributes != NULL)
- {
- delete extendedAttributes;
- CleanupStack::Pop(1);
- }
- if(pkiInfo != NULL)
- {
- delete pkiInfo;
- CleanupStack::Pop(1);
- }
- if(commonAttributes != NULL)
- {
- delete commonAttributes;
- CleanupStack::Pop(1);
- }
+ CleanupStack::PopAndDestroy(extendedAttributes);
+ CleanupStack::PopAndDestroy(pkiInfo);
+ CleanupStack::PopAndDestroy(commonAttributes);
+
if(CRInfoBuffer != NULL)
CleanupStack::PushL(CRInfoBuffer); // to be destroyed by the caller