Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add const qualification to clarify verifier is not modified #5031

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading