--- a/cryptoplugins/cryptospiplugins/source/softwarecrypto/dsakeypairgenimpl.cpp Tue Jan 26 13:18:49 2010 +0200
+++ b/cryptoplugins/cryptospiplugins/source/softwarecrypto/dsakeypairgenimpl.cpp Sat Feb 20 00:36:18 2010 +0200
@@ -29,6 +29,7 @@
#include "mont.h"
#include "sha1impl.h"
#include <random.h>
+#include <securityerr.h>
const TUint KShaSize = 20;
@@ -287,7 +288,9 @@
do
{
- GenerateRandomBytesL(seed);
+ TRAPD(err, GenerateRandomBytesL(seed));
+ if((err != KErrNone) && (err != KErrNotSecure))
+ User::Leave(err);
}
while(!GeneratePrimesL(seed, c, p, aKeySize, q));