Attest: Rename useful_buf to q_useful_buf

Set proper namespace to indicate that q_usful_buf
is originated from QCBOR library and to prevent
namespace collison.

Change-Id: I00a10ccc052dd4d4757f1c451d6534385e58ef00
Signed-off-by: Laurence Lundblade <lgl@securitytheory.com>
Co-authored-by: Tamas Ban <tamas.ban@arm.com>
diff --git a/lib/t_cose/inc/t_cose_common.h b/lib/t_cose/inc/t_cose_common.h
index d509a4b..1459702 100644
--- a/lib/t_cose/inc/t_cose_common.h
+++ b/lib/t_cose/inc/t_cose_common.h
@@ -12,6 +12,9 @@
 #ifndef __T_COSE_COMMON_H__
 #define __T_COSE_COMMON_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 /**
  * \file t_cose_common.h
@@ -143,6 +146,9 @@
     T_COSE_ERR_SHORT_CIRCUIT_SIG
 };
 
+#ifdef __cplusplus
+}
+#endif
 
 
 #endif /* __T_COSE_COMMON_H__ */
diff --git a/lib/t_cose/inc/t_cose_sign1_sign.h b/lib/t_cose/inc/t_cose_sign1_sign.h
index 35b26e5..dbe8896 100644
--- a/lib/t_cose/inc/t_cose_sign1_sign.h
+++ b/lib/t_cose/inc/t_cose_sign1_sign.h
@@ -16,6 +16,10 @@
 #include "qcbor.h"
 #include "t_cose_common.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 
 /**
  * \file t_cose_sign1_sign.h
@@ -59,13 +63,13 @@
  */
 struct t_cose_sign1_ctx {
     /* Private data structure */
-    uint8_t             buffer_for_protected_headers[
-                        T_COSE_SIGN1_MAX_PROT_HEADER];
-    struct useful_buf_c protected_headers;
-    int32_t             cose_algorithm_id;
-    int32_t             key_select;
-    bool                short_circuit_sign;
-    QCBOREncodeContext *cbor_encode_ctx;
+    uint8_t               buffer_for_protected_headers[
+                          T_COSE_SIGN1_MAX_PROT_HEADER];
+    struct q_useful_buf_c protected_headers;
+    int32_t               cose_algorithm_id;
+    int32_t               key_select;
+    bool                  short_circuit_sign;
+    QCBOREncodeContext   *cbor_encode_ctx;
 };
 
 
@@ -175,7 +179,11 @@
  * cbor_encode_ctx by calling \c QCBOREncode_Finish()
  */
 enum t_cose_err_t t_cose_sign1_finish(struct t_cose_sign1_ctx *me,
-                                      struct useful_buf_c payload);
+                                      struct q_useful_buf_c payload);
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __T_COSE_SIGN1_H__ */