From 9ac76460a9e39988236d4c48a14f1d57beb5de9e Mon Sep 17 00:00:00 2001 From: Ivan Petrov Date: Wed, 12 Feb 2020 12:35:03 +0000 Subject: [PATCH] Use same argument names in `policy.h` and `policy.cc` This change: - Deletes a redundant `get()` call from `app_config_serializer.cc` - Use same argument names in `policy.h` and `policy.cc` --- oak/common/app_config_serializer.cc | 2 +- oak/common/policy.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/oak/common/app_config_serializer.cc b/oak/common/app_config_serializer.cc index a238fe59d11..b9b63d94b1e 100644 --- a/oak/common/app_config_serializer.cc +++ b/oak/common/app_config_serializer.cc @@ -84,7 +84,7 @@ int main(int argc, char* argv[]) { } // Check application configuration validity. - if (!oak::ValidApplicationConfig(*config.get())) { + if (!oak::ValidApplicationConfig(*config)) { LOG(QFATAL) << "Application config is not valid"; } diff --git a/oak/common/policy.h b/oak/common/policy.h index 4a25022bca5..bf4aa8a91dd 100644 --- a/oak/common/policy.h +++ b/oak/common/policy.h @@ -38,14 +38,14 @@ ABSL_CONST_INIT extern const char kOakPolicyGrpcMetadataKey[]; ABSL_CONST_INIT extern const char kOakAuthorizationBearerTokenGrpcMetadataKey[]; // Serialized the provided policy so that it can be sent as a binary gRPC metadata value. -std::string SerializePolicy(const oak::policy::Label& policy); +std::string SerializePolicy(const oak::policy::Label& policy_proto); // Deserializes the provided binary gRPC metadata value into a policy. -oak::policy::Label DeserializePolicy(const std::string& serialized_policy); +oak::policy::Label DeserializePolicy(const std::string& policy_bytes); // Creates a policy that only allows declassifying data for gRPC clients that can present the // provided authorization bearer token. -oak::policy::Label AuthorizationBearerTokenPolicy(const std::string& authorization_token); +oak::policy::Label AuthorizationBearerTokenPolicy(const std::string& authorization_token_hmac); // Creates a policy that only allows declassifying data for modules that match the // provided module attestation.