os/security/cryptoservices/certificateandkeymgmt/tadditionalstores/Test1certstore.cpp
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.
19 #include "test1certstore.h"
20 #include "tadditionalstoremappings.h"
25 #include <ecom/implementationproxy.h>
28 _LIT(KName1, "Test store 1");
29 _LIT(KName2, "Test store 2");
32 //////////////////////////////////////////////////////////////////////////////////////////
34 /////////////////////////////////////////////////////////////////////////////////////////
36 CTest1CertStore* CTest1CertStore::NewL(RFs& aFs,
37 CTest1CertStoreToken& aToken,
38 const TDesC& aFileName,
41 CTest1CertStore* self = new(ELeave) CTest1CertStore(aToken, aFs);
42 CleanupStack::PushL(self);
43 self->ConstructL(aFileName, aMode);
44 CleanupStack::Pop(self);
48 MCTToken& CTest1CertStore::Token()
53 void CTest1CertStore::DoRelease()
55 if (iToken.Label() == KName1)
57 iToken.iRefCountInterface--;
58 if (!iToken.iRefCountInterface)
63 else if (iToken.Label() == KName2)
65 iToken.iRefCountInterface2--;
66 if (!iToken.iRefCountInterface2)
73 void CTest1CertStore::List(RMPointerArray<CCTCertInfo>& aCertInfos,
74 const CCertAttributeFilter& aFilter,
75 TRequestStatus& aStatus)
77 iOriginalRequestStatus = &aStatus;
78 aStatus = KRequestPending;
80 iCertInfos = &aCertInfos;
83 //Iinitialize the ketstore and then list the key info
84 if (iFilter->iKeyUsage != EX509UsageAll)
86 // We have to initialize the unified key store
87 TRAPD(err, iUnifiedKeyStore = CUnifiedKeyStore::NewL(iFs));
90 User::RequestComplete(iOriginalRequestStatus, err);
91 iOriginalRequestStatus = 0;
95 iUnifiedKeyStore->Initialize(iStatus);
96 iState = EGetKeyInfos;
103 TRequestStatus* status = &iStatus;
104 User::RequestComplete(status, KErrNone);
109 void CTest1CertStore::CancelList()
114 void CTest1CertStore::GetCert(CCTCertInfo*& aCertInfo,
115 const TCTTokenObjectHandle& aHandle,
116 TRequestStatus& aStatus)
118 TInt err = KErrNotFound;
119 if ((aHandle.iTokenHandle == iToken.Handle()) &&
120 (aHandle.iObjectId < iCerts->Count()))
122 TRAP(err, aCertInfo = CCTCertInfo::NewL(iCerts->Entry(aHandle.iObjectId)));
124 TRequestStatus* status = &aStatus;
125 User::RequestComplete(status, err);
128 void CTest1CertStore::CancelGetCert()
130 // Nothing to do because GetCert is not asynchronous.
133 void CTest1CertStore::Applications(const CCTCertInfo& aCertInfo,
134 RArray<TUid>& aApplications,
135 TRequestStatus& aStatus)
138 TInt index = iCerts->Index(aCertInfo);
139 if (index != KErrNotFound)
141 const RArray<TUid>& apps = iCerts->Mapping(index)->CertificateApps();
142 TInt end = apps.Count();
143 for (TInt i = 0; (i < end) && (err == KErrNone); i++)
145 err = aApplications.Append(apps[i]);
154 aApplications.Reset();
156 TRequestStatus* status = &aStatus;
157 User::RequestComplete(status, err);
160 void CTest1CertStore::CancelApplications()
164 void CTest1CertStore::IsApplicable(const CCTCertInfo& aCertInfo,
166 TBool& aIsApplicable,
167 TRequestStatus& aStatus)
169 TInt index = iCerts->Index(aCertInfo);
170 if (index != KErrNotFound)
172 const RArray<TUid>& apps = iCerts->Mapping(index)->CertificateApps();
173 TInt end = apps.Count();
175 for (i = 0; i < end; i++)
177 if (apps[i] == aApplication)
184 aIsApplicable = EFalse;
188 aIsApplicable = ETrue;
193 TRequestStatus* status = &aStatus;
194 User::RequestComplete(status, index);
197 void CTest1CertStore::CancelIsApplicable()
199 // Nothing to do because IsApplicable is not asynchronous.
202 void CTest1CertStore::Trusted(const CCTCertInfo& aCertInfo,
204 TRequestStatus& aStatus)
206 TInt index = iCerts->Index(aCertInfo);
207 if (index != KErrNotFound)
209 aTrusted = iCerts->Mapping(index)->Trusted();
213 TRequestStatus* status = &aStatus;
214 User::RequestComplete(status, index);
217 void CTest1CertStore::CancelTrusted()
219 // Nothing to do because Trusted is not asynchronous.
222 void CTest1CertStore::Retrieve(const CCTCertInfo& aCertInfo,
224 TRequestStatus& aStatus)
226 #ifdef CERTSTORE_SOFTWARE_ASYNCH
227 // perform an asynchronous retrieval of the certificate
228 iOriginalRequestStatus = &aStatus;
229 aStatus = KRequestPending;
231 iAsynchCertInfo = &aCertInfo;
232 iAsynchCertificate = &aCertificate;
235 TRequestStatus* status = &iStatus;
236 User::RequestComplete(status, KErrNone);
239 RetrieveNow(aCertInfo,aCertificate,aStatus);
243 void CTest1CertStore::RetrieveNow(const CCTCertInfo& aCertInfo,
245 TRequestStatus& aStatus)
247 TRequestStatus* status = &aStatus;
249 TInt index = iCerts->Index(aCertInfo);
250 if (index == KErrNotFound)
256 CFileCertStoreMapping* mapping = NULL;
257 mapping = iCerts->Mapping(index);
261 TRAP(err, DoLoadL(aCertificate, *mapping));
264 User::RequestComplete(status, err);
267 void CTest1CertStore::CancelRetrieve()
272 void CTest1CertStore::Capabilities(const CCTCertInfo& /*aCertInfo*/, TCapabilitySet& /*aCapbilitiesOut*/,
273 TRequestStatus& aStatus)
275 // currently not supported
276 TRequestStatus* status = &aStatus;
277 User::RequestComplete(status, KErrNotSupported);
280 void CTest1CertStore::CancelCapabilities()
282 // Nothing to do because Capabilities is not asynchronous.
285 void CTest1CertStore::IsMandatory(const CCTCertInfo& /*aCertInfo*/, TBool& /*aMandatoryOut*/,
286 TRequestStatus& aStatus)
288 // currently not supported
289 TRequestStatus* status = &aStatus;
290 User::RequestComplete(status, KErrNotSupported);
293 void CTest1CertStore::CancelIsMandatory()
295 // Nothing to do because IsMandatory is not asynchronous.
299 void CTest1CertStore::Remove(const CCTCertInfo& aCertInfo, TRequestStatus& aStatus)
301 // This removes the certificate from the file store.
302 TRAPD(err, DoRemoveL(aCertInfo));
303 TRequestStatus* status = &aStatus;
304 User::RequestComplete(status, err);
307 void CTest1CertStore::CancelRemove()
312 void CTest1CertStore::SetApplicability(const CCTCertInfo& aCertInfo,
313 const RArray<TUid>& aTrusters,
314 TRequestStatus& aStatus)
316 TRAPD(err, DoSetApplicabilityL(aCertInfo, aTrusters));
317 TRequestStatus* status = &aStatus;
318 User::RequestComplete(status, err);
322 void CTest1CertStore::CancelSetApplicability()
326 void CTest1CertStore::SetTrust(const CCTCertInfo& aCertInfo,
328 TRequestStatus& aStatus)
330 TRAPD(err, DoSetTrustL(aCertInfo, aTrusted));
331 TRequestStatus* status = &aStatus;
332 User::RequestComplete(status, err);
335 void CTest1CertStore::CancelSetTrust()
337 // Nothing to do because SetTrust is not asynchronous.
340 void CTest1CertStore::SetCapabilities(const CCTCertInfo& /*aCertInfo*/, const TCapabilitySet& /*aCapabilities*/,
341 TRequestStatus& aStatus)
343 // currently not supported
344 TRequestStatus* status = &aStatus;
345 User::RequestComplete(status, KErrNotSupported);
348 void CTest1CertStore::CancelSetCapabilities()
350 // Nothing to do because SetCapabilities is not asynchronous.
353 void CTest1CertStore::SetMandatory(const CCTCertInfo& /*aCertInfo*/, TBool /*aMandatory*/,
354 TRequestStatus& aStatus)
356 // currently not supported
357 TRequestStatus* status = &aStatus;
358 User::RequestComplete(status, KErrNotSupported);
361 void CTest1CertStore::CancelSetMandatory()
363 // Nothing to do because SetMandatory is not asynchronous.
367 void CTest1CertStore::RevertStore(TAny* aStore)
369 //this is a CleanupItem
370 CPermanentFileStore* store = REINTERPRET_CAST(CPermanentFileStore*, aStore);
375 void CTest1CertStore::DeleteFile(TAny* aThis)
377 CTest1CertStore* self = REINTERPRET_CAST(CTest1CertStore*, aThis);
378 TDriveUnit sysDrive (RFs::GetSystemDrive());
379 TDriveName driveName(sysDrive.Name());
380 TBuf<128> certStoreDefaultFullPath (driveName);
381 certStoreDefaultFullPath.Append(_L("\\system\\data\\cacerts.dat"));
383 self->iFs.Delete(certStoreDefaultFullPath);
388 CTest1CertStore::~CTest1CertStore()
397 TRAP(err, iStore->ReclaimL());
398 TRAP(err, iStore->CompactL());
401 TRAP(err, iStore->CommitL());
412 delete iUnifiedKeyStore;
416 void CTest1CertStore::DoSetApplicabilityL(const CCTCertInfo& aCertInfo,
417 const RArray<TUid>& aTrusters)
419 TInt index = iCerts->Index(aCertInfo);
420 if (index == KErrNotFound)
425 CFileCertStoreMapping* mapping = iCerts->Mapping(index);
426 const RArray<TUid>& trusters = mapping->CertificateApps(); //oldEntry->Trusters();
427 RArray<TUid>* oldTrusters = new(ELeave) RArray<TUid>();
428 CleanupStack::PushL(oldTrusters);
429 CleanupClosePushL(*oldTrusters);
430 TInt iEnd = trusters.Count();
432 for (i = 0; i < iEnd; i++)
434 User::LeaveIfError(oldTrusters->Append(trusters[i]));
437 RArray<TUid>* newTrusters = new (ELeave) RArray<TUid>;
438 CleanupStack::PushL(newTrusters);
439 CleanupClosePushL(*newTrusters);
440 for (i = 0 ; i < aTrusters.Count() ; ++i)
442 User::LeaveIfError(newTrusters->Append(aTrusters[i]));
445 mapping->SetCertificateApps(newTrusters);
446 CleanupStack::Pop(2, newTrusters);
448 TRAPD(err, UpdateStoreL());
449 CleanupStack::Pop(2); // *oldTrusters, oldTrusters
452 // If there is an error, we undo the change in oldEntry
453 mapping->SetCertificateApps(oldTrusters);
457 oldTrusters->Close();
463 void CTest1CertStore::DoSetTrustL(const CCTCertInfo& aCertInfo,
466 TInt index = iCerts->Index(aCertInfo);
467 if (index == KErrNotFound)
471 CFileCertStoreMapping* mapping = iCerts->Mapping(index);
472 TBool oldValue = mapping->Trusted();
473 mapping->SetTrusted(aTrusted);
474 TRAPD(err, UpdateStoreL());
477 // If there is an error, we undo the change in oldEntry
478 mapping->SetTrusted(oldValue);
482 void CTest1CertStore::Add(const TDesC& aLabel,
483 TCertificateFormat aFormat,
484 TCertificateOwnerType aCertificateOwnerType,
485 const TKeyIdentifier* aSubjectKeyId,
486 const TKeyIdentifier* aIssuerKeyId,
488 TRequestStatus& aStatus)
490 TRAPD(err, DoAddL(aLabel, aFormat, aCertificateOwnerType, aSubjectKeyId,
491 aIssuerKeyId, aCert));
492 TRequestStatus* status = &aStatus;
493 User::RequestComplete(status, err);
496 void CTest1CertStore::CancelAdd()
501 void CTest1CertStore::DoAddL(const TDesC& aLabel,
502 TCertificateFormat aFormat,
503 TCertificateOwnerType aCertificateOwnerType,
504 const TKeyIdentifier* aSubjectKeyId,
505 const TKeyIdentifier* aIssuerKeyId,
508 TKeyIdentifier subjectKeyId;
511 case EX509Certificate:
514 CCertificate* cert = CX509Certificate::NewLC(aCert);
515 subjectKeyId = cert->KeyIdentifierL();
516 aSubjectKeyId = &subjectKeyId;
517 CleanupStack::PopAndDestroy(cert);
521 case EWTLSCertificate:
524 CCertificate* cert = CWTLSCertificate::NewLC(aCert);
525 subjectKeyId = cert->KeyIdentifierL();
526 aSubjectKeyId = &subjectKeyId;
527 CleanupStack::PopAndDestroy(cert);
531 case EX509CertificateUrl:
534 User::Leave(KErrArgument);
539 User::Leave(KErrNotSupported);
544 TInt iend = iCerts->Count();
545 for (TInt i = 0; i < iend; i++)
547 if (iCerts->Entry(i).Label() == aLabel)
549 User::Leave(KErrBadName);
553 CCTCertInfo* entry = CCTCertInfo::NewL(aLabel, aFormat,
554 aCertificateOwnerType, aCert.Length(), aSubjectKeyId, aIssuerKeyId, iToken, iCerts->Count());
555 // AddCertL takes ownership of entry no matter what happens.
556 AddCertL(entry, aCert, *iCerts);
559 /*void CFileCertStore::AddUserCertL(const CCertificate& aCert,
561 TCertificateFormat aFormat,
562 const TKeyIdentifier& aIssuerKeyHash,
563 const TKeyIdentifier& aSubjectKeyHash)
565 if (aFormat != EX509Certificate)
567 User::Leave(KErrNotSupported);
570 TInt iend = iUserCerts->Count();
571 for (TInt i = 0; i < iend; i++)
573 if (iUserCerts->Entry(i).Label() == aLabel)
575 User::Leave(KErrBadName);
579 // We compute the subject key hash using the information contained in the certificate
580 const CSubjectPublicKeyInfo& key = aCert.PublicKey();
581 CX509RSAPublicKey* rsaKey = CX509RSAPublicKey::NewLC(key.KeyData());
582 #ifdef SYMBIAN_CRYPTO
583 const TInteger& modulus = rsaKey->Modulus();
585 const CInteger& modulus = rsaKey->Modulus();
587 HBufC8* modulusBuffer = modulus.BufferLC();
589 CSHA1* sha1 = CSHA1::NewL();
590 CleanupStack::PushL(sha1);
592 TPtrC8 hash = sha1->Hash(*modulusBuffer);
595 TKeyIdentifier keyId;
598 CleanupStack::PopAndDestroy(3); // rsaKey, modulusBuffer, sha1
600 // If the caller supplied a aSubjectKeyHash, we must compare it with the computed
601 // value and ensure they are the same
602 if ((aSubjectKeyHash != KNullDesC8) && (aSubjectKeyHash != keyId))
604 User::Leave(KErrArgument);
607 CCTCertInfo* entry = CCTCertInfo::NewL(aLabel,
608 *this, EX509Certificate, aCert.Encoding().Length(), keyId, aIssuerKeyHash);
609 AddCertL(entry, aCert, *iUserCerts);
612 /*void CFileCertStore::AddUserCertURLL(const TDesC8& aCert,
614 const TKeyIdentifier& aIssuerKeyHash,
615 const TKeyIdentifier& aSubjectKeyHash)
617 TInt iEnd = iUserCerts->Count();
618 for (TInt i = 0; i < iEnd; i++)
620 if (iUserCerts->Entry(i).Label() == aLabel)
622 User::Leave(KErrBadName);
626 CCTCertInfo* entry = CCTCertInfo::NewL(aLabel,
627 *this, EX509CertificateUrl, aCert.Length(), aSubjectKeyHash, aIssuerKeyHash);
628 AddCertL(entry, aCert, *iUserCerts);
631 void CTest1CertStore::AddCertL(CCTCertInfo* aCertInfo,
633 CFileCertStoreMappings& aMappings)
635 CleanupReleasePushL(*aCertInfo);
636 //create the mapping object
637 CFileCertStoreMapping* mapping = CFileCertStoreMapping::NewL();
638 mapping->SetEntry(aCertInfo);
639 CleanupStack::Pop();//aEntry, mapping has taken ownership
640 CleanupStack::PushL(mapping);
642 TCleanupItem cleanupStore(CTest1CertStore::RevertStore, iStore);//store will revert() if a leave occurs
643 CleanupStack::PushL(cleanupStore);
646 RStoreWriteStream stream;
647 TStreamId certId = stream.CreateLC(*iStore);//stream for cert
648 stream.WriteL(aCert);
650 CleanupStack::PopAndDestroy();//stream
651 mapping->SetId(certId);
653 //add mapping to mappings, & store mappings
654 aMappings.AddL(mapping); //takes ownership
655 CleanupStack::Pop();//mapping; mappings has taken ownership
657 //Update the mapping. if error, remove the entry.
658 TRAPD(err, aMappings.ReplaceL());
661 TRAP(err, iStore->CommitL());
664 aMappings.Remove(*mapping->Entry());
670 //oom tests pass currently
671 aMappings.Remove(*mapping->Entry());
674 CleanupStack::Pop();//revert store
677 void CTest1CertStore::UpdateStoreL()
679 //tries to write out the new cacerts to the file
680 TCleanupItem cleanupStore(RevertStore, iStore);//store will revert() if a leave occurs
681 CleanupStack::PushL(cleanupStore);
684 CleanupStack::Pop();//revert store
691 void CTest1CertStore::DoLoadL(TDes8& aCertificate, CFileCertStoreMapping& aMapping) const
693 RStoreReadStream stream;
694 stream.OpenLC(*iStore, aMapping.Id());
695 CCTCertInfo* entry = aMapping.Entry();
696 stream.ReadL(aCertificate, entry->Size());
697 CleanupStack::PopAndDestroy();//stream
700 void CTest1CertStore::DoRemoveL(const CCTCertInfo& aCertInfo)
702 switch(aCertInfo.CertificateFormat())
704 case EWTLSCertificate://must be a CA cert
705 case EX509CertificateUrl:
706 case EX509Certificate:
707 User::LeaveIfError(iCerts->SetTempRemove(aCertInfo, ETrue));
712 User::Leave(KErrNotSupported);
715 TRAPD(err, UpdateStoreL());
718 User::LeaveIfError(iCerts->SetTempRemove(aCertInfo, EFalse));
722 User::LeaveIfError(iCerts->Remove(aCertInfo));
727 CTest1CertStore::CTest1CertStore(CTest1CertStoreToken& aToken, RFs& aFs)
728 : CActive(EPriorityNormal), iToken(aToken), iFs(aFs)
730 CActiveScheduler::Add(this);
733 void CTest1CertStore::ConstructL(const TDesC& aFileName, TFileMode aMode)
735 iStore = OpenStoreL(aFileName, aMode);
739 void CTest1CertStore::RestoreL()
741 TStreamId caCertEntryStreamId;
742 RStoreReadStream stream;
743 stream.OpenLC(*iStore, iStore->Root());
745 stream >> caCertEntryStreamId;
746 CleanupStack::PopAndDestroy();//stream
748 iCerts = CFileCertStoreMappings::NewL(caCertEntryStreamId, *iStore);
749 RStoreReadStream caCertEntryStream;
750 caCertEntryStream.OpenLC(*iStore, caCertEntryStreamId);
752 TInt caCount = caCertEntryStream.ReadInt32L();
753 for (TInt i = 0; i < caCount; i++)
755 CFileCertStoreMapping* caCertMapping = CFileCertStoreMapping::NewL();
756 CleanupStack::PushL(caCertMapping);
757 CCTCertInfo* caCertEntry = CCTCertInfo::NewLC(caCertEntryStream, iToken);
758 caCertMapping->SetEntry(caCertEntry);
759 CleanupStack::Pop();//caCertEntry
760 // Read the CertificateApps uids
761 RArray<TUid>* certificateApps = new(ELeave) RArray<TUid>();
762 CleanupStack::PushL(certificateApps);
763 CleanupClosePushL(*certificateApps);
764 TInt count = caCertEntryStream.ReadInt32L();
765 for (TInt j = 0; j < count; j++)
768 caCertEntryStream >> id;
769 User::LeaveIfError(certificateApps->Append(id));
771 CleanupStack::Pop(2); // *certificateApps, certificateApps
772 caCertMapping->SetCertificateApps(certificateApps);
773 TBool trusted = caCertEntryStream.ReadUint8L();
774 caCertMapping->SetTrusted(trusted);
775 TStreamId caCertStreamId;
776 caCertEntryStream >> caCertStreamId;
777 caCertMapping->SetId(caCertStreamId);
778 iCerts->AddL(caCertMapping);
779 CleanupStack::Pop();//caCertMapping
781 CleanupStack::PopAndDestroy();//caCertStream
788 CPermanentFileStore* CTest1CertStore::OpenStoreLC(const TDesC& aFileName, TFileMode aMode)
790 //this function creates, opens and returns a permanent file store in KCertStorePath,
791 //on the drive letter passed in, leaving it on the cleanup stack.
792 //if the store isn't found it returns NULL
793 TInt err = iFile.Open(iFs, aFileName, aMode);
796 CPermanentFileStore* store = CPermanentFileStore::FromLC(iFile);
806 CPermanentFileStore* CTest1CertStore::OpenStoreL(const TDesC& aFileName, TFileMode aMode)
808 CPermanentFileStore* store = NULL;
809 store = OpenStoreLC(aFileName, aMode);
810 CleanupStack::Pop(store);
814 void CTest1CertStore::RunL()
819 iKeyFilter.iUsage = KeyUsageX509ToPKCS15Private(iFilter->iKeyUsage);
820 iUnifiedKeyStore->List(iKeyInfos, iKeyFilter, iStatus);
827 RetrieveNow(*iAsynchCertInfo,*iAsynchCertificate,*iOriginalRequestStatus);
832 TInt count = iCerts->Count();
833 for (TInt index = 0; index < count; index++)
835 const CCTCertInfo& certInfo = iCerts->Entry(index);
837 TBool accept = ETrue;
838 if (iFilter->iUidIsSet)
840 accept = iCerts->Mapping(index)->IsApplicable(iFilter->iUid);
842 if (iFilter->iFormatIsSet && accept)
844 accept = (iFilter->iFormat == certInfo.CertificateFormat());
846 if (iFilter->iOwnerTypeIsSet && accept)
848 accept = (iFilter->iOwnerType == certInfo.CertificateOwnerType());
850 if ((iFilter->iSubjectKeyId != KNullDesC8) && accept)
852 accept = (iFilter->iSubjectKeyId == certInfo.SubjectKeyId());
857 // Fill in the cert hash.
858 // (This returns an incorrect hard-coded value, which allows
859 // the test code to check that the store is being treated
860 // correctly as a hardware store, as it'll behave differently
861 // to if it returned the correct hashes.)
862 _LIT8(KHash, "\x70\xe4\xf4\x54\x5f\x8e\xe6\xf2\xbd\x4e\x76\x2b\x8d\xa1\x83\xd8\xe0\x5d\x4a\x7d");
863 CCTCertInfo* copy = CCTCertInfo::NewLC(
864 certInfo.Label(), certInfo.CertificateFormat(),
865 certInfo.CertificateOwnerType(), certInfo.Size(),
866 &certInfo.SubjectKeyId(), &certInfo.IssuerKeyId(),
867 certInfo.Token(), certInfo.Handle().iObjectId,
869 User::LeaveIfError(iCertInfos->Append(copy));
874 delete iUnifiedKeyStore;
875 iUnifiedKeyStore = 0;
876 User::RequestComplete(iOriginalRequestStatus, KErrNone);
881 // ignore the undefined operations
886 void CTest1CertStore::DoCancel()
888 if (iUnifiedKeyStore)
890 if (iState == EGetKeyInfos)
892 iUnifiedKeyStore->CancelInitialize();
894 else if (iState == EList)
896 iUnifiedKeyStore->CancelList();
900 delete iUnifiedKeyStore;
901 iUnifiedKeyStore = 0;
903 User::RequestComplete(iOriginalRequestStatus, KErrCancel);
906 const TImplementationProxy ImplementationTable[] =
908 #ifdef CERTSTORE_SOFTWARE_ASYNCH
909 IMPLEMENTATION_PROXY_ENTRY(0x101FF738, CTest1CertStoreTokenType::NewL)
911 #ifdef CERTSTORE_HARDWARE_SIM
912 IMPLEMENTATION_PROXY_ENTRY(0x10206846, CTest1CertStoreTokenType::NewL)
914 #ifdef CERTSTORE_HARDWARE_WIM
915 IMPLEMENTATION_PROXY_ENTRY(0x10206847, CTest1CertStoreTokenType::NewL)
917 #ifdef CERTSTORE_HARDWARE_UICC
918 IMPLEMENTATION_PROXY_ENTRY(0x10206848, CTest1CertStoreTokenType::NewL)
920 #ifdef CERTSTORE_DEVICE_IMMUTABLE
921 IMPLEMENTATION_PROXY_ENTRY(0x102077C3, CTest1CertStoreTokenType::NewL)
923 IMPLEMENTATION_PROXY_ENTRY(0x101F5279, CTest1CertStoreTokenType::NewL)
931 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
933 aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
935 return ImplementationTable;