summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Bray <ncbray@google.com>2018-06-13 15:48:56 -0700
committerNick Bray <ncbray@google.com>2018-06-15 14:16:50 -0700
commitf9449c4f292b479851e79e096aa5b02f079c65b1 (patch)
tree54558f37776a168e5765ced8d480cfc0c29a3267
parent7c72abb5ba400538e0634f9a3caf0104514cdb46 (diff)
downloadgatekeeper-f9449c4f292b479851e79e096aa5b02f079c65b1.tar.gz
Remove references to trusty_std.h.
Explicitly include the required header files instead. Also eliminate unneeded 'extern "C"' declarations. Also opportunistically reorder includes. Bug: 110159511 Change-Id: I6c99b86e3ecf32c2a216a91a6c3b68bcbc5d5369
-rw-r--r--ipc/gatekeeper_ipc.cpp6
-rw-r--r--trusty_gatekeeper.cpp10
-rw-r--r--trusty_gatekeeper.h1
3 files changed, 4 insertions, 13 deletions
diff --git a/ipc/gatekeeper_ipc.cpp b/ipc/gatekeeper_ipc.cpp
index 3dd2f87..7e6c58b 100644
--- a/ipc/gatekeeper_ipc.cpp
+++ b/ipc/gatekeeper_ipc.cpp
@@ -14,17 +14,11 @@
* limitations under the License.
*/
-// TODO: add guard in header
-extern "C" {
#include <stdlib.h>
-}
-
#include <string.h>
#include <stdio.h>
-#include <trusty_std.h>
#include <trusty_ipc.h>
-
#include <uapi/err.h>
#include "trusty_gatekeeper.h"
diff --git a/trusty_gatekeeper.cpp b/trusty_gatekeeper.cpp
index 024dfb2..a5a9845 100644
--- a/trusty_gatekeeper.cpp
+++ b/trusty_gatekeeper.cpp
@@ -14,19 +14,17 @@
* limitations under the License.
*/
-#include <openssl/hmac.h>
+#include "trusty_gatekeeper.h"
+
+#include <time.h>
#include <uapi/err.h>
-extern "C" {
#include <lib/hwkey/hwkey.h>
#include <lib/keymaster/keymaster.h>
#include <lib/rng/trusty_rng.h>
#include <lib/storage/storage.h>
-#include <trusty_std.h>
-}
-
-#include "trusty_gatekeeper.h"
+#include <openssl/hmac.h>
#define CALLS_BETWEEN_RNG_RESEEDS 32
#define RNG_RESEED_SIZE 64
diff --git a/trusty_gatekeeper.h b/trusty_gatekeeper.h
index 1235feb..2924b34 100644
--- a/trusty_gatekeeper.h
+++ b/trusty_gatekeeper.h
@@ -17,7 +17,6 @@
#ifndef TRUSTY_GATEKEEPER_H_
#define TRUSTY_GATEKEEPER_H_
-#include <trusty_std.h>
#include <stdio.h>
#include <gatekeeper/gatekeeper.h>