build: Fixing build and unit tests

Use only C++ and boost methods (memory copying, comparison, time
operations), which are guaranteed to be present on all platforms
with C++ and boost libraries.

Change-Id: Ia2883555c55909a4f7a877cf6d5fbd49b12c73c8
diff --git a/tests/test-sec-tpm-file.cpp b/tests/test-sec-tpm-file.cpp
index 9d75a38..a74a84b 100644
--- a/tests/test-sec-tpm-file.cpp
+++ b/tests/test-sec-tpm-file.cpp
@@ -32,10 +32,12 @@
   SecTpmFile tpm;
 
   Name keyName("/tmp/ksk-123456");
-  tpm.generateKeyPairInTpm(keyName, KEY_TYPE_RSA, 2048);
+  try {
+    tpm.generateKeyPairInTpm(keyName, KEY_TYPE_RSA, 2048);
+  }
+  catch(const SecTpm::Error&) {
+  }
   
-
-
   Data data("/tmp/test/1");
   const uint8_t content[] = {0x01, 0x02, 0x03, 0x04};