security: Generate random block in Tpm.

Change-Id: Ia65d32802ed0ebc76605ae7975ea02f4c2db737d
diff --git a/src/security/sec-tpm-osx.cpp b/src/security/sec-tpm-osx.cpp
index 27039bf..3f14f43 100644
--- a/src/security/sec-tpm-osx.cpp
+++ b/src/security/sec-tpm-osx.cpp
@@ -19,6 +19,7 @@
 
 #include <CoreFoundation/CoreFoundation.h>
 #include <Security/Security.h>
+#include <Security/SecRandom.h>
 #include <CoreServices/CoreServices.h>
 
 using namespace std;
@@ -562,6 +563,11 @@
 
 }
 
+bool
+SecTpmOsx::generateRandomBlock(uint8_t* res, size_t size)
+{
+  return (SecRandomCopyBytes(kSecRandomDefault, size, res) == 0);
+}
 
 ////////////////////////////////
 // OSXPrivateKeyStorage::Impl //