[package]
edition = "2024"
rust-version = "1.92"
name = "xml-sec"
version = "0.1.23"
build = false
include = [
"/Cargo.toml",
"/Cargo.lock",
"/LICENSE",
"/LICENSE-THIRD-PARTY",
"/README.md",
"/assets/usdt-qr.svg",
"/docs/**",
"/src/**",
"/examples/**",
"/benches/**",
"/benchmarks/dashboard/**",
"/benchmarks/Dockerfile",
"/tests/**",
"/tools/xmlsec1/**",
"/compatibility/**",
"/scripts/**",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Pure Rust XML Security: XMLDSig, XMLEnc, C14N. Drop-in replacement for libxmlsec1."
homepage = "https://github.com/structured-world/xml-sec"
documentation = "https://docs.rs/xml-sec"
readme = "README.md"
keywords = [
"xml",
"xmldsig",
"xmlenc",
"c14n",
"saml",
]
categories = [
"cryptography",
"web-programming",
"authentication",
]
license = "Apache-2.0 AND MIT"
repository = "https://github.com/structured-world/xml-sec"
[features]
aws-lc-fips = [
"std",
"xmldsig",
"dep:aws-lc-rs",
]
benchmark-alloc = ["benchmark-internals"]
benchmark-internals = [
"xmldsig",
"xmlenc",
"c14n",
"xml-backends-all",
]
c14n = []
default = [
"std",
"xmldsig",
"xmlenc",
"c14n",
"xml-backend-xmloxide",
]
embedded = []
experimental-pq = [
"xmldsig",
"dep:slh-dsa",
"dep:ml-kem",
"dep:common",
"dep:ctutils",
"dep:hybrid-array",
"dep:module-lattice",
"dep:shake",
"dep:const-oid",
"signature/digest",
"signature/alloc",
"signature/rand_core",
]
legacy-algorithms = [
"dep:ripemd",
"dep:md-5",
"dep:des",
]
no-unsafe = []
pkcs11 = [
"std",
"xmlenc",
"dep:cryptoki",
]
std = [
"thiserror/std",
"xmlparser/std",
"structured-asn1?/std",
"structured-pkix?/std",
]
xml-backend-differential = ["xml-backends-all"]
xml-backend-roxmltree = ["dep:memchr"]
xml-backend-xmloxide = []
xml-backends-all = [
"xml-backend-xmloxide",
"xml-backend-roxmltree",
]
xmldsig = [
"std",
"no-unsafe",
"embedded",
"dep:der",
"dep:crypto-bigint",
"dep:dsa",
"dep:des",
"dep:ed25519-dalek",
"dep:curve25519-dalek",
"dep:ed448-goldilocks",
"dep:getrandom",
"dep:hmac",
"dep:md-5",
"dep:pem",
"dep:pkcs12",
"dep:pbkdf2",
"dep:aes",
"dep:cbc",
"dep:peresil",
"dep:p256",
"dep:p384",
"dep:p521",
"dep:pkcs8",
"dep:pkcs1",
"dep:rsa",
"dep:sha1",
"dep:sha2",
"dep:keccak",
"dep:sponge-cursor",
"dep:signature",
"dep:snafu",
"dep:subtle",
"dep:x509-parser",
"dep:x509-cert",
"dep:structured-asn1",
"dep:structured-pkix",
"dep:tinyvec",
"dep:zeroize",
]
xmlenc = [
"std",
"xmldsig",
"dep:aes",
"dep:aes-gcm",
"dep:aes-kw",
"dep:cbc",
"dep:camellia",
"dep:chacha20",
"dep:chacha20poly1305",
"dep:getrandom",
"dep:rsa",
"dep:sha1",
"dep:sha2",
"dep:hkdf",
"dep:x25519-dalek",
"dep:x448",
"dep:crypto-primes",
"p256/ecdh",
"p384/ecdh",
"p521/ecdh",
]
[lib]
name = "xml_sec"
path = "src/lib.rs"
[[example]]
name = "benchmark_latency"
path = "examples/benchmark_latency.rs"
required-features = ["benchmark-internals"]
[[example]]
name = "encrypt"
path = "examples/encrypt.rs"
required-features = ["xmlenc"]
[[example]]
name = "sign"
path = "examples/sign.rs"
required-features = [
"xmldsig",
"c14n",
]
[[example]]
name = "verify"
path = "examples/verify.rs"
required-features = ["xmldsig"]
[[test]]
name = "authenticated_reference_replay"
path = "tests/authenticated_reference_replay.rs"
[[test]]
name = "aws_lc_provider"
path = "tests/aws_lc_provider.rs"
[[test]]
name = "base64_transform_integration"
path = "tests/base64_transform_integration.rs"
required-features = [
"xmldsig",
"c14n",
]
[[test]]
name = "behavioral_compatibility"
path = "tests/behavioral_compatibility.rs"
[[test]]
name = "benchmark_contract"
path = "tests/benchmark_contract.rs"
[[test]]
name = "c14n_golden"
path = "tests/c14n_golden.rs"
[[test]]
name = "c14n_integration"
path = "tests/c14n_integration.rs"
[[test]]
name = "capability_ledger"
path = "tests/capability_ledger.rs"
[[test]]
name = "cipher_reference"
path = "tests/cipher_reference.rs"
[[test]]
name = "dh_agreement"
path = "tests/dh_agreement.rs"
[[test]]
name = "donor_digest_vectors"
path = "tests/donor_digest_vectors.rs"
[[test]]
name = "donor_full_verification_suite"
path = "tests/donor_full_verification_suite.rs"
[[test]]
name = "donor_interop_suite"
path = "tests/donor_interop_suite.rs"
[[test]]
name = "donor_negative_vectors"
path = "tests/donor_negative_vectors.rs"
required-features = ["xmldsig"]
[[test]]
name = "ecdsa_signature_integration"
path = "tests/ecdsa_signature_integration.rs"
[[test]]
name = "encoding_public_api"
path = "tests/encoding_public_api.rs"
[[test]]
name = "fixtures_smoke"
path = "tests/fixtures_smoke.rs"
[[test]]
name = "hkdf_agreement"
path = "tests/hkdf_agreement.rs"
[[test]]
name = "hmac_pipeline"
path = "tests/hmac_pipeline.rs"
[[test]]
name = "import_donor_fixtures"
path = "tests/import_donor_fixtures.rs"
[[test]]
name = "install_xmlsec1"
path = "tests/install_xmlsec1.rs"
[[test]]
name = "key_establishment"
path = "tests/key_establishment.rs"
[[test]]
name = "key_establishment_policy"
path = "tests/key_establishment_policy.rs"
[[test]]
name = "key_manager_feature_contract"
path = "tests/key_manager_feature_contract.rs"
[[test]]
name = "key_trust_transition"
path = "tests/key_trust_transition.rs"
[[test]]
name = "merlin_interop"
path = "tests/merlin_interop.rs"
required-features = ["xmldsig"]
[[test]]
name = "modern_algorithms"
path = "tests/modern_algorithms.rs"
[[test]]
name = "opc_relationship_transform"
path = "tests/opc_relationship_transform.rs"
[[test]]
name = "owned_document_pipeline"
path = "tests/owned_document_pipeline.rs"
[[test]]
name = "phaos_interop"
path = "tests/phaos_interop.rs"
[[test]]
name = "pkcs11"
path = "tests/pkcs11.rs"
[[test]]
name = "policy_profiles"
path = "tests/policy_profiles.rs"
[[test]]
name = "provider_contract"
path = "tests/provider_contract.rs"
[[test]]
name = "provider_key_association"
path = "tests/provider_key_association.rs"
[[test]]
name = "reference_integration"
path = "tests/reference_integration.rs"
[[test]]
name = "rsa_encoding"
path = "tests/rsa_encoding.rs"
[[test]]
name = "rsa_pss"
path = "tests/rsa_pss.rs"
[[test]]
name = "rsa_signature_integration"
path = "tests/rsa_signature_integration.rs"
[[test]]
name = "saml_idp_integration"
path = "tests/saml_idp_integration.rs"
[[test]]
name = "saml_signing_integration"
path = "tests/saml_signing_integration.rs"
[[test]]
name = "secret_ownership"
path = "tests/secret_ownership.rs"
[[test]]
name = "selected_key_receipts"
path = "tests/selected_key_receipts.rs"
[[test]]
name = "signature_builder"
path = "tests/signature_builder.rs"
[[test]]
name = "signature_hash_uses"
path = "tests/signature_hash_uses.rs"
[[test]]
name = "signature_pipeline_integration"
path = "tests/signature_pipeline_integration.rs"
required-features = ["xmldsig"]
[[test]]
name = "signing_digest"
path = "tests/signing_digest.rs"
required-features = [
"xmldsig",
"c14n",
]
[[test]]
name = "spki_key_structure"
path = "tests/spki_key_structure.rs"
[[test]]
name = "transforms_integration"
path = "tests/transforms_integration.rs"
[[test]]
name = "uri_integration"
path = "tests/uri_integration.rs"
required-features = [
"xmldsig",
"c14n",
]
[[test]]
name = "verification_evidence"
path = "tests/verification_evidence.rs"
[[test]]
name = "x509_chain_integration"
path = "tests/x509_chain_integration.rs"
[[test]]
name = "xml_backend_runtime"
path = "tests/xml_backend_runtime.rs"
[[test]]
name = "xml_boolean_attribute"
path = "tests/xml_boolean_attribute.rs"
[[test]]
name = "xml_extension_identity"
path = "tests/xml_extension_identity.rs"
[[test]]
name = "xml_integer_inspection"
path = "tests/xml_integer_inspection.rs"
[[test]]
name = "xml_qname_inspection"
path = "tests/xml_qname_inspection.rs"
[[test]]
name = "xml_scalar_inspection"
path = "tests/xml_scalar_inspection.rs"
[[test]]
name = "xmlenc11_corpus"
path = "tests/xmlenc11_corpus.rs"
required-features = [
"xmlenc",
"c14n",
"legacy-algorithms",
]
[[test]]
name = "xmlenc_agreement"
path = "tests/xmlenc_agreement.rs"
[[test]]
name = "xmlenc_donor_integration"
path = "tests/xmlenc_donor_integration.rs"
[[test]]
name = "xmlenc_encrypt_integration"
path = "tests/xmlenc_encrypt_integration.rs"
[[test]]
name = "xmlenc_kdf"
path = "tests/xmlenc_kdf.rs"
[[test]]
name = "xmlenc_nested"
path = "tests/xmlenc_nested.rs"
[[test]]
name = "xmlsec1_interop"
path = "tests/xmlsec1_interop.rs"
required-features = [
"xmldsig",
"c14n",
]
[[test]]
name = "xpath_donor_vectors"
path = "tests/xpath_donor_vectors.rs"
[[test]]
name = "xpath_transform_integration"
path = "tests/xpath_transform_integration.rs"
required-features = [
"xmldsig",
"c14n",
]
[[bench]]
name = "security"
path = "benches/security.rs"
harness = false
required-features = ["benchmark-internals"]
[dependencies.aes]
version = "0.9.2"
optional = true
[dependencies.aes-gcm]
version = "0.11.1"
optional = true
[dependencies.aes-kw]
version = "0.3.1"
optional = true
[dependencies.aws-lc-rs]
version = "1.18.1"
features = ["fips"]
optional = true
default-features = false
[dependencies.base64]
version = "0.23"
[dependencies.camellia]
version = "0.2.1"
features = ["zeroize"]
optional = true
default-features = false
[dependencies.cbc]
version = "0.2.1"
optional = true
[dependencies.chacha20]
version = "0.10.2"
features = ["zeroize"]
optional = true
default-features = false
[dependencies.chacha20poly1305]
version = "0.11.0"
features = ["alloc"]
optional = true
default-features = false
[dependencies.common]
version = "0.2"
features = ["rand_core"]
optional = true
default-features = false
package = "crypto-common"
[dependencies.const-oid]
version = "0.10"
features = ["db"]
optional = true
default-features = false
[dependencies.crypto-bigint]
version = "0.7"
features = ["zeroize"]
optional = true
[dependencies.crypto-primes]
version = "0.7.2"
optional = true
default-features = false
[dependencies.cryptoki]
version = "0.12.1"
optional = true
[dependencies.ctutils]
version = "0.4"
optional = true
default-features = false
[dependencies.curve25519-dalek]
version = "5"
features = [
"alloc",
"precomputed-tables",
"zeroize",
]
optional = true
default-features = false
[dependencies.der]
version = "0.8"
optional = true
[dependencies.des]
version = "0.9"
optional = true
[dependencies.dsa]
version = "0.7"
features = ["hazmat"]
optional = true
[dependencies.ed25519-dalek]
version = "3"
features = [
"alloc",
"digest",
"fast",
"hazmat",
"pkcs8",
"zeroize",
]
optional = true
default-features = false
[dependencies.ed448-goldilocks]
version = "=0.14.0-pre.15"
features = [
"alloc",
"signing",
"pkcs8",
]
optional = true
default-features = false
[dependencies.encoding_rs]
version = "0.8"
features = ["alloc"]
default-features = false
[dependencies.getrandom]
version = "0.4"
features = ["sys_rng"]
optional = true
[dependencies.hkdf]
version = "0.13"
optional = true
default-features = false
[dependencies.hmac]
version = "0.13"
features = ["zeroize"]
optional = true
[dependencies.hybrid-array]
version = "0.4"
features = [
"extra-sizes",
"alloc",
"zeroize",
]
optional = true
default-features = false
[dependencies.keccak]
version = "0.2"
optional = true
default-features = false
[dependencies.md-5]
version = "0.11"
features = [
"oid",
"zeroize",
]
optional = true
[dependencies.memchr]
version = "2"
optional = true
default-features = false
[dependencies.ml-kem]
version = "0.3.2"
features = [
"alloc",
"zeroize",
]
optional = true
default-features = false
[dependencies.module-lattice]
version = "0.2.3"
features = [
"ctutils",
"alloc",
"zeroize",
]
optional = true
default-features = false
[dependencies.p256]
version = "0.14"
features = ["ecdsa"]
optional = true
[dependencies.p384]
version = "0.14"
features = ["ecdsa"]
optional = true
[dependencies.p521]
version = "0.14"
features = ["ecdsa"]
optional = true
[dependencies.pbkdf2]
version = "0.13"
features = ["hmac"]
optional = true
default-features = false
[dependencies.pem]
version = "4"
optional = true
[dependencies.peresil]
version = "0.3"
optional = true
[dependencies.pkcs1]
version = "0.8.0-rc.5"
features = [
"alloc",
"pem",
]
optional = true
default-features = false
[dependencies.pkcs12]
version = "=0.2.0-pre.0"
features = ["kdf"]
optional = true
default-features = false
[dependencies.pkcs8]
version = "0.11"
features = [
"encryption",
"pem",
]
optional = true
[dependencies.ripemd]
version = "0.2.0"
features = [
"oid",
"zeroize",
]
optional = true
default-features = false
[dependencies.rsa]
version = "0.10.2"
features = [
"sha1",
"sha2",
"hazmat",
]
optional = true
default-features = false
package = "sad-rsa"
[dependencies.self_cell]
version = "1.3"
[dependencies.sha1]
version = "0.11"
features = [
"oid",
"zeroize",
]
optional = true
[dependencies.sha2]
version = "0.11"
features = [
"oid",
"zeroize",
]
optional = true
[dependencies.shake]
version = "0.1"
optional = true
default-features = false
[dependencies.signature]
version = "3"
optional = true
[dependencies.slh-dsa]
version = "=0.2.0-rc.5"
features = [
"alloc",
"zeroize",
]
optional = true
default-features = false
[dependencies.snafu]
version = "0.9"
optional = true
[dependencies.sponge-cursor]
version = "0.1"
features = ["zeroize"]
optional = true
default-features = false
[dependencies.structured-asn1]
version = "0.6.3"
features = ["alloc"]
optional = true
default-features = false
[dependencies.structured-pkix]
version = "0.6.3"
features = ["alloc"]
optional = true
default-features = false
[dependencies.subtle]
version = "2"
optional = true
[dependencies.thiserror]
version = "2"
[dependencies.tinyvec]
version = "1.13"
optional = true
[dependencies.x25519-dalek]
version = "3"
features = [
"static_secrets",
"zeroize",
]
optional = true
default-features = false
[dependencies.x448]
version = "=0.14.0-pre.12"
features = ["static_secrets"]
optional = true
default-features = false
[dependencies.x509-cert]
version = "0.3"
optional = true
default-features = false
[dependencies.x509-parser]
version = "0.18"
optional = true
[dependencies.xmlparser]
version = "0.13.6"
default-features = false
[dependencies.zeroize]
version = "1"
optional = true
[dev-dependencies.divan]
version = "=0.1.21"
[dev-dependencies.hex-literal]
version = "1"
[dev-dependencies.ml-dsa]
version = "0.1.1"
features = [
"alloc",
"pkcs8",
"rand_core",
"zeroize",
]
default-features = false
[dev-dependencies.rand_chacha]
version = "0.10"
[dev-dependencies.rcgen]
version = "0.14.6"
[dev-dependencies.roxmltree]
version = "0.21"
features = ["positions"]
[dev-dependencies.serde]
version = "1"
features = ["derive"]
[dev-dependencies.serde_json]
version = "1"
[dev-dependencies.sha3]
version = "0.12"
features = [
"oid",
"zeroize",
]
default-features = false
[dev-dependencies.tempfile]
version = "3"
[dev-dependencies.time]
version = "0.3.55"
[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = ['cfg(feature, values("raw-pointer-backend", "__internal_expose_string_pool"))']
[profile.dev.package.xml-sec-sxd-document]
opt-level = 2
[profile.dev.package.xml-sec-sxd-xpath]
opt-level = 2
[profile.dev.package.xml-sec-xslt]
opt-level = 2