[package]
name = "attestation-service"
version = "0.1.0"
edition = "2021"

[features]
default = [ "restful-bin", "rvps-grpc" ]
all-verifier = [ "verifier/all-verifier" ]
tdx-verifier = [ "verifier/tdx-verifier" ]
sgx-verifier = [ "verifier/sgx-verifier" ]
az-snp-vtpm-verifier = [ "verifier/az-snp-vtpm-verifier" ]
az-tdx-vtpm-verifier = [ "verifier/az-tdx-vtpm-verifier" ]
snp-verifier = [ "verifier/snp-verifier" ]
csv-verifier = [ "verifier/csv-verifier" ]
cca-verifier = [ "verifier/cca-verifier" ]
se-verifier  = [ "verifier/se-verifier" ]
system-verifier = [ "verifier/system-verifier" ]
tpm-verifier = [ "verifier/tpm-verifier" ]

rvps-grpc = [ "prost", "tonic" ]

# For building gRPC CoCo-AS binary
grpc-bin = [ "clap", "env_logger", "prost", "tonic" ]

# For restful CoCo-AS binary
restful-bin = [ "actix-web/openssl", "clap", "env_logger" ]

[[bin]]
name = "grpc-as"
required-features = [ "grpc-bin" ]

[[bin]]
name = "restful-as"
required-features = [ "restful-bin" ]

[dependencies]
actix-web = { workspace = true, optional = true }
anyhow.workspace = true
async-trait.workspace = true
base64.workspace = true
cfg-if.workspace = true
clap = { workspace = true, optional = true }
ear.workspace = true
env_logger = { workspace = true, optional = true }
futures = "0.3.17"
hex.workspace = true
jsonwebtoken.workspace = true
kbs-types.workspace = true
lazy_static = "1.4.0"
log.workspace = true
openssl = "0.10.55"
prost = { workspace = true, optional = true }
rand = "0.8.5"
reqwest = { version = "0.11", features = ["json"] }
rsa = { version = "0.9.2", features = ["sha2"] }
reference-value-provider-service.path = "../rvps"
regorus.workspace = true
serde.workspace = true
serde_json.workspace = true
serde_variant = "0.1.2"
sha2.workspace = true
shadow-rs.workspace = true
strum.workspace = true
tempfile.workspace = true
time = { version = "0.3.23", features = ["std"] }
thiserror.workspace = true
tokio.workspace = true
tonic = { workspace = true, optional = true }
uuid = { version = "1.1.2", features = ["v4"] }
verifier = { path = "../deps/verifier", default-features = false }

[build-dependencies]
shadow-rs.workspace = true
tonic-build.workspace = true

[dev-dependencies]
assert-json-diff.workspace = true
hex.workspace = true
rstest.workspace = true
serial_test.workspace = true
sha2.workspace = true
testing_logger = "0.1.1"
