Skip to content

Commit

Permalink
Fixup proto formatting and package comments.
Browse files Browse the repository at this point in the history
This reduces the patches we need when importing into google3

Signed-off-by: Joe Richey <joerichey@google.com>
  • Loading branch information
josephlr committed Aug 30, 2022
1 parent fb6d253 commit 288ec44
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ jobs:
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: "3.19.1"
version: "3.21.4"
- name: Install protoc-gen-go
run: go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.27.1
run: go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28.0
- name: Check Protobuf Generation
run: |
go generate ./... ./cmd/... ./launcher/...
Expand Down
1 change: 1 addition & 0 deletions cmd/gotpm/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Package main is a just a binary wrapper package around cmd.
package main

import (
Expand Down
12 changes: 6 additions & 6 deletions proto/attest.proto
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
syntax = "proto3";

package attest;
option go_package = "github.com/google/go-tpm-tools/proto/attest";

import "tpm.proto";

option go_package = "github.com/google/go-tpm-tools/proto/attest";

// Information uniquely identifying a GCE instance. Can be used to create an
// instance URL, which can then be used with GCE APIs. Formatted like:
// https://www.googleapis.com/compute/v1/projects/{project_id}/zones/{zone}/instances/{instance_name}
Expand All @@ -31,8 +32,8 @@ message Attestation {
// Attestation Key (AK) Certificate, encoded as ASN.1 DER.
// Optional.
bytes ak_cert = 6;
// Intermediate Certificates for verifying the AK Certificate, encoded as ASN.1 DER.
// Optional.
// Intermediate Certificates for verifying the AK Certificate, encoded as
// ASN.1 DER. Optional.
repeated bytes intermediate_certs = 7;
}

Expand Down Expand Up @@ -71,7 +72,7 @@ message GrubState {
// and kernel modules.
repeated string commands = 2;
}

// The state of the Linux kernel.
// At the moment, parsing LinuxKernelState relies on parsing the GrubState.
// To do so, use ParseOpts{Loader: GRUB} when calling ParseMachineState.
Expand Down Expand Up @@ -109,9 +110,8 @@ enum WellKnownCertificate {
}

message Certificate {

// The representation of the certificate. If the certificate matches a
// well-known certificate above, representation should contain the value in
// well-known certificate above, representation should contain the value in
// the enum. Otherwise, it will contain the raw DER.
oneof representation {
// DER representation of the certificate.
Expand Down
11 changes: 7 additions & 4 deletions proto/attest/attest.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/tpm/tpm.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 288ec44

Please sign in to comment.