Update contrib.
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.
23 #include "x509keyencoder.h"
25 // TX509KeyEncoder Class Implementation
27 TX509KeyEncoder::TX509KeyEncoder(TAlgorithmId aDigestAlg)
28 : iDigestAlg(aDigestAlg)
32 EXPORT_C CASN1EncSequence* TX509KeyEncoder::EncodeDigestAlgorithmLC() const
34 CASN1EncSequence* digestAlgId = CASN1EncSequence::NewLC();
36 CASN1EncObjectIdentifier* oid = NULL;
41 oid = CASN1EncObjectIdentifier::NewLC(KMD2);
45 oid = CASN1EncObjectIdentifier::NewLC(KMD5);
49 oid = CASN1EncObjectIdentifier::NewLC(KSHA1);
53 User::Leave(KErrNotSupported);
56 digestAlgId->AddAndPopChildL(oid);
58 // No parameters : NULL
59 CASN1EncNull* nullparams = CASN1EncNull::NewLC();
60 digestAlgId->AddAndPopChildL(nullparams);