First public contribution.
2 * Copyright (c) 1998-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.
21 TASN1DecX509Time::TASN1DecX509Time()
26 TTime TASN1DecX509Time::DecodeDERL(const TDesC8& aSource,TInt& aPos)
29 TPtrC8 Source=aSource.Mid(aPos);
30 TASN1DecGeneric Gen(Source);
32 aPos+=Gen.LengthDER();
33 TTime t = TASN1DecX509Time::DecodeContentsL(Gen);
37 TTime TASN1DecX509Time::DecodeDERL(const TASN1DecGeneric& aSource)
39 return DecodeContentsL(aSource);
42 TTime TASN1DecX509Time::DecodeContentsL(const TASN1DecGeneric& aSource)
47 switch (aSource.Tag())
52 result = encT.DecodeDERL(aSource);
55 case EASN1GeneralizedTime:
57 TASN1DecGeneralizedTime encT;
58 result = encT.DecodeDERL(aSource);
62 User::Leave(KErrArgument);