cryptoplugins/cryptospiplugins/source/softwarecrypto/dsakeypairgenimpl.cpp
changeset 55 581b7c2ef978
parent 17 cd501b96611d
--- a/cryptoplugins/cryptospiplugins/source/softwarecrypto/dsakeypairgenimpl.cpp	Tue Jan 26 13:18:49 2010 +0200
+++ b/cryptoplugins/cryptospiplugins/source/softwarecrypto/dsakeypairgenimpl.cpp	Fri Mar 19 10:03:04 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));