2023-03-09 09:23:42 -05:00
|
|
|
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
|
|
|
load("//bazel/go:go_test.bzl", "go_test")
|
|
|
|
|
|
|
|
go_library(
|
|
|
|
name = "snp",
|
|
|
|
srcs = [
|
|
|
|
"errors.go",
|
|
|
|
"imds.go",
|
|
|
|
"issuer.go",
|
2023-03-21 07:46:49 -04:00
|
|
|
"maa.go",
|
2023-03-09 09:23:42 -05:00
|
|
|
"snp.go",
|
|
|
|
"validator.go",
|
|
|
|
],
|
|
|
|
importpath = "github.com/edgelesssys/constellation/v2/internal/attestation/azure/snp",
|
|
|
|
visibility = ["//:__subpackages__"],
|
|
|
|
deps = [
|
2023-03-08 08:13:57 -05:00
|
|
|
"//internal/attestation",
|
2023-03-09 09:23:42 -05:00
|
|
|
"//internal/attestation/idkeydigest",
|
2023-06-09 09:41:02 -04:00
|
|
|
"//internal/attestation/variant",
|
2023-03-09 09:23:42 -05:00
|
|
|
"//internal/attestation/vtpm",
|
2023-03-21 07:46:49 -04:00
|
|
|
"//internal/cloud/azure",
|
2023-04-06 11:00:56 -04:00
|
|
|
"//internal/config",
|
2023-03-09 09:23:42 -05:00
|
|
|
"//internal/crypto",
|
2023-03-21 07:46:49 -04:00
|
|
|
"@com_github_edgelesssys_go_azguestattestation//maa",
|
2023-07-07 07:17:58 -04:00
|
|
|
"@com_github_google_go_tpm//legacy/tpm2",
|
2023-03-09 09:23:42 -05:00
|
|
|
"@com_github_google_go_tpm_tools//client",
|
|
|
|
"@com_github_google_go_tpm_tools//proto/attest",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
go_test(
|
|
|
|
name = "snp_test",
|
|
|
|
srcs = [
|
|
|
|
"issuer_test.go",
|
|
|
|
"validator_test.go",
|
|
|
|
],
|
2023-03-20 12:05:58 -04:00
|
|
|
data = glob(["testdata/**"]),
|
2023-03-09 09:23:42 -05:00
|
|
|
embed = [":snp"],
|
|
|
|
# keep
|
|
|
|
gotags = select({
|
|
|
|
"//bazel/settings:tpm_simulator_enabled": [],
|
|
|
|
"//conditions:default": ["disable_tpm_simulator"],
|
|
|
|
}),
|
|
|
|
deps = [
|
|
|
|
"//internal/attestation/idkeydigest",
|
|
|
|
"//internal/attestation/simulator",
|
|
|
|
"//internal/attestation/vtpm",
|
2023-04-06 11:00:56 -04:00
|
|
|
"//internal/config",
|
2023-03-21 07:46:49 -04:00
|
|
|
"//internal/logger",
|
|
|
|
"@com_github_edgelesssys_go_azguestattestation//maa",
|
2023-07-07 07:17:58 -04:00
|
|
|
"@com_github_google_go_tpm//legacy/tpm2",
|
2023-03-09 09:23:42 -05:00
|
|
|
"@com_github_google_go_tpm_tools//client",
|
2023-03-21 07:46:49 -04:00
|
|
|
"@com_github_google_go_tpm_tools//proto/attest",
|
2023-03-09 09:23:42 -05:00
|
|
|
"@com_github_stretchr_testify//assert",
|
|
|
|
"@com_github_stretchr_testify//require",
|
|
|
|
],
|
|
|
|
)
|