cryptoplugins/cryptospiplugins/source/softwarecrypto/dsakeypairgenimpl.cpp
branchRCL_3
changeset 41 9b5a3a9fddf8
parent 19 cd501b96611d
--- 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));