First public contribution.
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.
19 #include "pkcs7asn1.h"
22 CArrayPtr<TASN1DecGeneric>* PKCS7ASN1::DecodeSequenceLC(const TDesC8& aRawData)
24 CArrayPtr<TASN1DecGeneric>* items = NULL;
26 // Check we've got a sequence
27 TASN1DecGeneric decGen(aRawData);
29 if(decGen.Tag() != EASN1Sequence && decGen.Tag() != EASN1Set)
31 User::Leave(KErrArgument);
35 // Decode the sequence
36 TASN1DecSequence decSeq;
37 items = decSeq.DecodeDERLC(decGen);
42 CArrayPtr<TASN1DecGeneric>* PKCS7ASN1::DecodeSequenceLC(const TDesC8& aRawData,
46 CArrayPtr<TASN1DecGeneric>* items = DecodeSequenceLC(aRawData);
47 TInt count = items->Count();
48 if(count < aMinTerms || count > aMaxTerms)
50 User::Leave(KErrArgument);