--- a/crypto/weakcryptospi/source/padding/padding.cpp Tue Jan 26 13:18:49 2010 +0200
+++ b/crypto/weakcryptospi/source/padding/padding.cpp Sat Feb 20 00:36:18 2010 +0200
@@ -295,7 +295,9 @@
TInt startOfData=BlockSize()-aInput.Length();
aOutput[1]=2; // Block type 2 (public key operation)
TBuf8<256> rnd(256);
- GenerateRandomBytesL(rnd);
+ TRAPD(err, GenerateRandomBytesL(rnd));
+ if((err != KErrNone) && (err != KErrNotSecure))
+ User::Leave(err);
TInt i = 2;
TInt j = 0;
@@ -307,7 +309,9 @@
}
if (++j==256)
{
- GenerateRandomBytesL(rnd);
+ TRAP(err, GenerateRandomBytesL(rnd));
+ if((err != KErrNone) && (err != KErrNotSecure))
+ User::Leave(err);
j=0;
}
}