[package]
name = "ocsp-staple"
version = "0.0.2"
categories = ["cryptography", "network-programming"]
edition.workspace = true
keywords = ["ocsp", "tls", "stapling", "certificates", "x509"]
license.workspace = true
readme = "README.md"
repository.workspace = true
rust-version.workspace = true
description = "Build OCSP requests, parse responses, and extract responder URLs from a certificate's AIA extension."

[lints]
workspace = true

[features]
default = []
# Hyper-based async fetch. Without this the crate is pure-function (parse/build only).
fetch = ["dep:hyper", "dep:hyper-util", "dep:http-body-util", "dep:tokio", "dep:url"]

[dependencies]
bytes = "1"
der = "0.7"
sha1 = { version = "0.10", features = ["oid"] }
thiserror = "2"
x509-cert = "0.2"
x509-ocsp = { version = "0.2", default-features = false, features = ["builder", "std"] }
x509-parser = "0.18"

# Async HTTP fetch — gated behind `fetch`.
http-body-util = { version = "0.1", optional = true }
hyper = { version = "1", features = ["client", "http1"], optional = true }
hyper-util = { version = "0.1", features = ["tokio"], optional = true }
tokio = { version = "1", features = ["net", "time", "rt"], optional = true }
url = { version = "2", optional = true }

[dev-dependencies]
rcgen = "0.14"
tokio = { version = "1", features = ["macros", "rt"] }
