verify: query vlek ASK from KDS if not set

The user can choose to supply an intermediate
certificate through the config, like they can
for the root key. If none is supplied,
the KDS is queried for a valid ASK.
This commit is contained in:
Otto Bittner 2023-11-07 12:17:08 +01:00
parent 07eed0e319
commit 84d8bd8110
8 changed files with 132 additions and 102 deletions

View file

@ -233,7 +233,7 @@ type stubAttDocFormatter struct {
formatErr error
}
func (f *stubAttDocFormatter) format(_ context.Context, _ string, _ bool, _ measurements.M, _ string) (string, error) {
func (f *stubAttDocFormatter) format(_ context.Context, _ string, _ bool, _ config.AttestationCfg) (string, error) {
return "", f.formatErr
}
@ -258,7 +258,7 @@ func TestFormat(t *testing.T) {
for name, tc := range testCases {
t.Run(name, func(t *testing.T) {
_, err := tc.formatter.format(context.Background(), tc.doc, false, nil, "")
_, err := tc.formatter.format(context.Background(), tc.doc, false, nil)
if tc.wantErr {
assert.Error(t, err)
} else {