Fix include guards to match presubmit expectations
Test: pw presubmit --full --step include_guard
Change-Id: Iae91c44a9d04148b66a4c301d2325969e213afa1
Reviewed-on: https://pigweed-review.googlesource.com/c/open-dice/+/162997
Reviewed-by: Andrew Scull <ascull@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed-service-accounts.iam.gserviceaccount.com>
Pigweed-Auto-Submit: Darren Krahn <dkrahn@google.com>
diff --git a/include/dice/boringssl_ecdsa_utils.h b/include/dice/boringssl_ecdsa_utils.h
index 229926a..f044d37 100644
--- a/include/dice/boringssl_ecdsa_utils.h
+++ b/include/dice/boringssl_ecdsa_utils.h
@@ -12,8 +12,8 @@
// License for the specific language governing permissions and limitations under
// the License.
-#ifndef BORINGSSL_ECDSA_UTILS_H_
-#define BORINGSSL_ECDSA_UTILS_H_
+#ifndef DICE_BORINGSSL_ECDSA_UTILS_H_
+#define DICE_BORINGSSL_ECDSA_UTILS_H_
#include <stddef.h>
#include <stdint.h>
@@ -54,4 +54,4 @@
} // extern "C"
#endif
-#endif // BORINGSSL_ECDSA_UTILS_H_
+#endif // DICE_BORINGSSL_ECDSA_UTILS_H_
diff --git a/include/dice/config/boringssl_ecdsa_p384/dice/config.h b/include/dice/config/boringssl_ecdsa_p384/dice/config.h
index a0f9583..567560c 100644
--- a/include/dice/config/boringssl_ecdsa_p384/dice/config.h
+++ b/include/dice/config/boringssl_ecdsa_p384/dice/config.h
@@ -12,8 +12,8 @@
// License for the specific language governing permissions and limitations under
// the License.
-#ifndef DICE_CONFIG_H_
-#define DICE_CONFIG_H_
+#ifndef DICE_CONFIG_BORINGSSL_ECDSA_P384_DICE_CONFIG_H_
+#define DICE_CONFIG_BORINGSSL_ECDSA_P384_DICE_CONFIG_H_
// ECDSA P384
// From table 1 of RFC 9053
@@ -22,4 +22,4 @@
#define DICE_PRIVATE_KEY_SIZE 48
#define DICE_SIGNATURE_SIZE 96
-#endif // DICE_DICE_CONFIG_H_
+#endif // DICE_CONFIG_BORINGSSL_ECDSA_P384_DICE_DICE_CONFIG_H_
diff --git a/include/dice/config/boringssl_ed25519/dice/config.h b/include/dice/config/boringssl_ed25519/dice/config.h
index 02097c4..276dd3b 100644
--- a/include/dice/config/boringssl_ed25519/dice/config.h
+++ b/include/dice/config/boringssl_ed25519/dice/config.h
@@ -12,8 +12,8 @@
// License for the specific language governing permissions and limitations under
// the License.
-#ifndef DICE_CONFIG_H_
-#define DICE_CONFIG_H_
+#ifndef DICE_CONFIG_BORINGSSL_ED25519_DICE_CONFIG_H_
+#define DICE_CONFIG_BORINGSSL_ED25519_DICE_CONFIG_H_
// Ed25519
// COSE Key alg value from Table 2 of RFC9053
@@ -22,4 +22,4 @@
#define DICE_PRIVATE_KEY_SIZE 64
#define DICE_SIGNATURE_SIZE 64
-#endif // DICE_DICE_CONFIG_H_
+#endif // DICE_CONFIG_BORINGSSL_ED25519_DICE_DICE_CONFIG_H_
diff --git a/include/dice/config/mbedtls_ecdsa_p256/dice/config.h b/include/dice/config/mbedtls_ecdsa_p256/dice/config.h
index 11f4875..6d43fe4 100644
--- a/include/dice/config/mbedtls_ecdsa_p256/dice/config.h
+++ b/include/dice/config/mbedtls_ecdsa_p256/dice/config.h
@@ -12,12 +12,12 @@
// License for the specific language governing permissions and limitations under
// the License.
-#ifndef DICE_CONFIG_H_
-#define DICE_CONFIG_H_
+#ifndef DICE_CONFIG_MBEDTLS_ECDSA_P256_DICE_CONFIG_H_
+#define DICE_CONFIG_MBEDTLS_ECDSA_P256_DICE_CONFIG_H_
// ECDSA-P256
#define DICE_PUBLIC_KEY_SIZE 33
#define DICE_PRIVATE_KEY_SIZE 32
#define DICE_SIGNATURE_SIZE 64
-#endif // DICE_DICE_CONFIG_H_
+#endif // DICE_CONFIG_MBEDTLS_ECDSA_P256_DICE_DICE_CONFIG_H_
diff --git a/include/dice/config/standalone/dice/config.h b/include/dice/config/standalone/dice/config.h
index 5f6188f..d5c2520 100644
--- a/include/dice/config/standalone/dice/config.h
+++ b/include/dice/config/standalone/dice/config.h
@@ -12,8 +12,8 @@
// License for the specific language governing permissions and limitations under
// the License.
-#ifndef DICE_CONFIG_H_
-#define DICE_CONFIG_H_
+#ifndef DICE_CONFIG_STANDALONE_DICE_CONFIG_H_
+#define DICE_CONFIG_STANDALONE_DICE_CONFIG_H_
// The standalone config is only used for testing. In particular, it is used
// for tests that focus on the core aspects of the library and not the ops.
@@ -23,4 +23,4 @@
#define DICE_PRIVATE_KEY_SIZE 1
#define DICE_SIGNATURE_SIZE 1
-#endif // DICE_DICE_CONFIG_H_
+#endif // DICE_CONFIG_STANDALONE_DICE_CONFIG_H_
diff --git a/include/dice/fuzz_utils.h b/include/dice/fuzz_utils.h
index dfc483d..26a45c6 100644
--- a/include/dice/fuzz_utils.h
+++ b/include/dice/fuzz_utils.h
@@ -12,6 +12,9 @@
// License for the specific language governing permissions and limitations under
// the License.
+#ifndef DICE_FUZZ_UTILS_H_
+#define DICE_FUZZ_UTILS_H_
+
#include <cstdint>
#include <vector>
@@ -70,3 +73,5 @@
} // namespace fuzz
} // namespace dice
+
+#endif // DICE_FUZZ_UTILS_H_
diff --git a/include/dice/test_utils.h b/include/dice/test_utils.h
index afc400a..70469c4 100644
--- a/include/dice/test_utils.h
+++ b/include/dice/test_utils.h
@@ -12,6 +12,9 @@
// License for the specific language governing permissions and limitations under
// the License.
+#ifndef DICE_TEST_UTILS_H_
+#define DICE_TEST_UTILS_H_
+
#include <stddef.h>
#include <stdint.h>
@@ -72,3 +75,5 @@
} // namespace test
} // namespace dice
+
+#endif // DICE_TEST_UTILS_
diff --git a/third_party/cose-c/include/ed25519/cose/cose_configure.h b/third_party/cose-c/include/ed25519/cose/cose_configure.h
index f6d91a2..b487905 100644
--- a/third_party/cose-c/include/ed25519/cose/cose_configure.h
+++ b/third_party/cose-c/include/ed25519/cose/cose_configure.h
@@ -1,3 +1,6 @@
+#ifndef THIRD_PARTY_COSE_C_ED25519_COSE_COSE_CONFIGURE_H_
+#define THIRD_PARTY_COSE_C_ED25519_COSE_COSE_CONFIGURE_H_
+
#define USE_EDDSA
#define PUBLIC_KEY_SIZE 32
@@ -9,3 +12,5 @@
#define INCLUDE_SIGN1 1
#define INCLUDE_COUNTERSIGNATURE 0
#define INCLUDE_COUNTERSIGNATURE1 0
+
+#endif // THIRD_PARTY_COSE_C_ED25519_COSE_COSE_CONFIGURE_H_
diff --git a/third_party/cose-c/include/p384/cose/cose_configure.h b/third_party/cose-c/include/p384/cose/cose_configure.h
index ebb4469..5ddf8d7 100644
--- a/third_party/cose-c/include/p384/cose/cose_configure.h
+++ b/third_party/cose-c/include/p384/cose/cose_configure.h
@@ -1,3 +1,6 @@
+#ifndef THIRD_PARTY_COSE_C_P384_COSE_COSE_CONFIGURE_H_
+#define THIRD_PARTY_COSE_C_P384_COSE_COSE_CONFIGURE_H_
+
#define USE_ECDSA_SHA_384
#define PUBLIC_KEY_SIZE 96
@@ -9,3 +12,5 @@
#define INCLUDE_SIGN1 1
#define INCLUDE_COUNTERSIGNATURE 0
#define INCLUDE_COUNTERSIGNATURE1 0
+
+#endif // THIRD_PARTY_COSE_C_P384_COSE_COSE_CONFIGURE_H_
diff --git a/third_party/mbedtls/custom_config.h b/third_party/mbedtls/custom_config.h
index 24d5418..3044667 100644
--- a/third_party/mbedtls/custom_config.h
+++ b/third_party/mbedtls/custom_config.h
@@ -12,8 +12,8 @@
// License for the specific language governing permissions and limitations under
// the License.
-#ifndef MBEDTLS_CONFIG_H
-#define MBEDTLS_CONFIG_H
+#ifndef THIRD_PARTY_MBEDTLS_CUSTOM_CONFIG_H_
+#define THIRD_PARTY_MBEDTLS_CUSTOM_CONFIG_H_
/* mbed TLS feature support */
#define MBEDTLS_DEPRECATED_REMOVED
@@ -40,4 +40,4 @@
#include "mbedtls/check_config.h"
-#endif /* MBEDTLS_CONFIG_H */
+#endif /* THIRD_PARTY_MBEDTLS_CUSTOM_CONFIG_H_ */