Skip to content

Commit

Permalink
Use same argument names in policy.h and policy.cc
Browse files Browse the repository at this point in the history
This change:
- Deletes a redundant `get()` call from `app_config_serializer.cc`
- Use same argument names in `policy.h` and `policy.cc`
  • Loading branch information
ipetr0v authored Feb 12, 2020
1 parent d362ebd commit 9ac7646
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion oak/common/app_config_serializer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}

Expand Down
6 changes: 3 additions & 3 deletions oak/common/policy.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 9ac7646

Please sign in to comment.