internal: use config to create attestation validators (#1561)

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
Daniel Weiße 2023-04-06 17:00:56 +02:00 committed by GitHub
parent 2b962598bf
commit ec01c57661
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 649 additions and 274 deletions

View file

@ -21,6 +21,7 @@ import (
"github.com/edgelesssys/constellation/v2/internal/attestation/measurements"
"github.com/edgelesssys/constellation/v2/internal/attestation/simulator"
"github.com/edgelesssys/constellation/v2/internal/attestation/vtpm"
"github.com/edgelesssys/constellation/v2/internal/config"
"github.com/edgelesssys/constellation/v2/internal/crypto"
"github.com/edgelesssys/constellation/v2/internal/logger"
tpmclient "github.com/google/go-tpm-tools/client"
@ -200,7 +201,7 @@ func TestGetAttestationCert(t *testing.T) {
},
}
validator := NewValidator(measurements.M{}, nil)
validator := NewValidator(config.AzureTrustedLaunch{Measurements: measurements.M{}}, nil)
cert, err := x509.ParseCertificate(rootCert.Raw)
require.NoError(err)
roots := x509.NewCertPool()