cert: move platform_oid.h to include/tools_share for all platforms
Platforms aligned with TBBR are supposed to use their own OIDs, but
defining the same macros with different OIDs does not provide any
value (at least technically).
For easier use of TBBR, this commit allows platforms to reuse the OIDs
obtained by ARM Ltd. This will be useful for non-ARM vendors that
do not need their own extension fields in their certificate files.
The OIDs of ARM Ltd. have been moved to include/tools_share/tbbr_oid.h
Platforms can include <tbbr_oid.h> instead of <platform_oid.h> by
defining USE_TBBR_DEFS as 1. USE_TBBR_DEFS is 0 by default to keep the
backward compatibility.
For clarification, I inserted a blank line between headers from the
include/ directory (#include <...>) and ones from a local directory
(#include "..." ).
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
diff --git a/plat/arm/board/fvp/include/platform_oid.h b/plat/arm/board/fvp/include/platform_oid.h
index 5ef1580..c64155f 100644
--- a/plat/arm/board/fvp/include/platform_oid.h
+++ b/plat/arm/board/fvp/include/platform_oid.h
@@ -1,9 +1,9 @@
/*
- * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include "../../../../../include/plat/arm/board/common/board_arm_oid.h"
+#include <tbbr_oid.h>
/*
* Required platform OIDs
diff --git a/plat/arm/board/juno/include/platform_oid.h b/plat/arm/board/juno/include/platform_oid.h
index 5ef1580..c64155f 100644
--- a/plat/arm/board/juno/include/platform_oid.h
+++ b/plat/arm/board/juno/include/platform_oid.h
@@ -1,9 +1,9 @@
/*
- * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include "../../../../../include/plat/arm/board/common/board_arm_oid.h"
+#include <tbbr_oid.h>
/*
* Required platform OIDs
diff --git a/plat/common/tbbr/plat_tbbr.c b/plat/common/tbbr/plat_tbbr.c
index 4aa9457..f5a4f31 100644
--- a/plat/common/tbbr/plat_tbbr.c
+++ b/plat/common/tbbr/plat_tbbr.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2016-2017, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -7,7 +7,11 @@
#include <assert.h>
#include <auth/auth_mod.h>
#include <platform.h>
+#if USE_TBBR_DEFS
+#include <tbbr_oid.h>
+#else
#include <platform_oid.h>
+#endif
#include <string.h>
/*