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 SecureBootState to ParseMachineState #139

Merged
merged 14 commits into from
Dec 2, 2021
Merged
Show file tree
Hide file tree
Changes from 10 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
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module github.com/google/go-tpm-tools
go 1.16

require (
github.com/google/certificate-transparency-go v1.1.1
github.com/google/go-attestation v0.3.2
github.com/google/go-tpm v0.3.2
github.com/spf13/cobra v1.1.3
Expand Down
42 changes: 41 additions & 1 deletion proto/attest.proto
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,51 @@ message Event {
bool digest_verified = 5;
}

message Certificate {
// Common, publicly-listed certificates by different vendors.
enum WellKnownCertificate {
UNKNOWN = 0;

// Microsoft certs: https://go.microsoft.com/fwlink/p/?linkid=321192
MS_WINDOWS_PROD_PCA_2011 = 1;
MS_THIRD_PARTY_UEFI_CA_2011 = 2;
}
alexmwu marked this conversation as resolved.
Show resolved Hide resolved

// The representation of the certificate. If the certificate matches a
// 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.
bytes der = 1;
WellKnownCertificate well_known = 2;
}
}

// A Secure Boot database containing lists of hashes and certificates,
// as defined by section 32.4.1 Signature Database in the UEFI spec.
message Database {
repeated Certificate certs = 1;
repeated bytes hashes = 2;
}

// The Secure Boot state for this instance
alexmwu marked this conversation as resolved.
Show resolved Hide resolved
message SecureBootState {
jkl73 marked this conversation as resolved.
Show resolved Hide resolved
// Whether Secure Boot is enabled.
bool enabled = 1;
// The Secure Boot signature (allowed) database.
Database db = 2;
// The Secure Boot revoked signature (forbidden) database.
Database dbx = 3;
// Authority events post-separator. Pre-separator authorities
// are currently not supported.
Database authority = 4;
jkl73 marked this conversation as resolved.
Show resolved Hide resolved
}

// The verified state of a booted machine, obtained from an Attestation
message MachineState {
PlatformState platform = 1;

// SecureBootState secure_boot = 2;
SecureBootState secure_boot = 2;

// The complete parsed TCG Event Log, including those events used to
// create the PlatformState.
Expand Down
Loading