Skip to content

Commit

Permalink
Add const qualification to clarify verifier is not modified
Browse files Browse the repository at this point in the history
  • Loading branch information
pmcgrath17 committed May 9, 2024
1 parent f964100 commit 122538c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions cc/client/client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@

namespace oak::client {

namespace {
using ::oak::attestation::v1::AttestationResults;
using ::oak::attestation::verification::AttestationVerifier;
using ::oak::crypto::ClientEncryptor;
Expand All @@ -46,13 +45,12 @@ using ::oak::crypto::v1::EncryptedRequest;
using ::oak::crypto::v1::EncryptedResponse;
using ::oak::session::v1::EndorsedEvidence;
using ::oak::transport::TransportWrapper;
} // namespace

constexpr absl::string_view kEmptyAssociatedData = "";

absl::StatusOr<std::unique_ptr<OakClient>> OakClient::Create(
std::unique_ptr<TransportWrapper> transport,
AttestationVerifier& verifier) {
const AttestationVerifier& verifier) {
absl::StatusOr<EndorsedEvidence> endorsed_evidence =
transport->GetEndorsedEvidence();
if (!endorsed_evidence.ok()) {
Expand Down
2 changes: 1 addition & 1 deletion cc/client/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class OakClient {
// and creating an encrypted channel.
static absl::StatusOr<std::unique_ptr<OakClient>> Create(
std::unique_ptr<::oak::transport::TransportWrapper> transport,
::oak::attestation::verification::AttestationVerifier& verifier);
const ::oak::attestation::verification::AttestationVerifier& verifier);

// Invoke the provided method by fetching and verifying the attested enclave
// public key, and then using it to encrypt the request body.
Expand Down

0 comments on commit 122538c

Please sign in to comment.