cryptoservices/filebasedcertificateandkeystores/test/thwkeystore/common/tkeydetails.cpp
--- a/cryptoservices/filebasedcertificateandkeystores/test/thwkeystore/common/tkeydetails.cpp Mon Oct 12 10:17:04 2009 +0300
+++ b/cryptoservices/filebasedcertificateandkeystores/test/thwkeystore/common/tkeydetails.cpp Fri Nov 06 13:21:00 2009 +0200
@@ -80,7 +80,11 @@
// set the access type to never extractable
iAccessType |= CKeyInfoBase::ENeverExtractable;
iAccessType |= CKeyInfoBase::ELocal;
-
+ // Policy set for keys in hardware depends on the vendor requirements
+ // this reference implementation assumes that accessibility of keys
+ // does not need any restriction. Hence for the testing environment policy is set to always pass.
+ TSecurityPolicy temp(TSecurityPolicy::EAlwaysPass);
+ iUsePolicy = temp;
}
void CKeyDetails::ExternalizeL(RWriteStream& aWriteStream) const
@@ -98,7 +102,7 @@
TPtr8 keyPtr = iPrivateKey->Des();
keyPtr.SetLength(stringLen);
aWriteStream.WriteL(keyPtr);
-
+
stringLen = iPublicKey->Length();
aWriteStream.WriteInt32L(stringLen);
keyPtr = iPublicKey->Des();
@@ -127,4 +131,9 @@
TPtr8 publicKeyPtr((TUint8*)iPublicKey->Ptr(), stringLen, stringLen);
publicKeyPtr.FillZ(stringLen);
aReadStream.ReadL(publicKeyPtr);
+ // Policy set for keys in hardware depends on the vendor requirements
+ // this reference implementation assumes that accessibility of keys
+ // does not need any restriction. Hence for the testing environment policy is set to always pass.
+ TSecurityPolicy temp(TSecurityPolicy::EAlwaysPass);
+ iUsePolicy = temp;
}