[package]
name = "aws-sigv4"
version = "1.2.2"
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>", "David Barsky <me@davidbarsky.com>"]
description = "SigV4 signer for HTTP requests and Event Stream messages."
edition = "2021"
exclude = ["aws-sig-v4-test-suite/*"]
license = "Apache-2.0"
repository = "https://github.com/smithy-lang/smithy-rs"

[features]
default = ["sign-http", "http1"]
http0-compat = ["dep:http0"]
http1 = ["dep:http"]
sign-http = ["dep:http0", "dep:percent-encoding", "dep:form_urlencoded"]
sign-eventstream = ["dep:aws-smithy-eventstream"]
sigv4a = ["dep:p256", "dep:crypto-bigint", "dep:subtle", "dep:zeroize", "dep:ring"]

[dependencies]
aws-credential-types = { path = "../aws-credential-types" }
aws-smithy-eventstream = { path = "../../../rust-runtime/aws-smithy-eventstream", optional = true }
aws-smithy-http = { path = "../../../rust-runtime/aws-smithy-http" }
aws-smithy-runtime-api = { path = "../../../rust-runtime/aws-smithy-runtime-api", features = ["client"] }
aws-smithy-types = { path = "../../../rust-runtime/aws-smithy-types" }
bytes = "1"
form_urlencoded = { version = "1.0", optional = true }
hex = "0.4"
hmac = "0.12"
http0 = { version = "0.2", optional = true, package = "http" }
http = { version = "1", optional = true }
once_cell = "1.8"
p256 = { version = "0.11", features = ["ecdsa"], optional = true }
percent-encoding = { version = "2.1", optional = true }
ring = { version = "0.17.5", optional = true }
sha2 = "0.10"
crypto-bigint = { version = "0.5.4", optional = true }
subtle = { version = "2.5.0", optional = true }
time = "0.3.5"
tracing = "0.1"
zeroize = { version = "^1", optional = true }

[dev-dependencies]
aws-credential-types = { path = "../aws-credential-types", features = ["test-util", "hardcoded-credentials"] }
aws-smithy-runtime-api = { path = "../../../rust-runtime/aws-smithy-runtime-api", features = ["client", "test-util"] }
bytes = "1"
hex-literal = "0.4.1"
httparse = "=1.8"
libfuzzer-sys = "0.4.6"
pretty_assertions = "1.3"
proptest = "1.2"
serde = "1.0.180"
serde_derive = "1.0.180"
serde_json = "1.0.104"
time = { version = "0.3.5", features = ["parsing"] }

criterion = "0.5"

[target.'cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))'.dev-dependencies]
ring = "0.17.5"

[[bench]]
name = "hmac"
harness = false

[[bench]]
name = "sigv4a"
harness = false
required-features = [ "sigv4a" ]

[package.metadata.docs.rs]
all-features = true
targets = ["x86_64-unknown-linux-gnu"]
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
rustdoc-args = ["--cfg", "docsrs"]
# End of docs.rs metadata

[package.metadata.smithy-rs-release-tooling]
stable = true
