@@ -20,7 +20,6 @@ import (
2020 "github.com/oasisprotocol/oasis-core/go/common/sgx/pcs"
2121 sgxQuote "github.com/oasisprotocol/oasis-core/go/common/sgx/quote"
2222 "github.com/oasisprotocol/oasis-core/go/config"
23- consensus "github.com/oasisprotocol/oasis-core/go/consensus/api"
2423 "github.com/oasisprotocol/oasis-core/go/runtime/bundle/component"
2524 "github.com/oasisprotocol/oasis-core/go/runtime/host"
2625 "github.com/oasisprotocol/oasis-core/go/runtime/host/protocol"
@@ -56,8 +55,8 @@ type QemuConfig struct {
5655
5756 // PCS is the Intel Provisioning Certification Service quote service.
5857 PCS pcs.QuoteService
59- // Consensus is the consensus layer backend .
60- Consensus consensus. Service
58+ // QuotePolicy provides the quote policy for RONL deployments .
59+ QuotePolicy sgxCommon. QuotePolicyProvider
6160 // Identity is the node identity.
6261 Identity * identity.Identity
6362
@@ -78,11 +77,11 @@ type QemuExtraConfig struct {
7877type qemuProvisioner struct {
7978 cfg QemuConfig
8079
81- sandbox host.Provisioner
82- pcs pcs.QuoteService
83- consensus consensus. Service
84- identity * identity.Identity
85- cidPool * CidPool
80+ sandbox host.Provisioner
81+ pcs pcs.QuoteService
82+ quotePolicy sgxCommon. QuotePolicyProvider
83+ identity * identity.Identity
84+ cidPool * CidPool
8685
8786 logger * logging.Logger
8887}
@@ -97,12 +96,12 @@ func NewQemuProvisioner(cfg QemuConfig) (host.Provisioner, error) {
9796 sgxCommon .InitMetrics ()
9897
9998 p := & qemuProvisioner {
100- cfg : cfg ,
101- pcs : cfg .PCS ,
102- consensus : cfg .Consensus ,
103- identity : cfg .Identity ,
104- cidPool : cfg .CidPool ,
105- logger : logging .GetLogger ("runtime/host/tdx/qemu" ),
99+ cfg : cfg ,
100+ pcs : cfg .PCS ,
101+ quotePolicy : cfg .QuotePolicy ,
102+ identity : cfg .Identity ,
103+ cidPool : cfg .CidPool ,
104+ logger : logging .GetLogger ("runtime/host/tdx/qemu" ),
106105 }
107106 sp , err := sandbox .NewProvisioner (sandbox.Config {
108107 Connector : newVsockConnector ,
@@ -437,7 +436,7 @@ func (p *qemuProvisioner) updateCapabilityTEE(ctx context.Context, hp *sandbox.H
437436 var quotePolicy * sgxQuote.Policy
438437 switch hp .Config .Component .Kind {
439438 case component .RONL :
440- quotePolicy , err = sgxCommon . GetQuotePolicy (ctx , hp .Config .ID , hp .Config .Component .Version , p . consensus )
439+ quotePolicy , err = p . quotePolicy . Get (ctx , hp .Config .ID , hp .Config .Component .Version )
441440 if err != nil {
442441 return nil , fmt .Errorf ("failed to fetch RONL quote policy: %w" , err )
443442 }
0 commit comments