Skip to content

Commit ea39ab7

Browse files
committed
Added NewTdxAdapter.
1 parent 1cf93de commit ea39ab7

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

go-tdx/tdx_adapter.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022-2024 Intel Corporation
2+
* Copyright (c) 2022-2025 Intel Corporation
33
* All rights reserved.
44
* SPDX-License-Identifier: BSD-3-Clause
55
*/
@@ -27,6 +27,15 @@ type compositeTdxEvidence struct {
2727
VerifierNonce *connector.VerifierNonce `json:"verifier_nonce,omitempty"`
2828
}
2929

30+
// NewTdxAdapter returns a new TDX Adapter instance
31+
func NewTdxAdapter(udata []byte, withCcel bool) (connector.EvidenceAdapter, error) {
32+
return &tdxAdapter{
33+
uData: udata,
34+
withCcel: withCcel,
35+
cfsQuoteProvider: &cfsQuoteProviderImpl{},
36+
}, nil
37+
}
38+
3039
// CollectEvidence is used to get TDX quote using TDX Quote Generation service
3140
func (adapter *tdxAdapter) CollectEvidence(nonce []byte) (*connector.Evidence, error) {
3241

0 commit comments

Comments
 (0)