[package]
edition = "2021"
name = "zlicenser-protocol"
version = "0.3.0"
authors = ["ZAL Analytics <arsalan@anwari.nl>"]
build = false
publish = true
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Shared protocol types, wire formats, cryptographic primitives, and hardware fingerprinting for the zlicenser licensing framework."
documentation = "https://docs.rs/zlicenser-protocol"
readme = "README.md"
keywords = [
"licensing",
"hardware-fingerprint",
"protocol",
"cryptography",
"zlicenser",
]
categories = [
"encoding",
"network-programming",
"cryptography",
]
license = "Apache-2.0"
repository = "https://github.com/zal-analytics/zlicenser-protocol"
[features]
collect-linux = [
"dep:nix",
"dep:procfs",
"dep:raw-cpuid",
]
default = [
"validate",
"tsa-verify",
]
tpm = [
"collect-linux",
"dep:tss-esapi",
]
tsa-clients = [
"tsa-verify",
"dep:reqwest",
]
tsa-test-utils = [
"tsa-clients",
"dep:rcgen",
"dep:chrono",
"dep:tokio",
]
tsa-verify = [
"dep:rasn",
"dep:rasn-pkix",
"dep:rsa",
"dep:p256",
"dep:p384",
]
validate = []
[lib]
name = "zlicenser_protocol"
path = "src/lib.rs"
[[example]]
name = "capture_tsr"
path = "examples/capture_tsr.rs"
required-features = ["tsa-clients"]
[[example]]
name = "create_bundle"
path = "examples/create_bundle.rs"
required-features = ["collect-linux"]
[[example]]
name = "linux_collect"
path = "examples/linux_collect.rs"
required-features = ["collect-linux"]
[[example]]
name = "tsa_stamp"
path = "examples/tsa_stamp.rs"
required-features = ["tsa-clients"]
[[test]]
name = "tsa_fixtures"
path = "tests/tsa_fixtures.rs"
[[test]]
name = "tsa_roundtrip"
path = "tests/tsa_roundtrip.rs"
[[test]]
name = "wire_roundtrip"
path = "tests/wire_roundtrip.rs"
[[test]]
name = "wire_stability"
path = "tests/wire_stability.rs"
[dependencies.argon2]
version = "0.5"
[dependencies.blake3]
version = "1"
[dependencies.chacha20poly1305]
version = "0.10"
[dependencies.chrono]
version = "0.4"
optional = true
[dependencies.ciborium]
version = "0.2"
[dependencies.ed25519-dalek]
version = "2"
features = [
"serde",
"rand_core",
]
[dependencies.hkdf]
version = "0.12"
[dependencies.nix]
version = "0.29"
optional = true
[dependencies.p256]
version = "0.13"
features = [
"ecdsa",
"pkcs8",
]
optional = true
[dependencies.p384]
version = "0.13"
features = [
"ecdsa",
"pkcs8",
]
optional = true
[dependencies.procfs]
version = "0.16"
optional = true
[dependencies.rand]
version = "0.8"
[dependencies.rasn]
version = "0.22"
optional = true
[dependencies.rasn-pkix]
version = "0.22"
optional = true
[dependencies.raw-cpuid]
version = "11"
optional = true
[dependencies.rcgen]
version = "0.13"
optional = true
[dependencies.reqwest]
version = "0.12"
features = ["rustls-tls"]
optional = true
default-features = false
[dependencies.rsa]
version = "0.9"
features = ["sha2"]
optional = true
[dependencies.serde]
version = "1"
features = ["derive"]
[dependencies.sha2]
version = "0.10"
[dependencies.subtle]
version = "2"
[dependencies.thiserror]
version = "2"
[dependencies.tokio]
version = "1"
features = [
"net",
"io-util",
"rt",
"sync",
"macros",
]
optional = true
[dependencies.tss-esapi]
version = "7.7.0"
optional = true
[dependencies.vsss-rs]
version = "4"
[dependencies.zeroize]
version = "1"
features = ["derive"]
[dev-dependencies.chrono]
version = "0.4"
[dev-dependencies.hex]
version = "0.4"
[dev-dependencies.insta]
version = "1"
[dev-dependencies.proptest]
version = "1"
[dev-dependencies.tokio]
version = "1"
features = [
"rt-multi-thread",
"macros",
]