diff --git a/.github/workflows/legacy-tls-security.yml b/.github/workflows/legacy-tls-security.yml new file mode 100644 index 00000000000..821f8b45d2c --- /dev/null +++ b/.github/workflows/legacy-tls-security.yml @@ -0,0 +1,16 @@ +name: Legacy TLS security regression +on: + pull_request: + paths: ["Cargo.toml", "Cargo.lock", "vendor/**", ".github/workflows/legacy-tls-security.yml"] + push: + branches: [main] + paths: ["Cargo.toml", "Cargo.lock", "vendor/**", ".github/workflows/legacy-tls-security.yml"] +permissions: + contents: read +jobs: + distrust: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + - uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 + - run: cargo test --manifest-path vendor/rustls-webpki-legacy/Cargo.toml --features ring --test security_distrust --locked diff --git a/Cargo.lock b/Cargo.lock index 85e3a004b4b..b5066b1e150 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -222,7 +222,7 @@ version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -233,7 +233,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -667,13 +667,13 @@ dependencies = [ "aws-smithy-async", "aws-smithy-runtime-api", "aws-smithy-types", - "h2 0.4.15", + "h2 0.4.16", "http 1.5.0", "hyper 1.11.0", "hyper-rustls 0.27.9", "hyper-util", "pin-project-lite", - "rustls 0.23.43", + "rustls 0.23.46", "rustls-native-certs 0.8.4", "rustls-pki-types", "tokio", @@ -1135,7 +1135,7 @@ dependencies = [ "hyperlocal", "log", "pin-project-lite", - "rustls 0.23.43", + "rustls 0.23.46", "rustls-native-certs 0.8.4", "rustls-pemfile", "rustls-pki-types", @@ -1304,7 +1304,7 @@ dependencies = [ "cap-primitives", "cap-std", "io-lifetimes 3.0.1", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -1321,7 +1321,7 @@ dependencies = [ "maybe-owned", "rustix 1.1.4", "rustix-linux-procfs", - "windows-sys 0.61.2", + "windows-sys 0.60.2", "winx", ] @@ -1402,9 +1402,9 @@ checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" [[package]] name = "chacha20" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81" +checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06" dependencies = [ "cfg-if", "cpufeatures 0.3.0", @@ -2301,7 +2301,7 @@ dependencies = [ "libc", "option-ext", "redox_users 0.5.2", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -2499,7 +2499,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -3081,9 +3081,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.15" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cb093c84e8bd9b188d4c4a8cb6579fc016968d14c99882163cd3ff402a4f155" +checksum = "a9f37a958b41b3b19ee2707c06439c0e9e547e847223eb791ecb0cb821c65e27" dependencies = [ "atomic-waker", "bytes", @@ -3346,7 +3346,7 @@ dependencies = [ "bytes", "futures-channel", "futures-core", - "h2 0.4.15", + "h2 0.4.16", "http 1.5.0", "http-body 1.1.0", "httparse", @@ -3399,12 +3399,12 @@ dependencies = [ "http 1.5.0", "hyper 1.11.0", "hyper-util", - "rustls 0.23.43", + "rustls 0.23.46", "rustls-native-certs 0.8.4", "tokio", "tokio-rustls 0.26.4", "tower-service", - "webpki-roots 1.0.9", + "webpki-roots 1.0.10", ] [[package]] @@ -3436,7 +3436,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2 0.6.5", + "socket2 0.5.10", "system-configuration", "tokio", "tower-service", @@ -4144,7 +4144,7 @@ dependencies = [ "ironclaw_filesystem", "ironclaw_host_api", "libsql", - "rustls 0.23.43", + "rustls 0.23.46", "rustls-native-certs 0.8.4", "secrecy", "serde", @@ -4157,7 +4157,7 @@ dependencies = [ "tokio-postgres-rustls", "tracing", "urlencoding", - "webpki-roots 1.0.9", + "webpki-roots 1.0.10", ] [[package]] @@ -6279,7 +6279,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -7311,8 +7311,8 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash 2.1.3", - "rustls 0.23.43", - "socket2 0.6.5", + "rustls 0.23.46", + "socket2 0.5.10", "thiserror 2.0.20", "tokio", "tracing", @@ -7321,9 +7321,9 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.16" +version = "0.11.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f4bfc015262b9df63c8845072ce59068853ff5872180c2ce2f13038b970e560" +checksum = "0e750cca55fe4f0439a15d0bb529da9651e79993e8e72c61a899a36d462befbe" dependencies = [ "aws-lc-rs", "bytes", @@ -7333,7 +7333,7 @@ dependencies = [ "rand_pcg", "ring", "rustc-hash 2.1.3", - "rustls 0.23.43", + "rustls 0.23.46", "rustls-pki-types", "slab", "thiserror 2.0.20", @@ -7351,9 +7351,9 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2 0.6.5", + "socket2 0.5.10", "tracing", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -7698,7 +7698,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.43", + "rustls 0.23.46", "rustls-native-certs 0.8.4", "rustls-pki-types", "serde", @@ -7716,7 +7716,7 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams 0.4.2", "web-sys", - "webpki-roots 1.0.9", + "webpki-roots 1.0.10", ] [[package]] @@ -7730,7 +7730,7 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2 0.4.15", + "h2 0.4.16", "http 1.5.0", "http-body 1.1.0", "http-body-util", @@ -7744,7 +7744,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.43", + "rustls 0.23.46", "rustls-pki-types", "rustls-platform-verifier", "serde", @@ -7978,7 +7978,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.12.1", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -8000,22 +8000,22 @@ dependencies = [ "log", "ring", "rustls-pki-types", - "rustls-webpki 0.102.8", + "rustls-webpki 0.102.9+security.emudhra.1", "subtle", "zeroize", ] [[package]] name = "rustls" -version = "0.23.43" +version = "0.23.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0283386ce02abc0151e1761d08802dfe86c173b0b494af5cbc086574e453da06" +checksum = "48e13bd8c0e9365c43cfa5c9e8f9ad49d3c8444926c9aac819e0e4dc503c8fdf" dependencies = [ "aws-lc-rs", "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.103.14", + "rustls-webpki 0.103.16", "subtle", "zeroize", ] @@ -8075,14 +8075,14 @@ dependencies = [ "jni", "log", "once_cell", - "rustls 0.23.43", + "rustls 0.23.46", "rustls-native-certs 0.8.4", "rustls-platform-verifier-android", - "rustls-webpki 0.103.14", + "rustls-webpki 0.103.16", "security-framework 3.7.0", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -8093,9 +8093,7 @@ checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" [[package]] name = "rustls-webpki" -version = "0.102.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +version = "0.102.9+security.emudhra.1" dependencies = [ "ring", "rustls-pki-types", @@ -8104,9 +8102,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.14" +version = "0.103.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0527518605e68109d875e248ea259b6758801cf165e4b2c2733ae3b51f12535a" +checksum = "4443b1b6d39d7c663139942cc4558262562d2c84123bb6282ef177009ca8b281" dependencies = [ "aws-lc-rs", "ring", @@ -8639,7 +8637,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -8836,10 +8834,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.4.3", + "getrandom 0.3.4", "once_cell", "rustix 1.1.4", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -9095,7 +9093,7 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c2ad44aa0ae96db89c4742212ed41645b2f597311ff6e1945542a4d9fadc2fb" dependencies = [ - "rustls 0.23.43", + "rustls 0.23.46", "sha2 0.11.0", "tokio", "tokio-postgres", @@ -9120,7 +9118,7 @@ version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" dependencies = [ - "rustls 0.23.43", + "rustls 0.23.46", "tokio", ] @@ -9169,7 +9167,7 @@ checksum = "c6989540ced10490aaf14e6bad2e3d33728a2813310a0c71d1574304c49631cd" dependencies = [ "futures-util", "log", - "rustls 0.23.43", + "rustls 0.23.46", "rustls-pki-types", "tokio", "tokio-rustls 0.26.4", @@ -9556,7 +9554,7 @@ dependencies = [ "httparse", "log", "rand 0.8.7", - "rustls 0.23.43", + "rustls 0.23.46", "rustls-pki-types", "sha1 0.10.7", "thiserror 1.0.69", @@ -9614,7 +9612,7 @@ checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e" dependencies = [ "memoffset", "tempfile", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -10383,9 +10381,9 @@ dependencies = [ [[package]] name = "webpki-root-certs" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b96554aa2acc8ccdb7e1c9a58a7a68dd5d13bccc69cd124cb09406db612a1c9b" +checksum = "58ec80e73fd8baf57bf0d9615554c75348bda990d6d5bbeab964dd068319fecb" dependencies = [ "rustls-pki-types", ] @@ -10396,14 +10394,14 @@ version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" dependencies = [ - "webpki-roots 1.0.9", + "webpki-roots 1.0.10", ] [[package]] name = "webpki-roots" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dcd9d09a39985f5344844e66b0c530a33843579125f23e21e9f0f220850f22a" +checksum = "1c1c8e20c8a38fc7d65abfe74eb7280e4aa667e8eec8bc84996d2874810748d9" dependencies = [ "rustls-pki-types", ] @@ -10467,7 +10465,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 613ccfeaf05..5433e7881c3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -557,3 +557,7 @@ aarch64-apple-darwin = "macos-14" "actions/download-artifact" = "37930b1c2abaa49bbe596cd826c3c89aef350131" "actions/upload-artifact" = "b7c566a772e6b6bfb58ed0dc250532a479d7789f" "swatinem/rust-cache" = "e18b497796c12c097a38f9edb9d0641fb99eee32" + +# Legacy libsql TLS branch: attributed SPKI-distrust backport; see vendor/PATCHES.md. +[patch.crates-io] +webpki-legacy = { package = "rustls-webpki", path = "vendor/rustls-webpki-legacy" } diff --git a/Dockerfile b/Dockerfile index 08d40c8389e..481cda1970a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ # preview, or hosted-single-tenant-volume-sandboxed-railway for the explicit # Railway Sandbox preview described in docs/internal/reborn/railway-sandbox-operator.md. -FROM node:22.23.1-bookworm-slim@sha256:813a7480f28fdadac1f7f5c824bcdad435b5bc1322a5968bbbdef8d058f9dff4 AS node_toolchain +FROM node:22.23.4-bookworm-slim@sha256:de170b39439eb0e5a3444ad7d60b015614a381e10fecae2e30ec9e735122f38d AS node_toolchain FROM debian:bookworm-slim@sha256:7b140f374b289a7c2befc338f42ebe6441b7ea838a042bbd5acbfca6ec875818 AS railway_cli diff --git a/Dockerfile.sandbox-worker b/Dockerfile.sandbox-worker index 35510e8fce5..4dfbc57b1bd 100644 --- a/Dockerfile.sandbox-worker +++ b/Dockerfile.sandbox-worker @@ -1,6 +1,6 @@ # Python-only PR1 worker for the local-Docker user-sandbox profile. # Keep the base digest aligned with RailwayPreviewSandboxConfig's default. -FROM python:3.12-slim@sha256:57cd7c3a7a273101a6485ba99423ee568157882804b1124b4dd04266317710de +FROM python:3.12.15-slim-bookworm@sha256:6a0e06f5ba0b373d051aabd3fffb9b873f27f9a2a3a14bcbe37dee6f0e3bbc70 RUN groupadd --gid 1000 sandbox \ && useradd --uid 1000 --gid sandbox --create-home --shell /bin/sh sandbox diff --git a/crates/lanes/ironclaw_sandbox/src/sandbox_process/railway.rs b/crates/lanes/ironclaw_sandbox/src/sandbox_process/railway.rs index 650803207a6..bc153075623 100644 --- a/crates/lanes/ironclaw_sandbox/src/sandbox_process/railway.rs +++ b/crates/lanes/ironclaw_sandbox/src/sandbox_process/railway.rs @@ -26,11 +26,9 @@ use crate::sandbox_process::RebornSandboxUserKey; use super::worker_spec::DOCKER_WORKER_USER as WORKER_USER; const DEFAULT_IDLE_TIMEOUT_MINUTES: u16 = 5; -// Pin the exact multi-platform manifest exercised by the Railway preview -// canary. Operators may override this explicitly, but the default must not -// drift between review and deployment. -const DEFAULT_WORKER_IMAGE: &str = - "python:3.12-slim@sha256:57cd7c3a7a273101a6485ba99423ee568157882804b1124b4dd04266317710de"; +// Pin the exact multi-platform manifest used by Dockerfile.sandbox-worker. +// Operators may override this explicitly; keep the source defaults aligned. +const DEFAULT_WORKER_IMAGE: &str = "python:3.12.15-slim-bookworm@sha256:6a0e06f5ba0b373d051aabd3fffb9b873f27f9a2a3a14bcbe37dee6f0e3bbc70"; const DEFAULT_COMMAND_TIMEOUT: Duration = Duration::from_secs(60); const MAX_COMMAND_TIMEOUT: Duration = Duration::from_secs(600); const DEFAULT_OUTPUT_LIMIT: usize = 16 * 1024; diff --git a/crates/product/ironclaw_webui/frontend/package.json b/crates/product/ironclaw_webui/frontend/package.json index a72cd832d84..5ccf562ae89 100644 --- a/crates/product/ironclaw_webui/frontend/package.json +++ b/crates/product/ironclaw_webui/frontend/package.json @@ -6,7 +6,7 @@ "packageManager": "pnpm@11.7.0", "type": "module", "engines": { - "node": ">=22.22 <23", + "node": ">=22.23.4 <23", "pnpm": ">=11 <12" }, "scripts": { @@ -22,7 +22,7 @@ }, "dependencies": { "@tanstack/react-query": "5.87.4", - "dompurify": "3.4.12", + "dompurify": "3.4.17", "event-source-plus": "0.1.15", "gemoji": "8.0.0", "highlight.js": "11.11.1", @@ -47,7 +47,7 @@ "jsdom": "29.1.1", "tailwindcss": "4.3.2", "typescript": "6.0.3", - "vite": "8.1.3", - "vitest": "4.1.9" + "vite": "8.1.6", + "vitest": "4.1.12" } } diff --git a/crates/product/ironclaw_webui/frontend/pnpm-lock.yaml b/crates/product/ironclaw_webui/frontend/pnpm-lock.yaml index b11cc8df8d2..a3ae0bf1e49 100644 --- a/crates/product/ironclaw_webui/frontend/pnpm-lock.yaml +++ b/crates/product/ironclaw_webui/frontend/pnpm-lock.yaml @@ -4,6 +4,9 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +overrides: + katex: 0.18.2 + importers: .: @@ -12,8 +15,8 @@ importers: specifier: 5.87.4 version: 5.87.4(react@19.2.8) dompurify: - specifier: 3.4.12 - version: 3.4.12 + specifier: 3.4.17 + version: 3.4.17 event-source-plus: specifier: 0.1.15 version: 0.1.15 @@ -53,7 +56,7 @@ importers: devDependencies: '@tailwindcss/vite': specifier: 4.3.2 - version: 4.3.2(vite@8.1.3(@types/node@26.1.0)(jiti@2.7.0)) + version: 4.3.2(vite@8.1.6(@types/node@26.1.0)(jiti@2.7.0)) '@types/node': specifier: 26.1.0 version: 26.1.0 @@ -68,7 +71,7 @@ importers: version: 19.2.3(@types/react@19.2.17) '@vitejs/plugin-react': specifier: 6.0.3 - version: 6.0.3(vite@8.1.3(@types/node@26.1.0)(jiti@2.7.0)) + version: 6.0.3(vite@8.1.6(@types/node@26.1.0)(jiti@2.7.0)) happy-dom: specifier: 20.11.1 version: 20.11.1 @@ -82,11 +85,11 @@ importers: specifier: 6.0.3 version: 6.0.3 vite: - specifier: 8.1.3 - version: 8.1.3(@types/node@26.1.0)(jiti@2.7.0) + specifier: 8.1.6 + version: 8.1.6(@types/node@26.1.0)(jiti@2.7.0) vitest: - specifier: 4.1.9 - version: 4.1.9(@types/node@26.1.0)(happy-dom@20.11.1)(jsdom@29.1.1)(vite@8.1.3(@types/node@26.1.0)(jiti@2.7.0)) + specifier: 4.1.12 + version: 4.1.12(@types/node@26.1.0)(happy-dom@20.11.1)(jsdom@29.1.1)(vite@8.1.6(@types/node@26.1.0)(jiti@2.7.0)) packages: @@ -194,8 +197,8 @@ packages: '@jridgewell/trace-mapping@0.3.31': resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} - '@mermaid-js/parser@1.2.0': - resolution: {integrity: sha512-oYPyv8A4As1yH5Bx+04iQEQxXuIQDe0GKCNSRgao6z8AM9jixXIfP0vsppRLvGf+nKIOb9/LdpWA4YuJiVvESA==} + '@mermaid-js/parser@1.2.1': + resolution: {integrity: sha512-n12NohV3mrUyUL2o93IgG/ifeW9FTyeJn3zDxkhwa8MJ9Fxg3HQMlA3RiGmD/3UnJvheztkjjQAjA2T4LmUcpw==} '@napi-rs/wasm-runtime@1.1.6': resolution: {integrity: sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg==} @@ -203,100 +206,100 @@ packages: '@emnapi/core': ^1.7.1 '@emnapi/runtime': ^1.7.1 - '@oxc-project/types@0.138.0': - resolution: {integrity: sha512-1a7ZKmrRTCoN1XMZ4L0PyyqrMnrNlLyPuOkdSX2MZg7IiIGRUyurNhAm73ptDOraoBcIordsIGKNPKUzy3ZmfA==} + '@oxc-project/types@0.139.0': + resolution: {integrity: sha512-r9gHphtCs+1M7J0pw6Sn/hh/Wpa/iQrOOkrNAlVLF/gHq+/CJmHIWKKUUhdWjcD6CIa8idarspCsASiXCXvFUw==} - '@rolldown/binding-android-arm64@1.1.4': - resolution: {integrity: sha512-EZLpf/8y7GXkkra90ML47kzik/GMP3EMcE9bPyHmRfxLC6z9+aW5A8poCsoxjrT5GfEcNAAvWwUHjvP1pUQkfw==} + '@rolldown/binding-android-arm64@1.1.5': + resolution: {integrity: sha512-lZg8fqIv2v7FF237bwMgzGZEJvGL79/s5knJ/i6FmsGF4XXlzccZ4jb+TrFIxtSSxFtIpdsgrPZeMk1I9AFcyQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [android] - '@rolldown/binding-darwin-arm64@1.1.4': - resolution: {integrity: sha512-aUi+HBvmYb7j8krl1+qJgkG8C17fO79gk3c+jPw4S8glRFc1DTija9S3EyaTSQUm5GJXYKDAsugBEhFHH2vYiQ==} + '@rolldown/binding-darwin-arm64@1.1.5': + resolution: {integrity: sha512-51Bnx9pNiMRKSUNtBfySkNJ9vMU9Hh3I1ozDd6gyPPYzaXCfnptUcEZxXGYFn+ul2dtcMUiqGR1Yai2K10uoTw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@rolldown/binding-darwin-x64@1.1.4': - resolution: {integrity: sha512-F7hHC3gwY11+vByKPRWqwGbeXWVgKmL+pTGCinaEhdihzBV2aQ0fvZOch9cXYUOKuKKq429HeYXOqQLc7wFCEg==} + '@rolldown/binding-darwin-x64@1.1.5': + resolution: {integrity: sha512-Tm+gbfC0aHu1tBA/JvKQh32S0K6YgCHkiAF4/W6xX0K0RmNuc94VeK419dJoE65R5aRxmo+noZQSWrAMF6yb6g==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@rolldown/binding-freebsd-x64@1.1.4': - resolution: {integrity: sha512-sI5yw+7s92SK6odiEhD5lKCBlWcpjHS5qyqpVQbZAJ0fIzEUXrmbl3DH2ybR3PZogulNJF+COLtmA8hUfvkCCQ==} + '@rolldown/binding-freebsd-x64@1.1.5': + resolution: {integrity: sha512-JMzDKCCXq93YccG5gz3hvOs1oXRKAf0XYpfOS88e+wZrC8Iugj6j68867vrYZkvpDDpKn/KoKORThmchMpF6TA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [freebsd] - '@rolldown/binding-linux-arm-gnueabihf@1.1.4': - resolution: {integrity: sha512-mCi0OKgEieFircrtVYmQAFGszRtMnZ6fpZAXrxanXAu7lqZcsK1E1RAaZNG0uKAnxox3B1f4EyQNnoyMfN1vAA==} + '@rolldown/binding-linux-arm-gnueabihf@1.1.5': + resolution: {integrity: sha512-uML21j2K5TfPGutKxub+M+nLjZIrWjXQ5Grx4lCe/nimTj9B4L63zHpjXLl4y0L3mcm2htEQIb06oCG/szerNw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@rolldown/binding-linux-arm64-gnu@1.1.4': - resolution: {integrity: sha512-B9Ial3Kv5sh0SHnB1g/QWcUQCEvCF6QKGAl4zXypYj65mVI+B4AhFBwPtSN7pDrJeIx8Z7zdy4ntx+wQABom7w==} + '@rolldown/binding-linux-arm64-gnu@1.1.5': + resolution: {integrity: sha512-navSiuTMogvnQoZoM/v+l3ZWo50/NTwSHSzheABx/RCnmUPaKwq9qSo4Br2OYRs21+Fz8uFqITZM3H4opOB0/Q==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [glibc] - '@rolldown/binding-linux-arm64-musl@1.1.4': - resolution: {integrity: sha512-lZVym0PuHE1KZ22gmFTC15lAkrg9iTszR617oYRB/iPY1A56ywoJzVKOJBKaot5RiikCObmur6pogpse3gRcng==} + '@rolldown/binding-linux-arm64-musl@1.1.5': + resolution: {integrity: sha512-lAryqH7IteztmCXQXk0etKj4wBQ7Gx5S6LjKhsgp9zb8I5bsuvU/2llH1hDQcjsFeqIsovMVN339/8pUDDBXxA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [musl] - '@rolldown/binding-linux-ppc64-gnu@1.1.4': - resolution: {integrity: sha512-t2DNiLJWNTbnEHyUzTumldML6ET4/g16467LZoDDJ3tSxGvguL5/NyC2lCsNKuyRycg9XeDQF5SSv+TNOhQEXg==} + '@rolldown/binding-linux-ppc64-gnu@1.1.5': + resolution: {integrity: sha512-fsK/sNBnxzBlL4O1JNrZakVQxPspqpED5dLtNsZS9oOKmtSpdNIzxH2kkol5HYTWJN47sE20ztMJPxfZ89qGOg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ppc64] os: [linux] libc: [glibc] - '@rolldown/binding-linux-s390x-gnu@1.1.4': - resolution: {integrity: sha512-0WIRnL1Uw4BvTZRLQt+PVgo6ZKTJadlC2btP+/EOXv2f/DWbY0rEgl+y834mIVwP1FkTlWVTrGGJXf12lru7EQ==} + '@rolldown/binding-linux-s390x-gnu@1.1.5': + resolution: {integrity: sha512-gLYb4BIadlfTOYT5gO503n8zQjXflgzpD0FcyKh0Mzx3rqCZKnHoJWV9xe1KXUJ5lx2JfcSHr/mhzS0PC/McAA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] libc: [glibc] - '@rolldown/binding-linux-x64-gnu@1.1.4': - resolution: {integrity: sha512-JWtGshGfX+oENAKonoNkqEJX+7hC8yfhi9GUyPX1VX4mdh1y5r+ZiJLR5XzAB0aoP6s/PcILsGjKq8O0mm24bw==} + '@rolldown/binding-linux-x64-gnu@1.1.5': + resolution: {integrity: sha512-FjcpEKUyJygHgs1o50VYNvkt5+7Le/VEdYt0AkRpkL33MnyQfwr8l5mXwMmfmTbyMPr5vJLC+8/Gd9gXnwU1QQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [glibc] - '@rolldown/binding-linux-x64-musl@1.1.4': - resolution: {integrity: sha512-rT6yQcxUuXs4CnbofqwHRRV0iem349rLMYpTjkgQGLjrY4ado/eDzwPZPTCgTOlF6Nkp8NEv70yLMTn6qkWxsQ==} + '@rolldown/binding-linux-x64-musl@1.1.5': + resolution: {integrity: sha512-Me+PfPI2TMeOQk0gYWfLQZtTktrmzbr8cDboqX83XKc7UrgAi55gF+2dUkWdxd19n55Essp2yeca+O9N5rBxHg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [musl] - '@rolldown/binding-openharmony-arm64@1.1.4': - resolution: {integrity: sha512-KXMGoboq5cyaCQjDA4GLuRiOwBQ0EyFnJoVViLeZ45/3rFItRODEr+NdsBcVpll40hhNArlm/speWGRvj08LzA==} + '@rolldown/binding-openharmony-arm64@1.1.5': + resolution: {integrity: sha512-yc5WrLzXks6zCQfn9Oxr8pORKyl/pF+QjHmW/Qx3qu0oyrrNC+y2JLTU1E2rcWYAmzlnqngWXHQjy51VzW70Vw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [openharmony] - '@rolldown/binding-wasm32-wasi@1.1.4': - resolution: {integrity: sha512-5K83rb36oJiY7BCyE9zLZtGcPV4g5wvq+xwdO0XPIwDVZI8cyB/AUjkNXGb92/rnmezEkjMOpgY61rtwjQtFwg==} + '@rolldown/binding-wasm32-wasi@1.1.5': + resolution: {integrity: sha512-VbQGPX2b4r48TAMIM2cjgluIM1HYutm4pcTEJsle7iEP7sB1dFqtPLBVbdLAZCxy1txCcPxf4QFf4v8uvltPqA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [wasm32] - '@rolldown/binding-win32-arm64-msvc@1.1.4': - resolution: {integrity: sha512-PnWBtw3TV5KOg69HQQDR0mnQuyCmSGR2pAB4DC1rPF808fgKeTUMj2EOEyKATpgiuxuR5APQmiDO7PDgEjTFSA==} + '@rolldown/binding-win32-arm64-msvc@1.1.5': + resolution: {integrity: sha512-gHv82k63z4qpV5+Q1y/12KrK0ltWBukVDI8nZcbT7Tt/ZlOIVwppazneq0F93oDxTo3IgAMEDIoQh3E2n6mVsw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@rolldown/binding-win32-x64-msvc@1.1.4': - resolution: {integrity: sha512-M1lpniBePobTfsa7Ks9a199e1akxsXn+GYBUKsEzv3YFzOm1HJAMNwKI3qr0Zq+mxwx9gOZoTdP1yXRYsZUocQ==} + '@rolldown/binding-win32-x64-msvc@1.1.5': + resolution: {integrity: sha512-tTZuDBPw85tEN5PQi1pnEBzDy0Z49HtScLAbD5t6hyeU92A95pRWaSMw1GZZi/RwgSgUIl0xrSlXIT/9QzvYSA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] @@ -580,11 +583,11 @@ packages: babel-plugin-react-compiler: optional: true - '@vitest/expect@4.1.9': - resolution: {integrity: sha512-vl/rYsUKcBr3SnQn166+XR5ZQcgMx3DQhFWdfli/cWpLnLUmbxZvyrJZotLFUryib+LtArYMSTJ5RbQ57ZqrlA==} + '@vitest/expect@4.1.12': + resolution: {integrity: sha512-vFlTt+YEu9WBpNjdGayNmlMVzrWPi1+sv853/7t2FU7hpO5gAFBKHzQmkCq5Xjpr+evegF2994LQT3hF3mRlqQ==} - '@vitest/mocker@4.1.9': - resolution: {integrity: sha512-EVkXzBjrPGM+cK8/ANWgBrkUCfJfb38/EfTSO8h7pWvKkyPkpWxvR7BkD2MyItMF62C97zAEoqdpUixwR/e+Rw==} + '@vitest/mocker@4.1.12': + resolution: {integrity: sha512-fKShNpKZzupWZuY0z7egydvL0sqW4INEZBEExMBMAa6izlENEVHwoXgdaTCaBZ5fwlr4xf2o1wXC83n9RpO+NA==} peerDependencies: msw: ^2.4.9 vite: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -594,20 +597,20 @@ packages: vite: optional: true - '@vitest/pretty-format@4.1.9': - resolution: {integrity: sha512-s0iufns3iIFitdgm+YR7g1whCAaGtXz459VS9/PqyKDEEFgYIhsHOQmXgIgDuYCt7DeQmiZT0Qe2OA2p4ZPu5A==} + '@vitest/pretty-format@4.1.12': + resolution: {integrity: sha512-XW9O8+Mxx4VpCtkYdMJLZQQwsVryP9wk7cPKDxtXFfwSak6yRh5+2fep/Y0XF/ElBvJHq8bcYdi6aeuai0opZA==} - '@vitest/runner@4.1.9': - resolution: {integrity: sha512-KXLMDtc7oe70+3mJfGrPUWPesswH+3sTxAMAMl8DG7I8IUQT4XW718dY5ID3vPUcmlu27CcKfY4P3h3I29SLJg==} + '@vitest/runner@4.1.12': + resolution: {integrity: sha512-NKlVKCr5QnCe8jijdMnmkpHHU+WTqiLFR6G0pHji9uRjXK9xJl1k1nTw6F3pOOj2PDcsDt2GKQMI7wIsaT491w==} - '@vitest/snapshot@4.1.9': - resolution: {integrity: sha512-Jc7RKGNBo8Z28WYIm0Niej4xdSPByRf6mU58VpHQkd6Zh05rlnA+twjbK5HyeIGHxrzsc3mJgS43uM0CZKzaIA==} + '@vitest/snapshot@4.1.12': + resolution: {integrity: sha512-ko1y1Qgb/slzQ9mr+b89Cuqud8WG1TKtsPD8r7ZUBdvVOGt85Af2HwCqHujrhwJq95hs/9RM7fcAPg57o1vlzw==} - '@vitest/spy@4.1.9': - resolution: {integrity: sha512-fHpsS6mIi+PiEW+vcRVOMkX1oSaPKne3VOclSFICPcGOmfKgXPU5iAah+wcNcj2xPrCCmfq99IDGf+EojhhvhA==} + '@vitest/spy@4.1.12': + resolution: {integrity: sha512-RGq9x4JNGNTZHEJxvN0oSiJjeSCExm0n2gZKKJZHY9cX5AVA6M7VJILBT3ZJ/tJ/0J9uWT7fETV9/btoi//vSg==} - '@vitest/utils@4.1.9': - resolution: {integrity: sha512-A51o8ymO5PpqlWNnBP9ZHPXDIpuMtTLlGSjN7la4US+LJzoUMyhwjA5QXlm39JexgwHKW4Xjs8Z2d3dLCXOeuA==} + '@vitest/utils@4.1.12': + resolution: {integrity: sha512-Q3awXrwOfEV+qc3WmO5ONyE0yO7Q1gQ9/oyHxGLZ/pl7N3NO/ZztqQwKLuwMkV+CA1JYSIeO3gkHnRDIo4AVaA==} ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} @@ -903,6 +906,9 @@ packages: dompurify@3.4.12: resolution: {integrity: sha512-zQvGet8Z2sWbQhCmfFz/T5QWH2oBmjnqK3qvOjaqaNLrLEF912WamU+ohnTp0TCep/MFVHpdJuCZEdFOdTnEFg==} + dompurify@3.4.17: + resolution: {integrity: sha512-B/pSlYVHQ58kqISD/yDjuJ1yfzI34m1gF4lAod2bwSRhiN4K5Cl3H8Af7hqB2PmTL911tdEudnnXn5FnhRoz0w==} + emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -948,6 +954,9 @@ packages: extend@3.0.2: resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} + fastdom@1.0.12: + resolution: {integrity: sha512-LB+xjSTEbjHE1cWsxu+tN2Xqr1kpi+V9aADI7sVM5ZMaXyYGPHULQMzpJMYqOTULK/73pUkWVzzObFRBkPr+hg==} + fdir@6.5.0: resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} engines: {node: '>=12.0.0'} @@ -1079,8 +1088,8 @@ packages: canvas: optional: true - katex@0.16.47: - resolution: {integrity: sha512-Eeo8Ys1doU1z+x8AZsPpQu+p/QcZBI5PeOo7QGQdy2x2m0MU/hYagBbGOmXwr5KVbEfVuWv9LpnQWeehogurjg==} + katex@0.18.2: + resolution: {integrity: sha512-3snve4y0SXTMequLim1FMiPvLGElySam0blN5xQZBqEY3lOJz1TnuaaiugnBZBqHzlSAGmFTYL7MCQkORuLKCA==} hasBin: true khroma@2.1.0: @@ -1244,8 +1253,8 @@ packages: mdn-data@2.27.1: resolution: {integrity: sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==} - mermaid@11.16.0: - resolution: {integrity: sha512-Zvm3kbstgdpvIJPPItlL7fppIZ3kibvc1oZIGxdvk9t6UFz6flv+Jw7FtRGKwfcI8OckmH04LqG6LlS6X4B1pA==} + mermaid@11.17.2: + resolution: {integrity: sha512-V6K3C8EBdEsPFZXSKMJe6ppQOENxuHARr9GvHX4hh47lAbhMRD9qf4oEK7LoaRQxULMa80/qt5gHO73aCleBBg==} micromark-core-commonmark@2.0.3: resolution: {integrity: sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==} @@ -1334,8 +1343,8 @@ packages: ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - nanoid@3.3.15: - resolution: {integrity: sha512-y7Wygv/7mEOvxTuEQDB8StXdMRBWf1kR/tlhAzBRUFkB2jfcLOAxO/SHmOO2zgz1pVgK29/kyupn059/bCHdjA==} + nanoid@3.3.20: + resolution: {integrity: sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true @@ -1400,8 +1409,8 @@ packages: points-on-path@0.2.1: resolution: {integrity: sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g==} - postcss@8.5.16: - resolution: {integrity: sha512-vuwillviilfKZsg0VGj5R/YwwcHx4SLsIOI/7K6mQkWx+l5cUHTjj5g0AasTBcyXsbfTgrwsUNmVUb5xVwyPwg==} + postcss@8.5.31: + resolution: {integrity: sha512-YUbWYCgErwnMAVkjUnYa+KlMBzGpHwiIt/DE7f0G33AuX2LH9UcTk6KgWxd3zRU+pN3u/C+Xl3EnMLM4Hea7Sg==} engines: {node: ^10 || ^12 || >=14} property-information@7.2.0: @@ -1489,8 +1498,8 @@ packages: robust-predicates@3.0.3: resolution: {integrity: sha512-NS3levdsRIUOmiJ8FZWCP7LG3QpJyrs/TE0Zpf1yvZu8cAJJ6QMW92H1c7kWpdIHo8RvmLxN/o2JXTKHp74lUA==} - rolldown@1.1.4: - resolution: {integrity: sha512-IjZYiLxZwpnhwhdBH2ugdTGVSdhCQUmLxLoqyjiL0JxYjyRst+5a0P3xfrTxJ5F638j4Mvvw5FAX5XE6eHpXbA==} + rolldown@1.1.5: + resolution: {integrity: sha512-t9z29cJjXf/vxQ8dyhCSpt6H6aSwHTk8cT5I3iy6SMXuFpk5mB6PL6XfC8PCwrPTx93udwKUm9HRteAlTGBLiA==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true @@ -1516,8 +1525,8 @@ packages: siginfo@2.0.0: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} - source-map-js@1.2.1: - resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + source-map-js@1.2.2: + resolution: {integrity: sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==} engines: {node: '>=0.10.0'} space-separated-tokens@2.0.2: @@ -1535,6 +1544,9 @@ packages: react: ^18.0.0 || ^19.0.0 react-dom: ^18.0.0 || ^19.0.0 + strictdom@1.0.1: + resolution: {integrity: sha512-cEmp9QeXXRmjj/rVp9oyiqcvyocWab/HaoN4+bwFeZ7QzykJD6L3yD4v12K1x0tHpqRqVpJevN3gW7kyM39Bqg==} + string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -1622,8 +1634,8 @@ packages: undici-types@8.3.0: resolution: {integrity: sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==} - undici@7.29.0: - resolution: {integrity: sha512-IDxfleLmmbSskfWSUATiN1nfn2rDuvnMOqb5CWR92iIfojA0Ud+ulOAAEQ57LPr9rWmsreUyf5lwyao+7GNNVw==} + undici@7.30.1: + resolution: {integrity: sha512-03KrMbjIFDWQR5RNPrSw3bd1r12JpyFQl9/yxjUbJtqkjmllqC5lFjZh6ujeuJCKr8EOQvRW872Oy/az+nLYxg==} engines: {node: '>=20.18.1'} unified@11.0.5: @@ -1657,8 +1669,8 @@ packages: vfile@6.0.3: resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} - vite@8.1.3: - resolution: {integrity: sha512-Ds+gBRbj0lwRO2Y5hwnUBdxSwlAve9LeRyU4sNnAr0ewW0gWF0n5bgXgUzbgZ49MV9BVUAQUFYVcDUcilUExMA==} + vite@8.1.6: + resolution: {integrity: sha512-aRAHIxx5SW5zc1sMqFwJU/t5qaFfXb5Hj0J7W0VXihu/X99+346tz6080tO1T1xVIJORX/b3zVTXGFqUXh35uw==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: @@ -1700,20 +1712,20 @@ packages: yaml: optional: true - vitest@4.1.9: - resolution: {integrity: sha512-nE3/LEyc0z87uHYLZebqCUOaJr2hdtuPp7BQ4BosVFnfltxgAvMG08NyrSGlPpOUWvR27c5flSmYFTNr78L9GQ==} + vitest@4.1.12: + resolution: {integrity: sha512-5eWdz2yb3ajxWF3C8C4TjkXl7FGm3n2E/VlazALrQHzK7nYMSGFnCZto0bbPNl77AwkOZVLk0YnBAejUu0NiWA==} engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@opentelemetry/api': ^1.9.0 '@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0 - '@vitest/browser-playwright': 4.1.9 - '@vitest/browser-preview': 4.1.9 - '@vitest/browser-webdriverio': 4.1.9 - '@vitest/coverage-istanbul': 4.1.9 - '@vitest/coverage-v8': 4.1.9 - '@vitest/ui': 4.1.9 + '@vitest/browser-playwright': 4.1.12 + '@vitest/browser-preview': 4.1.12 + '@vitest/browser-webdriverio': ^4.1.11 + '@vitest/coverage-istanbul': 4.1.12 + '@vitest/coverage-v8': 4.1.12 + '@vitest/ui': 4.1.12 happy-dom: '*' jsdom: '*' vite: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -1913,7 +1925,7 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.5 - '@mermaid-js/parser@1.2.0': + '@mermaid-js/parser@1.2.1': dependencies: '@chevrotain/types': 11.1.2 @@ -1924,55 +1936,55 @@ snapshots: '@tybys/wasm-util': 0.10.3 optional: true - '@oxc-project/types@0.138.0': {} + '@oxc-project/types@0.139.0': {} - '@rolldown/binding-android-arm64@1.1.4': + '@rolldown/binding-android-arm64@1.1.5': optional: true - '@rolldown/binding-darwin-arm64@1.1.4': + '@rolldown/binding-darwin-arm64@1.1.5': optional: true - '@rolldown/binding-darwin-x64@1.1.4': + '@rolldown/binding-darwin-x64@1.1.5': optional: true - '@rolldown/binding-freebsd-x64@1.1.4': + '@rolldown/binding-freebsd-x64@1.1.5': optional: true - '@rolldown/binding-linux-arm-gnueabihf@1.1.4': + '@rolldown/binding-linux-arm-gnueabihf@1.1.5': optional: true - '@rolldown/binding-linux-arm64-gnu@1.1.4': + '@rolldown/binding-linux-arm64-gnu@1.1.5': optional: true - '@rolldown/binding-linux-arm64-musl@1.1.4': + '@rolldown/binding-linux-arm64-musl@1.1.5': optional: true - '@rolldown/binding-linux-ppc64-gnu@1.1.4': + '@rolldown/binding-linux-ppc64-gnu@1.1.5': optional: true - '@rolldown/binding-linux-s390x-gnu@1.1.4': + '@rolldown/binding-linux-s390x-gnu@1.1.5': optional: true - '@rolldown/binding-linux-x64-gnu@1.1.4': + '@rolldown/binding-linux-x64-gnu@1.1.5': optional: true - '@rolldown/binding-linux-x64-musl@1.1.4': + '@rolldown/binding-linux-x64-musl@1.1.5': optional: true - '@rolldown/binding-openharmony-arm64@1.1.4': + '@rolldown/binding-openharmony-arm64@1.1.5': optional: true - '@rolldown/binding-wasm32-wasi@1.1.4': + '@rolldown/binding-wasm32-wasi@1.1.5': dependencies: '@emnapi/core': 1.11.1 '@emnapi/runtime': 1.11.1 '@napi-rs/wasm-runtime': 1.1.6(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1) optional: true - '@rolldown/binding-win32-arm64-msvc@1.1.4': + '@rolldown/binding-win32-arm64-msvc@1.1.5': optional: true - '@rolldown/binding-win32-x64-msvc@1.1.4': + '@rolldown/binding-win32-x64-msvc@1.1.5': optional: true '@rolldown/pluginutils@1.0.1': {} @@ -1986,7 +1998,7 @@ snapshots: jiti: 2.7.0 lightningcss: 1.32.0 magic-string: 0.30.21 - source-map-js: 1.2.1 + source-map-js: 1.2.2 tailwindcss: 4.3.2 '@tailwindcss/oxide-android-arm64@4.3.2': @@ -2040,12 +2052,12 @@ snapshots: '@tailwindcss/oxide-win32-arm64-msvc': 4.3.2 '@tailwindcss/oxide-win32-x64-msvc': 4.3.2 - '@tailwindcss/vite@4.3.2(vite@8.1.3(@types/node@26.1.0)(jiti@2.7.0))': + '@tailwindcss/vite@4.3.2(vite@8.1.6(@types/node@26.1.0)(jiti@2.7.0))': dependencies: '@tailwindcss/node': 4.3.2 '@tailwindcss/oxide': 4.3.2 tailwindcss: 4.3.2 - vite: 8.1.3(@types/node@26.1.0)(jiti@2.7.0) + vite: 8.1.6(@types/node@26.1.0)(jiti@2.7.0) '@tanstack/query-core@5.87.4': {} @@ -2241,49 +2253,49 @@ snapshots: d3-selection: 3.0.0 d3-transition: 3.0.1(d3-selection@3.0.0) - '@vitejs/plugin-react@6.0.3(vite@8.1.3(@types/node@26.1.0)(jiti@2.7.0))': + '@vitejs/plugin-react@6.0.3(vite@8.1.6(@types/node@26.1.0)(jiti@2.7.0))': dependencies: '@rolldown/pluginutils': 1.0.1 - vite: 8.1.3(@types/node@26.1.0)(jiti@2.7.0) + vite: 8.1.6(@types/node@26.1.0)(jiti@2.7.0) - '@vitest/expect@4.1.9': + '@vitest/expect@4.1.12': dependencies: '@standard-schema/spec': 1.1.0 '@types/chai': 5.2.3 - '@vitest/spy': 4.1.9 - '@vitest/utils': 4.1.9 + '@vitest/spy': 4.1.12 + '@vitest/utils': 4.1.12 chai: 6.2.2 tinyrainbow: 3.1.0 - '@vitest/mocker@4.1.9(vite@8.1.3(@types/node@26.1.0)(jiti@2.7.0))': + '@vitest/mocker@4.1.12(vite@8.1.6(@types/node@26.1.0)(jiti@2.7.0))': dependencies: - '@vitest/spy': 4.1.9 + '@vitest/spy': 4.1.12 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 8.1.3(@types/node@26.1.0)(jiti@2.7.0) + vite: 8.1.6(@types/node@26.1.0)(jiti@2.7.0) - '@vitest/pretty-format@4.1.9': + '@vitest/pretty-format@4.1.12': dependencies: tinyrainbow: 3.1.0 - '@vitest/runner@4.1.9': + '@vitest/runner@4.1.12': dependencies: - '@vitest/utils': 4.1.9 + '@vitest/utils': 4.1.12 pathe: 2.0.3 - '@vitest/snapshot@4.1.9': + '@vitest/snapshot@4.1.12': dependencies: - '@vitest/pretty-format': 4.1.9 - '@vitest/utils': 4.1.9 + '@vitest/pretty-format': 4.1.12 + '@vitest/utils': 4.1.12 magic-string: 0.30.21 pathe: 2.0.3 - '@vitest/spy@4.1.9': {} + '@vitest/spy@4.1.12': {} - '@vitest/utils@4.1.9': + '@vitest/utils@4.1.12': dependencies: - '@vitest/pretty-format': 4.1.9 + '@vitest/pretty-format': 4.1.12 convert-source-map: 2.0.0 tinyrainbow: 3.1.0 @@ -2354,7 +2366,7 @@ snapshots: css-tree@3.2.1: dependencies: mdn-data: 2.27.1 - source-map-js: 1.2.1 + source-map-js: 1.2.2 csstype@3.2.3: {} @@ -2583,6 +2595,10 @@ snapshots: optionalDependencies: '@types/trusted-types': 2.0.7 + dompurify@3.4.17: + optionalDependencies: + '@types/trusted-types': 2.0.7 + emoji-regex@8.0.0: {} enhanced-resolve@5.21.6: @@ -2616,6 +2632,10 @@ snapshots: extend@3.0.2: {} + fastdom@1.0.12: + dependencies: + strictdom: 1.0.1 + fdir@6.5.0(picomatch@4.0.5): optionalDependencies: picomatch: 4.0.5 @@ -2792,7 +2812,7 @@ snapshots: saxes: 6.0.0 symbol-tree: 3.2.4 tough-cookie: 6.0.2 - undici: 7.29.0 + undici: 7.30.1 w3c-xmlserializer: 5.0.0 webidl-conversions: 8.0.1 whatwg-mimetype: 5.0.0 @@ -2801,7 +2821,7 @@ snapshots: transitivePeerDependencies: - '@noble/hashes' - katex@0.16.47: + katex@0.18.2: dependencies: commander: 8.3.0 @@ -3035,11 +3055,11 @@ snapshots: mdn-data@2.27.1: {} - mermaid@11.16.0: + mermaid@11.17.2: dependencies: '@braintree/sanitize-url': 7.1.2 '@iconify/utils': 3.1.4 - '@mermaid-js/parser': 1.2.0 + '@mermaid-js/parser': 1.2.1 '@types/d3': 7.4.3 '@upsetjs/venn.js': 2.0.0 cytoscape: 3.34.0 @@ -3051,7 +3071,8 @@ snapshots: dayjs: 1.11.21 dompurify: 3.4.12 es-toolkit: 1.50.0 - katex: 0.16.47 + fastdom: 1.0.12 + katex: 0.18.2 khroma: 2.1.0 marked: 16.4.2 roughjs: 4.6.6 @@ -3252,7 +3273,7 @@ snapshots: ms@2.1.3: {} - nanoid@3.3.15: {} + nanoid@3.3.20: {} node-fetch-native@1.6.7: {} @@ -3313,11 +3334,11 @@ snapshots: path-data-parser: 0.1.0 points-on-curve: 0.2.0 - postcss@8.5.16: + postcss@8.5.31: dependencies: - nanoid: 3.3.15 + nanoid: 3.3.20 picocolors: 1.1.1 - source-map-js: 1.2.1 + source-map-js: 1.2.2 property-information@7.2.0: {} @@ -3419,26 +3440,26 @@ snapshots: robust-predicates@3.0.3: {} - rolldown@1.1.4: + rolldown@1.1.5: dependencies: - '@oxc-project/types': 0.138.0 + '@oxc-project/types': 0.139.0 '@rolldown/pluginutils': 1.0.1 optionalDependencies: - '@rolldown/binding-android-arm64': 1.1.4 - '@rolldown/binding-darwin-arm64': 1.1.4 - '@rolldown/binding-darwin-x64': 1.1.4 - '@rolldown/binding-freebsd-x64': 1.1.4 - '@rolldown/binding-linux-arm-gnueabihf': 1.1.4 - '@rolldown/binding-linux-arm64-gnu': 1.1.4 - '@rolldown/binding-linux-arm64-musl': 1.1.4 - '@rolldown/binding-linux-ppc64-gnu': 1.1.4 - '@rolldown/binding-linux-s390x-gnu': 1.1.4 - '@rolldown/binding-linux-x64-gnu': 1.1.4 - '@rolldown/binding-linux-x64-musl': 1.1.4 - '@rolldown/binding-openharmony-arm64': 1.1.4 - '@rolldown/binding-wasm32-wasi': 1.1.4 - '@rolldown/binding-win32-arm64-msvc': 1.1.4 - '@rolldown/binding-win32-x64-msvc': 1.1.4 + '@rolldown/binding-android-arm64': 1.1.5 + '@rolldown/binding-darwin-arm64': 1.1.5 + '@rolldown/binding-darwin-x64': 1.1.5 + '@rolldown/binding-freebsd-x64': 1.1.5 + '@rolldown/binding-linux-arm-gnueabihf': 1.1.5 + '@rolldown/binding-linux-arm64-gnu': 1.1.5 + '@rolldown/binding-linux-arm64-musl': 1.1.5 + '@rolldown/binding-linux-ppc64-gnu': 1.1.5 + '@rolldown/binding-linux-s390x-gnu': 1.1.5 + '@rolldown/binding-linux-x64-gnu': 1.1.5 + '@rolldown/binding-linux-x64-musl': 1.1.5 + '@rolldown/binding-openharmony-arm64': 1.1.5 + '@rolldown/binding-wasm32-wasi': 1.1.5 + '@rolldown/binding-win32-arm64-msvc': 1.1.5 + '@rolldown/binding-win32-x64-msvc': 1.1.5 roughjs@4.6.6: dependencies: @@ -3461,7 +3482,7 @@ snapshots: siginfo@2.0.0: {} - source-map-js@1.2.1: {} + source-map-js@1.2.2: {} space-separated-tokens@2.0.2: {} @@ -3475,7 +3496,7 @@ snapshots: hast-util-to-jsx-runtime: 2.3.6 html-url-attributes: 3.0.1 marked: 17.0.2 - mermaid: 11.16.0 + mermaid: 11.17.2 react: 19.2.8 react-dom: 19.2.8(react@19.2.8) rehype-harden: 1.1.8 @@ -3492,6 +3513,8 @@ snapshots: transitivePeerDependencies: - supports-color + strictdom@1.0.1: {} + string-width@4.2.3: dependencies: emoji-regex: 8.0.0 @@ -3565,7 +3588,7 @@ snapshots: undici-types@8.3.0: {} - undici@7.29.0: {} + undici@7.30.1: {} unified@11.0.5: dependencies: @@ -3617,27 +3640,27 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.3 - vite@8.1.3(@types/node@26.1.0)(jiti@2.7.0): + vite@8.1.6(@types/node@26.1.0)(jiti@2.7.0): dependencies: lightningcss: 1.32.0 picomatch: 4.0.5 - postcss: 8.5.16 - rolldown: 1.1.4 + postcss: 8.5.31 + rolldown: 1.1.5 tinyglobby: 0.2.17 optionalDependencies: '@types/node': 26.1.0 fsevents: 2.3.3 jiti: 2.7.0 - vitest@4.1.9(@types/node@26.1.0)(happy-dom@20.11.1)(jsdom@29.1.1)(vite@8.1.3(@types/node@26.1.0)(jiti@2.7.0)): + vitest@4.1.12(@types/node@26.1.0)(happy-dom@20.11.1)(jsdom@29.1.1)(vite@8.1.6(@types/node@26.1.0)(jiti@2.7.0)): dependencies: - '@vitest/expect': 4.1.9 - '@vitest/mocker': 4.1.9(vite@8.1.3(@types/node@26.1.0)(jiti@2.7.0)) - '@vitest/pretty-format': 4.1.9 - '@vitest/runner': 4.1.9 - '@vitest/snapshot': 4.1.9 - '@vitest/spy': 4.1.9 - '@vitest/utils': 4.1.9 + '@vitest/expect': 4.1.12 + '@vitest/mocker': 4.1.12(vite@8.1.6(@types/node@26.1.0)(jiti@2.7.0)) + '@vitest/pretty-format': 4.1.12 + '@vitest/runner': 4.1.12 + '@vitest/snapshot': 4.1.12 + '@vitest/spy': 4.1.12 + '@vitest/utils': 4.1.12 es-module-lexer: 2.3.0 expect-type: 1.4.0 magic-string: 0.30.21 @@ -3649,7 +3672,7 @@ snapshots: tinyexec: 1.2.4 tinyglobby: 0.2.17 tinyrainbow: 3.1.0 - vite: 8.1.3(@types/node@26.1.0)(jiti@2.7.0) + vite: 8.1.6(@types/node@26.1.0)(jiti@2.7.0) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 26.1.0 diff --git a/crates/product/ironclaw_webui/frontend/pnpm-workspace.yaml b/crates/product/ironclaw_webui/frontend/pnpm-workspace.yaml index 9af1dfcf1fd..f59adc597a2 100644 --- a/crates/product/ironclaw_webui/frontend/pnpm-workspace.yaml +++ b/crates/product/ironclaw_webui/frontend/pnpm-workspace.yaml @@ -3,3 +3,7 @@ packages: allowBuilds: esbuild: true + +# Mermaid still permits an affected KaTeX branch; retain its API with the security patch. +overrides: + katex: "0.18.2" diff --git a/crates/product/ironclaw_webui/frontend/src/lib/katex-security.test.ts b/crates/product/ironclaw_webui/frontend/src/lib/katex-security.test.ts new file mode 100644 index 00000000000..3607c0b2d1d --- /dev/null +++ b/crates/product/ironclaw_webui/frontend/src/lib/katex-security.test.ts @@ -0,0 +1,22 @@ +import assert from "node:assert/strict"; +import { createRequire } from "node:module"; +import { test } from "vitest"; + +// Resolve the actual Mermaid dependency used by the streaming renderer. +const fromStreamdown = createRequire(import.meta.resolve("streamdown")); +const fromMermaid = createRequire(fromStreamdown.resolve("mermaid")); +const katex = fromMermaid("katex") as { + renderToString: (expression: string, options?: Record) => string; +}; + +test("Mermaid's KaTeX ignores inherited trust while preserving ordinary math", () => { + const safe = katex.renderToString("x^2 + y^2 = z^2"); + assert.match(safe, /class="katex"/); + + // GHSA-238p-pmpm-9mq7: a separately polluted options prototype must not + // turn the renderer's default trust=false into trusted executable links. + const inheritedTrust = Object.create({ trust: true }); + const html = katex.renderToString("\\href{javascript:alert(1)}{click}", inheritedTrust); + assert.doesNotMatch(html, /href=["']javascript:/i); + assert.match(html, /katex/); +}); diff --git a/docs/internal/architecture-video/package-lock.json b/docs/internal/architecture-video/package-lock.json index 6ac8fe7fbb0..2049b2d8b7a 100644 --- a/docs/internal/architecture-video/package-lock.json +++ b/docs/internal/architecture-video/package-lock.json @@ -24,6 +24,9 @@ "eslint": "9.19.0", "prettier": "3.8.1", "typescript": "5.7.3" + }, + "engines": { + "node": "^22.23.4 || ^24.22.1 || >=26.12.1" } }, "node_modules/@alloc/quick-lru": { @@ -994,27 +997,43 @@ } }, "node_modules/@humanfs/core": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", - "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz", + "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==", "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/types": "^0.15.0" + }, "engines": { "node": ">=18.18.0" } }, "node_modules/@humanfs/node": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", - "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz", + "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==", "dev": true, + "license": "Apache-2.0", "dependencies": { - "@humanfs/core": "^0.19.1", + "@humanfs/core": "^0.19.2", + "@humanfs/types": "^0.15.0", "@humanwhocodes/retry": "^0.4.0" }, "engines": { "node": ">=18.18.0" } }, + "node_modules/@humanfs/types": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz", + "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -1326,9 +1345,6 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "optional": true, "os": [ "linux" @@ -1341,9 +1357,6 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "optional": true, "os": [ "linux" @@ -1356,9 +1369,6 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "optional": true, "os": [ "linux" @@ -1371,9 +1381,6 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "optional": true, "os": [ "linux" @@ -1536,9 +1543,9 @@ } }, "node_modules/@remotion/eslint-config-flat/node_modules/brace-expansion": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.4.tgz", - "integrity": "sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg==", + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.7.tgz", + "integrity": "sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g==", "dev": true, "license": "MIT", "dependencies": { @@ -1869,9 +1876,6 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1885,9 +1889,6 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1901,9 +1902,6 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1917,9 +1915,6 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2935,9 +2930,10 @@ "dev": true }, "node_modules/baseline-browser-mapping": { - "version": "2.10.17", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.17.tgz", - "integrity": "sha512-HdrkN8eVG2CXxeifv/VdJ4A4RSra1DTW8dc/hdxzhGHN8QePs6gKaWM9pHPcpCoxYZJuOZ8drHmbdpLHjCYjLA==", + "version": "2.11.31", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.31.tgz", + "integrity": "sha512-b0k7wXlWjpuL/Uxb/pYlpjY0ej5BjAmurtPUk3eRGuloI4yjK32m8TiKUQ81l1ptcLjKS/KH2+uqIolZti1x4Q==", + "license": "Apache-2.0", "bin": { "baseline-browser-mapping": "dist/cli.cjs" }, @@ -2946,9 +2942,9 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz", - "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==", + "version": "1.1.21", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.21.tgz", + "integrity": "sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==", "dev": true, "license": "MIT", "dependencies": { @@ -2969,9 +2965,9 @@ } }, "node_modules/browserslist": { - "version": "4.28.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz", - "integrity": "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==", + "version": "4.29.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.29.4.tgz", + "integrity": "sha512-2TcbbiwXEq+N0kD36tykpCfyyQigUXmuwNQbnPp4Xk4PX9JOqVIKjJlIDjpH7uY6tmRGoAd+apeT1p60T8wsdA==", "funding": [ { "type": "opencollective", @@ -2986,12 +2982,13 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { - "baseline-browser-mapping": "^2.10.12", - "caniuse-lite": "^1.0.30001782", - "electron-to-chromium": "^1.5.328", - "node-releases": "^2.0.36", - "update-browserslist-db": "^1.2.3" + "baseline-browser-mapping": "^2.11.29", + "caniuse-lite": "^1.0.30001816", + "electron-to-chromium": "^1.5.459", + "node-releases": "^2.0.59", + "update-browserslist-db": "^1.3.4" }, "bin": { "browserslist": "cli.js" @@ -3026,9 +3023,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001787", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001787.tgz", - "integrity": "sha512-mNcrMN9KeI68u7muanUpEejSLghOKlVhRqS/Za2IeyGllJ9I9otGpR9g3nsw7n4W378TE/LyIteA0+/FOZm4Kg==", + "version": "1.0.30001819", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001819.tgz", + "integrity": "sha512-LFUqIIAwpzsIuevnKnsR9qnStBcgzPShTX61lBwN9uFkkf8o8zLiebEjbW8AYtZiF+1YKDWfdt/pWDtMuG8Xwg==", "funding": [ { "type": "opencollective", @@ -3042,7 +3039,8 @@ "type": "github", "url": "https://github.com/sponsors/ai" } - ] + ], + "license": "CC-BY-4.0" }, "node_modules/chalk": { "version": "4.1.2", @@ -3268,9 +3266,10 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.334", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.334.tgz", - "integrity": "sha512-mgjZAz7Jyx1SRCwEpy9wefDS7GvNPazLthHg8eQMJ76wBdGQQDW33TCrUTvQ4wzpmOrv2zrFoD3oNufMdyMpog==" + "version": "1.5.463", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.463.tgz", + "integrity": "sha512-nVWNU6ltFjopvOdD44J4zoBkgO0M+WZiFKKFV7EjebOH9z0KNphk6bCEjplXtJofL21ARIuuwWOCsFkBVklm6w==", + "license": "ISC" }, "node_modules/enhanced-resolve": { "version": "5.20.1", @@ -3364,6 +3363,7 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "license": "MIT", "engines": { "node": ">=6" } @@ -3614,9 +3614,9 @@ "dev": true }, "node_modules/fast-uri": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.5.tgz", - "integrity": "sha512-gHwA1O9LDIcKunMKhObS/HimwtehO1nPUECKAu5TpKgaO19fcWEl4bliWe1jWxVFvIXztJjjQ4L8XQ1EU9f7Jw==", + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.9.tgz", + "integrity": "sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==", "funding": [ { "type": "github", @@ -3964,9 +3964,9 @@ "license": "MIT" }, "node_modules/js-yaml": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz", - "integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.2.tgz", + "integrity": "sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==", "funding": [ { "type": "github", @@ -4487,9 +4487,9 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/nanoid": { - "version": "3.3.16", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.16.tgz", - "integrity": "sha512-bzlKTyNJ7+LdGIIwy8ijFpIqEQIvafahV7eYykJ8Cvh42EdJeODoJ6gUJXpQJvej1BddH8OqTXZNE/KfbWAu8Q==", + "version": "3.3.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", + "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==", "funding": [ { "type": "github", @@ -4526,9 +4526,13 @@ } }, "node_modules/node-releases": { - "version": "2.0.37", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.37.tgz", - "integrity": "sha512-1h5gKZCF+pO/o3Iqt5Jp7wc9rH3eJJ0+nh/CIoiRwjRxde/hAHyLPXYN4V3CqKAbiZPSeJFSWHmJsbkicta0Eg==" + "version": "2.0.60", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.60.tgz", + "integrity": "sha512-OmO8+GM1JUZqXET720VrJCwkjUCXmCMQm0Z3UDDRbfNLHS4NEAvY60j5jiFv0tkKw2PNNlqOLhahVmwJIOLDIQ==", + "license": "MIT", + "engines": { + "node": ">=18" + } }, "node_modules/npm-run-path": { "version": "4.0.1", @@ -4781,9 +4785,9 @@ } }, "node_modules/postcss-selector-parser": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.4.tgz", - "integrity": "sha512-HeP7D2wyhkR+XaK6v4W8oRF62Dsz4flyuczALJp61GckGm42u1saSSJ/0auvcBqxs3jMRFEcPK34At/0JBKdOg==", + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.7.tgz", + "integrity": "sha512-wWBro/7hJ40ye6TPiXkUQoXKCw23xSsjriUvqd7Uls9Sso3oLiON1flc18cCdnjgCRXw4fBVqUJJeOdDTh3P3g==", "license": "MIT", "dependencies": { "cssesc": "^3.0.0", @@ -5115,9 +5119,10 @@ } }, "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", + "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==", + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -5351,9 +5356,9 @@ "integrity": "sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg==" }, "node_modules/update-browserslist-db": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", - "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.4.tgz", + "integrity": "sha512-t8wonIOdQyOjtPd2VktlBu6QjTVTks6v8bSi7kd0r2Vll8TK1JYDZtRRdbmCHOAMphkZgrzK+L+vXK4pyZ8t4A==", "funding": [ { "type": "opencollective", @@ -5368,6 +5373,7 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { "escalade": "^3.2.0", "picocolors": "^1.1.1" diff --git a/docs/internal/architecture-video/package.json b/docs/internal/architecture-video/package.json index 0ab3661a60d..f98b416a9c4 100644 --- a/docs/internal/architecture-video/package.json +++ b/docs/internal/architecture-video/package.json @@ -32,8 +32,11 @@ "*.css" ], "overrides": { - "fast-uri": "^3.1.1", + "fast-uri": "^3.1.8", "ws": "^8.21.0", "esbuild": "^0.28.1" + }, + "engines": { + "node": "^22.23.4 || ^24.22.1 || >=26.12.1" } } diff --git a/harness/latency/runner/Cargo.lock b/harness/latency/runner/Cargo.lock index 730c1e7be00..febe791a98a 100644 --- a/harness/latency/runner/Cargo.lock +++ b/harness/latency/runner/Cargo.lock @@ -106,6 +106,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "aliasable" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd" + [[package]] name = "alloc-no-stdlib" version = "2.0.4" @@ -127,6 +133,29 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" +[[package]] +name = "allsorts-azul" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab097a7be305dd66b2b6917f5efb6b723129ce4b2cd11aa1a0afcc293c7dc08e" +dependencies = [ + "bitflags 2.13.1", + "brotli-decompressor", + "encoding_rs", + "enumflags2", + "flate2", + "glyph-names", + "log", + "ouroboros", + "pathfinder_geometry", + "rustc-hash 2.1.3", + "tinyvec", + "ucd-trie", + "unicode-canonical-combining-class", + "unicode-general-category", + "unicode-joining-type", +] + [[package]] name = "ambient-authority" version = "0.0.2" @@ -293,9 +322,9 @@ checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" [[package]] name = "aws-lc-rs" -version = "1.17.3" +version = "1.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00bdb5da18dac48ca2cc7cd4a98e533e8635a58e2361d13a1a4ee3888e0d72f1" +checksum = "faac5829c2b74c28f830747e7818ccfb684261b5f48a1118b1e2a13d36dfab13" dependencies = [ "aws-lc-sys", "untrusted 0.7.1", @@ -304,9 +333,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.43.0" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43103168cc76fe62678a375e722fc9cb3a0146159ac5828bc4f0dfd755c2224c" +checksum = "f1622d8446a2d4b2ce0c7eefc73dd43a99779028d5ee5c2dd8073a658ba8a2bc" dependencies = [ "cc", "cmake", @@ -560,6 +589,15 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-padding" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "710f1dd022ef4e93f8a438b4ba958de7f64308434fa6a87104481645cc30068b" +dependencies = [ + "hybrid-array", +] + [[package]] name = "bollard" version = "0.18.1" @@ -735,7 +773,7 @@ dependencies = [ "cap-primitives", "cap-std", "io-lifetimes 3.0.1", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -752,7 +790,7 @@ dependencies = [ "maybe-owned", "rustix 1.1.4", "rustix-linux-procfs", - "windows-sys 0.61.2", + "windows-sys 0.60.2", "winx", ] @@ -777,6 +815,15 @@ dependencies = [ "cipher 0.4.4", ] +[[package]] +name = "cbc" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce2dc9ee5f88d11e0beb842c88b33c8a5cf0d1329c4b19494af42b07dbfe8896" +dependencies = [ + "cipher 0.5.2", +] + [[package]] name = "cc" version = "1.4.0" @@ -818,9 +865,9 @@ checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" [[package]] name = "chacha20" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81" +checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06" dependencies = [ "cfg-if", "cpufeatures 0.3.0", @@ -1092,7 +1139,7 @@ dependencies = [ "cranelift-assembler-x64-meta", "cranelift-codegen-shared", "cranelift-srcgen", - "heck", + "heck 0.5.0", "pulley-interpreter", ] @@ -1452,7 +1499,7 @@ dependencies = [ "libc", "option-ext", "redox_users 0.5.2", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -1498,6 +1545,15 @@ dependencies = [ "cipher 0.4.4", ] +[[package]] +name = "ecb" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26f2a8b3e564eba0877223dc343703ad0385794e882e6d13f3a4dd5c6b1f41ac" +dependencies = [ + "cipher 0.5.2", +] + [[package]] name = "ed25519" version = "2.2.3" @@ -1599,7 +1655,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -1996,6 +2052,12 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b" +[[package]] +name = "glyph-names" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3531d702d6c1a3ba92a5fb55a404c7b8c476c8e7ca249951077afcbe4bc807f" + [[package]] name = "h2" version = "0.3.27" @@ -2017,9 +2079,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.15" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cb093c84e8bd9b188d4c4a8cb6579fc016968d14c99882163cd3ff402a4f155" +checksum = "a9f37a958b41b3b19ee2707c06439c0e9e547e847223eb791ecb0cb821c65e27" dependencies = [ "atomic-waker", "bytes", @@ -2081,6 +2143,12 @@ dependencies = [ "hashbrown 0.14.5", ] +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + [[package]] name = "heck" version = "0.5.0" @@ -2260,7 +2328,7 @@ dependencies = [ "bytes", "futures-channel", "futures-core", - "h2 0.4.15", + "h2 0.4.16", "http 1.5.0", "http-body 1.1.0", "httparse", @@ -2313,12 +2381,12 @@ dependencies = [ "http 1.5.0", "hyper 1.11.0", "hyper-util", - "rustls 0.23.43", + "rustls 0.23.46", "rustls-native-certs 0.8.4", "tokio", "tokio-rustls 0.26.4", "tower-service", - "webpki-roots 1.0.9", + "webpki-roots 1.0.10", ] [[package]] @@ -2350,7 +2418,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2 0.6.5", + "socket2 0.5.10", "system-configuration", "tokio", "tower-service", @@ -2535,7 +2603,7 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" dependencies = [ - "block-padding", + "block-padding 0.3.3", "generic-array", ] @@ -2545,6 +2613,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4250ce6452e92010fdf7268ccc5d14faa80bb12fc741938534c58f16804e03c7" dependencies = [ + "block-padding 0.4.2", "hybrid-array", ] @@ -2582,6 +2651,7 @@ version = "0.1.0" dependencies = [ "async-trait", "blake3", + "futures", "ironclaw_common", "ironclaw_host_api", "ironclaw_loop_contracts", @@ -2696,6 +2766,7 @@ dependencies = [ "serde", "serde_json", "sha2 0.11.0", + "static_assertions", "subtle", "thiserror 2.0.19", "tokio", @@ -2815,6 +2886,7 @@ dependencies = [ "ironclaw_resources", "ironclaw_runtime_policy", "ironclaw_safety", + "ironclaw_sandbox", "ironclaw_secrets", "ironclaw_skills", "ironclaw_threads", @@ -2823,6 +2895,7 @@ dependencies = [ "ironclaw_trust", "ironclaw_turn_runner", "ironclaw_turns", + "ironclaw_web_app", "libc", "libsql", "lru", @@ -2876,6 +2949,17 @@ dependencies = [ "uuid", ] +[[package]] +name = "ironclaw_documents" +version = "0.1.0" +dependencies = [ + "printpdf", + "quick-xml", + "serde", + "thiserror 2.0.19", + "zip", +] + [[package]] name = "ironclaw_event_log" version = "0.1.0" @@ -2912,7 +2996,7 @@ dependencies = [ "ironclaw_filesystem", "ironclaw_host_api", "libsql", - "rustls 0.23.43", + "rustls 0.23.46", "rustls-native-certs 0.8.4", "secrecy", "serde", @@ -2924,7 +3008,7 @@ dependencies = [ "tokio-postgres-rustls", "tracing", "urlencoding", - "webpki-roots 1.0.9", + "webpki-roots 1.0.10", ] [[package]] @@ -2949,10 +3033,12 @@ dependencies = [ "async-trait", "chrono", "ironclaw_host_api", + "secrecy", "serde", "serde_json", "thiserror 2.0.19", "uuid", + "zeroize", ] [[package]] @@ -3022,6 +3108,7 @@ dependencies = [ "base64 0.23.1", "chrono", "ed25519-dalek", + "futures", "hex", "hmac 0.13.0", "ironclaw_approvals", @@ -3076,6 +3163,7 @@ dependencies = [ "futures-util", "glob", "ironclaw_auth", + "ironclaw_documents", "ironclaw_extractors", "ironclaw_filesystem", "ironclaw_host_api", @@ -3181,6 +3269,7 @@ name = "ironclaw_host_runtime" version = "0.1.0" dependencies = [ "async-trait", + "aws-lc-rs", "base64 0.23.1", "chrono", "chrono-tz", @@ -3758,6 +3847,7 @@ dependencies = [ "ironclaw_safety", "libsql", "serde", + "serde_json", "sha2 0.11.0", "thiserror 2.0.19", "tokio", @@ -3859,6 +3949,24 @@ dependencies = [ "wasmtime", ] +[[package]] +name = "ironclaw_web_app" +version = "0.1.0" +dependencies = [ + "async-trait", + "aws-lc-rs", + "base64 0.23.1", + "ironclaw_filesystem", + "ironclaw_host_api", + "serde", + "serde_json", + "sha2 0.11.0", + "thiserror 2.0.19", + "tracing", + "url", + "uuid", +] + [[package]] name = "ironclaw_webui" version = "0.1.0" @@ -4271,7 +4379,7 @@ dependencies = [ "async-stream", "async-trait", "bytes", - "cbc", + "cbc 0.1.2", "libsql-rusqlite", "libsql-sys", "parking_lot", @@ -4328,8 +4436,8 @@ checksum = "25aab26d99567469098e64a02f42679f8965c6401263eefa31d8f2dcc37a221c" dependencies = [ "aes 0.8.4", "bitflags 2.13.1", - "cbc", - "ecb", + "cbc 0.1.2", + "ecb 0.1.2", "encoding_rs", "flate2", "getrandom 0.4.3", @@ -4344,7 +4452,33 @@ dependencies = [ "stringprep", "thiserror 2.0.19", "ttf-parser", - "weezl", + "weezl 0.1.12", +] + +[[package]] +name = "lopdf" +version = "0.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e2ec995d822e05cabc3f06d196ee43650af3fe4fe38012cacb35e0c3d113b68" +dependencies = [ + "aes 0.9.2", + "bitflags 2.13.1", + "cbc 0.2.1", + "ecb 0.2.1", + "encoding_rs", + "flate2", + "getrandom 0.4.3", + "indexmap 2.14.0", + "itoa", + "log", + "md-5 0.11.0", + "nom 8.0.0", + "rand 0.10.2", + "rangemap", + "sha2 0.11.0", + "stringprep", + "thiserror 2.0.19", + "weezl 0.2.1", ] [[package]] @@ -4525,7 +4659,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -4714,6 +4848,30 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "ouroboros" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0f050db9c44b97a94723127e6be766ac5c340c48f2c4bb3ffa11713744be59" +dependencies = [ + "aliasable", + "ouroboros_macro", + "static_assertions", +] + +[[package]] +name = "ouroboros_macro" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c7028bdd3d43083f6d8d4d5187680d0d3560d54df4cc9d752005268b41e64d0" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "proc-macro2-diagnostics", + "quote", + "syn 2.0.119", +] + [[package]] name = "outref" version = "0.5.2" @@ -4749,6 +4907,25 @@ dependencies = [ "windows-link", ] +[[package]] +name = "pathfinder_geometry" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b7e7b4ea703700ce73ebf128e1450eb69c3a8329199ffbfb9b2a0418e5ad3" +dependencies = [ + "log", + "pathfinder_simd", +] + +[[package]] +name = "pathfinder_simd" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4500030c302e4af1d423f36f3b958d1aecb6c04184356ed5a833bf6b60435777" +dependencies = [ + "rustc_version", +] + [[package]] name = "pdf-extract" version = "0.12.0" @@ -4760,7 +4937,7 @@ dependencies = [ "encoding_rs", "euclid", "log", - "lopdf", + "lopdf 0.42.0", "postscript", "type1-encoding-parser", "unicode-normalization", @@ -5031,6 +5208,27 @@ dependencies = [ "syn 2.0.119", ] +[[package]] +name = "printpdf" +version = "0.12.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95d50369c5e18e18d4716bd855172db3a70f9e82c966687ae051ea58138f285c" +dependencies = [ + "allsorts-azul", + "base64 0.22.1", + "flate2", + "getrandom 0.4.3", + "lopdf 0.44.0", + "serde", + "serde_derive", + "serde_json", + "smallvec", + "time", + "wasm-bindgen", + "wasm-bindgen-futures", + "weezl 0.2.1", +] + [[package]] name = "proc-macro-crate" version = "3.5.0" @@ -5049,6 +5247,19 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "proc-macro2-diagnostics" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", + "version_check", + "yansi", +] + [[package]] name = "prost" version = "0.12.6" @@ -5115,6 +5326,15 @@ dependencies = [ "syn 2.0.119", ] +[[package]] +name = "quick-xml" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1" +dependencies = [ + "memchr", +] + [[package]] name = "quinn" version = "0.11.11" @@ -5127,8 +5347,8 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash 2.1.3", - "rustls 0.23.43", - "socket2 0.6.5", + "rustls 0.23.46", + "socket2 0.5.10", "thiserror 2.0.19", "tokio", "tracing", @@ -5137,9 +5357,9 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.16" +version = "0.11.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f4bfc015262b9df63c8845072ce59068853ff5872180c2ce2f13038b970e560" +checksum = "0e750cca55fe4f0439a15d0bb529da9651e79993e8e72c61a899a36d462befbe" dependencies = [ "aws-lc-rs", "bytes", @@ -5149,7 +5369,7 @@ dependencies = [ "rand_pcg", "ring", "rustc-hash 2.1.3", - "rustls 0.23.43", + "rustls 0.23.46", "rustls-pki-types", "slab", "thiserror 2.0.19", @@ -5167,9 +5387,9 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2 0.6.5", + "socket2 0.5.10", "tracing", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -5467,7 +5687,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.43", + "rustls 0.23.46", "rustls-native-certs 0.8.4", "rustls-pki-types", "serde", @@ -5485,7 +5705,7 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams 0.4.2", "web-sys", - "webpki-roots 1.0.9", + "webpki-roots 1.0.10", ] [[package]] @@ -5499,7 +5719,7 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2 0.4.15", + "h2 0.4.16", "http 1.5.0", "http-body 1.1.0", "http-body-util", @@ -5513,7 +5733,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.43", + "rustls 0.23.46", "rustls-pki-types", "rustls-platform-verifier", "serde", @@ -5696,7 +5916,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.12.1", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -5718,22 +5938,22 @@ dependencies = [ "log", "ring", "rustls-pki-types", - "rustls-webpki 0.102.8", + "rustls-webpki 0.102.9+security.emudhra.1", "subtle", "zeroize", ] [[package]] name = "rustls" -version = "0.23.43" +version = "0.23.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0283386ce02abc0151e1761d08802dfe86c173b0b494af5cbc086574e453da06" +checksum = "48e13bd8c0e9365c43cfa5c9e8f9ad49d3c8444926c9aac819e0e4dc503c8fdf" dependencies = [ "aws-lc-rs", "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.103.13", + "rustls-webpki 0.103.16", "subtle", "zeroize", ] @@ -5793,14 +6013,14 @@ dependencies = [ "jni", "log", "once_cell", - "rustls 0.23.43", + "rustls 0.23.46", "rustls-native-certs 0.8.4", "rustls-platform-verifier-android", - "rustls-webpki 0.103.13", + "rustls-webpki 0.103.16", "security-framework 3.7.0", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -5811,9 +6031,7 @@ checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" [[package]] name = "rustls-webpki" -version = "0.102.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +version = "0.102.9+security.emudhra.1" dependencies = [ "ring", "rustls-pki-types", @@ -5822,9 +6040,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.13" +version = "0.103.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" +checksum = "4443b1b6d39d7c663139942cc4558262562d2c84123bb6282ef177009ca8b281" dependencies = [ "aws-lc-rs", "ring", @@ -5934,7 +6152,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a62d7f86047af0077255a29494136b9aaaf697c76ff70b8e49cded4e2623c14" dependencies = [ "aes 0.8.4", - "cbc", + "cbc 0.1.2", "futures-util", "generic-array", "getrandom 0.2.17", @@ -6292,7 +6510,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -6343,7 +6561,7 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab85eea0270ee17587ed4156089e10b9e6880ee688791d45a905f5b1ca36f664" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", "syn 2.0.119", @@ -6454,10 +6672,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.4.3", + "getrandom 0.3.4", "once_cell", "rustix 1.1.4", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -6665,7 +6883,7 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c2ad44aa0ae96db89c4742212ed41645b2f597311ff6e1945542a4d9fadc2fb" dependencies = [ - "rustls 0.23.43", + "rustls 0.23.46", "sha2 0.11.0", "tokio", "tokio-postgres", @@ -6690,7 +6908,7 @@ version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" dependencies = [ - "rustls 0.23.43", + "rustls 0.23.46", "tokio", ] @@ -6713,7 +6931,7 @@ checksum = "c6989540ced10490aaf14e6bad2e3d33728a2813310a0c71d1574304c49631cd" dependencies = [ "futures-util", "log", - "rustls 0.23.43", + "rustls 0.23.46", "rustls-pki-types", "tokio", "tokio-rustls 0.26.4", @@ -7075,7 +7293,7 @@ dependencies = [ "httparse", "log", "rand 0.8.7", - "rustls 0.23.43", + "rustls 0.23.46", "rustls-pki-types", "sha1", "thiserror 1.0.69", @@ -7119,6 +7337,12 @@ version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" +[[package]] +name = "ucd-trie" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" + [[package]] name = "uds_windows" version = "1.2.1" @@ -7127,7 +7351,7 @@ checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e" dependencies = [ "memoffset", "tempfile", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -7162,6 +7386,12 @@ version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" +[[package]] +name = "unicode-canonical-combining-class" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41c99d5174052d02ce765418e826597a1be18f32c114e35d9e22f92390239561" + [[package]] name = "unicode-general-category" version = "1.1.0" @@ -7174,6 +7404,12 @@ version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" +[[package]] +name = "unicode-joining-type" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8d00a78170970967fdb83f9d49b92f959ab2bb829186b113e4f4604ad98e180" + [[package]] name = "unicode-normalization" version = "0.1.25" @@ -7409,7 +7645,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d59b710751a35d54732a63851cdfacbfb2266b7160ce174faf269d3f4e84e31b" dependencies = [ "anyhow", - "heck", + "heck 0.5.0", "indexmap 2.14.0", "log", "petgraph", @@ -7735,7 +7971,7 @@ checksum = "c456ad6e81e0f46abfeca43687d18ea15e289c395b262ea6e0023e2682e088be" dependencies = [ "anyhow", "bitflags 2.13.1", - "heck", + "heck 0.5.0", "indexmap 2.14.0", "wit-parser", ] @@ -7822,9 +8058,9 @@ dependencies = [ [[package]] name = "webpki-root-certs" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b96554aa2acc8ccdb7e1c9a58a7a68dd5d13bccc69cd124cb09406db612a1c9b" +checksum = "58ec80e73fd8baf57bf0d9615554c75348bda990d6d5bbeab964dd068319fecb" dependencies = [ "rustls-pki-types", ] @@ -7835,14 +8071,14 @@ version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" dependencies = [ - "webpki-roots 1.0.9", + "webpki-roots 1.0.10", ] [[package]] name = "webpki-roots" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dcd9d09a39985f5344844e66b0c530a33843579125f23e21e9f0f220850f22a" +checksum = "1c1c8e20c8a38fc7d65abfe74eb7280e4aa667e8eec8bc84996d2874810748d9" dependencies = [ "rustls-pki-types", ] @@ -7853,6 +8089,12 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" +[[package]] +name = "weezl" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4ca08e5ef825b65b056d9efbd95c8750683f0a6d0466d02e96dc2e4e360f3d2" + [[package]] name = "which" version = "4.4.2" @@ -7900,7 +8142,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -8242,6 +8484,12 @@ dependencies = [ "time", ] +[[package]] +name = "yansi" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" + [[package]] name = "yasna" version = "0.6.0" diff --git a/harness/latency/runner/Cargo.toml b/harness/latency/runner/Cargo.toml index 52a2f2dde8c..eb4722b7471 100644 --- a/harness/latency/runner/Cargo.toml +++ b/harness/latency/runner/Cargo.toml @@ -34,3 +34,7 @@ tokio = { version = "1", features = ["full"] } tokio-postgres = { version = "0.7", features = ["with-serde_json-1"] } tower = { version = "0.5", features = ["util"] } uuid = { version = "1", features = ["v4"] } + +# Match the application verifier patch in this standalone workspace. +[patch.crates-io] +webpki-legacy = { package = "rustls-webpki", path = "../../../vendor/rustls-webpki-legacy" } diff --git a/scripts/ci/reborn_pr_test_plan.py b/scripts/ci/reborn_pr_test_plan.py index 0263ec21b1b..b380f99b38a 100644 --- a/scripts/ci/reborn_pr_test_plan.py +++ b/scripts/ci/reborn_pr_test_plan.py @@ -787,6 +787,7 @@ def build_plan( qa_evidence_changed = False nextest_config_changed = False shared_reborn_action_changed = False + vendored_dependency_changed = False reasons: list[str] = [] root_inventory = _root_test_partitions() integration_inventory = _integration_test_lanes() @@ -804,6 +805,11 @@ def build_plan( ) for path in sorted(paths): + if path.startswith("vendor/"): + # Cargo path patches participate in the production dependency + # graph but are not workspace members. Exercise every consumer. + vendored_dependency_changed = True + continue if path == "Cargo.lock": if lockfile_manifest_owned: reasons.append( @@ -1131,6 +1137,11 @@ def build_plan( raise ValueError(f"unmapped test or CI path: {path}") raise ValueError(f"unclassified pull-request path: {path}") + if vendored_dependency_changed: + return _full_plan( + "vendored production dependency changed; this PR runs the exhaustive plan", + canonical_packages, + ) if nextest_config_changed: return _full_plan( "nextest runner config changed; this PR runs the exhaustive plan", diff --git a/scripts/ci/test_reborn_pr_test_plan.py b/scripts/ci/test_reborn_pr_test_plan.py index fa1f6ddf500..cf6f709d3aa 100644 --- a/scripts/ci/test_reborn_pr_test_plan.py +++ b/scripts/ci/test_reborn_pr_test_plan.py @@ -941,6 +941,22 @@ def test_unclassified_build_input_fails_fast(self) -> None: with self.assertRaisesRegex(ValueError, "unclassified pull-request path"): self.plan("pull_request", ["Makefile"]) + def test_vendored_dependency_widens_to_exhaustive_plan(self) -> None: + for path in ( + "vendor/rustls-webpki-legacy/src/verify_cert.rs", + "vendor/PATCHES.md", + ): + with self.subTest(path=path): + plan = self.plan("pull_request", [path]) + self.assertEqual(plan["mode"], "full") + self.assertEqual(plan["root_partitions"], [0, 1, 2, 3]) + self.assertEqual(plan["integration_lanes"], [0, 1, 2, 3, "groups"]) + self.assertIn("vendored production dependency changed", plan["reasons"][0]) + + # A known broad dependency change must not hide unknown inputs. + with self.assertRaisesRegex(ValueError, "unclassified pull-request path"): + self.plan("pull_request", ["vendor/PATCHES.md", "Makefile"]) + def test_nextest_config_widens_to_exhaustive_plan(self) -> None: """`.config/nextest.toml` is runner config every test lane reads. diff --git a/tests/e2e/ironclaw_e2e.egg-info/PKG-INFO b/tests/e2e/ironclaw_e2e.egg-info/PKG-INFO index 6340b43c745..3bbef42dd2b 100644 --- a/tests/e2e/ironclaw_e2e.egg-info/PKG-INFO +++ b/tests/e2e/ironclaw_e2e.egg-info/PKG-INFO @@ -6,10 +6,11 @@ Requires-Dist: pytest>=8.0 Requires-Dist: pytest-asyncio>=0.23 Requires-Dist: pytest-playwright>=0.5 Requires-Dist: pytest-timeout>=2.3 -Requires-Dist: playwright>=1.45 -Requires-Dist: aiohttp>=3.9 +Requires-Dist: playwright>=1.64.1 +Requires-Dist: aiohttp>=3.14.4 Requires-Dist: httpx>=0.27 -Requires-Dist: cryptography>=42.0 +Requires-Dist: certifi>=2026.10.19 +Requires-Dist: cryptography>=50.0.2 Provides-Extra: vision Requires-Dist: anthropic>=0.40; extra == "vision" Provides-Extra: telegram diff --git a/tests/e2e/ironclaw_e2e.egg-info/requires.txt b/tests/e2e/ironclaw_e2e.egg-info/requires.txt index d18aaff0528..f24582723ec 100644 --- a/tests/e2e/ironclaw_e2e.egg-info/requires.txt +++ b/tests/e2e/ironclaw_e2e.egg-info/requires.txt @@ -2,10 +2,11 @@ pytest>=8.0 pytest-asyncio>=0.23 pytest-playwright>=0.5 pytest-timeout>=2.3 -playwright>=1.45 -aiohttp>=3.9 +playwright>=1.64.1 +aiohttp>=3.14.4 httpx>=0.27 -cryptography>=42.0 +certifi>=2026.10.19 +cryptography>=50.0.2 [telegram] telethon>=1.40 diff --git a/tests/e2e/pyproject.toml b/tests/e2e/pyproject.toml index 3e39a3fdb12..a732407e62c 100644 --- a/tests/e2e/pyproject.toml +++ b/tests/e2e/pyproject.toml @@ -7,10 +7,11 @@ dependencies = [ "pytest-asyncio>=0.23", "pytest-playwright>=0.5", "pytest-timeout>=2.3", - "playwright>=1.45", - "aiohttp>=3.9", + "playwright>=1.64.1", + "aiohttp>=3.14.4", "httpx>=0.27", - "cryptography>=42.0", + "certifi>=2026.10.19", + "cryptography>=50.0.2", ] [project.optional-dependencies] @@ -53,3 +54,7 @@ xfail_strict = true markers = [ "shared_world: replays journeys against one shared, un-reset provider world", ] + +[build-system] +requires = ["setuptools>=84.2.1", "wheel>=0.46.2"] +build-backend = "setuptools.build_meta" diff --git a/tests/e2e/uv.lock b/tests/e2e/uv.lock index 84ea58a896a..877f2ced824 100644 --- a/tests/e2e/uv.lock +++ b/tests/e2e/uv.lock @@ -1,5 +1,5 @@ version = 1 -revision = 3 +revision = 5 requires-python = ">=3.11" [[package]] @@ -13,7 +13,7 @@ wheels = [ [[package]] name = "aiohttp" -version = "3.14.3" +version = "3.14.5" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "aiohappyeyeballs" }, @@ -25,108 +25,150 @@ dependencies = [ { name = "typing-extensions", marker = "python_full_version < '3.13'" }, { name = "yarl" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/58/d9/22ce5786ac0c1653ae8b6c23bded02c1686d11f0dbb45b31ce128e0df985/aiohttp-3.14.3.tar.gz", hash = "sha256:9491196535a88924a60afd5b5f434b5b203b6cc616250878dbdb223a8f7844bc", size = 7971213, upload-time = "2026-07-23T01:57:27.037Z" } +sdist = { url = "https://files.pythonhosted.org/packages/6c/4c/bdccd81e9ee225b69c60e7766c9a5b05364f118f4d383713b89a682d772d/aiohttp-3.14.5.tar.gz", hash = "sha256:5558a7f5a05af9ecf744af91e5baefc436f93c9333e656c27ec253f9a6bbe178", size = 8078052, upload-time = "2026-10-11T01:05:12.408Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/f8/5c/b3e4ff8ad43a8afef9602c5e90285936da1beaea8b029016b793891f03c3/aiohttp-3.14.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:e568e14940c09955aa51f4e645b6daa18a581c5dcfcd73744dcc86a856e3ced3", size = 764250, upload-time = "2026-07-23T01:52:48.525Z" }, - { url = "https://files.pythonhosted.org/packages/0e/da/f1b384465e51449d844056b75070461da03a9a23e6c1747003695bf4172a/aiohttp-3.14.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:54cfcdee2770dac994417cbb0ee1f3eb0e7cb6b30c79bf44f2c02ff79ec5124a", size = 516281, upload-time = "2026-07-23T01:52:51.047Z" }, - { url = "https://files.pythonhosted.org/packages/b9/3f/01264f820ee2e3712a827892b1cd6ff80f3300c1fcbffbb45714a915d47a/aiohttp-3.14.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:21c016079415ed3fd676963e9793700a566d85dbbd6bfc564b9b2d209147dcc8", size = 514742, upload-time = "2026-07-23T01:52:53.779Z" }, - { url = "https://files.pythonhosted.org/packages/9e/8d/a71c6f2db52ac1ed142b133f7feddaa6b70539c3f4de24d7e226c95b794c/aiohttp-3.14.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d6088ec9894113802bddb3c09e974929aed2c7b3a8c456219b8aab4481f1a239", size = 1780613, upload-time = "2026-07-23T01:52:56.948Z" }, - { url = "https://files.pythonhosted.org/packages/a5/11/3dd9b3fb3a170f6ec9011b5291d876a6fab4086714c9e158600edf01b4fd/aiohttp-3.14.3-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:16ea7e24c309fb7c0bbd505d149abe4fe4dccfb8db911db7dbec0921bc889a6f", size = 1737688, upload-time = "2026-07-23T01:52:59.294Z" }, - { url = "https://files.pythonhosted.org/packages/6d/3e/834c26918be7d88068822b40e0db30fca50b5f4fe79104aa16a93f1d74e6/aiohttp-3.14.3-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:56f355e79f71aef2a85c80305cc915f894b170dba76de5fe84f6351939b83c06", size = 1845742, upload-time = "2026-07-23T01:53:01.641Z" }, - { url = "https://files.pythonhosted.org/packages/cc/c9/49ab8572df7d66bc13d11e31f781292badb04180dd87ba98733066c6aed7/aiohttp-3.14.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:18c441d0a8fca6de8d1f546849b9f0ab20d435993e2c5b59562b2fae6be2f929", size = 1928412, upload-time = "2026-07-23T01:53:04.018Z" }, - { url = "https://files.pythonhosted.org/packages/a5/b9/2b8f0c0ce09c87a1daf80fd483431b56b1435d3f62789bc86f572e1245de/aiohttp-3.14.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:53e7b4ce82b54a8bcc71b3b67a5cbd177ca1d7f592cbc92cd38b7349f73482db", size = 1786220, upload-time = "2026-07-23T01:53:06.481Z" }, - { url = "https://files.pythonhosted.org/packages/85/00/9c45f81de11710460edfa1dc81317b6e882703b160926c879a9d20da9fcc/aiohttp-3.14.3-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f55119f7bf25f49ed210f6096090715da24f2943c62102448915fde3c62877ce", size = 1637231, upload-time = "2026-07-23T01:53:10.258Z" }, - { url = "https://files.pythonhosted.org/packages/19/ce/967d628e910756f3539c6107cb7844a1b69440dcb3029a5ee7871b09ab63/aiohttp-3.14.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:9aa6e61fdf20105c4144e755bd586008ff450791d67b1c8146fdc15959c4d51c", size = 1753161, upload-time = "2026-07-23T01:53:13.817Z" }, - { url = "https://files.pythonhosted.org/packages/11/b2/0c3d4114f0aee4f580f5b3b4eb71b24d7a23b834ea506a4dfebe76513f35/aiohttp-3.14.3-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:ccd4893707b3e2a13e39c90d43cf80edf2e4d0457935bcc103bf2346214c3f15", size = 1756356, upload-time = "2026-07-23T01:53:16.211Z" }, - { url = "https://files.pythonhosted.org/packages/63/5d/99e7d91c82f1399d1ae2a854e080bd1493fbc31e5e959dbc4ec33dac3bec/aiohttp-3.14.3-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:b2466434105a4e03113c36ec775cc2ebe6676b62eae326fa670bb607ef788c1c", size = 1819846, upload-time = "2026-07-23T01:53:18.289Z" }, - { url = "https://files.pythonhosted.org/packages/ad/05/d5e1cb6480eeffd3f901d40a2c5e2d1e7effdc797837da3b490272699f13/aiohttp-3.14.3-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:ba59d59aba08ac02fc03b0c8983ccd5ee39a199d0552ce9e6d2b4845b34d59ae", size = 1628531, upload-time = "2026-07-23T01:53:23.86Z" }, - { url = "https://files.pythonhosted.org/packages/c9/90/b934682bcaefae18a9e04f3dff5b68522ba810906358ae5029b68110ea3b/aiohttp-3.14.3-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:ed099d105449c4f9e84f24af203cd131349d4761d8813fa7e02c32e7128cd910", size = 1832712, upload-time = "2026-07-23T01:53:27.551Z" }, - { url = "https://files.pythonhosted.org/packages/21/df/6061679faaf81fac746e7307c7adb71e858071a5d34c27583afefc64f543/aiohttp-3.14.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:152516815ef926786a0b6ae2b8f1fd2e0c71582dee0b435636865316fd4891b7", size = 1775014, upload-time = "2026-07-23T01:53:30.223Z" }, - { url = "https://files.pythonhosted.org/packages/8a/1d/f854878bbc69b88faefe924b619a34a6f59ec05fd387c77690667eaa75eb/aiohttp-3.14.3-cp311-cp311-win32.whl", hash = "sha256:a4af35c443e0b1a1bd6a8af3f3485d7fda15c142751a00f3ff8090f0b93346fa", size = 456006, upload-time = "2026-07-23T01:53:34.97Z" }, - { url = "https://files.pythonhosted.org/packages/73/0c/2af9d1674baccd1dbd47282a93d660a22e57ef6167c856deb24b4214fbab/aiohttp-3.14.3-cp311-cp311-win_amd64.whl", hash = "sha256:e1e74298bab6ee0d6e749ed4fd1901c7e604bdda32c03d787a2cc71c46d0433d", size = 481069, upload-time = "2026-07-23T01:53:39.673Z" }, - { url = "https://files.pythonhosted.org/packages/8e/76/88401ff3fc95e85c5fc38d588f36f55e61ecb64343b2bc8d69326f453cc0/aiohttp-3.14.3-cp311-cp311-win_arm64.whl", hash = "sha256:03cd2bde3d7f085b64e549c985f4bb928cad7e8ecf5323bfca320db548d81b39", size = 453021, upload-time = "2026-07-23T01:53:43.749Z" }, - { url = "https://files.pythonhosted.org/packages/18/d4/eb96299230e20acf2efae207cb8d69051f1f68e357e5ea5e479bf6fb097a/aiohttp-3.14.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:39aded8c7f3b935b54aab1d8d73c70ec0ee2d3ec3b943e0e86611bc150ba47f5", size = 754690, upload-time = "2026-07-23T01:53:47.332Z" }, - { url = "https://files.pythonhosted.org/packages/88/11/e7a70a209eb9a067c0d3212b518a0134e3484f5178c7533878b6b514d469/aiohttp-3.14.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:5bcb6ff3fdab1258a192679ff1a05d44f59626430aa05cd1a9d2447423599228", size = 509484, upload-time = "2026-07-23T01:53:51.159Z" }, - { url = "https://files.pythonhosted.org/packages/30/07/4bbc222cc8dbe31d4c3e8a5baad2286e4d42026ac0c570027b89afce6344/aiohttp-3.14.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:617105e2c3018ee38d0c8ce5ee3c84f621a6d8b9f723202aacaff28449ca91ee", size = 511949, upload-time = "2026-07-23T01:53:55.083Z" }, - { url = "https://files.pythonhosted.org/packages/54/b9/42e74c46b7b7c794b995bbc1f573fb48950c38b19d8600c62a6804ee2d67/aiohttp-3.14.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f631fe87a6f30df5fbe6d79640b25e4cffb38c31c7fb6f10871517b84b0f8c1a", size = 1765282, upload-time = "2026-07-23T01:53:59.662Z" }, - { url = "https://files.pythonhosted.org/packages/6b/ed/62bc4d74363ad346d518e0720363a949f63e2e23439a79eb5813d4d29bb3/aiohttp-3.14.3-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:a94dbaae5ae27bd849c93570669bff91e0510f33a80805738e3de72a7be0447b", size = 1741511, upload-time = "2026-07-23T01:54:04.063Z" }, - { url = "https://files.pythonhosted.org/packages/d0/9f/181e8a8bc79e47d13c7fc4540bd7a3b729d9505609c61f392a8dd2fbfe55/aiohttp-3.14.3-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8f2f1c4c032c7cedd7d8da6f54c97b70266c6570c3108d3fdffee7188bb70529", size = 1810680, upload-time = "2026-07-23T01:54:09.882Z" }, - { url = "https://files.pythonhosted.org/packages/5c/9a/dec94d6ad694552fe3424e3f1928d7a606a5d9d9433a04e7ecdd9d38ae7f/aiohttp-3.14.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:ea05e1f97ceea523942d9b2a7d7c0359d781d683d6b043f5943a602b14da4787", size = 1905646, upload-time = "2026-07-23T01:54:13.475Z" }, - { url = "https://files.pythonhosted.org/packages/52/b7/7cd31f29d6055bd711ae6e669367fba6f5ae9de463910a793e30556a8db7/aiohttp-3.14.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:543906c127fb1d929b95076db19b83fa2d46751006ff1e23b093aa5ac4d8db42", size = 1792122, upload-time = "2026-07-23T01:54:15.752Z" }, - { url = "https://files.pythonhosted.org/packages/66/73/10b1ef93afa61f4963c746257b70ced619cf31a4798671de5fdb2608501d/aiohttp-3.14.3-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0a5ff2dfbb9ce645fa5b8ef3e02c6c0b9cc3f6030ff863d0c51fffc50cb5541b", size = 1591127, upload-time = "2026-07-23T01:54:19.489Z" }, - { url = "https://files.pythonhosted.org/packages/49/ed/3b203fa6de1b338c14acdc06bf6ca9b043b7944f005966958c2ced932cde/aiohttp-3.14.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:041badb8f84396357c4d3ad26de6afd7a32b112f43d3c63045c0c8278cfd2043", size = 1725210, upload-time = "2026-07-23T01:54:24.129Z" }, - { url = "https://files.pythonhosted.org/packages/28/b7/1c2aab8c706436dcc28598452488ac9cd7c409da815237c28c27d58993e6/aiohttp-3.14.3-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:530125ee1163c4219af35dc3aa1206e541e7b31b6efc1a3f93b70a136f65d427", size = 1764848, upload-time = "2026-07-23T01:54:27.973Z" }, - { url = "https://files.pythonhosted.org/packages/54/50/94c28f08b131c4bf10984ea2c7a536c9920608bb2d6e7f95642c30cc87b7/aiohttp-3.14.3-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c8653fd547c93a61aadc612007790f5555cdd18946fa48cf45e26d8ea4ea473d", size = 1777102, upload-time = "2026-07-23T01:54:31.775Z" }, - { url = "https://files.pythonhosted.org/packages/13/d4/e7d09ba7d345fb2d74440fd2fa033c5e079fac05552927705986f41a364f/aiohttp-3.14.3-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:89176250f686cb9853c0fb7ead90e639e915b84a6f43eedc2a4e7ec21f1037f0", size = 1580205, upload-time = "2026-07-23T01:54:34.518Z" }, - { url = "https://files.pythonhosted.org/packages/a3/84/072a91d68e1e1eb587985b54baab94221277f877e8ef274fc213a0ceae28/aiohttp-3.14.3-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:3a26434dafe408229ff3403458ca58de24fb51936504decac49ce6755f77e59d", size = 1797219, upload-time = "2026-07-23T01:54:36.995Z" }, - { url = "https://files.pythonhosted.org/packages/e0/eb/aad34e897e668424d6e995da5dff8a4a09af93363d3392488772957a63aa/aiohttp-3.14.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:d1558173930a5a8d3069cee5c92fc91c87c4dbcb099debbb3622053717145a19", size = 1768629, upload-time = "2026-07-23T01:54:40.103Z" }, - { url = "https://files.pythonhosted.org/packages/b6/2b/6bb88ddba0fecd9122aa3ebcad25996cf6c083a4a7040dbb3a4f97972af6/aiohttp-3.14.3-cp312-cp312-win32.whl", hash = "sha256:16100ad3ab8d649fdfbee87602d9d2dcdca9df0b9eda8a1b5fdc0d41f96da559", size = 451481, upload-time = "2026-07-23T01:54:42.547Z" }, - { url = "https://files.pythonhosted.org/packages/76/9b/f2f8f108da17ecef2cc3efc424e8b7ad3782b1a8360f7b8eae8ced84f6ea/aiohttp-3.14.3-cp312-cp312-win_amd64.whl", hash = "sha256:33a2d7c28d33797a2e99923dffa63f83d908a19b6bf26cfe80fa790aa5e1a75a", size = 476845, upload-time = "2026-07-23T01:54:44.853Z" }, - { url = "https://files.pythonhosted.org/packages/3e/44/28dac80a8941b604f4da10ce21097614ca1bf905ce93dca28d8d7de9c1e7/aiohttp-3.14.3-cp312-cp312-win_arm64.whl", hash = "sha256:362a3fd481769cac1a824514bcd86fda51c65e8fe6e051099e008fddde6db17c", size = 448050, upload-time = "2026-07-23T01:54:47.087Z" }, - { url = "https://files.pythonhosted.org/packages/57/be/5afd201cc0ab139029aadb75392efe85a293403d9dd3a3226161c21ce00c/aiohttp-3.14.3-cp313-cp313-android_21_arm64_v8a.whl", hash = "sha256:2e9878ae68e4a5f1c0abe4dd497dbc3d51946f5837b56759e2a02e78fa90ef86", size = 506269, upload-time = "2026-07-23T01:54:49.075Z" }, - { url = "https://files.pythonhosted.org/packages/22/09/dec8189d62b45ade009f6792a2264b942a90cb88aeaf181239933cd72c3c/aiohttp-3.14.3-cp313-cp313-android_21_x86_64.whl", hash = "sha256:f3d2669fe7dec7fc359ecdb5984b29b50d85d5d00f8c1cb61de4f4a24ee42627", size = 515166, upload-time = "2026-07-23T01:54:51.894Z" }, - { url = "https://files.pythonhosted.org/packages/28/24/2854869d29ed8a8b19d74f9ec6629515f7e04d02dd329d9d179201e58e47/aiohttp-3.14.3-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:cc7cb243a68167172f48c1fd43cee91ec4b1d40cefd190edd43369d1a6bc9c82", size = 486263, upload-time = "2026-07-23T01:54:54.223Z" }, - { url = "https://files.pythonhosted.org/packages/d4/dd/57187c8be2a35aea65eaee3bd2c3dcbbcf0204f5106c89637e3610380cd1/aiohttp-3.14.3-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:78253b573e6ffab5028924fc98bc281aae05445969982a10864bc360dea2016c", size = 492299, upload-time = "2026-07-23T01:54:56.236Z" }, - { url = "https://files.pythonhosted.org/packages/b9/11/06ae6ed8f0d414edf4068861e233d8fe23ee699bfd4b3ceb8663db948a62/aiohttp-3.14.3-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:7041d52c3a7fa20c9e8c182b534704abb19502c8bdcbde7ab23bfda6f642394f", size = 502235, upload-time = "2026-07-23T01:54:58.377Z" }, - { url = "https://files.pythonhosted.org/packages/7e/a3/559639c34a345d2cf7c52dff6838119f2eaf29eb508227b5b83f573af813/aiohttp-3.14.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ac74facc01463f138b0da5580329cfcc82818dea5656e83ddcd11268fc12ff80", size = 750883, upload-time = "2026-07-23T01:55:00.65Z" }, - { url = "https://files.pythonhosted.org/packages/91/cd/41e131f13afd1e7b0172a9d9eda085ef90eb8439f41f0d279db81ed3ae60/aiohttp-3.14.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:d6218d92e450824e9b4881f44e8c09f1853b490f9a64130801024a4793b1b3b0", size = 508473, upload-time = "2026-07-23T01:55:02.945Z" }, - { url = "https://files.pythonhosted.org/packages/bc/6b/e7f13410d391c6e55b4c007a8de024355389d7d459e3d64c42b2d33617e5/aiohttp-3.14.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:11fb37ef075669eee52ab1928fbf6e1741fada40409fa309ebde9607a962aebf", size = 509190, upload-time = "2026-07-23T01:55:05.173Z" }, - { url = "https://files.pythonhosted.org/packages/97/21/6464573e53d69672cc1eada3e5c5cb2d2efa82701e8305a0f2047a576967/aiohttp-3.14.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:55bdcc472aafe2de4a253045cc128007a64f1e0264fb675791e132ea5edaa3bd", size = 1761478, upload-time = "2026-07-23T01:55:07.383Z" }, - { url = "https://files.pythonhosted.org/packages/1a/81/d217043a4c17fbce360905e3b2bdd20139ebc9a2de836d035d179c4da006/aiohttp-3.14.3-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c39846c3aad97a8530c89d7a3869a8f8e9e3762c6ac0504481e5c80948f7e807", size = 1735092, upload-time = "2026-07-23T01:55:09.803Z" }, - { url = "https://files.pythonhosted.org/packages/a1/66/e13a02d0eeb1a9a502402a977abb4e4abff9fe4051c26f80558c57a7c975/aiohttp-3.14.3-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5895ef58c4620afe02fa16044f023dc4dafec08158f9d08874a46a7dbc0341b8", size = 1800546, upload-time = "2026-07-23T01:55:12.012Z" }, - { url = "https://files.pythonhosted.org/packages/26/5e/57d42fca1d18cb5acc1cad945d017fabc5d6ae71d8a08ad66be8dc3ee544/aiohttp-3.14.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:fa9467a8113aa69d3d7c55a70ef0b7c636010a40993f3df9d9d0d73b3eb7ef24", size = 1895250, upload-time = "2026-07-23T01:55:14.357Z" }, - { url = "https://files.pythonhosted.org/packages/ca/1c/7da8d08e74d56f00070822f9638ff3f1c563f8ad87d1efa996c87bfc8644/aiohttp-3.14.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d7d2deec16eeedf55f2c7cf75b521ea3856a5177e123844f8fd0f114ce252cb5", size = 1789289, upload-time = "2026-07-23T01:55:16.668Z" }, - { url = "https://files.pythonhosted.org/packages/cd/0f/cf16bcf56896981c1a0319f5d5db9337994b5165730c48a8fa07e9b34be6/aiohttp-3.14.3-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:dd54d0e8717de95939766febac482ac0474d8ac3b048115f9f2b1d23a16e7db4", size = 1586706, upload-time = "2026-07-23T01:55:18.913Z" }, - { url = "https://files.pythonhosted.org/packages/fe/6f/76eac12a7f2480e1e304f842efdb07db33256b0d9165b866b6ef0806c202/aiohttp-3.14.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:df82f3787c940c94986b34222d59c9e38843fba85139f36e85255a82ad5355a9", size = 1724652, upload-time = "2026-07-23T01:55:21.296Z" }, - { url = "https://files.pythonhosted.org/packages/39/b6/19c8c592baeeb94b75f966547d40c02ac7590902306ec5863d5c027cf506/aiohttp-3.14.3-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:42a67efc36300d052fb4508a53e8b6901b9284b599ae63945c377569c5fcc1e1", size = 1756239, upload-time = "2026-07-23T01:55:23.705Z" }, - { url = "https://files.pythonhosted.org/packages/dc/c9/4e9383150296f97f873b680c4de8fb2cd88608fb9f48c79edcb111611abc/aiohttp-3.14.3-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:7a75aa63cbf9b21cfaf60dc2657e19df2c2867d91707d653fee171ffeedd1371", size = 1769161, upload-time = "2026-07-23T01:55:26.082Z" }, - { url = "https://files.pythonhosted.org/packages/aa/1e/147bdc6cc5de5f3ab011be8bf5d6e786633249f22c20bae06f85e45f5387/aiohttp-3.14.3-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:e92eb8acc45eb6a9f4935071a77edf5b85cc6f8dfad5cd99e97653c26593cdde", size = 1578759, upload-time = "2026-07-23T01:55:28.846Z" }, - { url = "https://files.pythonhosted.org/packages/fd/31/78388a9d6040ece2e11df62ea229a822cf5e52d238374b220ae9975b2623/aiohttp-3.14.3-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:b014a6ed7cf912e787149fdc529166d3ceabac23f26efeea3158c9aba2354e7e", size = 1792025, upload-time = "2026-07-23T01:55:31.457Z" }, - { url = "https://files.pythonhosted.org/packages/03/51/a3d29fdf2c25d796746af8ad6fe56a45d6256c38b0a8a2ed752e1160b3a2/aiohttp-3.14.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:3d4f72af88ac2474bb5bca640030320e3d38a0163a1d7533500e87be458eef71", size = 1768477, upload-time = "2026-07-23T01:55:33.87Z" }, - { url = "https://files.pythonhosted.org/packages/29/a6/442e18b5afeade534d877a2dc3c3e392aff8d49787890b0cf84790410267/aiohttp-3.14.3-cp313-cp313-win32.whl", hash = "sha256:5f08ec777f35ee70720233b8b9811d3bb5d728137f30ac91b7457709c3261ac0", size = 451069, upload-time = "2026-07-23T01:55:36.121Z" }, - { url = "https://files.pythonhosted.org/packages/9d/69/3d876ac02659f271cf7f6769f14a8e3de5b6e888ed8b5a7e998086a4cec8/aiohttp-3.14.3-cp313-cp313-win_amd64.whl", hash = "sha256:dff9461ec275f22135650d5ba4b4931a11f3958df7dfbb8db630000d4dee0883", size = 476518, upload-time = "2026-07-23T01:55:38.303Z" }, - { url = "https://files.pythonhosted.org/packages/b2/0e/50d6e6471cd31edce8b282bdec59375a3a69124d8a989a0b1313355cae52/aiohttp-3.14.3-cp313-cp313-win_arm64.whl", hash = "sha256:ddcac3c6b382e81f1dd0499199d4136b877beb4cb5ef770bbbfba56c4b8f55d2", size = 447676, upload-time = "2026-07-23T01:55:40.451Z" }, - { url = "https://files.pythonhosted.org/packages/c8/20/887fdcf832326571b370ffc347b3e70abe101096f3720126aac161b1d872/aiohttp-3.14.3-cp314-cp314-android_24_arm64_v8a.whl", hash = "sha256:49f7325beb0f85ef4aef5f48f490269575f83e6e2acad00a1d80b807eb027062", size = 509067, upload-time = "2026-07-23T01:55:42.618Z" }, - { url = "https://files.pythonhosted.org/packages/ad/a3/92cec936f78cc4bf0fa5554ebe593b73459d94e3c62303e1902a4cccb6f7/aiohttp-3.14.3-cp314-cp314-android_24_x86_64.whl", hash = "sha256:e3be98a7c30b8c25d573dafba7171d66dfb05ee6a9070fc46535464ff97700a6", size = 514774, upload-time = "2026-07-23T01:55:44.937Z" }, - { url = "https://files.pythonhosted.org/packages/29/ba/2a0c38df3fc557620b6a5acd98364af050053b6285b4dc7ee74100c63c18/aiohttp-3.14.3-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:614c61d478b83953e261d02bb2df750f17227cd33ef8002945bf5aebbde21919", size = 488134, upload-time = "2026-07-23T01:55:47.135Z" }, - { url = "https://files.pythonhosted.org/packages/48/d6/d51b7d4bf309af3693940d8ffd2b9ed0b682434ef85959b7c9c137f60cf8/aiohttp-3.14.3-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:1caa7b0d05f3e3a36f87788c59e970a7ee1cefcfcbb924a9f138c4a6551c9cb7", size = 494201, upload-time = "2026-07-23T01:55:49.451Z" }, - { url = "https://files.pythonhosted.org/packages/3f/5a/8f624384e5f1efabb5229b94157eb966b021e97bdb188c62860c2ae243c2/aiohttp-3.14.3-cp314-cp314-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:dfa68deb2a443bdaa3ea5297b0699c1464f08aef3812b486d1348eee61b07dc0", size = 502766, upload-time = "2026-07-23T01:55:51.656Z" }, - { url = "https://files.pythonhosted.org/packages/a6/26/4ff0164370deec18fb19254ee4ab10b7a73304ac0c860b13f5f84663759b/aiohttp-3.14.3-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:e72ee89e28d907a18f46959b4eb0bb06701cc7f8cf4366e00029e2ccfaaf5924", size = 756557, upload-time = "2026-07-23T01:55:53.964Z" }, - { url = "https://files.pythonhosted.org/packages/97/a3/7056b86dc0d9ec709ea9777eae3b0161428f943372f8b98c01c11593b682/aiohttp-3.14.3-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:ad4c8b7488d745d2ca4838ebd8ae5ba9b56341d30b1da43640e4ce87f9f49646", size = 510168, upload-time = "2026-07-23T01:55:56.22Z" }, - { url = "https://files.pythonhosted.org/packages/85/ed/0357a015892fd68058bf2d39d3fd1958e459b997a7db30aaa6aaa434ae96/aiohttp-3.14.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:db332af25642007330fca8be5c4d194caf2bea7a7fc84415aff3497af5dfee6b", size = 512957, upload-time = "2026-07-23T01:55:58.437Z" }, - { url = "https://files.pythonhosted.org/packages/47/d1/8aba53f15ccb2238405f5e9d30e2a8ca44f93878c26e7165ade00d374b1c/aiohttp-3.14.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:25bd2708db6bdf6a6630dd37bdcdfcb47c4434d22ac69c64665b802910140b30", size = 1750149, upload-time = "2026-07-23T01:56:00.856Z" }, - { url = "https://files.pythonhosted.org/packages/49/bd/40c3fee327529284375c6701cbb0fa4600cc2e8432af1378f897e2ef7d3a/aiohttp-3.14.3-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:cef89a58e628c4efcac3275c2d68083f82426dcdc89c1492a6f654f9f7ea6ab9", size = 1707685, upload-time = "2026-07-23T01:56:03.371Z" }, - { url = "https://files.pythonhosted.org/packages/2a/a3/ca0cc6724cca8114b05694abd916060758c79894c3aa5b012cdadc1bc28e/aiohttp-3.14.3-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c23ec8ee9d5ab2f5421f9c7fffce208435607af27fd46d4a44e031954352838f", size = 1803911, upload-time = "2026-07-23T01:56:05.817Z" }, - { url = "https://files.pythonhosted.org/packages/95/b5/85b099c299c3ffd38ad9b3e43694c8a346934e4a30c88c4fd5a841234f77/aiohttp-3.14.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:e2667f0bbe7eb6c74eae5e9691441ad186e5845ca3cff63230fc09c4e7514f5d", size = 1876929, upload-time = "2026-07-23T01:56:08.413Z" }, - { url = "https://files.pythonhosted.org/packages/d5/b7/1da684a04175473fa4cddbf9a2f572e79514c3fd27a74597f43057d4f3da/aiohttp-3.14.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:18cb43369747b2ae007bd2655fb8e63a099c2ff1d207962943636dac989b3147", size = 1761112, upload-time = "2026-07-23T01:56:10.918Z" }, - { url = "https://files.pythonhosted.org/packages/d1/16/bc4b55e3e5cb175fd69c53c90d60d2f47797cb343da5106e23863dc4dba4/aiohttp-3.14.3-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:d77640cc618c1d99fc4f8589c0f24a730adfa54eb1e57ef7bf0c8dfb78da898c", size = 1583500, upload-time = "2026-07-23T01:56:13.613Z" }, - { url = "https://files.pythonhosted.org/packages/2a/e8/13a9d957a1ee40837f46aa30f0f4c657e673ad86a2e6362a9f9be20d26d9/aiohttp-3.14.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:53e5179d8abb5710f8e83ba207c41c8d1261fcffd4616500e15ca2b7a33be10a", size = 1713940, upload-time = "2026-07-23T01:56:15.969Z" }, - { url = "https://files.pythonhosted.org/packages/38/05/d33c680c1bcf1c7e130f9cbfc1fc02fe8bb0c4af2a94a53dd5fb56131e5c/aiohttp-3.14.3-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:cd817772b2fcf2b8c0905795318485f9ec16eae60b29feb7f4c77085311637f0", size = 1724413, upload-time = "2026-07-23T01:56:18.591Z" }, - { url = "https://files.pythonhosted.org/packages/85/1d/af798d306f7a74b6a632dbcabcf62a4c91391b7582d2a8c6d7712e2cc54e/aiohttp-3.14.3-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:4e3ac92d90e92773b2362d506068e9a948192bd553e743c5b2429e28527c8661", size = 1770748, upload-time = "2026-07-23T01:56:21.074Z" }, - { url = "https://files.pythonhosted.org/packages/a8/92/ad720d472556a995049206867765e9410969684f86ee09423ff9969044c1/aiohttp-3.14.3-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:3f42e9b78301f11c8f861746175d8b9c1ccef713fcad9eab396e2f6db8ed4a22", size = 1577564, upload-time = "2026-07-23T01:56:23.475Z" }, - { url = "https://files.pythonhosted.org/packages/60/ad/0ed7586cbef7a884e23a752fa2bb987a122e6a5dd50dab109258d0a95193/aiohttp-3.14.3-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:9d9edccfe496b476db5f398d97b865e9a6752bcf8aec4eef8390ce20fb64bb41", size = 1782080, upload-time = "2026-07-23T01:56:25.994Z" }, - { url = "https://files.pythonhosted.org/packages/97/ea/dbaed0d73e8a69aad653b045dab451c67c2454bb731a37b45a86593e9422/aiohttp-3.14.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:1c5ec8fb1bcc31a8466f74aaf26c345d5c386fa4bd08a3f0eb9c7a4a3fe8b5bf", size = 1745813, upload-time = "2026-07-23T01:56:28.604Z" }, - { url = "https://files.pythonhosted.org/packages/81/1b/6893d4bc57e434fc93a6c9217c637d967a0b651d989f6e3265179375754a/aiohttp-3.14.3-cp314-cp314-win32.whl", hash = "sha256:38901a84da3ce22249f6e860bf8f90d141bcab7da090cc398f8bb58c0e44b7da", size = 455872, upload-time = "2026-07-23T01:56:31.031Z" }, - { url = "https://files.pythonhosted.org/packages/f5/8b/c7baa1ba1eda4db6989baefe5de6d99834921b84ebd7918624febcb9f290/aiohttp-3.14.3-cp314-cp314-win_amd64.whl", hash = "sha256:8b3b60de05f3dcb6f6a00f818bb2ec781cee4de0645f59ccaf99b1d1823b6100", size = 481030, upload-time = "2026-07-23T01:56:33.365Z" }, - { url = "https://files.pythonhosted.org/packages/22/8c/c29d067df825a2df88ca432db848aa2fe8199598359cc06c12b09320cac9/aiohttp-3.14.3-cp314-cp314-win_arm64.whl", hash = "sha256:1576145bdceeb92382d899751e12743a3a5b8e460a841e3e50543859e54864dc", size = 453669, upload-time = "2026-07-23T01:56:35.731Z" }, - { url = "https://files.pythonhosted.org/packages/6a/a4/9c033beb355d39b6147980597ec9645e4729243f686ee4dc73945de72030/aiohttp-3.14.3-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:8800c996b01c2772a783e3e46f3e1abd5823029adca0df54231960de9bfefa5b", size = 791403, upload-time = "2026-07-23T01:56:37.972Z" }, - { url = "https://files.pythonhosted.org/packages/80/ca/87c32a0a7704583cfc49660bd817889bae5b830bf53b5dcb4e92145ac2da/aiohttp-3.14.3-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:ebe8e504f058fe91223351cecd2d9d6946c9d241bb0250d898ffbdf584cc72b0", size = 526413, upload-time = "2026-07-23T01:56:40.523Z" }, - { url = "https://files.pythonhosted.org/packages/9e/d8/8ec0e471248c500acdce2be3f46db8fb62b5eb60efef072529cc85ee1d26/aiohttp-3.14.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:30402d03a7c0ff52bce290b57e564e9079fd9d0cb545c8aba73f86a103162d2e", size = 532135, upload-time = "2026-07-23T01:56:42.876Z" }, - { url = "https://files.pythonhosted.org/packages/fe/45/f8919fd936e8b79fcd9bda7b6d8e62613462a713f4f17987fd7c34399142/aiohttp-3.14.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9fc7b5bfec6573f3ae844f457fdde5adeb713f8b8e4a81ad64fc207b49383716", size = 1922742, upload-time = "2026-07-23T01:56:45.528Z" }, - { url = "https://files.pythonhosted.org/packages/f6/ec/9ca76b28a27525b0cc53e20842e0228b022f301ce1f436b7d814b4aaf2df/aiohttp-3.14.3-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:8a5fd34f7f7410d1730d5c2ba873cacb2eed3fede366feb268a70ba22581ed8f", size = 1787371, upload-time = "2026-07-23T01:56:48.045Z" }, - { url = "https://files.pythonhosted.org/packages/b1/04/6acdbf17315f7b55f1937e3387acb89a3cddeb4995689553d064af8e92ab/aiohttp-3.14.3-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:270d3dace9ca2f10f0da5d8ebe519b7a310fc6112ed916e32df5866df0888553", size = 1912623, upload-time = "2026-07-23T01:56:50.605Z" }, - { url = "https://files.pythonhosted.org/packages/86/e6/438b0c79ca6f45eb9fd9817dd4c01a91919a38c0de5ee9e05e2b4dc0ece7/aiohttp-3.14.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:3ae5b3a59436d089b5395d910121a390feed4d00578eb95a0fd1a329fe963100", size = 2005515, upload-time = "2026-07-23T01:56:53.153Z" }, - { url = "https://files.pythonhosted.org/packages/bb/6b/62cbd6577758699525f5c712d1ddef57d9875fbab0ae8d5f5a202fd598f8/aiohttp-3.14.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2498f0fe69ead802f9675beca44a7c21c62fdaa4ec5145ea1c3ad6edbee29f85", size = 1879906, upload-time = "2026-07-23T01:56:55.818Z" }, - { url = "https://files.pythonhosted.org/packages/00/95/18bcbf830a21dc3aae24d8f6b6feaf3db1d2090242d00a7868db2ffb0b67/aiohttp-3.14.3-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a0dc483c00da8b673abbb367eb6f8d8f4bcec30eb58529ea13cb42e7fd2dfa33", size = 1675849, upload-time = "2026-07-23T01:56:58.861Z" }, - { url = "https://files.pythonhosted.org/packages/a9/19/47f4968659c5e23606c3790c80fc624e691c153d036148449ee84d31b287/aiohttp-3.14.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:c7d3a97c678d34fc5b59da671ee9cd630096ddc643e7b5a30d54a2a6f3574d3f", size = 1843496, upload-time = "2026-07-23T01:57:01.591Z" }, - { url = "https://files.pythonhosted.org/packages/64/af/38c33c4dd82fddcb4e56c4653b6f1072a8edbc6b7fa15809f14932c41e2d/aiohttp-3.14.3-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:f8fb78a83c9e5f741ca3a68cfb455c1f5bb83b4e7249a3848b3cd78d0a8563b0", size = 1827746, upload-time = "2026-07-23T01:57:05.131Z" }, - { url = "https://files.pythonhosted.org/packages/a1/9d/0537cda4885ac8f5b7053d164dd06312f4c483a4edcb8ee5b8aaf2a989bf/aiohttp-3.14.3-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:74ab5b6a9fb13e873e5a90946588baecaf488745e1db1a4a5c433f971f035098", size = 1853810, upload-time = "2026-07-23T01:57:08.043Z" }, - { url = "https://files.pythonhosted.org/packages/19/fe/26f9c5e6458385aa86497836b0dea6fb2f027827d63f37c7856cce9286ee/aiohttp-3.14.3-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:bd52f811e65f6fb634b1047159657c98f52b407f8efec907bcfc09da9a4c0a25", size = 1668895, upload-time = "2026-07-23T01:57:10.837Z" }, - { url = "https://files.pythonhosted.org/packages/ec/4c/618b1db9b9ba079b8875d2cdf78e7c4a3bf72903bd5850fee7dd9544600a/aiohttp-3.14.3-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:f0f177d1b195b9e06376cfd7d308d8a1b920909a609d03ac82a8c73bbb16d3b9", size = 1883833, upload-time = "2026-07-23T01:57:13.672Z" }, - { url = "https://files.pythonhosted.org/packages/94/c6/bd959bd1e4771f9fd944e9e436224c48c77b018b73b519b5aad346335bcc/aiohttp-3.14.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:498c6c623134f8e09a3c4e60bcd607a0b4590dd7dbf08dd40851b27cbb520ccb", size = 1844251, upload-time = "2026-07-23T01:57:16.593Z" }, - { url = "https://files.pythonhosted.org/packages/5e/19/08d41839658bdd44a0ed2480f3891705ecb487ce28c0dde62c9040c997e0/aiohttp-3.14.3-cp314-cp314t-win32.whl", hash = "sha256:b304db572b4368edd8dda8a2274f73156fe15558fca4a917cb8a09fc47af5963", size = 474180, upload-time = "2026-07-23T01:57:19.306Z" }, - { url = "https://files.pythonhosted.org/packages/99/5d/3cd6ef0a2b2851f7ab913b5b079334781bd50ff56a323e4454063377a080/aiohttp-3.14.3-cp314-cp314t-win_amd64.whl", hash = "sha256:b20032766aedf6261c7a566585a40867d092ac03a0d81592d5370ef9b054f99b", size = 500528, upload-time = "2026-07-23T01:57:21.762Z" }, - { url = "https://files.pythonhosted.org/packages/a4/37/cfd1ed540a4d318da025590d96b728e63713c09e9377950fc655dadeb856/aiohttp-3.14.3-cp314-cp314t-win_arm64.whl", hash = "sha256:2e1161602f45a54de2ce0905243a95f58cb42dcd378402f3697f5e0b21e9d2e7", size = 469280, upload-time = "2026-07-23T01:57:24.241Z" }, + { url = "https://files.pythonhosted.org/packages/d8/f3/8997f18890a92c79f77fcfbb4f78ca17c2d4ab109e9eb6d31b4e9de194a0/aiohttp-3.14.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:d51db97c96384fbfcaf8f4c65922183a68b94f891c3c10c862ef5f6df2adbb1f", size = 832358, upload-time = "2026-10-11T00:59:42.195Z" }, + { url = "https://files.pythonhosted.org/packages/8e/42/084651e9efb5cadb99265f786df60f2a7b353cead7bfd2c87003cb4867ad/aiohttp-3.14.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ae53924aa853a7a2ca20ed4142c7c6b56338e4d4cd999e2980075b9efc2e257a", size = 559636, upload-time = "2026-10-11T00:59:43.677Z" }, + { url = "https://files.pythonhosted.org/packages/3d/fe/92838944e601f0fe195fd3f3ada37e29fbee3d19bfd323fe15937ec79d36/aiohttp-3.14.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a2c473a355f9239efcb72c92d5abfd8fcdb0cc78c8e9af607e72ca12dbb36593", size = 552588, upload-time = "2026-10-11T00:59:45.592Z" }, + { url = "https://files.pythonhosted.org/packages/8f/b8/dd9b95c5c20ceae1b47738e656bd79e9883e3117a9cc8b143901eb604e9a/aiohttp-3.14.5-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:32e8fa6644e541fcd7e02430588c7fc93b602c1778ea0bc345505db76b61cfb4", size = 1928224, upload-time = "2026-10-11T00:59:47.294Z" }, + { url = "https://files.pythonhosted.org/packages/c6/47/70010cd2ba8746968d53d433ff328c33f06a66c99da5f3de759c64a6b2eb/aiohttp-3.14.5-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:579f97d5120f2971876d2ddca2968135f6944d00c44c3a6590ad7d86ca9b403f", size = 1877674, upload-time = "2026-10-11T00:59:49.472Z" }, + { url = "https://files.pythonhosted.org/packages/c5/a1/b026f071dbd87f0bdba86b92d47e46f3899e3ad7143b6e0fe7e7887090b4/aiohttp-3.14.5-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:24409db442e2fb6e766bc7f3943851a8381dec3098140e43bb2e843b79e31b12", size = 1985850, upload-time = "2026-10-11T00:59:51.296Z" }, + { url = "https://files.pythonhosted.org/packages/36/d1/f7b6f6f8c3cb5a71b53baeddc2e70c224c28b12a23a55c42994c504019b7/aiohttp-3.14.5-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5e8f97c0488ffda3082766ac0f2c8150a9a58c4d05788330e479cfd449b37939", size = 2105471, upload-time = "2026-10-11T00:59:53.191Z" }, + { url = "https://files.pythonhosted.org/packages/42/74/2a2b22953de15c6c8a80debf26db3047e4e8a5a5db6dd7c2c6c01eec0605/aiohttp-3.14.5-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:50a195903119008fe9cc68710535eb37f556ffffd6a7759afe70a2c145587045", size = 1929915, upload-time = "2026-10-11T00:59:55.609Z" }, + { url = "https://files.pythonhosted.org/packages/33/ad/f80e8d33933d0eacd0217efa3b7fb32c9f48ed480ed0db53cf9948bf474f/aiohttp-3.14.5-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0133c3c3b54a0bf1e71fa5c1ad95c93f07fd54e24ef1fe182f5122e1573d2bf1", size = 1773832, upload-time = "2026-10-11T00:59:57.611Z" }, + { url = "https://files.pythonhosted.org/packages/04/a4/0273d239f3e3bb69438f209c64c82e1f98dc60d5db264795e41f7dd05dcb/aiohttp-3.14.5-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c172db893e516e1358e65a95ee20b7ce7173963eefe318b6ab2a2220688b999e", size = 1901001, upload-time = "2026-10-11T01:00:00.605Z" }, + { url = "https://files.pythonhosted.org/packages/16/ed/7dd439d26c654645bc34ca3c9a822fc11c1c51801fed1cefdfe1cc41c1f6/aiohttp-3.14.5-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:f2a7966bda23dd85051f1661ce0ace38d6890e05ec6c357ecae9d2479cba377e", size = 1907218, upload-time = "2026-10-11T01:00:02.699Z" }, + { url = "https://files.pythonhosted.org/packages/32/dd/86249c3b8248562a17fd3e22ee0c164378d65766f01aceef62cf52783710/aiohttp-3.14.5-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:4887d130a7bbfed3a85493bb5a25e5b5b558d40c1d986dd16970d2bb26d63793", size = 1958650, upload-time = "2026-10-11T01:00:04.851Z" }, + { url = "https://files.pythonhosted.org/packages/bc/0b/ca4d53d68f683ce195807fd0aeb063bf6d1c6b39343fff234c9524e8d5a9/aiohttp-3.14.5-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:225c579c23b68b343cccea27a7e06e3bd8ec23a09c30b427eb3f1e4ca6239b20", size = 1760057, upload-time = "2026-10-11T01:00:06.978Z" }, + { url = "https://files.pythonhosted.org/packages/6b/42/005437ffd7fa56c2ce3347add40404b654a32754ce91f2e2a14b9e5ab2bc/aiohttp-3.14.5-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:ab52d8f1fc1b64821c1fbad64a647ed6203627004059a6d1ed4f0858a1499703", size = 1978081, upload-time = "2026-10-11T01:00:08.868Z" }, + { url = "https://files.pythonhosted.org/packages/03/71/3a5b66fe1b7b23d3c6524350817ed55de5feb7fbb4cccba7cbe044d118dd/aiohttp-3.14.5-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:cb131d775a1573c1aee66656bd78b023577bbdb6cb8349a07773bd4f73e68a6e", size = 1922954, upload-time = "2026-10-11T01:00:11.035Z" }, + { url = "https://files.pythonhosted.org/packages/69/84/d08a554f281d42fd7c6b2b6dd7738f3e3a7a9f657ddd87e11ca2091cdfe3/aiohttp-3.14.5-cp311-cp311-win32.whl", hash = "sha256:e87046c8ff77a8decdb6a41d8ab25824b47531b2da933aeab0c1e21c7acff329", size = 488101, upload-time = "2026-10-11T01:00:12.933Z" }, + { url = "https://files.pythonhosted.org/packages/0f/15/52b5e65f02b33686ae49f1518548ae4f5a7adaf31d9d3c54fa12a143137b/aiohttp-3.14.5-cp311-cp311-win_amd64.whl", hash = "sha256:6f275c11d1aa6d4c458e05a68be084efe3c55a113d99e3f46a318098e52948fc", size = 512575, upload-time = "2026-10-11T01:00:14.743Z" }, + { url = "https://files.pythonhosted.org/packages/b0/b9/bb75012635f3defb0f7cbb7c4ae391e36bb9cb3fbdca3b9944e2ebebf743/aiohttp-3.14.5-cp311-cp311-win_arm64.whl", hash = "sha256:b032a0023eb41d768ce77d83210ab2a3c389bc0b09313273c7e1eca48c10a755", size = 493179, upload-time = "2026-10-11T01:00:16.961Z" }, + { url = "https://files.pythonhosted.org/packages/d5/94/6ba86efddcb616c811b40e6a0dfdd862738f647e4e3860a961075d5e9ed8/aiohttp-3.14.5-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:df37b620684e19b5e25724412518ccafc3b1a49cdac706fdbd2f983fad943450", size = 817499, upload-time = "2026-10-11T01:00:18.901Z" }, + { url = "https://files.pythonhosted.org/packages/5e/e1/7bca6d84dabd228aa8eb4b7f9feac2586aaa9be5505d7d65bf287a615c43/aiohttp-3.14.5-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:ef60869969180ec2464f1349aff07138ae35ca2200f0946cb3552e49e8f301a8", size = 549467, upload-time = "2026-10-11T01:00:20.854Z" }, + { url = "https://files.pythonhosted.org/packages/64/91/11b89f45ca486252dd67dd5f3231fec04bf5518da39a95cb3997619f17fb/aiohttp-3.14.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d079c0a0135c36e7beb6f1c88087c8f108dc5891cdd0b5eafa778421bda70ed2", size = 548067, upload-time = "2026-10-11T01:00:22.659Z" }, + { url = "https://files.pythonhosted.org/packages/22/ff/c6615806c14aab34f82b9424ccde8ce6e417315fd57ce1c5b4d4747888e1/aiohttp-3.14.5-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:abfda5cb094a829f7bc25216a32f7db2e85cc65bd59910f8e7b40b3d9b224764", size = 1896245, upload-time = "2026-10-11T01:00:24.638Z" }, + { url = "https://files.pythonhosted.org/packages/39/b2/25a8c971ae6a92c8394d77e42422d7f38989e05cf41a5ceb92d73d67ab7e/aiohttp-3.14.5-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:9cc882cf8619109583c906b4d4a85d6a111a98afa34b7a450d1e08118d016820", size = 1872180, upload-time = "2026-10-11T01:00:26.838Z" }, + { url = "https://files.pythonhosted.org/packages/2f/d5/99f93ea36cc5205e47c1e5a803e087f2ad21b5430b5db2e942cb6e988a37/aiohttp-3.14.5-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:7457580535e019e1247ea35d6a02bf081ad30c26d0cbc210c93f6c3ab67a0835", size = 1937261, upload-time = "2026-10-11T01:00:28.74Z" }, + { url = "https://files.pythonhosted.org/packages/40/a6/9ac9c9e6695040bd73d2584a1b59a9388f6433c76d5294a7bf591e21ffe5/aiohttp-3.14.5-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c5ed596aedb9c42afd3fe0aae3117725378ac73d2cc5ddc735056fbdb96c5d02", size = 2064994, upload-time = "2026-10-11T01:00:30.623Z" }, + { url = "https://files.pythonhosted.org/packages/da/e4/aa172eb534b7f02f1f8ff1c3213347eaf3cf218db91a727c6863c22f1035/aiohttp-3.14.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:20f085697d7e911f1f73c43ed03fafbed1e7121797e2eb5428efa80398060584", size = 1919630, upload-time = "2026-10-11T01:00:32.548Z" }, + { url = "https://files.pythonhosted.org/packages/06/7d/4eedafc5bababa8932636c141e346806966eade12c0b7e5946d43bf8218b/aiohttp-3.14.5-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:74b0a9c8270f9b0a11410e124ff8d4f18bfc1f1837440ec84da5ae7b50927b5d", size = 1710016, upload-time = "2026-10-11T01:00:34.471Z" }, + { url = "https://files.pythonhosted.org/packages/b2/94/eee018537ba19da0ceb2ac79cab83faed4ac49568e08376e2799043f2538/aiohttp-3.14.5-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:19e2ba471507c34f8252402ab50f5ab512398b9ea8c8f1cb26beb3f75793ba30", size = 1858112, upload-time = "2026-10-11T01:00:36.581Z" }, + { url = "https://files.pythonhosted.org/packages/68/76/354653a306547238f3427283905972d796ba7c292ba9977abec9f2b6f260/aiohttp-3.14.5-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:d418ce2af40c6bb685b3f663e9e8de27cb0a22431d8e88a167348d7f01878073", size = 1896371, upload-time = "2026-10-11T01:00:38.478Z" }, + { url = "https://files.pythonhosted.org/packages/f2/ec/63e8c7136b570e356345ad3174e3820fdc973ea10712cb6c649bf875755a/aiohttp-3.14.5-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:70cb4008ac2ed1e0ca9e824deb4b53d3aa0d939109698ebf1e723a84337bd794", size = 1905836, upload-time = "2026-10-11T01:00:40.527Z" }, + { url = "https://files.pythonhosted.org/packages/57/d8/11365bda144b127928cd42533d0eff78a55613c9e28f81941bd6630ea887/aiohttp-3.14.5-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:a23fe35d776bc03cb495938b9594450d047e3bc08c5255315a82323e9cb7d2dd", size = 1696534, upload-time = "2026-10-11T01:00:42.686Z" }, + { url = "https://files.pythonhosted.org/packages/2f/3d/82df0461b18e00b2998f205c03e0d3010222478c43640aceb8e03dcd7e8f/aiohttp-3.14.5-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:3e0eb43bed3c6801a6cee315195377789e90b2a72c2277a475b578535312488d", size = 1933970, upload-time = "2026-10-11T01:00:44.71Z" }, + { url = "https://files.pythonhosted.org/packages/03/ad/6ddfe0aacd931c17b53533336d97e9d11a98b96d6ae815a9da0b19f82ccf/aiohttp-3.14.5-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3be7dd397d64ca3e1869626fa9318aaebb54b7bf93bc72d7a205448d83e4f748", size = 1899501, upload-time = "2026-10-11T01:00:46.629Z" }, + { url = "https://files.pythonhosted.org/packages/9e/8e/189bdd9ae4793059bb09f6dc880f211a6c6c7859cebcbf33912dbfab7dd7/aiohttp-3.14.5-cp312-cp312-win32.whl", hash = "sha256:eb324e2009fb54db30a071dad7caf6998ee2879c4704007efb244514dad1fec1", size = 480370, upload-time = "2026-10-11T01:00:48.468Z" }, + { url = "https://files.pythonhosted.org/packages/ae/ce/1f08114679d49655b30a6e0a29858375c94b82c1de1a0bd0a20c2fee8b02/aiohttp-3.14.5-cp312-cp312-win_amd64.whl", hash = "sha256:2cc38a4f2b516bef1714e690df87a0e043faf1a7693c82d860091684453d5111", size = 506141, upload-time = "2026-10-11T01:00:50.272Z" }, + { url = "https://files.pythonhosted.org/packages/79/d4/c7b4f60b16a1b7e43249fa9031ae05e7e8c341ba4b7d1866f914dafeaa0e/aiohttp-3.14.5-cp312-cp312-win_arm64.whl", hash = "sha256:a63afd1f757de949028387e65a7127b61ad0f775432dbb0e62816ae619fe69ac", size = 488108, upload-time = "2026-10-11T01:00:52.321Z" }, + { url = "https://files.pythonhosted.org/packages/d3/e1/2841e020ebb7aefae5513586193e011e06313d9a6bdbd296622afbbce204/aiohttp-3.14.5-cp313-cp313-android_24_arm64_v8a.whl", hash = "sha256:9ad7e6aa38c20da1be697874349c4c273c8a03b7887169665081706398d0439a", size = 538932, upload-time = "2026-10-11T01:00:54.3Z" }, + { url = "https://files.pythonhosted.org/packages/f7/a6/7fb8ea8fe96bcc7b7c7a36d10f021d99d01a8dc8a4b3f0ddacecfad9a80e/aiohttp-3.14.5-cp313-cp313-android_24_x86_64.whl", hash = "sha256:f59c7673465908cbe506117176156c127f29f917677afceada34957179221d91", size = 553329, upload-time = "2026-10-11T01:00:56.442Z" }, + { url = "https://files.pythonhosted.org/packages/de/64/d056e3c27647dc25af1a592cf356245382ea7c808171b9dac7677afedfc8/aiohttp-3.14.5-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:1b5416552740edf07234cc9437d0706f2acb67b93c198670b1a68e1b2b587dec", size = 521367, upload-time = "2026-10-11T01:00:58.345Z" }, + { url = "https://files.pythonhosted.org/packages/3e/e4/95226147e11d4db916fd1d495dcf85af8e3816e38333e42718241196e848/aiohttp-3.14.5-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:43351bdb5e4c3cb7d1772368e988534e869a74db7778079a83782c11c69535c7", size = 528322, upload-time = "2026-10-11T01:01:00.211Z" }, + { url = "https://files.pythonhosted.org/packages/17/cd/1d3c9192cafdb51cad62b2d3ded96cff9cc8af51893210aadd448a325389/aiohttp-3.14.5-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:c8c4478bef6d57fcfda15dae461ea3c9f06aa7b257c58df3f2300174ccbb185a", size = 539874, upload-time = "2026-10-11T01:01:02.06Z" }, + { url = "https://files.pythonhosted.org/packages/f6/0c/dfa33aecc7d4d1dc75e05248f5eac5a0edf4d09e7b44d93ab62529b0c1db/aiohttp-3.14.5-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:c2c30484dd1417ef98b51021ffa2cc0d7f3c78918adaaaab7e70817335ab3e02", size = 813836, upload-time = "2026-10-11T01:01:04.01Z" }, + { url = "https://files.pythonhosted.org/packages/33/17/4a63738052d20567d55529d6daa1b9480d906fd52930fbcf6d3fbed618f0/aiohttp-3.14.5-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:dab9ac5a67c8d1f070c00fa8fccb7cbd1b8dcc1a8d6b42f37540df9b3d4cc603", size = 548070, upload-time = "2026-10-11T01:01:06.035Z" }, + { url = "https://files.pythonhosted.org/packages/15/e5/b57e58695a757fd4c02497c033fced96a69c631b13866c43d336530c9670/aiohttp-3.14.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:e1cc2bfaee8c214f06080a7c7d5772419b8a1108e8e5349236189811823fb02a", size = 545786, upload-time = "2026-10-11T01:01:07.817Z" }, + { url = "https://files.pythonhosted.org/packages/9a/68/8c2c67a3aedf46e00f3c42f04fbc6983de80d4ed5786151e33681ba45883/aiohttp-3.14.5-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:74efb69332b85675b1eabd760a8cfc2e2cf42c60607c66f88014c1bdfb40942d", size = 1886492, upload-time = "2026-10-11T01:01:09.834Z" }, + { url = "https://files.pythonhosted.org/packages/ab/4b/74aab5e8d28c62e8f795b4fe8f38cf5586fd264a9a27bd2141ef6490333d/aiohttp-3.14.5-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:42b5e616946dbaf505e2bff18c9af2cd4ef9e7ef300ee58a6e951a5b7cf147ae", size = 1870057, upload-time = "2026-10-11T01:01:12.045Z" }, + { url = "https://files.pythonhosted.org/packages/a8/f7/eafc3b1988302b1815d9fd4a21071be5c360d616c0a430d02fd92dc97688/aiohttp-3.14.5-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f9033b43f511f27547c557dcaba0177649e10a3725336ccd2cce0fdc1dc4850d", size = 1925119, upload-time = "2026-10-11T01:01:14.09Z" }, + { url = "https://files.pythonhosted.org/packages/a1/04/78d8f294f74dd570f3898ff20402349fce524176045df98ba727d6846a68/aiohttp-3.14.5-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:15a310d3c71398e3d7bfc93a1a73fbe664315cd9e9016b8efc1cff85eeab7155", size = 2053137, upload-time = "2026-10-11T01:01:16.344Z" }, + { url = "https://files.pythonhosted.org/packages/32/51/395d225ef36f5a50d8e548dcd3141bfdbcd31fb6eed859022c573d2c4d66/aiohttp-3.14.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1ffa3a523a36d8628f98c06492ae16a31a23d14c0b4ec721757b477319f656d6", size = 1911038, upload-time = "2026-10-11T01:01:18.653Z" }, + { url = "https://files.pythonhosted.org/packages/ff/a4/2aec1aa06d82e8a244843b5dae31d78061e5e76744270a86dd0ee051c889/aiohttp-3.14.5-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:5fb6a6e919bfb703227bc1ce6579281b84b1a2ba57deb9794dfdbec7dcd1e40c", size = 1702205, upload-time = "2026-10-11T01:01:20.904Z" }, + { url = "https://files.pythonhosted.org/packages/16/27/6051bfde7b6f418f70edd60d655fa426abb3355fa0981764739d87ecf160/aiohttp-3.14.5-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:43e1b7994a8b038125f722bff07492ef501110722c2727c408995d9fb864c421", size = 1848588, upload-time = "2026-10-11T01:01:22.918Z" }, + { url = "https://files.pythonhosted.org/packages/9e/44/55efc06fc26c4e6e1c095f231b4c222bf2d86d64a8eebbc24b2bb5958ea8/aiohttp-3.14.5-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:5f3e96071686755d9cd3600c3880183eb94b012178e92746d68101800f0ed8a3", size = 1887540, upload-time = "2026-10-11T01:01:25.278Z" }, + { url = "https://files.pythonhosted.org/packages/48/dc/1502bfdc2a65760d386ac6a00090b0addaa8a3c9c60b3f8127fad3a9afb2/aiohttp-3.14.5-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:cd88b01f3d37b7a2a34f91d98f14720206f1ea3d540843fab2d649dd5fb91fec", size = 1895030, upload-time = "2026-10-11T01:01:27.316Z" }, + { url = "https://files.pythonhosted.org/packages/93/7e/44174bb6288264418c9eec07a5e35180969c0d5a796c7af544db3cb8a33a/aiohttp-3.14.5-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:f2ed8b64dc0c651c0f5a9c926777719770021251b8f336d97c4b80b660836ce1", size = 1693244, upload-time = "2026-10-11T01:01:29.39Z" }, + { url = "https://files.pythonhosted.org/packages/47/dd/b507d64e50db23888582fff08eda13998b12f9dea70c072edaac19218380/aiohttp-3.14.5-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:a9918e58faf62ba2c7147927d06057aec78f42475aff5048047ec47e7265a600", size = 1926308, upload-time = "2026-10-11T01:01:31.634Z" }, + { url = "https://files.pythonhosted.org/packages/98/4b/5b51b4f63e3f2793151f4aea49c48fe1e00baeb7cec9c7a206de499f8de0/aiohttp-3.14.5-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:42f320d4a5b00b9af0bddcfec5407dc6f2d9816f006b2f79ebbaa31f16895df3", size = 1888406, upload-time = "2026-10-11T01:01:33.715Z" }, + { url = "https://files.pythonhosted.org/packages/ff/13/d5e818a5eaba9f822016727299f41c0e1075799f82a6433ec508a93ab867/aiohttp-3.14.5-cp313-cp313-win32.whl", hash = "sha256:3ae800a20947e2c2e53088047d021e6bf7d51560cc49f6a0737a1f79d2e3a13c", size = 479970, upload-time = "2026-10-11T01:01:35.677Z" }, + { url = "https://files.pythonhosted.org/packages/8d/d0/8eca2c65aa467320990d78fb2005f38ed3588944280c39ff9deb6423fef1/aiohttp-3.14.5-cp313-cp313-win_amd64.whl", hash = "sha256:d05e94cdfe0d15d0206f970722d2554780ce562787b21b218b275447f8751319", size = 505985, upload-time = "2026-10-11T01:01:37.574Z" }, + { url = "https://files.pythonhosted.org/packages/7a/f8/4cdd65305d2fca14b886bea9ed2abb1fe726287872524e56e3d26692b47d/aiohttp-3.14.5-cp313-cp313-win_arm64.whl", hash = "sha256:f001b571ead90ca1770f1e616db255351a1703317f20374c361ef22f12c06d09", size = 487629, upload-time = "2026-10-11T01:01:39.477Z" }, + { url = "https://files.pythonhosted.org/packages/43/be/3184a1d34a8be665569eadb7e9e764b4629e4f3413e241cb2e4d6fecf3b3/aiohttp-3.14.5-cp314-cp314-android_24_arm64_v8a.whl", hash = "sha256:939042d5cda21d41a6f512e7cc8b8e33a2aebff863352251da495fbd91b673b5", size = 540673, upload-time = "2026-10-11T01:01:41.354Z" }, + { url = "https://files.pythonhosted.org/packages/60/2a/d35f3ba4cf157b072e3b674bf9983047ca5ea5173c995d32d877e1191d36/aiohttp-3.14.5-cp314-cp314-android_24_x86_64.whl", hash = "sha256:6da32b5ff3fd78d244e37300463434c7145162bfd2b6e9e915ab164da37f7343", size = 554087, upload-time = "2026-10-11T01:01:43.719Z" }, + { url = "https://files.pythonhosted.org/packages/fc/d2/61a33880ca4eaca95a9c60ca3f6beed15555af1028652dfaac601627787b/aiohttp-3.14.5-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:1b438b73c38111818d0c9d6a5c2bfed8584c8e503a49ef085d70e874ec846738", size = 522613, upload-time = "2026-10-11T01:01:46.154Z" }, + { url = "https://files.pythonhosted.org/packages/31/1d/de579b299d2225dc2c6fd99d579d91f16c02a913fb5af9a3cf2fe9bd88ba/aiohttp-3.14.5-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:755933b107ea7a6a9ac916f635a70595a5b1a32fac10a8ff0b9f2ab88555550c", size = 529682, upload-time = "2026-10-11T01:01:48.477Z" }, + { url = "https://files.pythonhosted.org/packages/f4/4a/ddb923564e15e053b6e060b0036e1694dcadcb13aa476c5a87dcad20e336/aiohttp-3.14.5-cp314-cp314-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:b3cc509327c7b27f6f4727a8830f4004f6df7766e179f2f4b8e54e65c0bec5d3", size = 540120, upload-time = "2026-10-11T01:01:50.474Z" }, + { url = "https://files.pythonhosted.org/packages/3d/36/a640fbecaa53727a5900b892bdbe17b5f3e8cc88903e22864fe41b654def/aiohttp-3.14.5-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:7bd8ac754ebd6733a3e2a0dd1674c4d8ab086196803fd8dcd776f07b4e2607d9", size = 818795, upload-time = "2026-10-11T01:01:52.665Z" }, + { url = "https://files.pythonhosted.org/packages/ef/b6/d52ca608859e271b5fa7944074802dc45f60e52c318a4ddc34edbf73586e/aiohttp-3.14.5-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:e724a7b6091f0b1ac064f9d1b15ff9ec52e6033a86cdae649e5f086e32a3c0db", size = 549667, upload-time = "2026-10-11T01:01:54.65Z" }, + { url = "https://files.pythonhosted.org/packages/ce/b5/05b8ac39a76ff4bca89f42a4c2471560c71f894ff6e4bc16158c951874e3/aiohttp-3.14.5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c32e26310cc10e547f53cd13d39a369034f69dcb7d749d5cb0e5f67bc196b6ba", size = 548922, upload-time = "2026-10-11T01:01:56.547Z" }, + { url = "https://files.pythonhosted.org/packages/19/b0/5aa186d56ce2334dabe29b70bd99dc8ae926ee44184c0de64a53d415a4f3/aiohttp-3.14.5-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1eb8167961ec4dfcc8cb9dd50bd0ee72519f7ef496be95203e49e27b01618382", size = 1882422, upload-time = "2026-10-11T01:01:59.258Z" }, + { url = "https://files.pythonhosted.org/packages/db/f7/7d5c91bb9620db300c8ddb05337a9014301acb626223faff3abcb8ea47d7/aiohttp-3.14.5-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c1d60eafd9c7e8e74abd03a5b00df44e7febfe6d9b89b559c0a6551eef0699d4", size = 1843621, upload-time = "2026-10-11T01:02:01.417Z" }, + { url = "https://files.pythonhosted.org/packages/30/0a/b208953b96d8f24b75f6da704f508e6c5cf3022f52b60c61933df082e89c/aiohttp-3.14.5-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:137351bf20bbed9a65e839f4a4452ac377389bdb2f2857d2acffef38f5e9f2d1", size = 1927915, upload-time = "2026-10-11T01:02:03.697Z" }, + { url = "https://files.pythonhosted.org/packages/f6/79/90ebcccb55e2d1e11a1fed581d83bb966e38fb35fb4b2577fdc980f8707a/aiohttp-3.14.5-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:fba47bc2c3d7303c3d027c6cf4d07626c37b1314ac81f5820c31032e0ca1f677", size = 2036339, upload-time = "2026-10-11T01:02:06.046Z" }, + { url = "https://files.pythonhosted.org/packages/a6/66/55a8904b3a129fafdf94f9cc0a2e4ca09a3c914650be52355db7ad0bbdb6/aiohttp-3.14.5-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:94684b879ac1d71e4238850c99b62dc1b28d9086b156a2555f082010b85a865c", size = 1888041, upload-time = "2026-10-11T01:02:08.384Z" }, + { url = "https://files.pythonhosted.org/packages/0b/b8/96b25da7329a52e42c812b1e8b076386039ec4fc312afa043d173d8147fc/aiohttp-3.14.5-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:56572c42e3ecd636de8d2c3dd54cf5fc939cb5c32eb56297f176a0d366fac622", size = 1703849, upload-time = "2026-10-11T01:02:10.903Z" }, + { url = "https://files.pythonhosted.org/packages/1b/43/fbf976e3ae4c038d6f5c84945ab2150298c2d71201674d4e53d158063e75/aiohttp-3.14.5-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:a95529a92a446db351675f4aab518feaf5e99842f63f5dd17160c2b74f382db3", size = 1849703, upload-time = "2026-10-11T01:02:13.15Z" }, + { url = "https://files.pythonhosted.org/packages/8b/7d/218e912f4c1d89bde7ac551409be57ad2f6121638e56942d395a7cb1fa58/aiohttp-3.14.5-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:3edbece0379b8b4aaa67619b8aa2399bb66fce372cd5911098a434ea77220aa0", size = 1852695, upload-time = "2026-10-11T01:02:15.295Z" }, + { url = "https://files.pythonhosted.org/packages/5a/42/252a1b9287e3b6e393a1c3bd1776f36af30f5f25f071bbf2b0cb7eba9116/aiohttp-3.14.5-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:56d9828f204331a5ca8850fcfe2bcce95a149f1f223f60cc7216e5524978e480", size = 1893493, upload-time = "2026-10-11T01:02:17.93Z" }, + { url = "https://files.pythonhosted.org/packages/78/97/71cae83d5100556fad1521684f7cd1e3e578432644f850245ed3bd969310/aiohttp-3.14.5-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:20064a177a070d789ee64a50b01a9161d3468e989baacfc6c714aa685c4b332f", size = 1693468, upload-time = "2026-10-11T01:02:20.666Z" }, + { url = "https://files.pythonhosted.org/packages/1f/69/73d88e97a8b5f0ca7a946d0011c0de99fb188b1687c7948ecd0553dc5bf0/aiohttp-3.14.5-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:81c2b3dfd56c62bee6108e4852d5970b4cf9086390b6983f52b666e878c1f115", size = 1915398, upload-time = "2026-10-11T01:02:23.011Z" }, + { url = "https://files.pythonhosted.org/packages/05/f0/881644bcb15d4b258daea9b720a0af9dc4330496cc8d6ade9090cdd0cffc/aiohttp-3.14.5-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:09ec102b4b8c9a920275733bbc11fdbb615efe6f9231a06007c0218d336fb77a", size = 1871470, upload-time = "2026-10-11T01:02:25.278Z" }, + { url = "https://files.pythonhosted.org/packages/7f/de/19d9ebbcce5aedaa3242d8a99ff8816a60bdb7629fb0084bf4a45bfd1f62/aiohttp-3.14.5-cp314-cp314-win32.whl", hash = "sha256:9c428eb2bd8817588d16a0ab898aa4eb5d141f896aa2b394cc79a4cf61d9a8e2", size = 485517, upload-time = "2026-10-11T01:02:27.579Z" }, + { url = "https://files.pythonhosted.org/packages/a9/74/8cdaf0e58c2588371670d5a9a8215bbb971d36940b6e5d051967dd05c07d/aiohttp-3.14.5-cp314-cp314-win_amd64.whl", hash = "sha256:6f967dde489ca6a8c02d093ab245d2cbf50ccb5c36adf0188b17b0ca39d24b67", size = 511755, upload-time = "2026-10-11T01:02:29.685Z" }, + { url = "https://files.pythonhosted.org/packages/1a/6b/e0100e25502430a531c7cf1482a378d0b65bf728ab60c01ee270e56bc469/aiohttp-3.14.5-cp314-cp314-win_arm64.whl", hash = "sha256:1d2d981b53dd09a319e3570ef8cc3bbc3ef86f5a7abef0f6b2bff3867db3a9e7", size = 495151, upload-time = "2026-10-11T01:02:32.163Z" }, + { url = "https://files.pythonhosted.org/packages/9d/c2/ca2ead7b655688c53c03aeeb6e96e6851c9ff08d6be7b13802f53a6ae8fd/aiohttp-3.14.5-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:9ce66feae6ac65327379460380549bf1b8df8e17c4e25df2a2bcf168272e3bed", size = 855396, upload-time = "2026-10-11T01:02:34.443Z" }, + { url = "https://files.pythonhosted.org/packages/a7/70/22206fea409255a240c926ce11de48de354ae2bb90ca44f709c05497585d/aiohttp-3.14.5-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:27c2322e03f66101acb09869ce1cf1efc04994ee95e1735b69827bf8c8b9d781", size = 567734, upload-time = "2026-10-11T01:02:36.644Z" }, + { url = "https://files.pythonhosted.org/packages/ce/e5/79a36c118308b56f8667d67e05d2fb6dc638ab45985704cdb199631bedaa/aiohttp-3.14.5-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:ff75a7537413a86e7cafe98e0e1d6e3dc4b15c6349896e7d5c6b881bfdb6d550", size = 567379, upload-time = "2026-10-11T01:02:38.757Z" }, + { url = "https://files.pythonhosted.org/packages/63/a3/2ebec7dece3b1f02c30d2e484647f6f7b13952b1bb40a4cb285b849e8432/aiohttp-3.14.5-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9c061aa954daaf57d2a4b8374f9fca621ef0e1b603584431c220c22458c59b6d", size = 2050686, upload-time = "2026-10-11T01:02:41.169Z" }, + { url = "https://files.pythonhosted.org/packages/3a/d2/7e4d093db2f4450482652e7ef19a9e19919028f5135aa52bc4078c3beb80/aiohttp-3.14.5-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:1612fa5857b37bf32e5c1eaeefb96e3b01e9c70679eec81f0934e8a600080863", size = 1915077, upload-time = "2026-10-11T01:02:43.563Z" }, + { url = "https://files.pythonhosted.org/packages/a6/88/bd40d09958442a0a1df67da81de496361d6e2afc04f9db2950d835da750b/aiohttp-3.14.5-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:adbeee7d6fd4cf5fe0aece2fb3edc4243615d3180430ba8149d01a90670cac99", size = 2027204, upload-time = "2026-10-11T01:02:46.185Z" }, + { url = "https://files.pythonhosted.org/packages/63/eb/3a601c1f8d3103c1a60ea981f20924855da9f575d2007fc38f8898b792fb/aiohttp-3.14.5-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b2966998927d7bed9db12c0a4647b0c7b179755878fc9c357fe1ffd3e3b0c1a5", size = 2149520, upload-time = "2026-10-11T01:02:48.812Z" }, + { url = "https://files.pythonhosted.org/packages/22/d0/4e41bfe1b1ce1cb6f6d2e59fa7a88ef5cf92c402b2d07e9018778ba9edbc/aiohttp-3.14.5-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8e317e0fb6b16212c881d2205a7d87414c29acd69320b3aa6dce9d9c7b86fe4f", size = 2002039, upload-time = "2026-10-11T01:02:51.293Z" }, + { url = "https://files.pythonhosted.org/packages/6f/5e/72067019545c502b881b031153c437752ecef48d7d213bc0218ccebb4bfb/aiohttp-3.14.5-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:50343c1757b4b6f6708eeaf24534b32f19dfb99fb1b762c00420867a62fc81e0", size = 1786164, upload-time = "2026-10-11T01:02:53.533Z" }, + { url = "https://files.pythonhosted.org/packages/d9/fe/7741efd6119bfb7a00827fe6f7b84b4409de58d888ae21adc5a9a6824992/aiohttp-3.14.5-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:083673c7a94c3ea035caaa5ca04288bdb44887abfe1f5ba23294e6a4b03efd2d", size = 1970689, upload-time = "2026-10-11T01:02:55.888Z" }, + { url = "https://files.pythonhosted.org/packages/43/e7/342a13bf67f34d269bf2f7e870ecd72b99c832cc6f0a271a9210c0ebfb84/aiohttp-3.14.5-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:2528cb4c6b92008c76ac9ac6298624069bb2db91ff4929905512d1d84485f658", size = 1951967, upload-time = "2026-10-11T01:02:58.467Z" }, + { url = "https://files.pythonhosted.org/packages/e7/d4/fdb3b27340617e5e64df18a70fa89097778652ea5c7c7e2f79def76999c3/aiohttp-3.14.5-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:b1b8ece1e71132d2afba4dbc0c3d62c766e25165990b25db1196c04969eb3d84", size = 1968511, upload-time = "2026-10-11T01:03:00.883Z" }, + { url = "https://files.pythonhosted.org/packages/83/b2/e8f88298de78d1a951f36f9f966d38ec6ed1d4721303ba02064a545e8aa6/aiohttp-3.14.5-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:fce9523df31cea6284f3e2c479876750d7687cf671d7b25d32b19effc0e86441", size = 1778497, upload-time = "2026-10-11T01:03:03.206Z" }, + { url = "https://files.pythonhosted.org/packages/22/68/9ccdb93d664345c546be7f34480b921774d8c0d98f47e70d7e03b115d475/aiohttp-3.14.5-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:09e0eb18c7e0c8777e2f9149de63799195b9b3ca1b5c81ba6f32f2c6b8628210", size = 1999676, upload-time = "2026-10-11T01:03:05.829Z" }, + { url = "https://files.pythonhosted.org/packages/57/4a/a33cfa6dcb00e94194ae4fe710432ca4ed111e016356b4ba4d2f4c3a124c/aiohttp-3.14.5-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:6774814fd5c338e72ee0da5cbb9432816df450e69c019f72b5d29bdec2a1792d", size = 1963437, upload-time = "2026-10-11T01:03:08.196Z" }, + { url = "https://files.pythonhosted.org/packages/f4/20/eacbecfea3b5c3dcbfc9b023e3a5460f43e5dda16d06a2877ebe7184c3f3/aiohttp-3.14.5-cp314-cp314t-win32.whl", hash = "sha256:33f706574e32c6e694f352a856e05caf18f7f2c871b3e87b41c55ea452b409ab", size = 503973, upload-time = "2026-10-11T01:03:10.481Z" }, + { url = "https://files.pythonhosted.org/packages/ff/78/18eec294f6c8c5dc845dcf6d730a0147d8d0f17e86138a7bdb85e43a30fa/aiohttp-3.14.5-cp314-cp314t-win_amd64.whl", hash = "sha256:5ba14a839fbe87cf7c12a6b5661c05f324a296eb8363141edb3944ba63d4c9d3", size = 531190, upload-time = "2026-10-11T01:03:12.716Z" }, + { url = "https://files.pythonhosted.org/packages/9d/39/e53f8169acc85271ebd12b5b32ad7f1541b35639ccbe0f49034c64785d10/aiohttp-3.14.5-cp314-cp314t-win_arm64.whl", hash = "sha256:1061b364556e8172e8d46b0b183adeeb73e8c42d30ebc745591e1bd89acad52e", size = 510360, upload-time = "2026-10-11T01:03:15.08Z" }, + { url = "https://files.pythonhosted.org/packages/f3/1c/06d89f58b2db3ee92dd377217659d587e06f973e57bf0a97a0d8a4586c0c/aiohttp-3.14.5-cp315-cp315-android_24_arm64_v8a.whl", hash = "sha256:788ecaa9c10533b786ce5ba70c4f2df78ad41819fd00a6c99d92b66f9a32e1da", size = 540674, upload-time = "2026-10-11T01:03:17.483Z" }, + { url = "https://files.pythonhosted.org/packages/18/39/5e822e038f496f0540ada91e27099d48f9e7f919b6c6deb4cf6db36cc706/aiohttp-3.14.5-cp315-cp315-android_24_x86_64.whl", hash = "sha256:5c76f1802bab718a68ac3cce447160605c734551f95c67ae90fa1132b215cb29", size = 554183, upload-time = "2026-10-11T01:03:19.71Z" }, + { url = "https://files.pythonhosted.org/packages/9b/ff/0cf2619d902b5b160762422a7e5e02091295766a7fe4fcf5b9a655e386c1/aiohttp-3.14.5-cp315-cp315-ios_13_0_arm64_iphoneos.whl", hash = "sha256:a6d02b4c38de03d9c7617813433e6a0fb6b522797974177d69d9dad431900833", size = 523160, upload-time = "2026-10-11T01:03:22.193Z" }, + { url = "https://files.pythonhosted.org/packages/86/99/3553abfc53a40849dbaacc3f54c730ec58410809ffa2d05885ae56108f2d/aiohttp-3.14.5-cp315-cp315-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:20726f9782d5c2744c1c66255842d1d163bb3edcf768b8de25216bf47f7b6ccf", size = 530311, upload-time = "2026-10-11T01:03:24.435Z" }, + { url = "https://files.pythonhosted.org/packages/fe/a4/5d25f73754bc1e8f983ba704e86d641aea290c967f195f2aeebdaed2bd84/aiohttp-3.14.5-cp315-cp315-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:248d779ad720b49d4fb355720e60c9e5f444f95887bc16974fea48fc56c41789", size = 540274, upload-time = "2026-10-11T01:03:26.698Z" }, + { url = "https://files.pythonhosted.org/packages/29/a4/07eda5db2e3ee017d9590f36c12a94ec6f1f50516e8df78672373dfc7185/aiohttp-3.14.5-cp315-cp315-macosx_10_15_universal2.whl", hash = "sha256:0a8ea271867e360ac985ae607f4a23ad9a38414b9aca1d49ec98839ae660e49f", size = 819239, upload-time = "2026-10-11T01:03:29.481Z" }, + { url = "https://files.pythonhosted.org/packages/cb/aa/a8723dd987a696dd48d4cf2f0088e589ce77caebff0b96f2a78c20424380/aiohttp-3.14.5-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:823c910f046f23f4c713b8d99a2242dc65f591cb45ee86418fa11762a3c2963c", size = 549832, upload-time = "2026-10-11T01:03:32.02Z" }, + { url = "https://files.pythonhosted.org/packages/29/5c/969a1b72692055fd2a419590c41847ec9144fefb97b75ff1cde5b6372891/aiohttp-3.14.5-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:9b42db919715e91eb76acf3bc492a9a7ccd8bd9adc6745c1412b689735269f14", size = 549234, upload-time = "2026-10-11T01:03:34.469Z" }, + { url = "https://files.pythonhosted.org/packages/38/05/8e3e07fd8a0d33d06955ff4e54a1cb92f4bce347ff55e441dc3e25a7b5e5/aiohttp-3.14.5-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d3112585250b199296c26ca6e0131640b6a8d01bab8b232d2eb3763ed469de11", size = 1891314, upload-time = "2026-10-11T01:03:36.899Z" }, + { url = "https://files.pythonhosted.org/packages/b6/b3/05a79ce2e25f024e93de30c94f39dc6aa6e2bc1e9c531a5c4b18dc61b7a4/aiohttp-3.14.5-cp315-cp315-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c147451b4a58e7050f7f7394e6c467867c84161560001f9ad4fb2d1446743946", size = 1884372, upload-time = "2026-10-11T01:03:39.334Z" }, + { url = "https://files.pythonhosted.org/packages/94/52/0fd8af0717db109eea258191b326b5cb5847fb88928bfa6c862fd78b9ad3/aiohttp-3.14.5-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:bf163cc701f3d4ac43ba7d97771bf5fd955220ef5500ef3ee847bc0ecfbf4ec1", size = 1930957, upload-time = "2026-10-11T01:03:42.172Z" }, + { url = "https://files.pythonhosted.org/packages/4e/b3/fa78733da88812bf9fb193913fb0ce1548f8b6912047633fdf88a758ff8c/aiohttp-3.14.5-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f8d40ce41991e9d56fab4f5dc4a51fe59bc3b5c77c27f4b148963064d00232e8", size = 2038886, upload-time = "2026-10-11T01:03:44.646Z" }, + { url = "https://files.pythonhosted.org/packages/cf/f5/2fcc5e30053a938286f17d0edf3f0850b8061b984256fa7c26850b9c8809/aiohttp-3.14.5-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:276a4fc00b1d9ae492b802763a789c5b86328b989c5ea169f2faa447d6a11c7c", size = 1894470, upload-time = "2026-10-11T01:03:47.304Z" }, + { url = "https://files.pythonhosted.org/packages/62/2a/f87feb42abe8e6a7c03814dbcb711540849a1e90aa392055f3183c643610/aiohttp-3.14.5-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:50983e3be33d8c0942ab88cec3905b10602f64c469b20153c48c5d4e558dd016", size = 1716273, upload-time = "2026-10-11T01:03:50.121Z" }, + { url = "https://files.pythonhosted.org/packages/81/b2/adf1f960dd977722ed1347d33da512a1624807114f57a3b91f5cc828e081/aiohttp-3.14.5-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:16c8abd5bca220a47efe667d26f8460124c81810787e79ee87b242677563d9dd", size = 1857513, upload-time = "2026-10-11T01:03:52.959Z" }, + { url = "https://files.pythonhosted.org/packages/d7/fd/ef8d910e641de4160026a513ace5888b7f92826bbc3fd90ced05d55a828e/aiohttp-3.14.5-cp315-cp315-musllinux_1_2_armv7l.whl", hash = "sha256:0790ec66fa4013e83c53b9025a45d454723da1a2fce28b3208c9b32d08af162f", size = 1887704, upload-time = "2026-10-11T01:03:55.641Z" }, + { url = "https://files.pythonhosted.org/packages/7e/db/6c9142f941cba8d35be8e1fae6ea2bd390e754fc14076b8147aee1a4592f/aiohttp-3.14.5-cp315-cp315-musllinux_1_2_ppc64le.whl", hash = "sha256:cb11a971a3aea10f9b8373be628f1df932964fc6c6b174516d318a48c3ac4412", size = 1895684, upload-time = "2026-10-11T01:03:58.18Z" }, + { url = "https://files.pythonhosted.org/packages/e6/7c/6a6bd9a72e576d376c668333b00c51c6147aba4fb863ed6c94996d497eca/aiohttp-3.14.5-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:932ce7e694bbc29b2bf6f64f2343c27d148d4997c771d01bdade4639b6749ff4", size = 1706299, upload-time = "2026-10-11T01:04:00.8Z" }, + { url = "https://files.pythonhosted.org/packages/69/ec/d2cc494242f8c4d3d1cd70baf591742818a74386dc3b84af3195c5c4fced/aiohttp-3.14.5-cp315-cp315-musllinux_1_2_s390x.whl", hash = "sha256:a7d470cf7b206e6359fc77b1b860632fde400d5a2ed59cd0181b93a686bc81ee", size = 1916645, upload-time = "2026-10-11T01:04:03.892Z" }, + { url = "https://files.pythonhosted.org/packages/a3/6e/e852c53647e815db09a1b6b5ab634f54bd736412397e11940feef4d2c89a/aiohttp-3.14.5-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:6e1d8637cf73eebc92eba2e11d4cfff98a3b562f2505bd75bba766d908926e8d", size = 1875408, upload-time = "2026-10-11T01:04:06.922Z" }, + { url = "https://files.pythonhosted.org/packages/fe/f6/72ab6ef20c332399be593bac543d2c24a6d241e39d3540ce9f95a63e4bd2/aiohttp-3.14.5-cp315-cp315-win32.whl", hash = "sha256:fbdc5ec49f9ca3cd24955cf3520b10a4d4c901ba2572094c84274e9e7eb30534", size = 485590, upload-time = "2026-10-11T01:04:09.626Z" }, + { url = "https://files.pythonhosted.org/packages/06/eb/e9de75b8c6d2170c42c08ff303abf857ea8a6d9d9b6e99b5aba40f15e962/aiohttp-3.14.5-cp315-cp315-win_amd64.whl", hash = "sha256:a9d3983bd6ab7aa1cfd573544ae98df9b6cb6912a5185a198263e024a636861d", size = 511740, upload-time = "2026-10-11T01:04:12.277Z" }, + { url = "https://files.pythonhosted.org/packages/fc/25/455f3c2785eb0d50748cffd0abd07500815f419a9495b14610b7622d8d2d/aiohttp-3.14.5-cp315-cp315-win_arm64.whl", hash = "sha256:e29347c142cf6e99e0dff5e2995ead1d50fa3b51bf37a7c726a7ccfe5419745a", size = 495171, upload-time = "2026-10-11T01:04:14.667Z" }, + { url = "https://files.pythonhosted.org/packages/e7/6c/497f0a98782eebfcf0f02a7fbdef5428148bd426027140cbad494cf842b5/aiohttp-3.14.5-cp315-cp315t-macosx_10_15_universal2.whl", hash = "sha256:9bf1d5dcc15204d9ec8b8ea4c18fd66e6b80e5de1f4ecbafb3a2f2740f8039d4", size = 855638, upload-time = "2026-10-11T01:04:17.154Z" }, + { url = "https://files.pythonhosted.org/packages/9a/c5/55c0cef2572af9b1ee81608f7c0a1bf74e6c9151a73b04915d933f192335/aiohttp-3.14.5-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:14f04769cfefe4734016a856a83af36133cd17779cef9ae817f812b8ba9d6d51", size = 567455, upload-time = "2026-10-11T01:04:19.702Z" }, + { url = "https://files.pythonhosted.org/packages/4d/47/e1a0e39f4a2b881f6071225afaf94a6547001b5aefc1566734d73c685934/aiohttp-3.14.5-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:6e4251c0ba4624a68a2c11471a1ac54c3306876c21f0ae86de085cc9241c8905", size = 567836, upload-time = "2026-10-11T01:04:22.235Z" }, + { url = "https://files.pythonhosted.org/packages/c3/1d/817d85836f52b687160064a326e62e037dc42f1ad5b6b5188a70e5c134b5/aiohttp-3.14.5-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e4f5cf4dc72a71c4cfa9751b4950be22f733626670230d46e7d606592aa22d59", size = 2051409, upload-time = "2026-10-11T01:04:24.821Z" }, + { url = "https://files.pythonhosted.org/packages/f7/25/e8ea6fc212a9aabce982917346ce8ecab0929c74b60232a056dd11c99da0/aiohttp-3.14.5-cp315-cp315t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:dbf53ae2601b7fd5a93c3944deea3a78d40f495226d582c35ef7a433425ce2b2", size = 1936493, upload-time = "2026-10-11T01:04:27.456Z" }, + { url = "https://files.pythonhosted.org/packages/24/33/de0517f71f1a19feea4aff78a2ec4ec2d98634129ec30ead78fce2f8f81b/aiohttp-3.14.5-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:657291433bf4dd3142f3abac495764cd47d0c7c92087751e6666c6447e65fcef", size = 2021405, upload-time = "2026-10-11T01:04:30.276Z" }, + { url = "https://files.pythonhosted.org/packages/c4/11/ddaf2e7930543e9f0cad3a1c54e1af0c1bd2fae3973d568c4263d3b010e9/aiohttp-3.14.5-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:3e51a27980c3788e6e6b3325d694fdd4898087fa8a86b2763af77b39353da41e", size = 2142017, upload-time = "2026-10-11T01:04:33.022Z" }, + { url = "https://files.pythonhosted.org/packages/1d/7b/58784353c06de8adc20f426daad3d85dd86fd55331c713a3f4b638c94573/aiohttp-3.14.5-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:82c7583cd3dfdc7dcc927835b4f6c7faae7ecc1ba3ca5879321621ae2e6f8e84", size = 2002482, upload-time = "2026-10-11T01:04:35.94Z" }, + { url = "https://files.pythonhosted.org/packages/b9/f0/417d9535caa9e165ffe6a53e2347a78107e7c87dcb0e10aca315c3af0344/aiohttp-3.14.5-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:6fdcd6af7e2e51d1ba1b4bea16e97b074bcb7b5dd0246a9d8201341bb28085a0", size = 1791774, upload-time = "2026-10-11T01:04:38.733Z" }, + { url = "https://files.pythonhosted.org/packages/98/01/25e49c2e8a01b9f0e19ca0a8448ad50aa2bdf96c8cd41e92bd45af044784/aiohttp-3.14.5-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:c8859a013ae0de1074660992139a1a440df3e6b219b86cf0d3f11c2692bb4fe3", size = 1970358, upload-time = "2026-10-11T01:04:41.66Z" }, + { url = "https://files.pythonhosted.org/packages/2d/fc/c132fd3465b6c7e4ce0193154f602c3e6c46b680e4da7eb3bd0d8a40d1c7/aiohttp-3.14.5-cp315-cp315t-musllinux_1_2_armv7l.whl", hash = "sha256:8966ecac808dd5f473c9c4cefd10cd3ffda71c18a4d3493b7c7d2ae1803bf2cc", size = 1969192, upload-time = "2026-10-11T01:04:44.66Z" }, + { url = "https://files.pythonhosted.org/packages/95/4e/d58b45e7dba4eb607eca11fc0a4aa77ae0f39c11afa804635a61ce18cff4/aiohttp-3.14.5-cp315-cp315t-musllinux_1_2_ppc64le.whl", hash = "sha256:3093b72c215bda16ce961a6d073f6e71d46e022962a9d5d457c5d4d421c78b57", size = 1963618, upload-time = "2026-10-11T01:04:47.505Z" }, + { url = "https://files.pythonhosted.org/packages/a2/d9/f6ac50946efb3490428ef52b56e62c1c6b7f9c6ff3ec6083535526c83e60/aiohttp-3.14.5-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:149fb56caf7acb67073126f675d0958d9c4b3125fcd3f6d4877df98aa8a97ce9", size = 1784817, upload-time = "2026-10-11T01:04:50.287Z" }, + { url = "https://files.pythonhosted.org/packages/d0/2f/f255eb63da788cd8a452fe350869c03266ccad7d884925f6963c87808f24/aiohttp-3.14.5-cp315-cp315t-musllinux_1_2_s390x.whl", hash = "sha256:293d3ae7c6a0ed176a42e59a1b5fde825ead65c835360f734148e96729f928d2", size = 1995956, upload-time = "2026-10-11T01:04:53.213Z" }, + { url = "https://files.pythonhosted.org/packages/d9/9b/241aa3393eaafda0034470add1625f82a4c252901108723b283a9b0b32ca/aiohttp-3.14.5-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:3f2dcc00191fd563e9075181a14ec31d7dd63223ced7582cc70a15a499de0c79", size = 1967794, upload-time = "2026-10-11T01:04:55.958Z" }, + { url = "https://files.pythonhosted.org/packages/5f/7f/a68e689288c9e4bfcf8d0979f2b12b774bf01861985420df6150eba5448e/aiohttp-3.14.5-cp315-cp315t-win32.whl", hash = "sha256:7779cd97e61ebe583ec2f1c5616cdd038aa08a4453b1848c67842176d054948e", size = 503876, upload-time = "2026-10-11T01:04:58.978Z" }, + { url = "https://files.pythonhosted.org/packages/a4/78/49b0299da6d54de19fc6fdc6889d50233ac47d192a461624f4fc010fde83/aiohttp-3.14.5-cp315-cp315t-win_amd64.whl", hash = "sha256:0e6f16f5e49c4b8267988c05ab07760d7064cea57d077c3d068d04b0fbb992cb", size = 530957, upload-time = "2026-10-11T01:05:02.23Z" }, + { url = "https://files.pythonhosted.org/packages/21/d4/b0afc936aeb6d2f93157e3408b069ec5d7934429ae7d023de5e0953b1887/aiohttp-3.14.5-cp315-cp315t-win_arm64.whl", hash = "sha256:1aead151c3abbac6b32942e452020cb66d7efc099d253cc6c20f748e926c858b", size = 510408, upload-time = "2026-10-11T01:05:05.362Z" }, + { url = "https://files.pythonhosted.org/packages/68/30/173960c42b05a6c59f7558e4b12a4b0d9ba376cf6aa9bde7f9e08a30ca8d/aiohttp-3.14.5-py3-none-any.whl", hash = "sha256:efc21a454892828368b11c2c780de0ff8bc991f73f6b99c6b66e56205470929b", size = 279517, upload-time = "2026-10-11T01:05:08.523Z" }, ] [[package]] @@ -194,11 +236,11 @@ wheels = [ [[package]] name = "certifi" -version = "2026.7.22" +version = "2026.10.19" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/a3/c2/24167ea9858356b47a87a50d39908bfdb72ceeefe0041586e704e5376b3a/certifi-2026.7.22.tar.gz", hash = "sha256:741e2c3b351ddf169a738da9f2c048608ff7f2c5cc02f1ebc6b118bb090d5d55", size = 138112, upload-time = "2026-07-22T03:35:12.644Z" } +sdist = { url = "https://files.pythonhosted.org/packages/a6/bd/1436c50cc46699de0230fbaacc1d1de7bfec413176099949e9d5112e88f2/certifi-2026.10.19.tar.gz", hash = "sha256:035c1e85572b141bf1c3a3eff0e33a8eb74917522f2559075ff8d2fea780a1ae", size = 137598, upload-time = "2026-10-20T02:24:16.604Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/0b/a7/71ac2cff56fec219ed242bb11b8efb69fcc4bec75db06fb7bfe35de520e6/certifi-2026.7.22-py3-none-any.whl", hash = "sha256:62f22742b58a1a33014a2b6b706588a8d7e2a88ae7bd1a6ebe8c992928483775", size = 136983, upload-time = "2026-07-22T03:35:11.276Z" }, + { url = "https://files.pythonhosted.org/packages/c4/51/29046e48f693c54e5b7412216d447a1d8362c9653148d98c02cdf65fa733/certifi-2026.10.19-py3-none-any.whl", hash = "sha256:42d35340cc5b9ba78e818ddbff0c5b1c2b779de448a340fd1b989f5fa8670e1b", size = 136464, upload-time = "2026-10-20T02:24:15.072Z" }, ] [[package]] @@ -384,58 +426,71 @@ wheels = [ [[package]] name = "cryptography" -version = "50.0.0" +version = "50.0.2" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "cffi", marker = "platform_python_implementation != 'PyPy'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/de/41/6cbdcf9142d00fe82836fbb51e503e58088575cf7a0fe1dbff6695bf0840/cryptography-50.0.0.tar.gz", hash = "sha256:eeac2acb5a20ed25e0ad6d1df9891a520b78b404266b6d11778f25d5d691a6c9", size = 880201, upload-time = "2026-07-31T14:25:10.11Z" } +sdist = { url = "https://files.pythonhosted.org/packages/9d/af/182eb91b0df3fe75c4d9f26fe70684569566745f6ba7e5c9c73a862c5252/cryptography-50.0.2.tar.gz", hash = "sha256:7b46165bb56eb4704e2eaaf86f3c940d19154535d9b0ca7d6d590b04060e00d5", size = 880623, upload-time = "2026-09-30T15:30:04.884Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/c5/5c/59086b4aac5e879d38ddbcf74e4be7ade89cebc3eb199a55da998c3bb46a/cryptography-50.0.0-cp311-abi3-macosx_11_0_arm64.whl", hash = "sha256:031e2d5dd4bb9caa3ca9c82e5a197fd8ae680232cee62603d1a813f3f07e3d03", size = 4001252, upload-time = "2026-07-31T14:23:33.331Z" }, - { url = "https://files.pythonhosted.org/packages/57/ef/8f2df13c7216bcad3e1c74e07f6e193d93e998e114f524a53877c9af27ad/cryptography-50.0.0-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:fd9192b7b70c573d7f214eb1ae35e00d359f6f5e4b27c7e21e30de1fc6204645", size = 4719554, upload-time = "2026-07-31T14:23:35.611Z" }, - { url = "https://files.pythonhosted.org/packages/d9/41/029086c34d91052fc3b88bcc8056f709a7c915c7a23b235a54eb800b1c97/cryptography-50.0.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:06a32a980526a6ab9a4b9bf8f7385800791e2bb960903cb6b530e4817509a3b7", size = 4702130, upload-time = "2026-07-31T14:23:37.635Z" }, - { url = "https://files.pythonhosted.org/packages/7d/ff/b6ce0954962e7f7b969f850a883744197bb3910bdfd7b6da162eab7d9f68/cryptography-50.0.0-cp311-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:a1b30560f2acc95aa8b2e06e716a13dbfc97314747b80d9707e307f77b40d6b3", size = 4725244, upload-time = "2026-07-31T14:23:39.471Z" }, - { url = "https://files.pythonhosted.org/packages/06/1e/63a1027cb7fec360a182208e1b7767d5aa1fe57be3d6aa856e69a321edc0/cryptography-50.0.0-cp311-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:8d89f3976b10b4ce31118de72329025f70d2c6ead14a8217c5514dd2c6d5a78f", size = 5342265, upload-time = "2026-07-31T14:23:41.286Z" }, - { url = "https://files.pythonhosted.org/packages/6b/72/a1116d683a6d7ece94590013882515de087edf9ef0e6292aae615a44df73/cryptography-50.0.0-cp311-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:b42a28c1844fd9de8f3f7d540e36b66f3a9c83fceac7170ebc7a6a19edd9dcae", size = 4734609, upload-time = "2026-07-31T14:23:43.139Z" }, - { url = "https://files.pythonhosted.org/packages/15/37/36a9c479bbe49acea2636c7fd3360d20f7b7e079c300352011c44850b181/cryptography-50.0.0-cp311-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:900131fafd8aead39ac7dd3a7e833be754c17a95cfd91221636949fe4eb0aa8a", size = 4356517, upload-time = "2026-07-31T14:23:44.939Z" }, - { url = "https://files.pythonhosted.org/packages/32/98/8a151d64367204cbc63ec65d37502f1d9c53cf4bfc6ec3c532614dbec60d/cryptography-50.0.0-cp311-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:07949c449a1abcf60d1ee6e88956d89404c7df3c8258f46589e912988e551987", size = 4724529, upload-time = "2026-07-31T14:23:46.93Z" }, - { url = "https://files.pythonhosted.org/packages/22/f6/ec13b470172126464a86bf54d2294a46d29837fc51ba3e45d4047946fb5e/cryptography-50.0.0-cp311-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:f89831ef99dd7dd169ab06d63a831adb9e20a87aac6d380266bbda5823349169", size = 5299852, upload-time = "2026-07-31T14:23:48.851Z" }, - { url = "https://files.pythonhosted.org/packages/da/3a/f05e32c99d440c9bb891ea0e36c9091891e36be5a9a87ab2ee6ea20729f6/cryptography-50.0.0-cp311-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:82148ec5bddac30b51a5b3c1945075f896fa022cb93f8e4a01e9f6ee95292c5f", size = 4734462, upload-time = "2026-07-31T14:23:50.861Z" }, - { url = "https://files.pythonhosted.org/packages/ca/dc/bd72b26be8953f80625f63151efd38eee71c76ca6cf591c08ff34615a79e/cryptography-50.0.0-cp311-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:1489e263a8048bb8b6a8bac662eb2d402ea5d2b7b4699b72f385f1e2772db105", size = 4852708, upload-time = "2026-07-31T14:23:52.715Z" }, - { url = "https://files.pythonhosted.org/packages/27/20/c930314a2ab476d15dec966ec87e2e9637bb02b06106b12c0396c57bb603/cryptography-50.0.0-cp311-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:7cec5b856506da6defb290f30c9ee687d5f5e8cb0bd3f6459dde43b0b4fa40ef", size = 5004179, upload-time = "2026-07-31T14:23:54.887Z" }, - { url = "https://files.pythonhosted.org/packages/32/2e/c9db68a0c4bfa28e310707527c0ee3a2bd254104d2e02e68f368e197aa4c/cryptography-50.0.0-cp311-abi3-win_amd64.whl", hash = "sha256:bd1c592e4d5974f0d08d4888e432157adba757c66da0246918e43677fafa2d30", size = 3840395, upload-time = "2026-07-31T14:23:56.677Z" }, - { url = "https://files.pythonhosted.org/packages/c3/fb/951032a3bf22a5697c83183fb6294a4843772947a70e616c57b3ff5f522e/cryptography-50.0.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:49e7d93abdbd2990caced757e5fade25302f719c3c8fb6e6fff2dde98999fc41", size = 3989258, upload-time = "2026-07-31T14:23:58.881Z" }, - { url = "https://files.pythonhosted.org/packages/d4/67/91eb047e69c5e845f2f14b8a2e4a1aab0f283cb885531e9e22c8adb176bc/cryptography-50.0.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:19736989797678c6af1e55cd49055cdbcb55d8f6b5583ac5335f933aba9101dc", size = 4700648, upload-time = "2026-07-31T14:24:00.702Z" }, - { url = "https://files.pythonhosted.org/packages/30/82/85f0f7425c856b9f96459411eb12e74ef72df9caf6f8f15bf23a33ff131f/cryptography-50.0.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:80b63928fa35083b33966ce1efb70e5b9607181e49dcd1c22c8c005e319f667f", size = 4682442, upload-time = "2026-07-31T14:24:02.538Z" }, - { url = "https://files.pythonhosted.org/packages/1a/28/b555a365adff1cca2fbe7b9e487d68a40de6bc67ff2cb587473eb43de0e7/cryptography-50.0.0-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:d58c3db7cd6eed54e6c06744db55456b65ebd7492ddeae9c1e93cfca7aa857d3", size = 4707596, upload-time = "2026-07-31T14:24:04.394Z" }, - { url = "https://files.pythonhosted.org/packages/72/d8/f52538140cc719df62a01cf87d1c7142318d235817109d6f4054d7c352d6/cryptography-50.0.0-cp314-cp314t-manylinux_2_28_ppc64le.whl", hash = "sha256:df2a58a472f332225671c35b0a830208b86d004f82baa8530fa3782c85646533", size = 5314552, upload-time = "2026-07-31T14:24:06.31Z" }, - { url = "https://files.pythonhosted.org/packages/38/14/6120e5bd7c5aa022ad15424ba4d5c5269d0d9448ed4d55e492ea91e3c1c4/cryptography-50.0.0-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:11b74db56cdbe3cdee6e3f6982ecb70334fa10dce99ed58bf7894aaaa3b2a037", size = 4717113, upload-time = "2026-07-31T14:24:08.349Z" }, - { url = "https://files.pythonhosted.org/packages/fa/71/190bf38c3ee2e0f8efc9860ae100c9df4169742eef274b91e7aa1cb133b9/cryptography-50.0.0-cp314-cp314t-manylinux_2_31_armv7l.whl", hash = "sha256:f59e38625469987d7ef6d495323c55e7db6c212eaf6112267e0d3b565a2e9c9f", size = 4338580, upload-time = "2026-07-31T14:24:10.227Z" }, - { url = "https://files.pythonhosted.org/packages/3a/63/504ccfbbe61fd8aa983f7f146399cdf034c72c2fc55f5b2dfdcdcdb20c99/cryptography-50.0.0-cp314-cp314t-manylinux_2_34_aarch64.whl", hash = "sha256:ecfed7367f965a0328cfbdd70da860f15441f002f613185668c6e6ebf5a0ac11", size = 4707038, upload-time = "2026-07-31T14:24:12.169Z" }, - { url = "https://files.pythonhosted.org/packages/01/77/2cf79bbfc4d12ca106437a6e170d6aaa01a373e93093118aaaef0e801bd4/cryptography-50.0.0-cp314-cp314t-manylinux_2_34_ppc64le.whl", hash = "sha256:9aa87839c383bdbab6ef865787a1fb877af8dd03464c4400322726feaaadfc6d", size = 5273110, upload-time = "2026-07-31T14:24:14.38Z" }, - { url = "https://files.pythonhosted.org/packages/e5/45/8aae2972c520145377ea3559a605a899bebe227bf070b33cdb445929a9b9/cryptography-50.0.0-cp314-cp314t-manylinux_2_34_x86_64.whl", hash = "sha256:6ba6a53445bd3cfa809ef3ef5f1589aa6ba08784a1d962bf47d0940e871dab1c", size = 4716439, upload-time = "2026-07-31T14:24:16.415Z" }, - { url = "https://files.pythonhosted.org/packages/7b/20/4fe50b619a48c2525cc46e2dbc1ac490708d704be5d467bdaac6dc955682/cryptography-50.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:3f5735ffe4996d28b809371756219f5354864902a3b9e7c0b9ee87041209fc9c", size = 4837383, upload-time = "2026-07-31T14:24:18.553Z" }, - { url = "https://files.pythonhosted.org/packages/92/91/3a31366e183343d3703f8995c095f5734676bd6938118047e50fcf279eb4/cryptography-50.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:1b4a266766514614f8aa60416e71f2fc6e575d36e7bdc90f644fadb2f4b75b95", size = 4985772, upload-time = "2026-07-31T14:24:20.385Z" }, - { url = "https://files.pythonhosted.org/packages/74/9a/02ffe35b2853d121689871eb5dce862092562b3a1ed5cc98f1aaed441506/cryptography-50.0.0-cp314-cp314t-win_amd64.whl", hash = "sha256:12b9c6996425c76ea6c457ace4f3073e715b8c545add07cd1a8f3a4f90691269", size = 3816291, upload-time = "2026-07-31T14:24:22.125Z" }, - { url = "https://files.pythonhosted.org/packages/03/37/73d005be173aff344af30e9fd2a576575cb2391a7101d9cd3842e1fa8cce/cryptography-50.0.0-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:ccdc4a71a4dabae05de219404f9f4abc38e3b58422177ff93d0da05967dafa07", size = 4036009, upload-time = "2026-07-31T14:24:24.122Z" }, - { url = "https://files.pythonhosted.org/packages/ff/c6/7a6202a534e32103a285b7834a120869557fe198d51d7cfe59754c8bda9c/cryptography-50.0.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:910e1d2668e7de9648f2bcee30e180db2a6b15c30f887d7c4c93ddf96e3992e3", size = 4745252, upload-time = "2026-07-31T14:24:26.118Z" }, - { url = "https://files.pythonhosted.org/packages/85/4f/0fa8c2f4428198f15d9ff8d63400e27afbf94ce833f6108da1eb3753f945/cryptography-50.0.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:a91296cb61e8df6f86d0c19cc4068228da256bf59bf86049fbd821084565327f", size = 4728939, upload-time = "2026-07-31T14:24:27.994Z" }, - { url = "https://files.pythonhosted.org/packages/d1/63/54dd723490ba2dc09b299682c10b38db38f159728bcaae8c591b8af2f22d/cryptography-50.0.0-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:e722f16708d854fe924790e051061f6704a472c3bac347b6fd88033ea8dd0dc5", size = 4748483, upload-time = "2026-07-31T14:24:30.254Z" }, - { url = "https://files.pythonhosted.org/packages/1d/dd/7c77d26285cc7f6991efce64a0f5b4f9383bfa5dd8c5033003eaf7db4cdb/cryptography-50.0.0-cp39-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:d764dcf130c428ef66786f866dd750f53182bc608813489915e9fc106bb0c82f", size = 5367599, upload-time = "2026-07-31T14:24:32.457Z" }, - { url = "https://files.pythonhosted.org/packages/46/c9/f60aed34c013f317f92817b6c171c2d22a78270fa41109bd4b08af26b194/cryptography-50.0.0-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:105110f43a471dbd0060b9c9516cb8a6a79233631a04cc2ba16f28323ac6e025", size = 4762647, upload-time = "2026-07-31T14:24:34.599Z" }, - { url = "https://files.pythonhosted.org/packages/be/f3/f9a0173b139372c3a48ed98154b45cc6b9de17c789d5ab552e621c293609/cryptography-50.0.0-cp39-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:828743d939e9629bc267b8e2d08d8bb67cd4319c771a33d4b18b22dd8fb7440a", size = 4385197, upload-time = "2026-07-31T14:24:36.647Z" }, - { url = "https://files.pythonhosted.org/packages/d8/36/83bb81f6e569bc38e1e4a7bc80f29b46bb9601920bc455fc8e888f5d5742/cryptography-50.0.0-cp39-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:2a8183b489dc1f7f80f135780fadc1108f14b31b8a40411c7a5b17425f65f28b", size = 4748095, upload-time = "2026-07-31T14:24:39.493Z" }, - { url = "https://files.pythonhosted.org/packages/6b/16/d3008eff98c764979865834c3d386d4fd041b5f52e7f34fc29ac1a5eb515/cryptography-50.0.0-cp39-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:6e7d61120573a7f2cd94cc095f9e81f6967c61ccdf194285aa143ecec8e0b708", size = 5325948, upload-time = "2026-07-31T14:24:41.556Z" }, - { url = "https://files.pythonhosted.org/packages/9c/f8/d97f9603efda3888187bfdb893f26c41be4735c10631d05d284ee6b047c4/cryptography-50.0.0-cp39-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:37fdb0d0111f1e2ff07139dfb79f1b49531f8e213c46f1163dd7642979b58c47", size = 4762400, upload-time = "2026-07-31T14:24:43.636Z" }, - { url = "https://files.pythonhosted.org/packages/64/a2/4615c8f7d81a00b1d6e6afe19f694e1543582349fb5f4076f6cb5dc36485/cryptography-50.0.0-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:c87f62a3d3b9888ed0fdde100ec06aa61ca9cd44bad9057d1dff9a516b5f5bb9", size = 4878208, upload-time = "2026-07-31T14:24:45.522Z" }, - { url = "https://files.pythonhosted.org/packages/d2/1a/efcfb02f91407149a0dacffffab791f7e19bf6385f63b3666dc8b5e5c9c8/cryptography-50.0.0-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:65c2c3add92b45fd0709db8594536aea39c2a67af0e27ffcf049c498501140b7", size = 5037050, upload-time = "2026-07-31T14:24:47.697Z" }, - { url = "https://files.pythonhosted.org/packages/57/30/4a22984d4f1bdfb8c054f07a92bc176b97a3134cc1d6c4b3bffb1f3688b4/cryptography-50.0.0-cp39-abi3-win_amd64.whl", hash = "sha256:d24fead1d4d076e1bfb006dcec392074a3cd8d7b4fc8a595aa64073b2b7a96ba", size = 3874135, upload-time = "2026-07-31T14:24:50.085Z" }, - { url = "https://files.pythonhosted.org/packages/9d/3e/e54cde8c01631a5a8226ccd617eab9e57fd5cfdad90f1a9e6bb570794631/cryptography-50.0.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:5e34edd123674534acd70147f0ca331eaa2c74e6325fb2028c886aa26ba0b68c", size = 3963170, upload-time = "2026-07-31T14:24:51.968Z" }, - { url = "https://files.pythonhosted.org/packages/01/b6/0b9e125e90f3d2dcf599a218a899cda7326a3158cfa258723f0b398b08f6/cryptography-50.0.0-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:8eb5e1172eb569ea8a872796576e6a67c276351728b6455d5beb01242b027c6a", size = 4692441, upload-time = "2026-07-31T14:24:53.743Z" }, - { url = "https://files.pythonhosted.org/packages/53/c9/a5151588710785a96d7bc4de27d4cd62f263bbbcb203cfe29df537eb6505/cryptography-50.0.0-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:910d11e1a385c654bf738bf3e6b8e6ed5de0f5610fcae2be9e5b398d8081d20e", size = 4699810, upload-time = "2026-07-31T14:24:55.746Z" }, - { url = "https://files.pythonhosted.org/packages/c7/1a/15b92b25eb6ce3089cd49377ae990a0f3ad485a510f968aed1f19dbdcdf2/cryptography-50.0.0-pp311-pypy311_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:62598a8a57f815db4c6259a4e97d857dab56697e7de8e8ab02352ab74da1995d", size = 4691924, upload-time = "2026-07-31T14:24:58.082Z" }, - { url = "https://files.pythonhosted.org/packages/62/15/219075012ab13e8905f3cd572204f4acb4b111df787104346b9bc0cea789/cryptography-50.0.0-pp311-pypy311_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:07479a1cb08219ab719147e742e76090c9c773321959bb94946fffdd397a6437", size = 4699593, upload-time = "2026-07-31T14:24:59.951Z" }, - { url = "https://files.pythonhosted.org/packages/8e/b5/c2c5fce26f0ee40d21bafe7f191d29a34b35a65ac4fe8a1191d1983612e9/cryptography-50.0.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:c99c003e088647b8a5b7c145d6f78c335f6348332b62e142d411c4b63d1460b9", size = 3813796, upload-time = "2026-07-31T14:25:02.298Z" }, + { url = "https://files.pythonhosted.org/packages/e5/56/d194340cc4a57535e82e1bee9e89667ac4b7c13b5d3f59686deae3094dd5/cryptography-50.0.2-cp311-abi3-macosx_11_0_arm64.whl", hash = "sha256:fa8f5efb344d6908a1ce62f4a24e2e5780f825d6f53f5f50ec5ffacac72936cb", size = 3914904, upload-time = "2026-09-30T14:43:44.339Z" }, + { url = "https://files.pythonhosted.org/packages/d9/69/c9bd862c3bf43d6399c433caf002df16e2dffd4be49bdf515cda38038711/cryptography-50.0.2-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:79def8d059362e7831389ed3be0ecdf58a89386e1271e35dd9f5af84e81bffd0", size = 4731146, upload-time = "2026-09-30T14:43:47.113Z" }, + { url = "https://files.pythonhosted.org/packages/21/69/64cef1f702bf6657e0cc186ed1a2891d50d29fb41586b254e1c07adea261/cryptography-50.0.2-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:630ebfea3bf689d075f82316324ff7433dc447fe6bc1bfc76524b74b4a9567d2", size = 4719841, upload-time = "2026-09-30T14:43:49.01Z" }, + { url = "https://files.pythonhosted.org/packages/38/6b/61a3f8d8c5e1e49a6cddccafc4015cc1c0021360ab0acb4080e7a423644a/cryptography-50.0.2-cp311-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:f9f6143a8c75945eb960d9eb98905a441394abfa24afaae239d514ffb2586480", size = 4738340, upload-time = "2026-09-30T14:43:50.932Z" }, + { url = "https://files.pythonhosted.org/packages/7b/2e/7212ca32fd43dc91f2f41db20160b268098874b4c9a0e7be94d6835f5b2e/cryptography-50.0.2-cp311-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:a582ab2ae1d34f67112cadc86702774c9ea4374df6bca6afe672817203c99134", size = 5367029, upload-time = "2026-09-30T14:43:52.911Z" }, + { url = "https://files.pythonhosted.org/packages/1a/f1/b474e930c4d910328780e3940da76f5aa5cbc48ce1fc14e44d239d9ea9db/cryptography-50.0.2-cp311-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:4061c0079120205fb760c58acab6443e217307dcf05e3702cf970e0689972856", size = 4753050, upload-time = "2026-09-30T14:43:55.272Z" }, + { url = "https://files.pythonhosted.org/packages/7c/52/9af10e80ac16b0fcc2123f9cbd5e7afbd0fd5075bb7a607c592258a39cda/cryptography-50.0.2-cp311-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:ac9ed99d81760c62fe89d5f0815cdfa1ba9a35141cf30f1c2d044f04b4803d2e", size = 4376724, upload-time = "2026-09-30T14:43:57.24Z" }, + { url = "https://files.pythonhosted.org/packages/71/37/6202e488cc1eb625ea110c292c6bda92823176e023f427d8d5660ce8d632/cryptography-50.0.2-cp311-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:87e9ce85beb6b328ba370cc6e6aea483c92617b4c95b1d33a49297eb662bfb04", size = 4737859, upload-time = "2026-09-30T14:43:59.541Z" }, + { url = "https://files.pythonhosted.org/packages/8f/30/e86d7d518489b0ae2497091a35287abcb1a2ce4037837a34afbe9b1d6964/cryptography-50.0.2-cp311-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:f265528741e048bce55c3463ed721fb0aa45a5888d8add8cfeccb3035451bbdc", size = 5324103, upload-time = "2026-09-30T14:44:01.901Z" }, + { url = "https://files.pythonhosted.org/packages/d3/69/2c833a049475e0a3444e94c7d0aca0aa51d166374a449b09e92ac98138de/cryptography-50.0.2-cp311-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:9dab55f57c74c3cad24c323bacbbd04be4705ba6eb0d92e920b1fc4837ed5079", size = 4752576, upload-time = "2026-09-30T14:44:04.545Z" }, + { url = "https://files.pythonhosted.org/packages/6c/5d/906970b83bbfc1f5bbfb677a143c181f2801f23b6a7204a3b47c42c97e65/cryptography-50.0.2-cp311-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:25784ce8b9621c90c643efb9e1e2162ab3b0224cae446ad5e70e7fcb1ce18b51", size = 4870819, upload-time = "2026-09-30T14:44:06.884Z" }, + { url = "https://files.pythonhosted.org/packages/68/e3/f2298d3bb55e0c4a91841ec4d01b3f020ba8c5fbf15ccdcc6dcf03f97025/cryptography-50.0.2-cp311-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:85d0d9a31b9098e98534226d5686b47264b95e62ce459dc2e62fdfc809f9fe93", size = 5030152, upload-time = "2026-09-30T14:44:09.443Z" }, + { url = "https://files.pythonhosted.org/packages/9a/4f/adfc442765721292fff86d314ce385d3249d22db42295c0dd057727b60f3/cryptography-50.0.2-cp311-abi3-win_amd64.whl", hash = "sha256:7afa5a6602a9f29af1f3a2965f831bae7c9d5d597b7cbb716d41ab3b7d89879c", size = 3824692, upload-time = "2026-09-30T14:44:11.671Z" }, + { url = "https://files.pythonhosted.org/packages/ce/cb/52eb3770c0d0be2702a98c6e96065ddc0a2877cf0845aa9c23397c142cd4/cryptography-50.0.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:f785f6161f202ab04d8ca194158968798e480ca058943907972da5f12e2881e8", size = 3892731, upload-time = "2026-09-30T14:44:13.485Z" }, + { url = "https://files.pythonhosted.org/packages/19/8e/aa1fc533d4546b127b45de8aa024eb5933d23eff9debfe25931e56861095/cryptography-50.0.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:0ecbc5652bdb6fc9eaf89a7d196e20941adfe812f43bc4ca05d9150496821047", size = 4710431, upload-time = "2026-09-30T14:44:15.427Z" }, + { url = "https://files.pythonhosted.org/packages/6a/64/72bc3f75176e7e406b748a3e3830432b8c51297b38368713df04dc04898a/cryptography-50.0.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ab50ee449bf968271e820086f10a33d101dd060370abc10bcd22279be2656539", size = 4694824, upload-time = "2026-09-30T14:44:17.69Z" }, + { url = "https://files.pythonhosted.org/packages/4e/c6/62c77550edfa5ca3f14bf44a1e6739b9fa09d6e998a11d97ed8213bccc98/cryptography-50.0.2-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:a9f7355e6fab51f6c369b86fb7571cffa05edee2c2121e0380a37fb9ac1cd5c1", size = 4716967, upload-time = "2026-09-30T14:44:19.661Z" }, + { url = "https://files.pythonhosted.org/packages/f4/37/cce70f150c432914460157a6ecc161752e053aa5ec0ef3b3f7dc6e31039a/cryptography-50.0.2-cp314-cp314t-manylinux_2_28_ppc64le.whl", hash = "sha256:94e5e9f108ee10471288214d3d233fbfbb492840a8457eb85178d643ddeb32c7", size = 5328676, upload-time = "2026-09-30T14:44:21.744Z" }, + { url = "https://files.pythonhosted.org/packages/aa/9a/6f2f0304d634ceafdeaf23e84537336664ac419b5d07611675c2ad3f6b7a/cryptography-50.0.2-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:241449bf940a5d27309bd317e6f9a2af6932113818bb2b8f5c59ddc7ef16da18", size = 4727698, upload-time = "2026-09-30T14:44:24.178Z" }, + { url = "https://files.pythonhosted.org/packages/1d/de/66bcf9244d118663b2e1aaded8990f4640e3d7b7411870a5765f252074d2/cryptography-50.0.2-cp314-cp314t-manylinux_2_31_armv7l.whl", hash = "sha256:d8947001be83df1394050758ce0e745dd74fb134eef0a4b5124208dfc3a68c37", size = 4354821, upload-time = "2026-09-30T14:44:26.263Z" }, + { url = "https://files.pythonhosted.org/packages/bd/e6/db28a28c7b6c676addce89136de3d8db49ea825a8c863472e36e42ead4ad/cryptography-50.0.2-cp314-cp314t-manylinux_2_34_aarch64.whl", hash = "sha256:4a20ce1e5cb4284a86692fdcba7cb8754185c6b2e5c56fcef3751cf451d3cdc2", size = 4716748, upload-time = "2026-09-30T14:44:28.447Z" }, + { url = "https://files.pythonhosted.org/packages/30/96/01546c7f69ea0e2ab790a2e4f0934a4052fb9b388147fbf83c2fd72f1e57/cryptography-50.0.2-cp314-cp314t-manylinux_2_34_ppc64le.whl", hash = "sha256:84f964e537f916e2cc85199e5a88742e964939b575ac8598b3f9d6cc416cdaf1", size = 5285085, upload-time = "2026-09-30T14:44:30.704Z" }, + { url = "https://files.pythonhosted.org/packages/6c/01/03263395f74d50b071e9e66daace3f8bef80493e5d410726f2ba8554736b/cryptography-50.0.2-cp314-cp314t-manylinux_2_34_x86_64.whl", hash = "sha256:828d49b0ff5a0e3975865571c5d91dbbdd0d38d8289b249a163e9425413a5e05", size = 4727268, upload-time = "2026-09-30T14:44:32.92Z" }, + { url = "https://files.pythonhosted.org/packages/eb/94/2bfe8f29ec0cc9c0d99359c4161adf32858e4934b72c6d100d2ac0bbe962/cryptography-50.0.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:deb9fde5c60e437ee4821bc9bc39ff31b42135c27e1dc61ef0a629389c1de62e", size = 4849503, upload-time = "2026-09-30T14:44:34.969Z" }, + { url = "https://files.pythonhosted.org/packages/54/44/e80651ecbf0e42b62e2bb5f5768916e07eea72e1297338956a61df361f88/cryptography-50.0.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:8c71ba2cd31fc93748c38e1b613200ff1c2665cbfd5341fe3a61cfde35a1430e", size = 5004057, upload-time = "2026-09-30T14:44:37.064Z" }, + { url = "https://files.pythonhosted.org/packages/f8/cc/1d33befb3cd7ea7e77d2d73f43f2066471da1b21f24a6156efcaabf6d2e8/cryptography-50.0.2-cp314-cp314t-win_amd64.whl", hash = "sha256:78198641e5be9521beea5aa782bb551a58068d10e6eb04c9c680c1b69f2e7d45", size = 3795868, upload-time = "2026-09-30T14:44:39.71Z" }, + { url = "https://files.pythonhosted.org/packages/2d/49/93f6a6e7a87c9aa68d44d3e1cdb5fe8f60c90d5d2f46acae9a56892816b8/cryptography-50.0.2-cp315-abi3.abi3t-macosx_11_0_arm64.whl", hash = "sha256:edc3342adf8f697fc5f59c887a304356f147b397809440ed64e2fa6af2f50f37", size = 4133708, upload-time = "2026-09-30T14:44:41.807Z" }, + { url = "https://files.pythonhosted.org/packages/8c/75/32ac2a56243d778805c16ca6a32b8f74fb757df7e28d7ecb560afafb59cf/cryptography-50.0.2-cp315-abi3.abi3t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d370b8d1dfcdf7130178137f6fbee6140774a1acc6cacefc4b42643ec11d0a3a", size = 4956267, upload-time = "2026-09-30T14:44:43.693Z" }, + { url = "https://files.pythonhosted.org/packages/aa/a4/2c8d734e43d97f0842ee9f1b7b4bfb3d0cf5e19edebf43c2afe6675c2320/cryptography-50.0.2-cp315-abi3.abi3t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:f2f9bd7f90c64fe89253f0a2c05e3c4856072660429ce8831b4235bf29403a67", size = 4966465, upload-time = "2026-09-30T14:44:45.769Z" }, + { url = "https://files.pythonhosted.org/packages/c2/58/ee288c829a6f41f6235ae9dd33d82fd19b45442b65b4c8a3da36963d9f7a/cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl", hash = "sha256:e275096ea1e60cc595cda2836fd4a6c725d1125108b868be17f53684d164e2cc", size = 4959356, upload-time = "2026-09-30T14:44:48.211Z" }, + { url = "https://files.pythonhosted.org/packages/92/20/9ded6d51ddd9897f6b6e81fb9ebea7951d7cc5d6c890b0ed8abf77a51a80/cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_28_ppc64le.whl", hash = "sha256:b13478603dcd0a2479ff8e87e2c19a7d525734686fe3c49542472293a204212d", size = 5548822, upload-time = "2026-09-30T14:44:50.86Z" }, + { url = "https://files.pythonhosted.org/packages/02/a8/8df951850d6b31d2a00218f19e2b3f999523437ed7a819df7fa427942fca/cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl", hash = "sha256:58a0c478eeca76fe5e07993c5a0703def34a6dc6a0cda4f5564639b33112ffe7", size = 5001199, upload-time = "2026-09-30T14:44:53.379Z" }, + { url = "https://files.pythonhosted.org/packages/8b/f9/36b3022218ce75b7cdf068fb95f809f9bd0d820e4955ef43b90c255cc7ac/cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_31_armv7l.whl", hash = "sha256:d38cdff612d06fa6a32840d5e1b1f7a27cee4a349aa9085d94a67789d6bfd408", size = 4629333, upload-time = "2026-09-30T14:44:55.635Z" }, + { url = "https://files.pythonhosted.org/packages/8c/72/20f99a219f6af47cdd1cbd978c243b92d71496e168a746138af44ded4f29/cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_34_aarch64.whl", hash = "sha256:fdd28f912fccfec1846a94e2e1e8f9b0012f557f0c46fe4f3eb0d7a87afcf90b", size = 4958822, upload-time = "2026-09-30T14:44:59.639Z" }, + { url = "https://files.pythonhosted.org/packages/f2/20/196f112617fb08eb4d608a2a6c422373d46f9cc2857f38fc0667033c0899/cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_34_ppc64le.whl", hash = "sha256:cbc8738fd8526d80f35cb3a40d41f41a2e7030bb3b18b09a6778ef63d291c2fd", size = 5506351, upload-time = "2026-09-30T14:45:02.267Z" }, + { url = "https://files.pythonhosted.org/packages/24/95/83378121ef3eaaaf71d4b781577ff794acb39b9e1b87a3f156898c8497ed/cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_34_x86_64.whl", hash = "sha256:e105ab60406787da31fccc883fc0f733af1efd78f0136a4599692c4083a73d0c", size = 5000859, upload-time = "2026-09-30T14:45:05.009Z" }, + { url = "https://files.pythonhosted.org/packages/22/f7/70fd7ae4d1dbfa7ba29b02e1b9068771519a86027756510b700ce81086a8/cryptography-50.0.2-cp315-abi3.abi3t-musllinux_1_2_aarch64.whl", hash = "sha256:6f8700550aa1474a91e5dc07049c46f98b423b5b1ddd0483e0b51362eeeaf5be", size = 5092151, upload-time = "2026-09-30T15:29:15.932Z" }, + { url = "https://files.pythonhosted.org/packages/d4/be/688367b74de86984bd58d8efacfc7c9e68b89a6a22ced0fb4f38db50254a/cryptography-50.0.2-cp315-abi3.abi3t-musllinux_1_2_x86_64.whl", hash = "sha256:c71be1cbfa5cd9a41ee452acf1eccd82b2c05950358b106ec8ceb83411d1a020", size = 5286120, upload-time = "2026-09-30T15:29:18.309Z" }, + { url = "https://files.pythonhosted.org/packages/39/d1/55f8a3f2ef5d1529e16835ef10cf0fe3d559ce237b46dddc440c0bba3649/cryptography-50.0.2-cp315-abi3.abi3t-win_amd64.whl", hash = "sha256:c423ab384a46c4dff7217b2ea5ba2e11cffdeab6441acd04cf65a369caf0366c", size = 4111557, upload-time = "2026-09-30T15:29:20.155Z" }, + { url = "https://files.pythonhosted.org/packages/23/ad/ac987755d00e1e64273760228d2635ae38dae2be83e3c6e0d3289d91dec3/cryptography-50.0.2-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:0ec5f09541743261e66e291b4a0cbf0fb2997aeaab6d9e9c740b9dba1b58d1c2", size = 3943588, upload-time = "2026-09-30T15:29:22.265Z" }, + { url = "https://files.pythonhosted.org/packages/d5/8d/6d585339bedf85d45044c85d8412dac53f2bb6f918e8b7777efba1787844/cryptography-50.0.2-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:c5e67125c7dca78d199ec4e116aa93dbb83494808ecbb8211a2cb09b1bf41dbd", size = 4756166, upload-time = "2026-09-30T15:29:24.58Z" }, + { url = "https://files.pythonhosted.org/packages/bf/f1/1c1f6874e8550cfddd4b688ceb38cefb6ed15ceed224d56f133f3d88c214/cryptography-50.0.2-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ee247f5c245c9a2fe7c8e2214e295918838e44e00a45a6718451e4004219e767", size = 4749145, upload-time = "2026-09-30T15:29:26.807Z" }, + { url = "https://files.pythonhosted.org/packages/c1/63/61b15dc1a8de03fe0adbe3fd7608b3ad5c73bf50993bbcb1faaa930afe33/cryptography-50.0.2-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:dfe9763530994147d9af1def057a5b9658b00e8f8fe8743d144d1e0911c2e454", size = 4763638, upload-time = "2026-09-30T15:29:28.588Z" }, + { url = "https://files.pythonhosted.org/packages/fc/35/b345bdfa40c9126df1a9d33236aa98418367931b8725f84fc3ae2b98dc59/cryptography-50.0.2-cp39-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:58ddb5a8e3179d12f19e4ea34d2d32e9d63a4baa142c875c1eb59f41b7243acd", size = 5382217, upload-time = "2026-09-30T15:29:30.589Z" }, + { url = "https://files.pythonhosted.org/packages/4f/87/ef344a9e616871f2519c22d6afcda79ddd5d35e9592d95eb6e677608d055/cryptography-50.0.2-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:f21e8a22c8605750c7af886bab299a363721264061b4ac0a30efb73cfd58efc5", size = 4781387, upload-time = "2026-09-30T15:29:32.605Z" }, + { url = "https://files.pythonhosted.org/packages/90/5b/f2fdb13cd0b96f6f932c8627bb292a45f11c64d21620a8e120aee9a3b848/cryptography-50.0.2-cp39-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:9c8402a82ea0dc4ceeab793db05f0fafa8ca139ca34fcde5df0f596103c74107", size = 4403790, upload-time = "2026-09-30T15:29:34.374Z" }, + { url = "https://files.pythonhosted.org/packages/bc/ce/7e4f662b1e3c393513569e402cfc85ac7da0bd3d5435e122a3140219eb2d/cryptography-50.0.2-cp39-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:0ddc924c04591c2811ca024d62ecad4f7f6f08af8939c211438f48a16bd23602", size = 4764319, upload-time = "2026-09-30T15:29:36.149Z" }, + { url = "https://files.pythonhosted.org/packages/3c/3f/86ff33ce34cc0de6847fb96e035a1a760d81652e38643f617c02ad32ef7a/cryptography-50.0.2-cp39-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:a6557e5f38e065ca9fbdaf7cfc7435ecb1d113aa81a022d1b51921ee7432e227", size = 5338560, upload-time = "2026-09-30T15:29:39.053Z" }, + { url = "https://files.pythonhosted.org/packages/40/cf/6b5c8e2fd9202d98988ab7cb5cc5c991704c4ad55f492ff408e4969f83f1/cryptography-50.0.2-cp39-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:1981f1db4630889b9ef7803fadef12b056f428cb6b85c27ba57b774793b6093c", size = 4780973, upload-time = "2026-09-30T15:29:41.251Z" }, + { url = "https://files.pythonhosted.org/packages/10/bf/8d6ebc7dded797bd0f0160d52188021211f011a2b164ef0ae1dac4587465/cryptography-50.0.2-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:7a8701d6b584d76e909e3d305b7d126b41439876a5aaf76cddc67fc230eafa2e", size = 4897738, upload-time = "2026-09-30T15:29:43.106Z" }, + { url = "https://files.pythonhosted.org/packages/d4/aa/f3f6e0de7e6253b8baa8b2d8fb9d50924fa75cee3d4624bd4bc1208ee923/cryptography-50.0.2-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:ce47f66801c20ec6c6632453bb5960fe38939e9306970b48b3a5a26de7745d94", size = 5058280, upload-time = "2026-09-30T15:29:44.827Z" }, + { url = "https://files.pythonhosted.org/packages/f6/b6/a1faf3a27ae9405fb34b1713cc73b2d8a26b04d5c561578fa2e6ef3e5bb9/cryptography-50.0.2-cp39-abi3-win_amd64.whl", hash = "sha256:4e81d95e5bafc2d6e34e4bed780e53e4d5b9a2f928573428aa4d35fbec1eb0de", size = 3854095, upload-time = "2026-09-30T15:29:46.782Z" }, + { url = "https://files.pythonhosted.org/packages/1d/7a/f08d34ce09d60f89ebd391e2ebc6ba2b995e6dd7552f41820f8085f94e53/cryptography-50.0.2-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:92e665960f25fcdc73725b9cec7a3824f279ba97a98653afe9ffac2e43668f67", size = 4716035, upload-time = "2026-09-30T15:29:48.681Z" }, + { url = "https://files.pythonhosted.org/packages/45/67/e18fb65592451a2acb76e9f2fbe14e0f47a8318b4c5430f1633851d03daa/cryptography-50.0.2-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:eef4c2f3423810b3070ab391f85436d2f8bbfcb286ac15cbc73190b3563b1f1a", size = 4726917, upload-time = "2026-09-30T15:29:50.608Z" }, + { url = "https://files.pythonhosted.org/packages/83/28/38fdce17e60f6b825e69fc3b7f75e70a6612759980704697e1de4cbfaf6e/cryptography-50.0.2-pp311-pypy311_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:7c6d0330c472d96f6a6afe24d80dfdf15176c33096f0a4397ae4c60f3dd3be48", size = 4715341, upload-time = "2026-09-30T15:29:52.522Z" }, + { url = "https://files.pythonhosted.org/packages/b6/b1/d9121a717e0f893c64bd6ca7702614778d7df2a5c309128a002421788516/cryptography-50.0.2-pp311-pypy311_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:1ba34f04897fcdaa73f74145c25f3ec146fbd56593853e88adc2e811303c5f42", size = 4726322, upload-time = "2026-09-30T15:29:54.263Z" }, + { url = "https://files.pythonhosted.org/packages/36/8b/e6d153808bf353e152abd2fd4d8f09670d956ac78379ac46e60d7efbf04c/cryptography-50.0.2-pp311-pypy311_pp80-macosx_11_0_arm64.whl", hash = "sha256:3dc4fd8058cea1644971207d530e1a03a184a805ffc8ebdddf0599d78a331b81", size = 3873097, upload-time = "2026-09-30T15:29:56.097Z" }, + { url = "https://files.pythonhosted.org/packages/ca/1d/1271f287ff7170ddafc2aad36260c4eec20ccd2fea70f38455e9d56d427b/cryptography-50.0.2-pp311-pypy311_pp80-win_amd64.whl", hash = "sha256:7b75de3c8b3be1cdb1052747c929440c3eea46c1bc2cb8a6e3a48388e9b7b452", size = 3805376, upload-time = "2026-09-30T15:29:58.729Z" }, ] [[package]] @@ -677,11 +732,11 @@ wheels = [ [[package]] name = "idna" -version = "3.18" +version = "3.20" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/cd/63/9496c57188a2ee585e0f1db071d75089a11e98aa86eb99d9d7618fc1edce/idna-3.18.tar.gz", hash = "sha256:ffb385a7e039654cef1ab9ef32c6fafe283c0c0467bba1d9029738ce4a14a848", size = 196711, upload-time = "2026-06-02T14:34:07.794Z" } +sdist = { url = "https://files.pythonhosted.org/packages/f5/08/8eea9d4b8302028f3abb2c0813953f7aec26d33b7a8960ed760e65ff29fa/idna-3.20.tar.gz", hash = "sha256:a7db850025b95ded1eae8a46181a1a6c56c92c96f0e2b005d9ff8dc0210cab44", size = 216463, upload-time = "2026-09-17T14:11:04.752Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/1e/5e/d4e9f1a599fb8e573b7b87160658329fbf28d19eac2718f51fc3def3aa5a/idna-3.18-py3-none-any.whl", hash = "sha256:7f952cbe720b688055e3f87de14f5c3e5fdaa8bc3928985c4077ca689de849a2", size = 65455, upload-time = "2026-06-02T14:34:06.319Z" }, + { url = "https://files.pythonhosted.org/packages/58/a2/bb081bab032533a855d44de1d56f8e8426114ff1ba5d1f07a438a0a654f8/idna-3.20-py3-none-any.whl", hash = "sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c", size = 69583, upload-time = "2026-09-17T14:11:03.168Z" }, ] [[package]] @@ -696,9 +751,10 @@ wheels = [ [[package]] name = "ironclaw-e2e" version = "0.1.0" -source = { virtual = "." } +source = { editable = "." } dependencies = [ { name = "aiohttp" }, + { name = "certifi" }, { name = "cryptography" }, { name = "httpx" }, { name = "playwright" }, @@ -718,11 +774,12 @@ vision = [ [package.metadata] requires-dist = [ - { name = "aiohttp", specifier = ">=3.9" }, + { name = "aiohttp", specifier = ">=3.14.4" }, { name = "anthropic", marker = "extra == 'vision'", specifier = ">=0.40" }, - { name = "cryptography", specifier = ">=42.0" }, + { name = "certifi", specifier = ">=2026.10.19" }, + { name = "cryptography", specifier = ">=50.0.2" }, { name = "httpx", specifier = ">=0.27" }, - { name = "playwright", specifier = ">=1.45" }, + { name = "playwright", specifier = ">=1.64.1" }, { name = "pytest", specifier = ">=8.0" }, { name = "pytest-asyncio", specifier = ">=0.23" }, { name = "pytest-playwright", specifier = ">=0.5" }, @@ -819,119 +876,160 @@ wheels = [ [[package]] name = "multidict" -version = "6.7.1" +version = "7.1.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/1a/c2/c2d94cbe6ac1753f3fc980da97b3d930efe1da3af3c9f5125354436c073d/multidict-6.7.1.tar.gz", hash = "sha256:ec6652a1bee61c53a3e5776b6049172c53b6aaba34f18c9ad04f82712bac623d", size = 102010, upload-time = "2026-01-26T02:46:45.979Z" } +sdist = { url = "https://files.pythonhosted.org/packages/f9/79/84ddb5ba16c4eb2c69c71db76ae3c579fe546e511f7170c7e27eedbab7c1/multidict-7.1.0.tar.gz", hash = "sha256:61a4e5d81b8d4e4ad61964b230129e7a2b914793d96289029078fc9009f074ec", size = 362341, upload-time = "2026-10-09T20:31:38.279Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/ce/f1/a90635c4f88fb913fbf4ce660b83b7445b7a02615bda034b2f8eb38fd597/multidict-6.7.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:7ff981b266af91d7b4b3793ca3382e53229088d193a85dfad6f5f4c27fc73e5d", size = 76626, upload-time = "2026-01-26T02:43:26.485Z" }, - { url = "https://files.pythonhosted.org/packages/a6/9b/267e64eaf6fc637a15b35f5de31a566634a2740f97d8d094a69d34f524a4/multidict-6.7.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:844c5bca0b5444adb44a623fb0a1310c2f4cd41f402126bb269cd44c9b3f3e1e", size = 44706, upload-time = "2026-01-26T02:43:27.607Z" }, - { url = "https://files.pythonhosted.org/packages/dd/a4/d45caf2b97b035c57267791ecfaafbd59c68212004b3842830954bb4b02e/multidict-6.7.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f2a0a924d4c2e9afcd7ec64f9de35fcd96915149b2216e1cb2c10a56df483855", size = 44356, upload-time = "2026-01-26T02:43:28.661Z" }, - { url = "https://files.pythonhosted.org/packages/fd/d2/0a36c8473f0cbaeadd5db6c8b72d15bbceeec275807772bfcd059bef487d/multidict-6.7.1-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:8be1802715a8e892c784c0197c2ace276ea52702a0ede98b6310c8f255a5afb3", size = 244355, upload-time = "2026-01-26T02:43:31.165Z" }, - { url = "https://files.pythonhosted.org/packages/5d/16/8c65be997fd7dd311b7d39c7b6e71a0cb449bad093761481eccbbe4b42a2/multidict-6.7.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2e2d2ed645ea29f31c4c7ea1552fcfd7cb7ba656e1eafd4134a6620c9f5fdd9e", size = 246433, upload-time = "2026-01-26T02:43:32.581Z" }, - { url = "https://files.pythonhosted.org/packages/01/fb/4dbd7e848d2799c6a026ec88ad39cf2b8416aa167fcc903baa55ecaa045c/multidict-6.7.1-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:95922cee9a778659e91db6497596435777bd25ed116701a4c034f8e46544955a", size = 225376, upload-time = "2026-01-26T02:43:34.417Z" }, - { url = "https://files.pythonhosted.org/packages/b6/8a/4a3a6341eac3830f6053062f8fbc9a9e54407c80755b3f05bc427295c2d0/multidict-6.7.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:6b83cabdc375ffaaa15edd97eb7c0c672ad788e2687004990074d7d6c9b140c8", size = 257365, upload-time = "2026-01-26T02:43:35.741Z" }, - { url = "https://files.pythonhosted.org/packages/f7/a2/dd575a69c1aa206e12d27d0770cdf9b92434b48a9ef0cd0d1afdecaa93c4/multidict-6.7.1-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:38fb49540705369bab8484db0689d86c0a33a0a9f2c1b197f506b71b4b6c19b0", size = 254747, upload-time = "2026-01-26T02:43:36.976Z" }, - { url = "https://files.pythonhosted.org/packages/5a/56/21b27c560c13822ed93133f08aa6372c53a8e067f11fbed37b4adcdac922/multidict-6.7.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:439cbebd499f92e9aa6793016a8acaa161dfa749ae86d20960189f5398a19144", size = 246293, upload-time = "2026-01-26T02:43:38.258Z" }, - { url = "https://files.pythonhosted.org/packages/5a/a4/23466059dc3854763423d0ad6c0f3683a379d97673b1b89ec33826e46728/multidict-6.7.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:6d3bc717b6fe763b8be3f2bee2701d3c8eb1b2a8ae9f60910f1b2860c82b6c49", size = 242962, upload-time = "2026-01-26T02:43:40.034Z" }, - { url = "https://files.pythonhosted.org/packages/1f/67/51dd754a3524d685958001e8fa20a0f5f90a6a856e0a9dcabff69be3dbb7/multidict-6.7.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:619e5a1ac57986dbfec9f0b301d865dddf763696435e2962f6d9cf2fdff2bb71", size = 237360, upload-time = "2026-01-26T02:43:41.752Z" }, - { url = "https://files.pythonhosted.org/packages/64/3f/036dfc8c174934d4b55d86ff4f978e558b0e585cef70cfc1ad01adc6bf18/multidict-6.7.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:0b38ebffd9be37c1170d33bc0f36f4f262e0a09bc1aac1c34c7aa51a7293f0b3", size = 245940, upload-time = "2026-01-26T02:43:43.042Z" }, - { url = "https://files.pythonhosted.org/packages/3d/20/6214d3c105928ebc353a1c644a6ef1408bc5794fcb4f170bb524a3c16311/multidict-6.7.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:10ae39c9cfe6adedcdb764f5e8411d4a92b055e35573a2eaa88d3323289ef93c", size = 253502, upload-time = "2026-01-26T02:43:44.371Z" }, - { url = "https://files.pythonhosted.org/packages/b1/e2/c653bc4ae1be70a0f836b82172d643fcf1dade042ba2676ab08ec08bff0f/multidict-6.7.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:25167cc263257660290fba06b9318d2026e3c910be240a146e1f66dd114af2b0", size = 247065, upload-time = "2026-01-26T02:43:45.745Z" }, - { url = "https://files.pythonhosted.org/packages/c8/11/a854b4154cd3bd8b1fd375e8a8ca9d73be37610c361543d56f764109509b/multidict-6.7.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:128441d052254f42989ef98b7b6a6ecb1e6f708aa962c7984235316db59f50fa", size = 241870, upload-time = "2026-01-26T02:43:47.054Z" }, - { url = "https://files.pythonhosted.org/packages/13/bf/9676c0392309b5fdae322333d22a829715b570edb9baa8016a517b55b558/multidict-6.7.1-cp311-cp311-win32.whl", hash = "sha256:d62b7f64ffde3b99d06b707a280db04fb3855b55f5a06df387236051d0668f4a", size = 41302, upload-time = "2026-01-26T02:43:48.753Z" }, - { url = "https://files.pythonhosted.org/packages/c9/68/f16a3a8ba6f7b6dc92a1f19669c0810bd2c43fc5a02da13b1cbf8e253845/multidict-6.7.1-cp311-cp311-win_amd64.whl", hash = "sha256:bdbf9f3b332abd0cdb306e7c2113818ab1e922dc84b8f8fd06ec89ed2a19ab8b", size = 45981, upload-time = "2026-01-26T02:43:49.921Z" }, - { url = "https://files.pythonhosted.org/packages/ac/ad/9dd5305253fa00cd3c7555dbef69d5bf4133debc53b87ab8d6a44d411665/multidict-6.7.1-cp311-cp311-win_arm64.whl", hash = "sha256:b8c990b037d2fff2f4e33d3f21b9b531c5745b33a49a7d6dbe7a177266af44f6", size = 43159, upload-time = "2026-01-26T02:43:51.635Z" }, - { url = "https://files.pythonhosted.org/packages/8d/9c/f20e0e2cf80e4b2e4b1c365bf5fe104ee633c751a724246262db8f1a0b13/multidict-6.7.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:a90f75c956e32891a4eda3639ce6dd86e87105271f43d43442a3aedf3cddf172", size = 76893, upload-time = "2026-01-26T02:43:52.754Z" }, - { url = "https://files.pythonhosted.org/packages/fe/cf/18ef143a81610136d3da8193da9d80bfe1cb548a1e2d1c775f26b23d024a/multidict-6.7.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:3fccb473e87eaa1382689053e4a4618e7ba7b9b9b8d6adf2027ee474597128cd", size = 45456, upload-time = "2026-01-26T02:43:53.893Z" }, - { url = "https://files.pythonhosted.org/packages/a9/65/1caac9d4cd32e8433908683446eebc953e82d22b03d10d41a5f0fefe991b/multidict-6.7.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b0fa96985700739c4c7853a43c0b3e169360d6855780021bfc6d0f1ce7c123e7", size = 43872, upload-time = "2026-01-26T02:43:55.041Z" }, - { url = "https://files.pythonhosted.org/packages/cf/3b/d6bd75dc4f3ff7c73766e04e705b00ed6dbbaccf670d9e05a12b006f5a21/multidict-6.7.1-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:cb2a55f408c3043e42b40cc8eecd575afa27b7e0b956dfb190de0f8499a57a53", size = 251018, upload-time = "2026-01-26T02:43:56.198Z" }, - { url = "https://files.pythonhosted.org/packages/fd/80/c959c5933adedb9ac15152e4067c702a808ea183a8b64cf8f31af8ad3155/multidict-6.7.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:eb0ce7b2a32d09892b3dd6cc44877a0d02a33241fafca5f25c8b6b62374f8b75", size = 258883, upload-time = "2026-01-26T02:43:57.499Z" }, - { url = "https://files.pythonhosted.org/packages/86/85/7ed40adafea3d4f1c8b916e3b5cc3a8e07dfcdcb9cd72800f4ed3ca1b387/multidict-6.7.1-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c3a32d23520ee37bf327d1e1a656fec76a2edd5c038bf43eddfa0572ec49c60b", size = 242413, upload-time = "2026-01-26T02:43:58.755Z" }, - { url = "https://files.pythonhosted.org/packages/d2/57/b8565ff533e48595503c785f8361ff9a4fde4d67de25c207cd0ba3befd03/multidict-6.7.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:9c90fed18bffc0189ba814749fdcc102b536e83a9f738a9003e569acd540a733", size = 268404, upload-time = "2026-01-26T02:44:00.216Z" }, - { url = "https://files.pythonhosted.org/packages/e0/50/9810c5c29350f7258180dfdcb2e52783a0632862eb334c4896ac717cebcb/multidict-6.7.1-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:da62917e6076f512daccfbbde27f46fed1c98fee202f0559adec8ee0de67f71a", size = 269456, upload-time = "2026-01-26T02:44:02.202Z" }, - { url = "https://files.pythonhosted.org/packages/f3/8d/5e5be3ced1d12966fefb5c4ea3b2a5b480afcea36406559442c6e31d4a48/multidict-6.7.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bfde23ef6ed9db7eaee6c37dcec08524cb43903c60b285b172b6c094711b3961", size = 256322, upload-time = "2026-01-26T02:44:03.56Z" }, - { url = "https://files.pythonhosted.org/packages/31/6e/d8a26d81ac166a5592782d208dd90dfdc0a7a218adaa52b45a672b46c122/multidict-6.7.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3758692429e4e32f1ba0df23219cd0b4fc0a52f476726fff9337d1a57676a582", size = 253955, upload-time = "2026-01-26T02:44:04.845Z" }, - { url = "https://files.pythonhosted.org/packages/59/4c/7c672c8aad41534ba619bcd4ade7a0dc87ed6b8b5c06149b85d3dd03f0cd/multidict-6.7.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:398c1478926eca669f2fd6a5856b6de9c0acf23a2cb59a14c0ba5844fa38077e", size = 251254, upload-time = "2026-01-26T02:44:06.133Z" }, - { url = "https://files.pythonhosted.org/packages/7b/bd/84c24de512cbafbdbc39439f74e967f19570ce7924e3007174a29c348916/multidict-6.7.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:c102791b1c4f3ab36ce4101154549105a53dc828f016356b3e3bcae2e3a039d3", size = 252059, upload-time = "2026-01-26T02:44:07.518Z" }, - { url = "https://files.pythonhosted.org/packages/fa/ba/f5449385510825b73d01c2d4087bf6d2fccc20a2d42ac34df93191d3dd03/multidict-6.7.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:a088b62bd733e2ad12c50dad01b7d0166c30287c166e137433d3b410add807a6", size = 263588, upload-time = "2026-01-26T02:44:09.382Z" }, - { url = "https://files.pythonhosted.org/packages/d7/11/afc7c677f68f75c84a69fe37184f0f82fce13ce4b92f49f3db280b7e92b3/multidict-6.7.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:3d51ff4785d58d3f6c91bdbffcb5e1f7ddfda557727043aa20d20ec4f65e324a", size = 259642, upload-time = "2026-01-26T02:44:10.73Z" }, - { url = "https://files.pythonhosted.org/packages/2b/17/ebb9644da78c4ab36403739e0e6e0e30ebb135b9caf3440825001a0bddcb/multidict-6.7.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fc5907494fccf3e7d3f94f95c91d6336b092b5fc83811720fae5e2765890dfba", size = 251377, upload-time = "2026-01-26T02:44:12.042Z" }, - { url = "https://files.pythonhosted.org/packages/ca/a4/840f5b97339e27846c46307f2530a2805d9d537d8b8bd416af031cad7fa0/multidict-6.7.1-cp312-cp312-win32.whl", hash = "sha256:28ca5ce2fd9716631133d0e9a9b9a745ad7f60bac2bccafb56aa380fc0b6c511", size = 41887, upload-time = "2026-01-26T02:44:14.245Z" }, - { url = "https://files.pythonhosted.org/packages/80/31/0b2517913687895f5904325c2069d6a3b78f66cc641a86a2baf75a05dcbb/multidict-6.7.1-cp312-cp312-win_amd64.whl", hash = "sha256:fcee94dfbd638784645b066074b338bc9cc155d4b4bffa4adce1615c5a426c19", size = 46053, upload-time = "2026-01-26T02:44:15.371Z" }, - { url = "https://files.pythonhosted.org/packages/0c/5b/aba28e4ee4006ae4c7df8d327d31025d760ffa992ea23812a601d226e682/multidict-6.7.1-cp312-cp312-win_arm64.whl", hash = "sha256:ba0a9fb644d0c1a2194cf7ffb043bd852cea63a57f66fbd33959f7dae18517bf", size = 43307, upload-time = "2026-01-26T02:44:16.852Z" }, - { url = "https://files.pythonhosted.org/packages/f2/22/929c141d6c0dba87d3e1d38fbdf1ba8baba86b7776469f2bc2d3227a1e67/multidict-6.7.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:2b41f5fed0ed563624f1c17630cb9941cf2309d4df00e494b551b5f3e3d67a23", size = 76174, upload-time = "2026-01-26T02:44:18.509Z" }, - { url = "https://files.pythonhosted.org/packages/c7/75/bc704ae15fee974f8fccd871305e254754167dce5f9e42d88a2def741a1d/multidict-6.7.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:84e61e3af5463c19b67ced91f6c634effb89ef8bfc5ca0267f954451ed4bb6a2", size = 45116, upload-time = "2026-01-26T02:44:19.745Z" }, - { url = "https://files.pythonhosted.org/packages/79/76/55cd7186f498ed080a18440c9013011eb548f77ae1b297206d030eb1180a/multidict-6.7.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:935434b9853c7c112eee7ac891bc4cb86455aa631269ae35442cb316790c1445", size = 43524, upload-time = "2026-01-26T02:44:21.571Z" }, - { url = "https://files.pythonhosted.org/packages/e9/3c/414842ef8d5a1628d68edee29ba0e5bcf235dbfb3ccd3ea303a7fe8c72ff/multidict-6.7.1-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:432feb25a1cb67fe82a9680b4d65fb542e4635cb3166cd9c01560651ad60f177", size = 249368, upload-time = "2026-01-26T02:44:22.803Z" }, - { url = "https://files.pythonhosted.org/packages/f6/32/befed7f74c458b4a525e60519fe8d87eef72bb1e99924fa2b0f9d97a221e/multidict-6.7.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e82d14e3c948952a1a85503817e038cba5905a3352de76b9a465075d072fba23", size = 256952, upload-time = "2026-01-26T02:44:24.306Z" }, - { url = "https://files.pythonhosted.org/packages/03/d6/c878a44ba877f366630c860fdf74bfb203c33778f12b6ac274936853c451/multidict-6.7.1-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:4cfb48c6ea66c83bcaaf7e4dfa7ec1b6bbcf751b7db85a328902796dfde4c060", size = 240317, upload-time = "2026-01-26T02:44:25.772Z" }, - { url = "https://files.pythonhosted.org/packages/68/49/57421b4d7ad2e9e60e25922b08ceb37e077b90444bde6ead629095327a6f/multidict-6.7.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:1d540e51b7e8e170174555edecddbd5538105443754539193e3e1061864d444d", size = 267132, upload-time = "2026-01-26T02:44:27.648Z" }, - { url = "https://files.pythonhosted.org/packages/b7/fe/ec0edd52ddbcea2a2e89e174f0206444a61440b40f39704e64dc807a70bd/multidict-6.7.1-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:273d23f4b40f3dce4d6c8a821c741a86dec62cded82e1175ba3d99be128147ed", size = 268140, upload-time = "2026-01-26T02:44:29.588Z" }, - { url = "https://files.pythonhosted.org/packages/b0/73/6e1b01cbeb458807aa0831742232dbdd1fa92bfa33f52a3f176b4ff3dc11/multidict-6.7.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9d624335fd4fa1c08a53f8b4be7676ebde19cd092b3895c421045ca87895b429", size = 254277, upload-time = "2026-01-26T02:44:30.902Z" }, - { url = "https://files.pythonhosted.org/packages/6a/b2/5fb8c124d7561a4974c342bc8c778b471ebbeb3cc17df696f034a7e9afe7/multidict-6.7.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:12fad252f8b267cc75b66e8fc51b3079604e8d43a75428ffe193cd9e2195dfd6", size = 252291, upload-time = "2026-01-26T02:44:32.31Z" }, - { url = "https://files.pythonhosted.org/packages/5a/96/51d4e4e06bcce92577fcd488e22600bd38e4fd59c20cb49434d054903bd2/multidict-6.7.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:03ede2a6ffbe8ef936b92cb4529f27f42be7f56afcdab5ab739cd5f27fb1cbf9", size = 250156, upload-time = "2026-01-26T02:44:33.734Z" }, - { url = "https://files.pythonhosted.org/packages/db/6b/420e173eec5fba721a50e2a9f89eda89d9c98fded1124f8d5c675f7a0c0f/multidict-6.7.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:90efbcf47dbe33dcf643a1e400d67d59abeac5db07dc3f27d6bdeae497a2198c", size = 249742, upload-time = "2026-01-26T02:44:35.222Z" }, - { url = "https://files.pythonhosted.org/packages/44/a3/ec5b5bd98f306bc2aa297b8c6f11a46714a56b1e6ef5ebda50a4f5d7c5fb/multidict-6.7.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:5c4b9bfc148f5a91be9244d6264c53035c8a0dcd2f51f1c3c6e30e30ebaa1c84", size = 262221, upload-time = "2026-01-26T02:44:36.604Z" }, - { url = "https://files.pythonhosted.org/packages/cd/f7/e8c0d0da0cd1e28d10e624604e1a36bcc3353aaebdfdc3a43c72bc683a12/multidict-6.7.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:401c5a650f3add2472d1d288c26deebc540f99e2fb83e9525007a74cd2116f1d", size = 258664, upload-time = "2026-01-26T02:44:38.008Z" }, - { url = "https://files.pythonhosted.org/packages/52/da/151a44e8016dd33feed44f730bd856a66257c1ee7aed4f44b649fb7edeb3/multidict-6.7.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:97891f3b1b3ffbded884e2916cacf3c6fc87b66bb0dde46f7357404750559f33", size = 249490, upload-time = "2026-01-26T02:44:39.386Z" }, - { url = "https://files.pythonhosted.org/packages/87/af/a3b86bf9630b732897f6fc3f4c4714b90aa4361983ccbdcd6c0339b21b0c/multidict-6.7.1-cp313-cp313-win32.whl", hash = "sha256:e1c5988359516095535c4301af38d8a8838534158f649c05dd1050222321bcb3", size = 41695, upload-time = "2026-01-26T02:44:41.318Z" }, - { url = "https://files.pythonhosted.org/packages/b2/35/e994121b0e90e46134673422dd564623f93304614f5d11886b1b3e06f503/multidict-6.7.1-cp313-cp313-win_amd64.whl", hash = "sha256:960c83bf01a95b12b08fd54324a4eb1d5b52c88932b5cba5d6e712bb3ed12eb5", size = 45884, upload-time = "2026-01-26T02:44:42.488Z" }, - { url = "https://files.pythonhosted.org/packages/ca/61/42d3e5dbf661242a69c97ea363f2d7b46c567da8eadef8890022be6e2ab0/multidict-6.7.1-cp313-cp313-win_arm64.whl", hash = "sha256:563fe25c678aaba333d5399408f5ec3c383ca5b663e7f774dd179a520b8144df", size = 43122, upload-time = "2026-01-26T02:44:43.664Z" }, - { url = "https://files.pythonhosted.org/packages/6d/b3/e6b21c6c4f314bb956016b0b3ef2162590a529b84cb831c257519e7fde44/multidict-6.7.1-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:c76c4bec1538375dad9d452d246ca5368ad6e1c9039dadcf007ae59c70619ea1", size = 83175, upload-time = "2026-01-26T02:44:44.894Z" }, - { url = "https://files.pythonhosted.org/packages/fb/76/23ecd2abfe0957b234f6c960f4ade497f55f2c16aeb684d4ecdbf1c95791/multidict-6.7.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:57b46b24b5d5ebcc978da4ec23a819a9402b4228b8a90d9c656422b4bdd8a963", size = 48460, upload-time = "2026-01-26T02:44:46.106Z" }, - { url = "https://files.pythonhosted.org/packages/c4/57/a0ed92b23f3a042c36bc4227b72b97eca803f5f1801c1ab77c8a212d455e/multidict-6.7.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:e954b24433c768ce78ab7929e84ccf3422e46deb45a4dc9f93438f8217fa2d34", size = 46930, upload-time = "2026-01-26T02:44:47.278Z" }, - { url = "https://files.pythonhosted.org/packages/b5/66/02ec7ace29162e447f6382c495dc95826bf931d3818799bbef11e8f7df1a/multidict-6.7.1-cp313-cp313t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:3bd231490fa7217cc832528e1cd8752a96f0125ddd2b5749390f7c3ec8721b65", size = 242582, upload-time = "2026-01-26T02:44:48.604Z" }, - { url = "https://files.pythonhosted.org/packages/58/18/64f5a795e7677670e872673aca234162514696274597b3708b2c0d276cce/multidict-6.7.1-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:253282d70d67885a15c8a7716f3a73edf2d635793ceda8173b9ecc21f2fb8292", size = 250031, upload-time = "2026-01-26T02:44:50.544Z" }, - { url = "https://files.pythonhosted.org/packages/c8/ed/e192291dbbe51a8290c5686f482084d31bcd9d09af24f63358c3d42fd284/multidict-6.7.1-cp313-cp313t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:0b4c48648d7649c9335cf1927a8b87fa692de3dcb15faa676c6a6f1f1aabda43", size = 228596, upload-time = "2026-01-26T02:44:51.951Z" }, - { url = "https://files.pythonhosted.org/packages/1e/7e/3562a15a60cf747397e7f2180b0a11dc0c38d9175a650e75fa1b4d325e15/multidict-6.7.1-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:98bc624954ec4d2c7cb074b8eefc2b5d0ce7d482e410df446414355d158fe4ca", size = 257492, upload-time = "2026-01-26T02:44:53.902Z" }, - { url = "https://files.pythonhosted.org/packages/24/02/7d0f9eae92b5249bb50ac1595b295f10e263dd0078ebb55115c31e0eaccd/multidict-6.7.1-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:1b99af4d9eec0b49927b4402bcbb58dea89d3e0db8806a4086117019939ad3dd", size = 255899, upload-time = "2026-01-26T02:44:55.316Z" }, - { url = "https://files.pythonhosted.org/packages/00/e3/9b60ed9e23e64c73a5cde95269ef1330678e9c6e34dd4eb6b431b85b5a10/multidict-6.7.1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6aac4f16b472d5b7dc6f66a0d49dd57b0e0902090be16594dc9ebfd3d17c47e7", size = 247970, upload-time = "2026-01-26T02:44:56.783Z" }, - { url = "https://files.pythonhosted.org/packages/3e/06/538e58a63ed5cfb0bd4517e346b91da32fde409d839720f664e9a4ae4f9d/multidict-6.7.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:21f830fe223215dffd51f538e78c172ed7c7f60c9b96a2bf05c4848ad49921c3", size = 245060, upload-time = "2026-01-26T02:44:58.195Z" }, - { url = "https://files.pythonhosted.org/packages/b2/2f/d743a3045a97c895d401e9bd29aaa09b94f5cbdf1bd561609e5a6c431c70/multidict-6.7.1-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:f5dd81c45b05518b9aa4da4aa74e1c93d715efa234fd3e8a179df611cc85e5f4", size = 235888, upload-time = "2026-01-26T02:44:59.57Z" }, - { url = "https://files.pythonhosted.org/packages/38/83/5a325cac191ab28b63c52f14f1131f3b0a55ba3b9aa65a6d0bf2a9b921a0/multidict-6.7.1-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:eb304767bca2bb92fb9c5bd33cedc95baee5bb5f6c88e63706533a1c06ad08c8", size = 243554, upload-time = "2026-01-26T02:45:01.054Z" }, - { url = "https://files.pythonhosted.org/packages/20/1f/9d2327086bd15da2725ef6aae624208e2ef828ed99892b17f60c344e57ed/multidict-6.7.1-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:c9035dde0f916702850ef66460bc4239d89d08df4d02023a5926e7446724212c", size = 252341, upload-time = "2026-01-26T02:45:02.484Z" }, - { url = "https://files.pythonhosted.org/packages/e8/2c/2a1aa0280cf579d0f6eed8ee5211c4f1730bd7e06c636ba2ee6aafda302e/multidict-6.7.1-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:af959b9beeb66c822380f222f0e0a1889331597e81f1ded7f374f3ecb0fd6c52", size = 246391, upload-time = "2026-01-26T02:45:03.862Z" }, - { url = "https://files.pythonhosted.org/packages/e5/03/7ca022ffc36c5a3f6e03b179a5ceb829be9da5783e6fe395f347c0794680/multidict-6.7.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:41f2952231456154ee479651491e94118229844dd7226541788be783be2b5108", size = 243422, upload-time = "2026-01-26T02:45:05.296Z" }, - { url = "https://files.pythonhosted.org/packages/dc/1d/b31650eab6c5778aceed46ba735bd97f7c7d2f54b319fa916c0f96e7805b/multidict-6.7.1-cp313-cp313t-win32.whl", hash = "sha256:df9f19c28adcb40b6aae30bbaa1478c389efd50c28d541d76760199fc1037c32", size = 47770, upload-time = "2026-01-26T02:45:06.754Z" }, - { url = "https://files.pythonhosted.org/packages/ac/5b/2d2d1d522e51285bd61b1e20df8f47ae1a9d80839db0b24ea783b3832832/multidict-6.7.1-cp313-cp313t-win_amd64.whl", hash = "sha256:d54ecf9f301853f2c5e802da559604b3e95bb7a3b01a9c295c6ee591b9882de8", size = 53109, upload-time = "2026-01-26T02:45:08.044Z" }, - { url = "https://files.pythonhosted.org/packages/3d/a3/cc409ba012c83ca024a308516703cf339bdc4b696195644a7215a5164a24/multidict-6.7.1-cp313-cp313t-win_arm64.whl", hash = "sha256:5a37ca18e360377cfda1d62f5f382ff41f2b8c4ccb329ed974cc2e1643440118", size = 45573, upload-time = "2026-01-26T02:45:09.349Z" }, - { url = "https://files.pythonhosted.org/packages/91/cc/db74228a8be41884a567e88a62fd589a913708fcf180d029898c17a9a371/multidict-6.7.1-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:8f333ec9c5eb1b7105e3b84b53141e66ca05a19a605368c55450b6ba208cb9ee", size = 75190, upload-time = "2026-01-26T02:45:10.651Z" }, - { url = "https://files.pythonhosted.org/packages/d5/22/492f2246bb5b534abd44804292e81eeaf835388901f0c574bac4eeec73c5/multidict-6.7.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:a407f13c188f804c759fc6a9f88286a565c242a76b27626594c133b82883b5c2", size = 44486, upload-time = "2026-01-26T02:45:11.938Z" }, - { url = "https://files.pythonhosted.org/packages/f1/4f/733c48f270565d78b4544f2baddc2fb2a245e5a8640254b12c36ac7ac68e/multidict-6.7.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:0e161ddf326db5577c3a4cc2d8648f81456e8a20d40415541587a71620d7a7d1", size = 43219, upload-time = "2026-01-26T02:45:14.346Z" }, - { url = "https://files.pythonhosted.org/packages/24/bb/2c0c2287963f4259c85e8bcbba9182ced8d7fca65c780c38e99e61629d11/multidict-6.7.1-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:1e3a8bb24342a8201d178c3b4984c26ba81a577c80d4d525727427460a50c22d", size = 245132, upload-time = "2026-01-26T02:45:15.712Z" }, - { url = "https://files.pythonhosted.org/packages/a7/f9/44d4b3064c65079d2467888794dea218d1601898ac50222ab8a9a8094460/multidict-6.7.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:97231140a50f5d447d3164f994b86a0bed7cd016e2682f8650d6a9158e14fd31", size = 252420, upload-time = "2026-01-26T02:45:17.293Z" }, - { url = "https://files.pythonhosted.org/packages/8b/13/78f7275e73fa17b24c9a51b0bd9d73ba64bb32d0ed51b02a746eb876abe7/multidict-6.7.1-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:6b10359683bd8806a200fd2909e7c8ca3a7b24ec1d8132e483d58e791d881048", size = 233510, upload-time = "2026-01-26T02:45:19.356Z" }, - { url = "https://files.pythonhosted.org/packages/4b/25/8167187f62ae3cbd52da7893f58cb036b47ea3fb67138787c76800158982/multidict-6.7.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:283ddac99f7ac25a4acadbf004cb5ae34480bbeb063520f70ce397b281859362", size = 264094, upload-time = "2026-01-26T02:45:20.834Z" }, - { url = "https://files.pythonhosted.org/packages/a1/e7/69a3a83b7b030cf283fb06ce074a05a02322359783424d7edf0f15fe5022/multidict-6.7.1-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:538cec1e18c067d0e6103aa9a74f9e832904c957adc260e61cd9d8cf0c3b3d37", size = 260786, upload-time = "2026-01-26T02:45:22.818Z" }, - { url = "https://files.pythonhosted.org/packages/fe/3b/8ec5074bcfc450fe84273713b4b0a0dd47c0249358f5d82eb8104ffe2520/multidict-6.7.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7eee46ccb30ff48a1e35bb818cc90846c6be2b68240e42a78599166722cea709", size = 248483, upload-time = "2026-01-26T02:45:24.368Z" }, - { url = "https://files.pythonhosted.org/packages/48/5a/d5a99e3acbca0e29c5d9cba8f92ceb15dce78bab963b308ae692981e3a5d/multidict-6.7.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:fa263a02f4f2dd2d11a7b1bb4362aa7cb1049f84a9235d31adf63f30143469a0", size = 248403, upload-time = "2026-01-26T02:45:25.982Z" }, - { url = "https://files.pythonhosted.org/packages/35/48/e58cd31f6c7d5102f2a4bf89f96b9cf7e00b6c6f3d04ecc44417c00a5a3c/multidict-6.7.1-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:2e1425e2f99ec5bd36c15a01b690a1a2456209c5deed58f95469ffb46039ccbb", size = 240315, upload-time = "2026-01-26T02:45:27.487Z" }, - { url = "https://files.pythonhosted.org/packages/94/33/1cd210229559cb90b6786c30676bb0c58249ff42f942765f88793b41fdce/multidict-6.7.1-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:497394b3239fc6f0e13a78a3e1b61296e72bf1c5f94b4c4eb80b265c37a131cd", size = 245528, upload-time = "2026-01-26T02:45:28.991Z" }, - { url = "https://files.pythonhosted.org/packages/64/f2/6e1107d226278c876c783056b7db43d800bb64c6131cec9c8dfb6903698e/multidict-6.7.1-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:233b398c29d3f1b9676b4b6f75c518a06fcb2ea0b925119fb2c1bc35c05e1601", size = 258784, upload-time = "2026-01-26T02:45:30.503Z" }, - { url = "https://files.pythonhosted.org/packages/4d/c1/11f664f14d525e4a1b5327a82d4de61a1db604ab34c6603bb3c2cc63ad34/multidict-6.7.1-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:93b1818e4a6e0930454f0f2af7dfce69307ca03cdcfb3739bf4d91241967b6c1", size = 251980, upload-time = "2026-01-26T02:45:32.603Z" }, - { url = "https://files.pythonhosted.org/packages/e1/9f/75a9ac888121d0c5bbd4ecf4eead45668b1766f6baabfb3b7f66a410e231/multidict-6.7.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:f33dc2a3abe9249ea5d8360f969ec7f4142e7ac45ee7014d8f8d5acddf178b7b", size = 243602, upload-time = "2026-01-26T02:45:34.043Z" }, - { url = "https://files.pythonhosted.org/packages/9a/e7/50bf7b004cc8525d80dbbbedfdc7aed3e4c323810890be4413e589074032/multidict-6.7.1-cp314-cp314-win32.whl", hash = "sha256:3ab8b9d8b75aef9df299595d5388b14530839f6422333357af1339443cff777d", size = 40930, upload-time = "2026-01-26T02:45:36.278Z" }, - { url = "https://files.pythonhosted.org/packages/e0/bf/52f25716bbe93745595800f36fb17b73711f14da59ed0bb2eba141bc9f0f/multidict-6.7.1-cp314-cp314-win_amd64.whl", hash = "sha256:5e01429a929600e7dab7b166062d9bb54a5eed752384c7384c968c2afab8f50f", size = 45074, upload-time = "2026-01-26T02:45:37.546Z" }, - { url = "https://files.pythonhosted.org/packages/97/ab/22803b03285fa3a525f48217963da3a65ae40f6a1b6f6cf2768879e208f9/multidict-6.7.1-cp314-cp314-win_arm64.whl", hash = "sha256:4885cb0e817aef5d00a2e8451d4665c1808378dc27c2705f1bf4ef8505c0d2e5", size = 42471, upload-time = "2026-01-26T02:45:38.889Z" }, - { url = "https://files.pythonhosted.org/packages/e0/6d/f9293baa6146ba9507e360ea0292b6422b016907c393e2f63fc40ab7b7b5/multidict-6.7.1-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:0458c978acd8e6ea53c81eefaddbbee9c6c5e591f41b3f5e8e194780fe026581", size = 82401, upload-time = "2026-01-26T02:45:40.254Z" }, - { url = "https://files.pythonhosted.org/packages/7a/68/53b5494738d83558d87c3c71a486504d8373421c3e0dbb6d0db48ad42ee0/multidict-6.7.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:c0abd12629b0af3cf590982c0b413b1e7395cd4ec026f30986818ab95bfaa94a", size = 48143, upload-time = "2026-01-26T02:45:41.635Z" }, - { url = "https://files.pythonhosted.org/packages/37/e8/5284c53310dcdc99ce5d66563f6e5773531a9b9fe9ec7a615e9bc306b05f/multidict-6.7.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:14525a5f61d7d0c94b368a42cff4c9a4e7ba2d52e2672a7b23d84dc86fb02b0c", size = 46507, upload-time = "2026-01-26T02:45:42.99Z" }, - { url = "https://files.pythonhosted.org/packages/e4/fc/6800d0e5b3875568b4083ecf5f310dcf91d86d52573160834fb4bfcf5e4f/multidict-6.7.1-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:17307b22c217b4cf05033dabefe68255a534d637c6c9b0cc8382718f87be4262", size = 239358, upload-time = "2026-01-26T02:45:44.376Z" }, - { url = "https://files.pythonhosted.org/packages/41/75/4ad0973179361cdf3a113905e6e088173198349131be2b390f9fa4da5fc6/multidict-6.7.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7a7e590ff876a3eaf1c02a4dfe0724b6e69a9e9de6d8f556816f29c496046e59", size = 246884, upload-time = "2026-01-26T02:45:47.167Z" }, - { url = "https://files.pythonhosted.org/packages/c3/9c/095bb28b5da139bd41fb9a5d5caff412584f377914bd8787c2aa98717130/multidict-6.7.1-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:5fa6a95dfee63893d80a34758cd0e0c118a30b8dcb46372bf75106c591b77889", size = 225878, upload-time = "2026-01-26T02:45:48.698Z" }, - { url = "https://files.pythonhosted.org/packages/07/d0/c0a72000243756e8f5a277b6b514fa005f2c73d481b7d9e47cd4568aa2e4/multidict-6.7.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a0543217a6a017692aa6ae5cc39adb75e587af0f3a82288b1492eb73dd6cc2a4", size = 253542, upload-time = "2026-01-26T02:45:50.164Z" }, - { url = "https://files.pythonhosted.org/packages/c0/6b/f69da15289e384ecf2a68837ec8b5ad8c33e973aa18b266f50fe55f24b8c/multidict-6.7.1-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f99fe611c312b3c1c0ace793f92464d8cd263cc3b26b5721950d977b006b6c4d", size = 252403, upload-time = "2026-01-26T02:45:51.779Z" }, - { url = "https://files.pythonhosted.org/packages/a2/76/b9669547afa5a1a25cd93eaca91c0da1c095b06b6d2d8ec25b713588d3a1/multidict-6.7.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9004d8386d133b7e6135679424c91b0b854d2d164af6ea3f289f8f2761064609", size = 244889, upload-time = "2026-01-26T02:45:53.27Z" }, - { url = "https://files.pythonhosted.org/packages/7e/a9/a50d2669e506dad33cfc45b5d574a205587b7b8a5f426f2fbb2e90882588/multidict-6.7.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e628ef0e6859ffd8273c69412a2465c4be4a9517d07261b33334b5ec6f3c7489", size = 241982, upload-time = "2026-01-26T02:45:54.919Z" }, - { url = "https://files.pythonhosted.org/packages/c5/bb/1609558ad8b456b4827d3c5a5b775c93b87878fd3117ed3db3423dfbce1b/multidict-6.7.1-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:841189848ba629c3552035a6a7f5bf3b02eb304e9fea7492ca220a8eda6b0e5c", size = 232415, upload-time = "2026-01-26T02:45:56.981Z" }, - { url = "https://files.pythonhosted.org/packages/d8/59/6f61039d2aa9261871e03ab9dc058a550d240f25859b05b67fd70f80d4b3/multidict-6.7.1-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:ce1bbd7d780bb5a0da032e095c951f7014d6b0a205f8318308140f1a6aba159e", size = 240337, upload-time = "2026-01-26T02:45:58.698Z" }, - { url = "https://files.pythonhosted.org/packages/a1/29/fdc6a43c203890dc2ae9249971ecd0c41deaedfe00d25cb6564b2edd99eb/multidict-6.7.1-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:b26684587228afed0d50cf804cc71062cc9c1cdf55051c4c6345d372947b268c", size = 248788, upload-time = "2026-01-26T02:46:00.862Z" }, - { url = "https://files.pythonhosted.org/packages/a9/14/a153a06101323e4cf086ecee3faadba52ff71633d471f9685c42e3736163/multidict-6.7.1-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:9f9af11306994335398293f9958071019e3ab95e9a707dc1383a35613f6abcb9", size = 242842, upload-time = "2026-01-26T02:46:02.824Z" }, - { url = "https://files.pythonhosted.org/packages/41/5f/604ae839e64a4a6efc80db94465348d3b328ee955e37acb24badbcd24d83/multidict-6.7.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:b4938326284c4f1224178a560987b6cf8b4d38458b113d9b8c1db1a836e640a2", size = 240237, upload-time = "2026-01-26T02:46:05.898Z" }, - { url = "https://files.pythonhosted.org/packages/5f/60/c3a5187bf66f6fb546ff4ab8fb5a077cbdd832d7b1908d4365c7f74a1917/multidict-6.7.1-cp314-cp314t-win32.whl", hash = "sha256:98655c737850c064a65e006a3df7c997cd3b220be4ec8fe26215760b9697d4d7", size = 48008, upload-time = "2026-01-26T02:46:07.468Z" }, - { url = "https://files.pythonhosted.org/packages/0c/f7/addf1087b860ac60e6f382240f64fb99f8bfb532bb06f7c542b83c29ca61/multidict-6.7.1-cp314-cp314t-win_amd64.whl", hash = "sha256:497bde6223c212ba11d462853cfa4f0ae6ef97465033e7dc9940cdb3ab5b48e5", size = 53542, upload-time = "2026-01-26T02:46:08.809Z" }, - { url = "https://files.pythonhosted.org/packages/4c/81/4629d0aa32302ef7b2ec65c75a728cc5ff4fa410c50096174c1632e70b3e/multidict-6.7.1-cp314-cp314t-win_arm64.whl", hash = "sha256:2bbd113e0d4af5db41d5ebfe9ccaff89de2120578164f86a5d17d5a576d1e5b2", size = 44719, upload-time = "2026-01-26T02:46:11.146Z" }, - { url = "https://files.pythonhosted.org/packages/81/08/7036c080d7117f28a4af526d794aab6a84463126db031b007717c1a6676e/multidict-6.7.1-py3-none-any.whl", hash = "sha256:55d97cc6dae627efa6a6e548885712d4864b81110ac76fa4e534c03819fa4a56", size = 12319, upload-time = "2026-01-26T02:46:44.004Z" }, + { url = "https://files.pythonhosted.org/packages/29/72/c68c86c078a3b3cfa254bce218fbeaf1f6617d4ace811558154ae63d2c20/multidict-7.1.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:41ff3202cc23c800507777df5a4805b402f262b31008c60fdc652aeb6db2f278", size = 165442, upload-time = "2026-10-09T13:59:19.146Z" }, + { url = "https://files.pythonhosted.org/packages/7c/af/988c71ec3a6fe143b2971ac8d57cd5aca7cc6da970bccd1e4c2254997a09/multidict-7.1.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:e50f7775b66c7802f4cb697e986c5acf30ec07301efee95b396c08114e890d67", size = 95611, upload-time = "2026-10-09T13:59:20.591Z" }, + { url = "https://files.pythonhosted.org/packages/30/5e/7d18eb5a75cf4bacb6b3ee689929dcb27d7ed8ca2d245e80e9b8056fcbf5/multidict-7.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:85cb3ced4fa84949cee12bfe78208b6ece7baf3cbd242b26dcaf773efff8d206", size = 98743, upload-time = "2026-10-09T13:59:21.841Z" }, + { url = "https://files.pythonhosted.org/packages/72/38/2aeff3de6ddf235094aad6f833e3df14d1b3175e328748508443cb2b5458/multidict-7.1.0-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:2128f3358335e0c83688ecb40c19d9d6606cd60784dfbf2e24e980ac2ba87b0d", size = 452832, upload-time = "2026-10-09T13:59:23.131Z" }, + { url = "https://files.pythonhosted.org/packages/eb/1f/94d8b7fc7d47bb43be1fc041bccc2784383d352258d4d0dd90ef55d1a2e5/multidict-7.1.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e2e718fa9d1d900decbc240a533d5d0baf0947ef464c78a8cd4fa32b4e8f590c", size = 475378, upload-time = "2026-10-09T13:59:24.661Z" }, + { url = "https://files.pythonhosted.org/packages/93/86/78f431ef2735fae7a773261ea26cff11e37cbbb4520bf3caed56ece006f1/multidict-7.1.0-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:ecc68f5e47bc6f6f889bbed5bc657b22bb2237ad9ccab8229cb5a0d64f4cb536", size = 442847, upload-time = "2026-10-09T13:59:26.276Z" }, + { url = "https://files.pythonhosted.org/packages/45/d3/1c5af82fe42f677f7c4dcaf487449511d754b84fc29f11a6d190cfb01836/multidict-7.1.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5f21fda91bd6c34455bd5c312e42aa1334da46cdafb4c533ecd01e0f7f19250b", size = 493652, upload-time = "2026-10-09T13:59:28.162Z" }, + { url = "https://files.pythonhosted.org/packages/c4/bc/414b4a83a12811329c046a7c1954d6f08a5eda63f8466939a6cb612da22b/multidict-7.1.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:7a90453a79423cd7145cc08fc92322dcd7aca4862258f533e03f473226d4b835", size = 506991, upload-time = "2026-10-09T13:59:29.701Z" }, + { url = "https://files.pythonhosted.org/packages/ec/ac/a91709d7153489a3b53661b62af371112b96fb083d10443e22d54665a1e1/multidict-7.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c54ae1b89e582aa25f213cd8b5eac0bda1724e79299f486baeb3f562bbf82ca5", size = 480392, upload-time = "2026-10-09T13:59:31.179Z" }, + { url = "https://files.pythonhosted.org/packages/72/63/a4fc53b6da419876f363fc6860f9fbaa48eb8066f458e907eb2989e9510b/multidict-7.1.0-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:7ff8dd079e7b5f3438332499233a2a5acfca0741fd0eb3d4ddba0c2d9bc04d19", size = 431248, upload-time = "2026-10-09T13:59:32.899Z" }, + { url = "https://files.pythonhosted.org/packages/3d/78/08af4a624b3b9d2f48af730c173394135d14afbf4b3de5ae6c80e0900fd1/multidict-7.1.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:e4ef15d0a29fc2da67fe8ba2301ecabd6f8733696cc2bf0a0cf96a144a20328c", size = 463657, upload-time = "2026-10-09T13:59:34.721Z" }, + { url = "https://files.pythonhosted.org/packages/58/ef/06e5c75b88506972c880d228fe96702cf0fa058ea31f157f5fcd5efcf006/multidict-7.1.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:5fa296f14068538fced53c6eec86520a2ef3d3d27a0fb134640d03e067986d5f", size = 436120, upload-time = "2026-10-09T13:59:36.135Z" }, + { url = "https://files.pythonhosted.org/packages/23/8d/a917004a1e8ceb325c4cf0583e418a40b7ff9519cbfe759bc6982cd3b4c1/multidict-7.1.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:6ab323f0c5490abaf35a78563e1043c7a772eb86d93f359ecc0fd286d1cd3807", size = 453859, upload-time = "2026-10-09T13:59:37.878Z" }, + { url = "https://files.pythonhosted.org/packages/1f/0b/d1cc417355625152b611790aa1f0bc780983ed8c0752f44087fc7dbe66c9/multidict-7.1.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:88ec4d16e9f58071c9896ea01c4da97cce9d01418fe844ff06eebb00e0a1386a", size = 481768, upload-time = "2026-10-09T13:59:39.39Z" }, + { url = "https://files.pythonhosted.org/packages/94/0b/8e79adf65cf5430497d1020504b7d86ebe90e3289a95bb6b252a630d761f/multidict-7.1.0-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:9161eb81b8062da824426d3700d4b0d287f0cb0b05923713adfe3bd25e7937ac", size = 426973, upload-time = "2026-10-09T13:59:40.932Z" }, + { url = "https://files.pythonhosted.org/packages/ae/4c/e84d6e05943600b16cd2745587e65a407f89b3a4a1f77081d456c5a07011/multidict-7.1.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:c564d0758748f38aec56a6b98c6801a427b3a63f39b7cac538b2b2d18ca32740", size = 489681, upload-time = "2026-10-09T13:59:42.663Z" }, + { url = "https://files.pythonhosted.org/packages/eb/98/01951236a01b3e15c037a4a796f329b5099374e46365d0bc65bb4a7b325d/multidict-7.1.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:c5e4a362a95b85301d262ef6bed06cc8e4a144ac7e2be874cb4c3c46ae89d754", size = 475655, upload-time = "2026-10-09T13:59:44.508Z" }, + { url = "https://files.pythonhosted.org/packages/d3/72/52be318cdb46732da8eb118c2e4212fe570724eaef817901f8b702af2016/multidict-7.1.0-cp311-cp311-win32.whl", hash = "sha256:5d19bb1ec12e385c09215d5d53a243c060c7e8a0aacdba16d933e22902ee380d", size = 81719, upload-time = "2026-10-09T13:59:46.158Z" }, + { url = "https://files.pythonhosted.org/packages/37/fd/1ed7b7d206ef7a6918ac3de515543ca4b49bc50131325ca1814c005daf3f/multidict-7.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:396ba9917fe489ec3a5942ae3e29e91324c8b9956f371f7e124c971c71379e7a", size = 93586, upload-time = "2026-10-09T13:59:47.618Z" }, + { url = "https://files.pythonhosted.org/packages/d8/1e/837877d218bfd2b656ca899ec9dd83e6eb82d8e1ef16e896d5abf3cb60cd/multidict-7.1.0-cp311-cp311-win_arm64.whl", hash = "sha256:b5ed78742502b8d90ff2816688d407a097c8b5cc6af4343fc5ad7a98df53a7cd", size = 92446, upload-time = "2026-10-09T13:59:48.996Z" }, + { url = "https://files.pythonhosted.org/packages/03/e1/215e7df354e2907f3af9d910c8136653cfec94796012a776359bc802a326/multidict-7.1.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:ccfb950359a80de0fcd2030ad60ac1b1a861462de3e2ef746697c9256659af21", size = 165426, upload-time = "2026-10-09T13:59:50.564Z" }, + { url = "https://files.pythonhosted.org/packages/a4/ec/461ba588b308ada2cd16907d6ea425ca4d417596b88c12814ad9a0bb7325/multidict-7.1.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:939d8cd2d8c35e3956f6bc858390b6ccb611e6152b4920d64ab5e98f3fcf39e4", size = 95943, upload-time = "2026-10-09T13:59:52.381Z" }, + { url = "https://files.pythonhosted.org/packages/c9/84/31444ef07ec13a33c42c2772d986129e137e69c4beb89ca64f2138988145/multidict-7.1.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f8e95c95039eab6a2dad8c83c38ab87fc5431d28849e0c8a7e2a4e70ba38710d", size = 98294, upload-time = "2026-10-09T13:59:54.066Z" }, + { url = "https://files.pythonhosted.org/packages/dc/10/aca13806d73d88b5b01e35e828e23a346cb1abad710a49dff0507702efc9/multidict-7.1.0-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:05d12b4bac53abe0c65f3163af2b45894e2e1c0cc55493ac784d52a350047d88", size = 453301, upload-time = "2026-10-09T13:59:55.397Z" }, + { url = "https://files.pythonhosted.org/packages/96/8c/382d771bfb3a9282d98332d0e1f27fd1f8b4ae0e7175bd7e008ebf934900/multidict-7.1.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0e79ed92b1dece6bb57e9b46effd74d7a5d3d00187c85466d880ed184239a698", size = 478570, upload-time = "2026-10-09T13:59:56.899Z" }, + { url = "https://files.pythonhosted.org/packages/52/9c/e81b0c92449da3a1950a575c520d957d7be618777d170717a71e00558d7f/multidict-7.1.0-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:fab380fcff8b3555eb2bd04304fa4330909a771a9a9b0dc07666cfc23148a711", size = 443699, upload-time = "2026-10-09T13:59:58.465Z" }, + { url = "https://files.pythonhosted.org/packages/63/72/f8f5fee6960d1b580a7b046c7c5abccf67aa26fa5647927a91c9c835c2f8/multidict-7.1.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4b5c41e44da74383c924cc5d75ef0a268f301d69305b3c42bd17af685d55e412", size = 497332, upload-time = "2026-10-09T14:08:01.88Z" }, + { url = "https://files.pythonhosted.org/packages/e2/92/a25d7db3ca451b588e743e067ee80f2b475edf6467a56908454faf6a714c/multidict-7.1.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:3dbaa7f7c2f0ca8578895fc61fb8c8e50ebb405dad8982f92f4343285c7a3fda", size = 512457, upload-time = "2026-10-09T14:08:25.465Z" }, + { url = "https://files.pythonhosted.org/packages/7a/f3/374c0ab122bb98b1a62a8742b1e3f59563e4d609942005a4041861a0df67/multidict-7.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fed6b7705d49dd07e5e0dd5f5c873fc44047e92d714299b13245b5fecac49d01", size = 483000, upload-time = "2026-10-09T14:08:27.132Z" }, + { url = "https://files.pythonhosted.org/packages/46/1f/01c8522859771dc3cee840d5852233fe84c91aa982a1cd8ad594306d25cc/multidict-7.1.0-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:53daa47dd176db64bb35170e3d5d0ae2388c060121201883696278f055a0e70c", size = 430746, upload-time = "2026-10-09T14:08:28.715Z" }, + { url = "https://files.pythonhosted.org/packages/ab/f3/af90affc8cca6b4ee59b2ec354a20839005e829d14d155451009810ef1ce/multidict-7.1.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:542429c796430de924d03b68a6173bb6d79d5c4967d4e9a18de3e501cad55593", size = 466859, upload-time = "2026-10-09T20:27:24.139Z" }, + { url = "https://files.pythonhosted.org/packages/f8/97/1b6762f37f6331449e164af9d5500f0abb0f23670e81ba543441e0a6be1d/multidict-7.1.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:c44ca6d3cdf4cfcbcd4f928fdcbe87af5fd7319f6ad4169617b7fd6b4527c33c", size = 441952, upload-time = "2026-10-09T20:27:26.559Z" }, + { url = "https://files.pythonhosted.org/packages/bf/d2/4908177fbf22438799c04ba11a2853a99c69d028fccefe61f19e68caba0c/multidict-7.1.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:eb0228c809b2e7eb47921876050af0bc4214b351bad8d8112f70b6ed4288763c", size = 452810, upload-time = "2026-10-09T20:27:28.347Z" }, + { url = "https://files.pythonhosted.org/packages/8d/05/5031f44f680ec54fc182c4d71c9ab7c07216983946aa64ce6fdd56a52692/multidict-7.1.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:6ad60de1f4c702448fc8f1449f05e810f6b7957c08a5b3950c8a792dfb13b50a", size = 483934, upload-time = "2026-10-09T20:27:30.14Z" }, + { url = "https://files.pythonhosted.org/packages/da/3b/9b21d107dbe96fa7e6966ff9e5e10b9ac0d2d1c2cf1633098e4c700f865e/multidict-7.1.0-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:f79def86aee67b5ba01b2565f1610f262bf88ae53c379f93e5fa29c50fe793be", size = 427042, upload-time = "2026-10-09T20:27:32.433Z" }, + { url = "https://files.pythonhosted.org/packages/53/ce/5b01b1041580072866b30e39c6380bff269e72fb5ca41a7f2fb828ede943/multidict-7.1.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:248dabb89b5aa90b2f7e43e045f048f7e5392ec77b6446d80853ba7117d7bbdf", size = 492543, upload-time = "2026-10-09T20:27:34.459Z" }, + { url = "https://files.pythonhosted.org/packages/1e/6f/6508a23fcc7b1122e4f18409d7900ffeb3cd020cd080fe98aba3eabf9486/multidict-7.1.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:0747a83e7ae617793181a4763ee8b84863cec5c0bbbde70c4394e4c0276c36de", size = 475796, upload-time = "2026-10-09T20:27:36.289Z" }, + { url = "https://files.pythonhosted.org/packages/8f/b6/ebb6433f4aa55ac1fea4bf11e860e99611640d07cc92d21cb3f35608de22/multidict-7.1.0-cp312-cp312-win32.whl", hash = "sha256:1df055e51fe7491120cc84f3362bd43db186be78d0e4c476acad45e435af9ffb", size = 81250, upload-time = "2026-10-09T20:27:38.229Z" }, + { url = "https://files.pythonhosted.org/packages/61/0a/11240e5e7d2e986e288f4a6090f569ad00225b7c2c513d4096b36643f9ab/multidict-7.1.0-cp312-cp312-win_amd64.whl", hash = "sha256:10202ba98cfb3f7eb60da7ca87a2c458a69b7d0d6e4d4388cd6773ebbce89085", size = 93817, upload-time = "2026-10-09T20:27:39.739Z" }, + { url = "https://files.pythonhosted.org/packages/e9/9b/a04ffd76db7cca2a60d347e839315e1ada63017c6c343fa90a23a5a55433/multidict-7.1.0-cp312-cp312-win_arm64.whl", hash = "sha256:0aa1ba3ff7cdda05a1242490612976b2ae1c90fc6200903ef8f53815dcb35c5d", size = 92312, upload-time = "2026-10-09T20:27:41.285Z" }, + { url = "https://files.pythonhosted.org/packages/60/34/22ee5f60d704e8edfe6e0a37ca1e2d1efe276560dc8f6f8caee35ea7a4f5/multidict-7.1.0-cp313-cp313-android_24_x86_64.whl", hash = "sha256:51d7f33be9a4a1a2801430846d72841deea0894eae8381a07e7d90e0f71b3c4b", size = 101454, upload-time = "2026-10-09T20:27:43.102Z" }, + { url = "https://files.pythonhosted.org/packages/3b/6d/7652943397171fd624de163d25fc6d2807852931c40c24776cfee3f857cc/multidict-7.1.0-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:2a964dfeb2aba3663f0536c809aa1ff385f065e89fae57e883fb7edfb4067c2f", size = 95823, upload-time = "2026-10-09T20:27:44.912Z" }, + { url = "https://files.pythonhosted.org/packages/a2/57/717d1aa4e901f58a7e93b945ed741c860d950f456b75be47123fef507ac2/multidict-7.1.0-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:d02cd23b5af182a49d635ee72be38053767711987a9fd82625b16b93828a0d8c", size = 97841, upload-time = "2026-10-09T20:27:46.616Z" }, + { url = "https://files.pythonhosted.org/packages/a8/74/d2d22d306225f3c53ea5a682abb8a43bc30057d6c78b5c94a74035450bfd/multidict-7.1.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:0179698c3c913eb64f32397083747fad20ed0f0a2b7469a08cd1a8a95d14d90e", size = 164661, upload-time = "2026-10-09T20:27:48.495Z" }, + { url = "https://files.pythonhosted.org/packages/55/f4/1e63fea41ba86768e18dbc1743e6780f75ad32d7a45e418740c6fb64589e/multidict-7.1.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:ccf98ee859fe29f874ddd8e637f14ba59108a333492b521acb885a9095244a9c", size = 95489, upload-time = "2026-10-09T20:27:50.055Z" }, + { url = "https://files.pythonhosted.org/packages/8c/55/477c351b21b34fe948ffffa8b64cd0c246efd998fed3de922b217e632e59/multidict-7.1.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5fa1484f74d011addf2e5f5a0378ec41521989839a05d6051d8067d8ce732423", size = 97931, upload-time = "2026-10-09T20:27:51.598Z" }, + { url = "https://files.pythonhosted.org/packages/cc/dd/288508d7deb9489dd7c8e0b172d62dc1da8f3cb24877293ead42e6cc2047/multidict-7.1.0-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:1fed3d721f75c25a9fcdd0e362af53f4b20acbcdc63081112f85419ba0ce3444", size = 453816, upload-time = "2026-10-09T20:27:53.217Z" }, + { url = "https://files.pythonhosted.org/packages/60/ed/172447dd09f06111f69d2cf22a018020b34a93a39ddf72cddfdb48323449/multidict-7.1.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:df03e392cae1e05462918abbae06d6100f1e53f67db971ff0ac6c07d9edf7321", size = 477779, upload-time = "2026-10-09T20:27:54.972Z" }, + { url = "https://files.pythonhosted.org/packages/e4/7d/e5b7755e84611ee846f0dc830cb1363ce10764b29247a01b857722fda653/multidict-7.1.0-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:379f477b98a1e9a77ddc3ccaa8c709d3fb4a288ff54b96e171e637b55b4adbae", size = 441299, upload-time = "2026-10-09T20:27:56.901Z" }, + { url = "https://files.pythonhosted.org/packages/1b/d6/e9c93da1644491610f09258349283421a279fdb3b383929b4d963698691c/multidict-7.1.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:40f586bc8a084a3671ddcae9e5fbd3228a596bfb63d9f0380f153f9a65b69f08", size = 496193, upload-time = "2026-10-09T20:27:58.788Z" }, + { url = "https://files.pythonhosted.org/packages/22/49/7fe19efed1b1c73e2f6ae65eba4e6528eeb26e10c970dc0bb0fc009a2aae/multidict-7.1.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:6e7f70d912a589e30290ed926f90ddbc3160998359cbad7c9ede1bcee481748c", size = 511469, upload-time = "2026-10-09T20:28:00.689Z" }, + { url = "https://files.pythonhosted.org/packages/4d/2e/7b708a72001323dc6b2930834d63e355870ea5b1ee8d1450e0fe1a24752b/multidict-7.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5129cc1f5fec6888e2db0be936dab67242e32c738811c8769aeea93aab4257a8", size = 481377, upload-time = "2026-10-09T20:28:03.011Z" }, + { url = "https://files.pythonhosted.org/packages/8b/60/3d23e7d2ebc7e7e6b1b205de0d5c2ce0652a9b2edef65eea3528758b5699/multidict-7.1.0-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:1401caec21fd7f002e79ab6806bbfd1f54bb3de6d5e12bd91c6685dce16ad2be", size = 429992, upload-time = "2026-10-09T20:28:04.846Z" }, + { url = "https://files.pythonhosted.org/packages/f6/e6/8e3bef78ea1929a3f2c395aa292799d4effd6ce1b5cfce42c1986a33e2b5/multidict-7.1.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:c81062e947f4b5a624135a843f6ac4b3c7fe6508300c9fb27347f022ba0c513d", size = 465635, upload-time = "2026-10-09T20:28:06.527Z" }, + { url = "https://files.pythonhosted.org/packages/44/6a/55fe5dd90c0e9ce60f5c4fa8ace27eeb1190d9cbb151929b04412f0c673a/multidict-7.1.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:c53be0dd676484a660acc56e4f1cd0dd74bc1255d12fa285e86a3fa9d5f22bf9", size = 441693, upload-time = "2026-10-09T20:28:08.443Z" }, + { url = "https://files.pythonhosted.org/packages/c2/a9/628913f71537dce7dbd6c4ee1ae5019976264427c55354ecc593b4b921b9/multidict-7.1.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:41e0c3350d08994ee8640c39884e16514e282f70ba40f5b2299582509a327774", size = 453808, upload-time = "2026-10-09T20:28:10.871Z" }, + { url = "https://files.pythonhosted.org/packages/25/d0/3ae3af653b5776d045f460582006d0b4d7dd41b078b3ab2e874bf4d1e22f/multidict-7.1.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:abeec7a89d698aa1c9b4c36bd5e3c746faef0867076e6a2ca27fa5077c4ece26", size = 483160, upload-time = "2026-10-09T20:28:12.892Z" }, + { url = "https://files.pythonhosted.org/packages/56/3e/2c13e111b9f4c6216aee0ac57ac39c53db7f97e42bb8490e60a06eaca352/multidict-7.1.0-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:23f6d325241b0db006ca2841309ed17622137e134930a740a8f1331ec4404791", size = 425896, upload-time = "2026-10-09T20:28:14.65Z" }, + { url = "https://files.pythonhosted.org/packages/45/13/15b4d614cf0d6838a7d89eb14f4820fdecfd1b7f529061d172a674912d41/multidict-7.1.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:034b0dc1b7fb8279599c5d8563f86abb4d2454735b06544ecab23c54572ad2bd", size = 491674, upload-time = "2026-10-09T20:28:16.508Z" }, + { url = "https://files.pythonhosted.org/packages/4f/97/3a6f8c75f12a607ff047e3db9a45dff6a558b1e31b89b2f0f27da0fedb6f/multidict-7.1.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:5c8074ad4d67067c87bd0663dfda654f786336078c8fd7d2f6c1aa41de8494cc", size = 473989, upload-time = "2026-10-09T20:28:18.284Z" }, + { url = "https://files.pythonhosted.org/packages/3f/20/5e7726631e50b6afd26324a234851a06104b8ee30f01bc209140788b76c6/multidict-7.1.0-cp313-cp313-win32.whl", hash = "sha256:7b25c335fc53acf29d4d21dbc19fe39d2824201cdda0448623152cc5917bd259", size = 80952, upload-time = "2026-10-09T20:28:20.044Z" }, + { url = "https://files.pythonhosted.org/packages/4f/19/b26bdbef5bf5071ea5a3ba37c963af187fddb8b0a925bd39c0c5dd0ad04a/multidict-7.1.0-cp313-cp313-win_amd64.whl", hash = "sha256:7de54b49e6da811b0321e412d14efdaa1ee0c0b6609296ea5b9022bc5b2bd843", size = 93554, upload-time = "2026-10-09T20:28:21.657Z" }, + { url = "https://files.pythonhosted.org/packages/35/d5/e9a8600d3868e3fdc4a4be1d15e594048508511c0398423df0ed18c11b5a/multidict-7.1.0-cp313-cp313-win_arm64.whl", hash = "sha256:aeba2c750102051aa51e087c2ccbc79f2724a41c94168f8731e36f54c453551a", size = 92039, upload-time = "2026-10-09T20:28:23.464Z" }, + { url = "https://files.pythonhosted.org/packages/2c/a7/c9f5c08348a6f903143b631546e22becf1b704a1304b17f7e1b9850308d2/multidict-7.1.0-cp314-cp314-android_24_x86_64.whl", hash = "sha256:128ea4142f81a79d430f3d0eb55206093e5eda03a12abbc7b03c34748ff6116b", size = 100435, upload-time = "2026-10-09T20:28:26.111Z" }, + { url = "https://files.pythonhosted.org/packages/82/60/92fe617008c74cc019483b1c59202c48738c6f637ad5b12b36f01e21db43/multidict-7.1.0-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:439a19f7fbbff232ce96682c57e27030b8ac3a4b8121484c94f04bf99d08bfff", size = 95267, upload-time = "2026-10-09T20:28:27.856Z" }, + { url = "https://files.pythonhosted.org/packages/17/78/82182f311d673f17de15bc7f7465c7ea5cbd2987ca3a6bf6546fa721e9d8/multidict-7.1.0-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:8090c35199d6b7bc6426bb8bdaf341e64f295cc2624a1fda7860c0837f1acc03", size = 97233, upload-time = "2026-10-09T20:28:29.817Z" }, + { url = "https://files.pythonhosted.org/packages/63/25/af4e482d053fd73b4b1d60de3ff5578c6cb1d319d39d3f2a454d65409835/multidict-7.1.0-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:b7cc5333fcbfb27327d12612ed72322f221b61c2b69deb1155078c964f86e1a1", size = 163070, upload-time = "2026-10-09T20:28:31.495Z" }, + { url = "https://files.pythonhosted.org/packages/df/d5/eaed52e199451dac445305fb2631d3f4e7ac9536aeef01f23622a1d93f90/multidict-7.1.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:b0e0040b0d8dd89bd0af9ab18901981e344ffba68bb30b8eabb4eab6c303279b", size = 94582, upload-time = "2026-10-09T20:28:33.263Z" }, + { url = "https://files.pythonhosted.org/packages/6b/e3/ff58ecad5161baa98dec05716e2745449446f2424a9c727464bf452f7fd1/multidict-7.1.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:33376418ab2846b931a72b36cfa16810befc4f49485d0b3f4dc054a4d6d00038", size = 97406, upload-time = "2026-10-09T20:28:34.981Z" }, + { url = "https://files.pythonhosted.org/packages/ac/a2/ae4eadf02d4bc035baa7cadf5548ca4fa441517193f76ce1aeb5ed276ae3/multidict-7.1.0-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:1101aea5c3eb1d26e090b931c693488af0db9f3d52e68be8d4cdd807dad9841d", size = 449908, upload-time = "2026-10-09T20:28:36.659Z" }, + { url = "https://files.pythonhosted.org/packages/91/55/bd5101ef760d1af4c3f246330b29b48ee22bfdd5a83150b713dd93b431e2/multidict-7.1.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f996b19ac89e0dae65821ce65f788619e4286f78c62d005ecd3b75b5d9c0892b", size = 471605, upload-time = "2026-10-09T20:28:38.561Z" }, + { url = "https://files.pythonhosted.org/packages/4d/8f/3dea8a28b0416ab71d47c8ce274bb3cacedde2d9838647ac67cdaa3d48e6/multidict-7.1.0-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e0d91a4bcb59ac0d7af0d8e0da737332e1b7fe6831e53e47819b1b5349d431b2", size = 433523, upload-time = "2026-10-09T20:28:40.913Z" }, + { url = "https://files.pythonhosted.org/packages/24/97/805d2aa4f746cc43cf4b206f1b1bfe2566add95bbb145abd3d9cf61858bf/multidict-7.1.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e96d67914ddbf5466e4476a1cd7ff30a332cbab85ed895207acc3e58c979b6a7", size = 488277, upload-time = "2026-10-09T20:28:42.851Z" }, + { url = "https://files.pythonhosted.org/packages/dd/7b/eac247b7e76f6010071c7c2401da5255eeffd1b2ac981925e533413d21ec/multidict-7.1.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:170ba61761f59ab92afcc86ce5534a3f3d0b07c38b339b950a83213f22dd86ec", size = 501888, upload-time = "2026-10-09T20:28:44.75Z" }, + { url = "https://files.pythonhosted.org/packages/87/58/de62e27b09dd15756265765945f68f1c0d1e23eaba09e2e109fbb4112425/multidict-7.1.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:33389fe084e5426d9fd85d7d9ca91a29cd0d88a83c7c96e411aca49a3f9967bc", size = 474883, upload-time = "2026-10-09T20:28:46.704Z" }, + { url = "https://files.pythonhosted.org/packages/21/fd/afb4e50ce3b44707b5ee39c6b5fa1573bdb50c4be660bb35b040362b5170/multidict-7.1.0-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:77024596b9046572c4e90b34c1ff212346756dc48933f90c53cf6e233660788d", size = 424327, upload-time = "2026-10-09T20:28:48.681Z" }, + { url = "https://files.pythonhosted.org/packages/23/70/96c9abf933c4edae53b8a1c8d3f038120a3a60d363f16c6d94eee9b04851/multidict-7.1.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:ff15531a376dc6f35984443fd1429e4b150c36ce27633e7cc52a9e5318546e20", size = 459255, upload-time = "2026-10-09T20:28:50.562Z" }, + { url = "https://files.pythonhosted.org/packages/24/37/dbc1dba26dc1c9e42aa07ee01908131a67fee0e79ebe5c1d0e7fc00aad55/multidict-7.1.0-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:544f2642a456fa264614e975d921540ee8c3b368b04d5aa1ddbec33241b13e08", size = 432476, upload-time = "2026-10-09T20:28:52.361Z" }, + { url = "https://files.pythonhosted.org/packages/9c/0a/eac70cc1461668bad8253a2da727670a56293eaba112aeb4079af8cd37d9/multidict-7.1.0-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:08834fb8b20e1a985c70e8380a10940234b4162de62694458727330376e58b33", size = 450030, upload-time = "2026-10-09T20:28:54.252Z" }, + { url = "https://files.pythonhosted.org/packages/23/2d/eb40652ea74f96df859c7c5d38f9997f420b9dc404300dda0c5745327a6f/multidict-7.1.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:b4908e17867930b7ac77f89a18dc67308c67c511f037d8580489be86fb585912", size = 476169, upload-time = "2026-10-09T20:28:56.819Z" }, + { url = "https://files.pythonhosted.org/packages/44/d0/7454ab8335bc4ec9f8abcc4c83a314bab060f22db6da8436b396e07ed21a/multidict-7.1.0-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:9b24e1f93b9b586ec03bc7bea1bf021ec90bf2528c729195028a3ca1c266b3f9", size = 420459, upload-time = "2026-10-09T20:28:58.744Z" }, + { url = "https://files.pythonhosted.org/packages/60/7a/cedb46b287b720a2c4eda2448faf162612d0b718beb32581e35ccd9219b3/multidict-7.1.0-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:5c93473d0d7cd9bbb370973a9679a62f381c7050d7dff4ad6aaa92e8650f5a79", size = 483071, upload-time = "2026-10-09T20:29:01.114Z" }, + { url = "https://files.pythonhosted.org/packages/9a/11/e7ded22b008546dd30ae8c979aa5ac3282cad98876f7d5bbe93c1f2409a0/multidict-7.1.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:bf14cfcc30b097583d698a6e2b8b68c9bcffab277c485d481881958360c2938d", size = 467470, upload-time = "2026-10-09T20:29:03.388Z" }, + { url = "https://files.pythonhosted.org/packages/1d/f3/0136144cb0b1731fd93475cea75d974a55009358d3bf61dd55e2709a3dca/multidict-7.1.0-cp314-cp314-win32.whl", hash = "sha256:86bc779a0896e59e4be30a5be5cd6eeffd0b40b6f0e75e730218736b7bfc6f5c", size = 80205, upload-time = "2026-10-09T20:29:05.736Z" }, + { url = "https://files.pythonhosted.org/packages/74/d9/a62a690d780febc171026d3e3c5700fc8387aa3e5f77cd04ada33d23d3f4/multidict-7.1.0-cp314-cp314-win_amd64.whl", hash = "sha256:6c9fd50f636a8fa9cb6324cd3eac962fec2bc5bb432452a3b583583a1059acfc", size = 92923, upload-time = "2026-10-09T20:29:07.337Z" }, + { url = "https://files.pythonhosted.org/packages/84/08/eb7a1c34dc37c5f2c6aef52e6861e6f1cdfc6c685dcb72581eb218c00953/multidict-7.1.0-cp314-cp314-win_arm64.whl", hash = "sha256:e6906aa4bc62cde2c8aeb8a99a7b4401b241e274ae7b11df67d863d61ab3d5de", size = 92851, upload-time = "2026-10-09T20:29:09.15Z" }, + { url = "https://files.pythonhosted.org/packages/ff/3a/019abd746e8fbed9edd74b81259f20b278c011cef918868506d9b5bd6566/multidict-7.1.0-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:fabfdd4cf97db033196b51af46b8a681d4785c2a66347f2a5af1b4bbb1182629", size = 177429, upload-time = "2026-10-09T20:29:10.989Z" }, + { url = "https://files.pythonhosted.org/packages/f7/41/c8dda935231305d9b83c4a4cc5b5b9e323615328d4704f00ba2cf6d89916/multidict-7.1.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:a177a0ee5cf19931dcaeb3f662bc562754cfa4f4ace2351d9da24a954ef7db94", size = 102003, upload-time = "2026-10-09T20:29:12.78Z" }, + { url = "https://files.pythonhosted.org/packages/af/23/3c3e79a222eaaa59a32648cec34709d848657be5339f96876075731e7f8e/multidict-7.1.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:0ae91de396d5c4ac97cb24dbada3d5c91a51454781e0a70476b008f4e879e4f0", size = 104861, upload-time = "2026-10-09T20:29:14.591Z" }, + { url = "https://files.pythonhosted.org/packages/cd/5b/04637e7cea5729466fb89048520fde167c5404df1beedcc86f18aeabed7c/multidict-7.1.0-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:160bdb3520fdadcaa21e1b98aab2e011265070814ecab3804eb61674becbd400", size = 463221, upload-time = "2026-10-09T20:29:16.697Z" }, + { url = "https://files.pythonhosted.org/packages/2d/42/b121767de213a9774399c200cb877b19c2e1e5a0b0a6bc8407c7325fa37e/multidict-7.1.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6c2144785e42527404bbd5cfd11981fee4abe59a22aded0e498eb711a831d3f3", size = 502241, upload-time = "2026-10-09T20:29:18.657Z" }, + { url = "https://files.pythonhosted.org/packages/47/0a/1cccd17ebf39776df7d8a6c99d066fc3ac1823d044cfe86a22ebbf42b841/multidict-7.1.0-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:7d0b4fec6a8d02d7e95de5cfa913261820f1ce04bd4c0381924de0da523179b8", size = 457128, upload-time = "2026-10-09T20:29:20.589Z" }, + { url = "https://files.pythonhosted.org/packages/19/a9/0616d20dee16255f8737d9017288d9304dabf3695ac0071baca25d00c713/multidict-7.1.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:943a9bce22180ad0f4d32d1b402a0949a4ecfe5a1257b47f54a1b51981d81b86", size = 511842, upload-time = "2026-10-09T20:29:22.569Z" }, + { url = "https://files.pythonhosted.org/packages/91/68/5a406b82ecfeee50c097c05fd519c836a61815d81c4a9a8c523d90fb4b35/multidict-7.1.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f76ceb623f7ff50df46ac57e1587c479d87a5766319c4f43d0c0a5158896afab", size = 519852, upload-time = "2026-10-09T20:29:24.527Z" }, + { url = "https://files.pythonhosted.org/packages/d5/da/d42234f9d4f0e33885c70149112bf62aa4436045090c15cec0810ada0b2f/multidict-7.1.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:98beff85392ce435b28a0971ec21cade61ce8be8b632c9d855475a28ef92d31a", size = 500322, upload-time = "2026-10-09T20:29:26.569Z" }, + { url = "https://files.pythonhosted.org/packages/fb/c6/323e921a9812a6ea82978d4e1d9713e0b709023be037e6e4c14efe5472eb/multidict-7.1.0-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:71196ebb8d523148e5975396a444de02367f204b53b14e26794c96b2be0ed742", size = 444070, upload-time = "2026-10-09T20:29:28.52Z" }, + { url = "https://files.pythonhosted.org/packages/93/87/109b7170de2168294f3e562f9d10caaaf946628d614b5a57246279acc1a6/multidict-7.1.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:35534b366410a36bb3d6f788691e37a76e4d1da48326b0ada3e5032580dd76af", size = 484862, upload-time = "2026-10-09T20:29:30.504Z" }, + { url = "https://files.pythonhosted.org/packages/51/cf/7f1f63c9cf13f47036c0c64c607e6eee87c94076e3c6876abb6990ee62ad/multidict-7.1.0-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:b4674b12701c3fcbdf7f88b9e4479701c93bec5da9eb576140d5fcc0092990af", size = 457314, upload-time = "2026-10-09T20:29:32.6Z" }, + { url = "https://files.pythonhosted.org/packages/93/ce/7de8b4ee6a847cc951915c279fc388127ec32a7c14aa7a01c4ad692be575/multidict-7.1.0-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:0ead852a5e906a43fcb6784eeac480f6a67919a51d480c1f80d32ddf9d615475", size = 462672, upload-time = "2026-10-09T20:29:34.776Z" }, + { url = "https://files.pythonhosted.org/packages/f6/6c/02dd089475983b1f5b8729319caa0b02fa3a60b527f27c86b2d53c24ca11/multidict-7.1.0-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:afe36ca503c2ffe30fb6df82b20389fa3c4035b5d65888a61310921cf3ae91c5", size = 498109, upload-time = "2026-10-09T20:29:36.763Z" }, + { url = "https://files.pythonhosted.org/packages/47/d9/b9bdc59aa8e3eaf1f9e5d2460bbe0c428a01250d44417f8ccf965a8f6fa6/multidict-7.1.0-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:a5f0bebb10aae010d3c9ee3abaf83ab2069c718457aea09c15532355dd7e061f", size = 442260, upload-time = "2026-10-09T20:29:38.872Z" }, + { url = "https://files.pythonhosted.org/packages/fa/83/21b044885ab81bf5c03ec5c4c16aa449977e428c5c122e38969481cec1df/multidict-7.1.0-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:b9d9b7d72975521434368fe8aed3f6b522060bf271adabaa5ca6c87c0c08e168", size = 498916, upload-time = "2026-10-09T20:29:41.091Z" }, + { url = "https://files.pythonhosted.org/packages/95/8b/31686730092e349ee2255fa630945ca344fc62e76f0b18d65b0f3dbb0ecf/multidict-7.1.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:274023bf952f849e0d05eba28a4c1f65f9796430d2b09ec16539386c0f76554c", size = 493525, upload-time = "2026-10-09T20:29:43.192Z" }, + { url = "https://files.pythonhosted.org/packages/c7/d0/c9fddcd7ac42b70a46ac9cf15e21eb527874164e14d418fcb50ce7190a4b/multidict-7.1.0-cp314-cp314t-win32.whl", hash = "sha256:7e0bfa161df365ba3c88899ee3b7c94755200967284bdedef8c1b8b43e2c0f2b", size = 86481, upload-time = "2026-10-09T20:29:45.188Z" }, + { url = "https://files.pythonhosted.org/packages/24/ab/ce727c06680e72b5d381caa8587f561cb6fea1bfab6ba20c877019768a6f/multidict-7.1.0-cp314-cp314t-win_amd64.whl", hash = "sha256:34a35be8fb82d37087e8176aba907b9459f03d0e293c80f574c6337a436f4eaa", size = 99676, upload-time = "2026-10-09T20:29:47.441Z" }, + { url = "https://files.pythonhosted.org/packages/fa/e7/d116d7ce514d04d9bf63774ed55e8033e2ce15ab5655a597bb947c53dfb8/multidict-7.1.0-cp314-cp314t-win_arm64.whl", hash = "sha256:d7dd46a8fcd7653c09ebe67eae9d4cb6636c7a905d9cbaf587dabcbd4eca6013", size = 98726, upload-time = "2026-10-09T20:29:49.365Z" }, + { url = "https://files.pythonhosted.org/packages/28/42/963e2e38ffd79487b24775841cfe2abb85aa1fa08ee152afc4a9b64e1cdd/multidict-7.1.0-cp315-cp315-android_24_x86_64.whl", hash = "sha256:852c921217f330b3e81a822647ebadeae7e42cf503ec1992d0bfbc90121c09fb", size = 100450, upload-time = "2026-10-09T20:29:51.486Z" }, + { url = "https://files.pythonhosted.org/packages/b3/6e/fbc4721aa0eaea2dff3274ff44e94f60a89841bbb4cdaecd9faa4eb64aa7/multidict-7.1.0-cp315-cp315-ios_13_0_arm64_iphoneos.whl", hash = "sha256:cbec738d2ad551c6f70955d7eec95e339380ee1564e2afe86bfee05fed52ceec", size = 95440, upload-time = "2026-10-09T20:29:53.929Z" }, + { url = "https://files.pythonhosted.org/packages/76/66/045aee749b599560d5348bb1bee5c9d61d8b12f31d16e0594778ef3472de/multidict-7.1.0-cp315-cp315-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:a5f721a2437390ab69c10c6df5c142478d399af8dfb02e6d823cf2358e8a4748", size = 97496, upload-time = "2026-10-09T20:29:55.808Z" }, + { url = "https://files.pythonhosted.org/packages/97/79/f2916b81324d629eba363f760fba26cafef5cb437489c24969ada979508d/multidict-7.1.0-cp315-cp315-macosx_10_15_universal2.whl", hash = "sha256:99cf27791129d37e191ff013bfc29bf6631c29edb21680c00978567b91fc5d6b", size = 163241, upload-time = "2026-10-09T20:29:57.813Z" }, + { url = "https://files.pythonhosted.org/packages/ce/f6/2aab2b2d7bf2d69204bde0cdabfefe4df3d1954f3f156bfc53714917e757/multidict-7.1.0-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:2ba6611fc93c4b169d0e0ea376ebf4b8a529933d1f5f2c2ec7d8f8b93ef58ec2", size = 94586, upload-time = "2026-10-09T20:30:00.201Z" }, + { url = "https://files.pythonhosted.org/packages/b6/83/cf690ab80a0db0f50b300a7141f45dbf1bbbb6b32457f74bb55f47d38f5c/multidict-7.1.0-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:c45629c0049fbdef932dbe408ac2b271fdc8c7d9962ca31160f4a0fc3455fe4f", size = 97573, upload-time = "2026-10-09T20:30:02.675Z" }, + { url = "https://files.pythonhosted.org/packages/ce/2e/951c1412c9803e8f87c8673305be1e448761c940cd867ccfdd3e6a551dfd/multidict-7.1.0-cp315-cp315-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:cf606cfe3f67984b4064ac605d71e1eba12515fbabf5bd5a34a8952b8800dc66", size = 453476, upload-time = "2026-10-09T20:30:04.622Z" }, + { url = "https://files.pythonhosted.org/packages/a1/55/12f9f95fc65470bf481ad3d1c0e0fc20094720d0af1985119656f2b4be25/multidict-7.1.0-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:50fdfcb03be719d9573597b095b1175d2e9d0b30d065791dfd9fca727c499442", size = 473078, upload-time = "2026-10-09T20:30:06.986Z" }, + { url = "https://files.pythonhosted.org/packages/87/31/ebe216194a68934de7053d582cde62c839bef4dbc4ae67e9bbccf80a61d2/multidict-7.1.0-cp315-cp315-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:a8bba9d1f6db4ef2a6ebfc937a65d36e80e3aada00b382eaf56fea8f639322d5", size = 435633, upload-time = "2026-10-09T20:30:09.021Z" }, + { url = "https://files.pythonhosted.org/packages/46/e5/4aea764cd6a1d326d91f2bb92b1c8c39c3f5a8da624e7b20b88179dffb72/multidict-7.1.0-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:46d4af0afc6eb9867b3ae50605787c80b868e2f52eac3801246034925fe578b8", size = 488656, upload-time = "2026-10-09T20:30:11.119Z" }, + { url = "https://files.pythonhosted.org/packages/6e/f8/b1e5935233fa4b504b1a58b584fcdf03526635e4b5f268f716be9108a1a4/multidict-7.1.0-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5cc58ebb731200ddb64d55f1b345630fb5f7a8138cdbd242af9dce964a7cb03d", size = 502311, upload-time = "2026-10-09T20:30:13.396Z" }, + { url = "https://files.pythonhosted.org/packages/9a/8e/cde07147b6fc56b9ae0fe01d9c0bebd730b2be2c3052d3a5a117e13f561e/multidict-7.1.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4b87ad54e8d4adeb0a1f04889504d6ec7f04fb02609220810f51f1b6c66bc1cc", size = 477470, upload-time = "2026-10-09T20:30:15.894Z" }, + { url = "https://files.pythonhosted.org/packages/68/a1/11ac1880eacddcf698aa227ba9387cda60128e38034eda182cf4585109ee/multidict-7.1.0-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:44f7e5dd83a615636b80182bdf446ece57ed61d5d51854acc5d9840631136d4e", size = 430088, upload-time = "2026-10-09T20:30:18.972Z" }, + { url = "https://files.pythonhosted.org/packages/6a/5a/09926de0ec910704507a21c4f1ad76026aab9a5657ced868c57bbbe9324b/multidict-7.1.0-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:9bc5e7f843d14a167cdc26fe2d22f6f3aa2feb57919cf3ff034262a57d8d95d0", size = 460632, upload-time = "2026-10-09T20:30:21.45Z" }, + { url = "https://files.pythonhosted.org/packages/ed/36/cc51eb3ffb09f475326bbf868c6af2805fbbe9175122ce6d7a65aa06d6c1/multidict-7.1.0-cp315-cp315-musllinux_1_2_armv7l.whl", hash = "sha256:0631eb5f49f67de10bbdc3f64141326dbc62e8d319900966648381ce0845d8ca", size = 434056, upload-time = "2026-10-09T20:30:23.679Z" }, + { url = "https://files.pythonhosted.org/packages/6d/f4/9e0e4dce595573eba1555495ac9ca6b5f7f6e14cf6c3a5cd87ce5bd33d6f/multidict-7.1.0-cp315-cp315-musllinux_1_2_i686.whl", hash = "sha256:d1b1b32f3c32f734dde8f36ac1df8e275e768a7b333241cd637cb2538628a4b4", size = 453014, upload-time = "2026-10-09T20:30:26.192Z" }, + { url = "https://files.pythonhosted.org/packages/96/14/993a7ac9f3592f5628a12f6bc2495f5cce5814b883170e06f487dede6969/multidict-7.1.0-cp315-cp315-musllinux_1_2_ppc64le.whl", hash = "sha256:159976f9c40f96e3fe0952b708846a43a76bacb114e9cc828816f5080bddd5ec", size = 476343, upload-time = "2026-10-09T20:30:28.532Z" }, + { url = "https://files.pythonhosted.org/packages/b0/da/c2147c1e225a676ee0c97f97bb935fb8a70821bc12df240491bf9f140801/multidict-7.1.0-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:81a0e08c64dfdad27dab687b96f572b23bafa1999a39d1b6f70b3ddbb73e8bd0", size = 426813, upload-time = "2026-10-09T20:30:31.015Z" }, + { url = "https://files.pythonhosted.org/packages/5f/fa/8858b260a6662035670759e7b3a7da9decc227296491749073e76202de93/multidict-7.1.0-cp315-cp315-musllinux_1_2_s390x.whl", hash = "sha256:4e11e7299079718c78f8147e7206c22fe35bab4466d38992420795288a0b8096", size = 483882, upload-time = "2026-10-09T20:30:33.509Z" }, + { url = "https://files.pythonhosted.org/packages/c2/43/d42dc515d56d506f437e8a19c4f604719a306f8d2b60f70a14be34ac9231/multidict-7.1.0-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:34d2ee98e15d5cfe782a431bc913fce3b58cf3fdb34fcb437aeb275cdf9007ab", size = 469953, upload-time = "2026-10-09T20:30:35.996Z" }, + { url = "https://files.pythonhosted.org/packages/5e/bd/1b6fb52f7e082b4d49b069d362169a2e6dbc43800f152f33c8f0e8933117/multidict-7.1.0-cp315-cp315-win32.whl", hash = "sha256:f376224572d1f5da1c871f969ab04765727f180e70d012d93e07bfc08442c64b", size = 80202, upload-time = "2026-10-09T20:30:38.121Z" }, + { url = "https://files.pythonhosted.org/packages/f2/26/5dec513dec950825529037703da89a597dc0b157e7b1b8d0304dd9e672cc/multidict-7.1.0-cp315-cp315-win_amd64.whl", hash = "sha256:67fcf28db77b385820881521db7435e9f1c607cfaf07db6eb78aa9d1146bde86", size = 92921, upload-time = "2026-10-09T20:30:40.507Z" }, + { url = "https://files.pythonhosted.org/packages/dd/eb/fd62025f8cd3dad6f936df8bd7ff2642e2fe3fe0166ef2fc75699ee57cac/multidict-7.1.0-cp315-cp315-win_arm64.whl", hash = "sha256:c7aafa4dd2f702ee2198005d6cba4309c1e25ed1c201d77beddefa47411bead8", size = 92848, upload-time = "2026-10-09T20:30:43.026Z" }, + { url = "https://files.pythonhosted.org/packages/42/f4/2dcd45731d2f57b87211a1dab1c29a72c6a4a527f370851c3e4cef5c4445/multidict-7.1.0-cp315-cp315t-macosx_10_15_universal2.whl", hash = "sha256:1348ddc076251cd542f4a99ccda4b7c1f8444e8ab489d3541a978ca5901c7c1f", size = 177634, upload-time = "2026-10-09T20:30:45.125Z" }, + { url = "https://files.pythonhosted.org/packages/6d/d6/d57b12a5bb19396a99ae66ec48ff69f764cc2c83e83bd9a003bd5ed5802a/multidict-7.1.0-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:9267bf8261a779abb2a6eab5f107f5db85b2d1745f2494081c731aaf28738ce3", size = 101954, upload-time = "2026-10-09T20:30:47.416Z" }, + { url = "https://files.pythonhosted.org/packages/46/8b/374e3f6e4581b8f8425712214cad854ff9370019483aaa49e6207c160adf/multidict-7.1.0-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:8a844b8b1685f38a2e8b2f3213b286e2a7abfe67508381780a0d4599ac337c1c", size = 105056, upload-time = "2026-10-09T20:30:49.618Z" }, + { url = "https://files.pythonhosted.org/packages/9e/0a/6c89e2179a84eaa78eec658b9a05f10d3e22654708d7b2e3ebdf0faa0614/multidict-7.1.0-cp315-cp315t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:18a447d46a3a2f1e61b365cbf5627db7030fdb707dad70c4f2760e5144166ecc", size = 467374, upload-time = "2026-10-09T20:30:51.933Z" }, + { url = "https://files.pythonhosted.org/packages/c5/62/431ed831b5e9b94c75ed0a410786d07176e879603601570eb25594039200/multidict-7.1.0-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:88811f890db240a1c82bf0bcd52973763707a552c8113ac3fcebca183afb2fa8", size = 504024, upload-time = "2026-10-09T20:30:54.701Z" }, + { url = "https://files.pythonhosted.org/packages/d4/dc/52e4204538a7824e407e531b742ff6f7a2ff614dd40382d29a62755699cb/multidict-7.1.0-cp315-cp315t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:a60b720c329c0007feae692b7bf91cf17b3f9bd3727be96cc6f9a3336651041b", size = 460139, upload-time = "2026-10-09T20:30:57.193Z" }, + { url = "https://files.pythonhosted.org/packages/22/4c/0228d61a8fee69a7ac4d8d0426aa1810b9c36b679a8c51844de701230073/multidict-7.1.0-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:b117ed1cd1a23df0902461c38093408b95971833dcee629112acda25b603c8d0", size = 513162, upload-time = "2026-10-09T20:30:59.662Z" }, + { url = "https://files.pythonhosted.org/packages/56/50/a0b28bf4f036897bbd44c8761fbb384c014c34f621687799d07345b62820/multidict-7.1.0-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:bbcae7a54050b7ad7bc7bf425ba63dea7d2cd31a92246ba787a2ce69a9b98dbc", size = 520312, upload-time = "2026-10-09T20:31:02.515Z" }, + { url = "https://files.pythonhosted.org/packages/4f/1d/ba96f77c24174eff9f6521cc7c83958f27598b924a9f7b6aca5d11c73f35/multidict-7.1.0-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4cba2b0b9235fe10e12301d6b4cfba0f353fa668d635f6e988b03623c2cd42ba", size = 502953, upload-time = "2026-10-09T20:31:05.187Z" }, + { url = "https://files.pythonhosted.org/packages/59/f2/14c3ffb649cf45a629ec38ca757a493f0caf729e3f3580816dc7779e4caa/multidict-7.1.0-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:535173fbcc3933d84f9929d49d7a59a0faec259ee07d07c34c7d2a980b4e3683", size = 451497, upload-time = "2026-10-09T20:31:07.597Z" }, + { url = "https://files.pythonhosted.org/packages/55/df/fa4f8f6ee2314bdd3e4bc830c25f1d8a737188198abeaf105c73454f0b95/multidict-7.1.0-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:ea027bdeca1d7e498237634ee4e3a852e2723eef39996dec0ff0f77dff8a2336", size = 486212, upload-time = "2026-10-09T20:31:10.178Z" }, + { url = "https://files.pythonhosted.org/packages/32/5e/3227762b04a8ff1a90359ee2c04af9ed095fe3892e101705fa4233b51514/multidict-7.1.0-cp315-cp315t-musllinux_1_2_armv7l.whl", hash = "sha256:507151e1e3dee95e9e8159e329aed4f75aa5205ecd6505a4f6be546890eafbe1", size = 459864, upload-time = "2026-10-09T20:31:13.044Z" }, + { url = "https://files.pythonhosted.org/packages/5e/04/58524c7e82176438a48704a687fb383cc943dd7075c67b5bea288043b504/multidict-7.1.0-cp315-cp315t-musllinux_1_2_i686.whl", hash = "sha256:9c10791e9f5ef132effc8fdce2009482c1cfb26618c5fc1b7952a47dd5eb632e", size = 465861, upload-time = "2026-10-09T20:31:15.503Z" }, + { url = "https://files.pythonhosted.org/packages/f8/d6/28e549b6ec0c829647de4c75cf32e4c7ea0d0e87b91dfb399292f630c365/multidict-7.1.0-cp315-cp315t-musllinux_1_2_ppc64le.whl", hash = "sha256:f16ac8af2804855d3cae5fc3c5ab609c9fd0fc8ecacd92579c05ed3c173396fd", size = 498865, upload-time = "2026-10-09T20:31:18.548Z" }, + { url = "https://files.pythonhosted.org/packages/eb/ac/3006640586b4d33442c53989b78fc290c8eae5fab5b62a31ac7a4c220e69/multidict-7.1.0-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:b78de22bae456a976f33df34d598dfd16edc9a03df8f4cc8b7c17bdba4c97b4a", size = 449885, upload-time = "2026-10-09T20:31:21.03Z" }, + { url = "https://files.pythonhosted.org/packages/80/7e/1ece407cee9f9aff9ace9e44379ed937bccb790936ae448feb79a82c362e/multidict-7.1.0-cp315-cp315t-musllinux_1_2_s390x.whl", hash = "sha256:db77888081431aaa69f3fd3480891746ddce6c2a571f6201869a24e2f06cf423", size = 500237, upload-time = "2026-10-09T20:31:23.611Z" }, + { url = "https://files.pythonhosted.org/packages/9a/4c/c052b700ffcf689454848ee81ba87bedfdc10caff592c0d2a327c43939a5/multidict-7.1.0-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:c39dfcaa0bf23443474c0cb58d8d8aea9529c1841d99654cb38e4dada7b1948a", size = 495143, upload-time = "2026-10-09T20:31:26.237Z" }, + { url = "https://files.pythonhosted.org/packages/0a/ef/9ddad94c32fb0bdfc5ad0942d06ae6699bd30d261b0ff59b94810a133238/multidict-7.1.0-cp315-cp315t-win32.whl", hash = "sha256:16b21164797bde6f417066d02775975cc2e15ab8abf80efa55fe85e0b4894020", size = 86526, upload-time = "2026-10-09T20:31:28.734Z" }, + { url = "https://files.pythonhosted.org/packages/b3/ce/2efa1f32a07adfe041d48c6d04c08b6f9db66b8512c765983172399b2855/multidict-7.1.0-cp315-cp315t-win_amd64.whl", hash = "sha256:55392202cb374dd1a1f89a8ce1586644870d9e936752059d053e576acc50bc89", size = 99671, upload-time = "2026-10-09T20:31:31.282Z" }, + { url = "https://files.pythonhosted.org/packages/a9/b3/a44c301fe13716c5f2c08afd89a481018988cde4b337b36e28a2b0fcf3a3/multidict-7.1.0-cp315-cp315t-win_arm64.whl", hash = "sha256:f979a077d1c0a9a36dd4fab0d3a36b8de7b593bf935e13df85a380395b2c11ad", size = 98893, upload-time = "2026-10-09T20:31:33.62Z" }, + { url = "https://files.pythonhosted.org/packages/d0/86/a3de309c5e28ee85b314d0e3ba0e0dea6fd361c313322a05e67be4656e1e/multidict-7.1.0-py3-none-any.whl", hash = "sha256:d9ef29cfd98e17085b4f91bba8fa1570bec6787d5c52ce653ed33a58785585d0", size = 28087, upload-time = "2026-10-09T20:31:35.945Z" }, ] [[package]] @@ -945,21 +1043,21 @@ wheels = [ [[package]] name = "playwright" -version = "1.61.0" +version = "1.64.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "greenlet" }, { name = "pyee" }, ] wheels = [ - { url = "https://files.pythonhosted.org/packages/44/ee/31e4e0db36588b817a10b299a0285082545fde7d36543c2abe498bb3d61a/playwright-1.61.0-py3-none-macosx_10_13_x86_64.whl", hash = "sha256:ff138c3a604f69911e9d42fd036e55c2a171e5616edf04c1e7f60a2a285540b0", size = 43421877, upload-time = "2026-06-29T10:32:48.428Z" }, - { url = "https://files.pythonhosted.org/packages/42/35/71395dd3ecc798965be4a3ef8c443217d4abca168e7cb34536304f9489e6/playwright-1.61.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:009588c2a7e499bc5a8b425b61fa65490968bbda9cd69e0cf2cff10f8304659a", size = 42205016, upload-time = "2026-06-29T10:32:52.104Z" }, - { url = "https://files.pythonhosted.org/packages/f4/44/323164cf5cd1647bdefce76ffce27651aadb959d089b48f53ea40918276e/playwright-1.61.0-py3-none-macosx_11_0_universal2.whl", hash = "sha256:9f7de4536088d12037c13a52b7ea34b59270b78926bb56935070597ffac6b1af", size = 43421884, upload-time = "2026-06-29T10:32:55.773Z" }, - { url = "https://files.pythonhosted.org/packages/ab/f8/a35bf179e4ba2522c1893635094a64e407572547bd61528820fc0abc87fe/playwright-1.61.0-py3-none-manylinux1_x86_64.whl", hash = "sha256:54f3b39f6eab832e33458c1dd7da0b5682aedab3b09ae731b5c59fa12fd2024e", size = 47421381, upload-time = "2026-06-29T10:32:59.903Z" }, - { url = "https://files.pythonhosted.org/packages/b7/eb/e3f922348ec17c315f98c463f72faa1181a1c3de0bfe31a8d2edf6561723/playwright-1.61.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:93454322ade8c11d5d6c211bfd91bdfb9ffb4810e3e026371bcbc4bec1b7ee4c", size = 47120545, upload-time = "2026-06-29T10:33:03.574Z" }, - { url = "https://files.pythonhosted.org/packages/c2/a6/5be4e52b40a9c0c8a073e7c5b0785c05cf5a9ea8f8a7b5b260e32d970342/playwright-1.61.0-py3-none-win32.whl", hash = "sha256:372d55a6f1248fa1dd47599686980cb8fb5bbe6fcda59eab793eb657c11d8a9b", size = 37844841, upload-time = "2026-06-29T10:33:07.361Z" }, - { url = "https://files.pythonhosted.org/packages/6c/fd/2b78036e5fbe9d5f5645bbe08a1eac7160c51243c0093963edbcf67c35d9/playwright-1.61.0-py3-none-win_amd64.whl", hash = "sha256:35c6cc4589a5d00964a59d7b3e59641e0aac0c02f15479a7af77d20f6bc79597", size = 37844846, upload-time = "2026-06-29T10:33:10.637Z" }, - { url = "https://files.pythonhosted.org/packages/27/0d/1b0f3c4ee4eb0514bc805b5c2f9a223e5b6de4f11a926f5235d51d0fc81b/playwright-1.61.0-py3-none-win_arm64.whl", hash = "sha256:e9fcbffcf557a8620fdedd92491eb59a32d18e23d6f3b4f6214b952be324fe51", size = 33955127, upload-time = "2026-06-29T10:33:14.008Z" }, + { url = "https://files.pythonhosted.org/packages/8d/c8/cc677856d89a0c077673b40ab915ed5597bf1347b205cabe70121c431ca9/playwright-1.64.1-py3-none-macosx_10_13_x86_64.whl", hash = "sha256:29453ff76e25c17d0b45658cacd6b92e9eec46e8db21e134fb3b7143df50f013", size = 44508971, upload-time = "2026-10-22T16:29:58.12Z" }, + { url = "https://files.pythonhosted.org/packages/72/4f/572bbbe60a5787ca61a84bad934c3ce19c08c2bc9c0e9781bf0d99cad1a6/playwright-1.64.1-py3-none-macosx_11_0_arm64.whl", hash = "sha256:59f7b041284ce8d1b72098ae50ca48a2d83692eec25154ab5ba79d4b6b4fe8a9", size = 43155232, upload-time = "2026-10-22T16:30:02.415Z" }, + { url = "https://files.pythonhosted.org/packages/44/fa/468f313a56d33a6420705147c8d47bef558f087856edf38c5b13eef8aa6c/playwright-1.64.1-py3-none-macosx_11_0_universal2.whl", hash = "sha256:6a6f99adad1ae40e6ee62efe89785db861ce7ddd57651521cb31894183cc4ae3", size = 44508977, upload-time = "2026-10-22T16:30:07.632Z" }, + { url = "https://files.pythonhosted.org/packages/15/b9/e481a34572933b5cf179d5637c98da488c732ee339dff5b73a0624d2e42b/playwright-1.64.1-py3-none-manylinux1_x86_64.whl", hash = "sha256:577b8d88778c245cfbd145ae17cf53044f084b1b46c55c69081d4069d56057e2", size = 48471931, upload-time = "2026-10-22T16:30:12.831Z" }, + { url = "https://files.pythonhosted.org/packages/0c/11/545f25e47ec54e1e8a2892ef9994fc2b298f909ab37b88578e3a1f87ac2e/playwright-1.64.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a29fda44725e11b0b625c4bff6458a1f6dbee97b88c9788d12e18a8344458c2d", size = 48150994, upload-time = "2026-10-22T16:30:18.297Z" }, + { url = "https://files.pythonhosted.org/packages/33/87/8ff7af99387ee72ae9b46a66ece7a0c0aa63f73320ecf6dd3dd087fa840a/playwright-1.64.1-py3-none-win32.whl", hash = "sha256:d3c48b31da426c2f3562d0919cb9ea4e5415f6dbd29d7211fa4d66cca24fbd2f", size = 38801828, upload-time = "2026-10-22T16:30:23.154Z" }, + { url = "https://files.pythonhosted.org/packages/96/0a/64db6851aa1852a4f76be28eea71d4e2bf9f3ce493ee2e66939426729046/playwright-1.64.1-py3-none-win_amd64.whl", hash = "sha256:5e240a79464434c9260957b9ef59a5808e02e96e3fcabdc717fd7485260b9730", size = 38801836, upload-time = "2026-10-22T16:30:28.092Z" }, + { url = "https://files.pythonhosted.org/packages/c5/4b/d7ddde9467a5fcfe6a0d3c954732332e98a4f4a9025fd42c8d091c16e5f9/playwright-1.64.1-py3-none-win_arm64.whl", hash = "sha256:983ccd085453ea5a7588193657fc349a6ffbf7bf7ba663fd58dc81e4aa3af9d9", size = 34693875, upload-time = "2026-10-22T16:30:32.724Z" }, ] [[package]] @@ -1406,108 +1504,142 @@ wheels = [ [[package]] name = "urllib3" -version = "2.7.0" +version = "2.8.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/53/0c/06f8b233b8fd13b9e5ee11424ef85419ba0d8ba0b3138bf360be2ff56953/urllib3-2.7.0.tar.gz", hash = "sha256:231e0ec3b63ceb14667c67be60f2f2c40a518cb38b03af60abc813da26505f4c", size = 433602, upload-time = "2026-05-07T16:13:18.596Z" } +sdist = { url = "https://files.pythonhosted.org/packages/e3/05/b17359e1cefb4f909b5e40b1b90a496d987258916dbbf88e842c729f510e/urllib3-2.8.0.tar.gz", hash = "sha256:63bf2ead4c879426ebf22ef2a781eeb4aa3b4ae798a0435506f8687fd5bb9b63", size = 458972, upload-time = "2026-09-15T19:29:36.253Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/7f/3e/5db95bcf282c52709639744ca2a8b149baccf648e39c8cc87553df9eae0c/urllib3-2.7.0-py3-none-any.whl", hash = "sha256:9fb4c81ebbb1ce9531cce37674bbc6f1360472bc18ca9a553ede278ef7276897", size = 131087, upload-time = "2026-05-07T16:13:17.151Z" }, + { url = "https://files.pythonhosted.org/packages/92/9d/c4e665119135114480843e7ab388fa94d8480650450e6f8e26b70d323a4c/urllib3-2.8.0-py3-none-any.whl", hash = "sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3", size = 135717, upload-time = "2026-09-15T19:29:34.577Z" }, ] [[package]] name = "yarl" -version = "1.24.5" +version = "1.25.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "idna" }, { name = "multidict" }, { name = "propcache" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/31/33/ebe9e3d1f86c7a0b51094c0a146392045ca1631d2664889539dec8088a33/yarl-1.24.5.tar.gz", hash = "sha256:e81b83143bee16329c23db3c1b2d82b29892fcbcb849186d2f6e98a5abe9a57f", size = 228679, upload-time = "2026-07-20T02:07:45.435Z" } +sdist = { url = "https://files.pythonhosted.org/packages/75/16/e8be8e2fb175bbf41a0680381a319f1199fae256588241a2ac8677eafb49/yarl-1.25.1.tar.gz", hash = "sha256:03dd38de09bc213e9a8b29761eec33ee1d5318dac0e49d8af36e4d27830e23a7", size = 246245, upload-time = "2026-09-15T19:35:02.264Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/fe/db/3cb5df059756a45761cc3dee8fd25ec82b83a6585ea3542b969fda850f99/yarl-1.24.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:2c1fe720934a16ea8e7146175cba2126f87f54912c8c5435e7f7c7a51ef808d3", size = 135043, upload-time = "2026-07-20T02:04:52.39Z" }, - { url = "https://files.pythonhosted.org/packages/44/f8/767d6bd5a03db63bc467df2fb56d6fafeae9667d74aea92cd6af399f828b/yarl-1.24.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c687ed078e145f5fd53a14854beff320e1d2ab76df03e2009c98f39a0f68f39a", size = 96942, upload-time = "2026-07-20T02:04:54.26Z" }, - { url = "https://files.pythonhosted.org/packages/ce/97/10b939c44d7b28d1dbc389cfc7012306d1ea8dba01eaef44b39fffaee52a/yarl-1.24.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:709f1efed56c4a145793c046cd4939f9959bcd818979a787b77d8e09c57a0840", size = 97046, upload-time = "2026-07-20T02:04:56.638Z" }, - { url = "https://files.pythonhosted.org/packages/5b/7a/b410dbe39b6255c55fb2a2bcee96eb844d0789235ddc381a889a90dc72d6/yarl-1.24.5-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:874019bd513008b009f58657134e5d0c5e030b3559bd0553976837adf52fe966", size = 110512, upload-time = "2026-07-20T02:04:58.955Z" }, - { url = "https://files.pythonhosted.org/packages/83/c7/da591971f78a5617e1f21f5699858ebccd836fe181a6493788ffc91ba69b/yarl-1.24.5-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:a4582acf7ef76482f6f511ebaf1946dae7f2e85ec4728b81a678c01df63bd723", size = 102454, upload-time = "2026-07-20T02:05:00.623Z" }, - { url = "https://files.pythonhosted.org/packages/c4/8e/73b0ed4de47289a78a96045d76d1cfe5e41848bf0da59ce25b2ec87ee05d/yarl-1.24.5-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2cabe6546e41dabe439999a23fcb5246e0c3b595b4315b96ef755252be90caeb", size = 117617, upload-time = "2026-07-20T02:05:02.325Z" }, - { url = "https://files.pythonhosted.org/packages/cf/14/b744747bc4f57a8d55bd744df463457524583e1e9f7538b5ace0346ab92e/yarl-1.24.5-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:17f57620f5475b3c69109376cc87e42a7af5db13c9398e4292772a706ff10780", size = 116135, upload-time = "2026-07-20T02:05:04.05Z" }, - { url = "https://files.pythonhosted.org/packages/66/ca/95aa4d0e5b7ea4f20e4d577c42d001ed9df207569fdb063cc5ed4ebb496b/yarl-1.24.5-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:570fec8fbd22b032733625f03f10b7ff023bc399213db15e72a7acaef28c2f4e", size = 111935, upload-time = "2026-07-20T02:05:05.738Z" }, - { url = "https://files.pythonhosted.org/packages/72/0d/d2ad8d6b147832d177a4e720ba1962fe686eb0913b74503b3eca094b8bba/yarl-1.24.5-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:5fede79c6f73ff2c3ef822864cb1ada23196e62756df53bc6231d351a49516a2", size = 110010, upload-time = "2026-07-20T02:05:07.471Z" }, - { url = "https://files.pythonhosted.org/packages/50/18/eb335e4120903903f4865041355ae46256a2406eb2865bc24827f4f27b61/yarl-1.24.5-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8ccf9aca873b767977c73df497a85dbedee4ee086ae9ae49dc461333b9b79f58", size = 110058, upload-time = "2026-07-20T02:05:09.246Z" }, - { url = "https://files.pythonhosted.org/packages/44/70/97353add32c62ad6f206d948ac5a5ee84398225e534dc6ed6433d1b335b6/yarl-1.24.5-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:ad5d8201d310b031e6cd839d9bac2d4e5a01533ce5d3d5b50b7de1ef3af1de61", size = 103308, upload-time = "2026-07-20T02:05:11.31Z" }, - { url = "https://files.pythonhosted.org/packages/68/39/5e7398d4b6f6b3c9062823ebc60802df5b272e3fe9e788f9734c6ee46c85/yarl-1.24.5-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:841f0852f48fefea3b12c9dfec00704dfa3aef5215d0e3ce564bb3d7cd8d57c6", size = 116898, upload-time = "2026-07-20T02:05:13.099Z" }, - { url = "https://files.pythonhosted.org/packages/e4/c9/09e52f2239e8b96357eccca05915382e4ba5405ebfb623b6036040d99654/yarl-1.24.5-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:9baafc71b04f8f4bb0703b21d6fc9f0c30b346c636a532ff16ec8491a5ea4b1f", size = 109400, upload-time = "2026-07-20T02:05:14.821Z" }, - { url = "https://files.pythonhosted.org/packages/4b/6a/e94133d4c2d1a14d2384310bf3e79d9cf32c9d1eae1c6f034fb80d098fa1/yarl-1.24.5-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:d897129df1a22b12aeed2c2c98df0785a2e8e6e0bde87b389491d0025c187077", size = 115934, upload-time = "2026-07-20T02:05:17.78Z" }, - { url = "https://files.pythonhosted.org/packages/4e/3c/34955ed967b976fc38edcbb6d538dee79dbda4cb7fc7f72a0907a7c78e0f/yarl-1.24.5-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:dd625535328fd9882374356269227670189adfcc6a2d90284f323c05862eecbd", size = 112178, upload-time = "2026-07-20T02:05:19.675Z" }, - { url = "https://files.pythonhosted.org/packages/f5/46/d7bd3a8859d47dcfaffd7127af7076032a7da278a9a02e17b5f37bfb6712/yarl-1.24.5-cp311-cp311-win_amd64.whl", hash = "sha256:f4239bbec5a3577ddb49e4b50aeb32d8e5792098262ae2f63723f916a29b1a25", size = 97544, upload-time = "2026-07-20T02:05:21.523Z" }, - { url = "https://files.pythonhosted.org/packages/01/69/c1bfd21e32c638974ea2c542a0b8c53ef1fa9eff336020f5d014f9503ff2/yarl-1.24.5-cp311-cp311-win_arm64.whl", hash = "sha256:3ac6aff147deb9c09461b2d4bbdf6256831198f5d8a23f5d37138213090b6d8a", size = 93359, upload-time = "2026-07-20T02:05:23.493Z" }, - { url = "https://files.pythonhosted.org/packages/1b/84/71d051c850b5af41d168c679d9eb67eb7c55283ac4ee131673edf134bc4e/yarl-1.24.5-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:d693396e5aea78db03decd60aec9ece16c9b40ba00a587f089615ff4e718a81d", size = 136035, upload-time = "2026-07-20T02:05:25.489Z" }, - { url = "https://files.pythonhosted.org/packages/03/4d/8ad27f9a1b7e69313cca5d695b925b48efe51208d3490e0844bae97cabc0/yarl-1.24.5-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:3363fcc96e665878946ad7a106b9a13eac0541766a690ef287c0232ac768b6ec", size = 97642, upload-time = "2026-07-20T02:05:27.429Z" }, - { url = "https://files.pythonhosted.org/packages/ea/b4/05b4131c407006cd1e410e9c6539f16a0945724677e5364447313c15ea3e/yarl-1.24.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9d399bdcfb4a0f659b9b3788bbc89babe63d9a6a65aacdf4d4e7065ff2e6316c", size = 97323, upload-time = "2026-07-20T02:05:29.441Z" }, - { url = "https://files.pythonhosted.org/packages/20/16/e618c875c73e0e39611f20a581b3d5e8d59b8857bf001bee3263044c6deb/yarl-1.24.5-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:90333fd89b43c0d08ac85f3f1447593fc2c66de18c3d6378d7125ea118dc7a54", size = 107741, upload-time = "2026-07-20T02:05:31.367Z" }, - { url = "https://files.pythonhosted.org/packages/d9/9a/c4defeaf3ed33fcb346aacf9c6e971a8d4e2bde04a0310e79abb208e7965/yarl-1.24.5-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:665b0a2c463cc9423dd647e0bfd9f4ccc9b50f768c55304d5e9f80b177c1de12", size = 103570, upload-time = "2026-07-20T02:05:33.303Z" }, - { url = "https://files.pythonhosted.org/packages/5f/e7/0e0e0de5865ebd5914537ef486f36c727a59865c3ac0cf5ff1b32aececbf/yarl-1.24.5-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e006d3a974c4ee19512e5f058abedb6eef36a5e553c14812bdeba1758d812e6d", size = 115815, upload-time = "2026-07-20T02:05:35.292Z" }, - { url = "https://files.pythonhosted.org/packages/2b/27/ca56b700cb170aba25a3893b75355b213935657dc5714d2383354a270e62/yarl-1.24.5-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:e7d42c531243450ef0d4d9c172e7ed6ef052640f195629065041b5add4e058d1", size = 116025, upload-time = "2026-07-20T02:05:37.503Z" }, - { url = "https://files.pythonhosted.org/packages/d6/d0/d56c859b8222116f5d68459199f48359e0bf121b6f65a69bf329b3602ba0/yarl-1.24.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f08c7513ecef5aad65687bfdf6bc601ae9fccd04a42904501f8f7141abad9eb9", size = 109835, upload-time = "2026-07-20T02:05:39.506Z" }, - { url = "https://files.pythonhosted.org/packages/70/a2/3a35557e4d1a79425040eba202ccaf08bdc8717680fc77e2498a1ad2e0a5/yarl-1.24.5-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:6c95b17fe34ed802f17e205112e6e10db92275c34fee290aa9bdc55a9c724027", size = 108884, upload-time = "2026-07-20T02:05:41.584Z" }, - { url = "https://files.pythonhosted.org/packages/e4/35/ef4c26356b7913c68983bac2d72a4212b3347af551cb8d250b99b5ed7b7f/yarl-1.24.5-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:56b149b22de33b23b0c6077ab9518c6dcb538ad462e1830e68d06591ccf6e38b", size = 107308, upload-time = "2026-07-20T02:05:43.697Z" }, - { url = "https://files.pythonhosted.org/packages/d5/91/ff0dc66c2ccf3e0153ab97ff61eabab4400e6a5264af427ab30cd69f1857/yarl-1.24.5-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:a8fe66b8f300da93798025a785a5b90b42f3810dc2b72283ff84a41aaaebc293", size = 103646, upload-time = "2026-07-20T02:05:45.895Z" }, - { url = "https://files.pythonhosted.org/packages/74/f0/33b9271c7f881766359d58266fa0811d2e5210ed860e28da7dc6d7786344/yarl-1.24.5-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:377fe3732edbaf78ee74efdf2c9f49f6e99f20e7f9d2649fda3eb4badd77d76e", size = 115305, upload-time = "2026-07-20T02:05:47.832Z" }, - { url = "https://files.pythonhosted.org/packages/ef/65/fd79fb1868c4a80db8661091de525bf430f63c3bea1b20e8b6a84fc7d359/yarl-1.24.5-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:e8ffa78582120024f476a611d7befc123cee59e47e8309d470cf667d806e613b", size = 108404, upload-time = "2026-07-20T02:05:49.604Z" }, - { url = "https://files.pythonhosted.org/packages/ff/ba/dbabe6b262f17a816c70cfc09558dbf03ece3ec76684d02f911a3d3a189c/yarl-1.24.5-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:daba5e594f06114e37db186efd2dd916609071e59daca901a0a2e71f02b142ce", size = 115940, upload-time = "2026-07-20T02:05:51.741Z" }, - { url = "https://files.pythonhosted.org/packages/a5/43/fab2d1dad9d340a268cdde63756a123d069723efff6a372d123fa74a9517/yarl-1.24.5-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:65be18ec59496c13908f02a2472751d9ef840b4f3fb5726f129306bf6a2a7bba", size = 110006, upload-time = "2026-07-20T02:05:53.554Z" }, - { url = "https://files.pythonhosted.org/packages/c4/27/41eb51bbd1b8d89546b83897cfb0164f1e109304fd408dbb151b639eec0f/yarl-1.24.5-cp312-cp312-win_amd64.whl", hash = "sha256:a929d878fec099030c292803b31e5d5540a7b6a31e6a3cc76cb4685fc2a2f51b", size = 97618, upload-time = "2026-07-20T02:05:55.57Z" }, - { url = "https://files.pythonhosted.org/packages/3c/25/b2553764b3d65db711d8f45416351ec4f420847558eb669edcbcaadf5780/yarl-1.24.5-cp312-cp312-win_arm64.whl", hash = "sha256:7ce27823052e2013b597e0c738b13e7e36b8ccb9400df8959417b052ab0fd92c", size = 93018, upload-time = "2026-07-20T02:05:57.554Z" }, - { url = "https://files.pythonhosted.org/packages/e1/63/64ef361967cc983573149dc1515d531db5da8a4c92d22bb833d59e01b313/yarl-1.24.5-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:79af890482fc94648e8cde4c68620378f7fef60932710fa17a66abc039244da2", size = 135075, upload-time = "2026-07-20T02:05:59.671Z" }, - { url = "https://files.pythonhosted.org/packages/bb/89/55920fd853ce43e608adbc3962456f0d649d6bb15250dc2988321da0fe1c/yarl-1.24.5-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:46c2f213e23a04b93a392942d782eb9e413e6ef6bf7c8c53884e599a5c174dcb", size = 97225, upload-time = "2026-07-20T02:06:01.769Z" }, - { url = "https://files.pythonhosted.org/packages/15/f0/7688d3f2cfff7590df2af38ec46d969f4281a4dddb08a9ad2eafbcdddf98/yarl-1.24.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:92ab3e11448f2ff7bf53c5a26eff0edc086898ec8b21fb154b85839ce1d88075", size = 96751, upload-time = "2026-07-20T02:06:03.676Z" }, - { url = "https://files.pythonhosted.org/packages/05/1a/a851a0f94aaaf379dd4f901bfc80f634280bec51eb260b47363e2a4cd62e/yarl-1.24.5-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ebb0ec7f17803063d5aeb982f3b1bd2b2f4e4fae6751226cbd6ba1fcfe9e63ff", size = 107960, upload-time = "2026-07-20T02:06:05.699Z" }, - { url = "https://files.pythonhosted.org/packages/6c/a8/faea066c12f9c77ca0de90641f1655f9dd7b412477bf28c76d692f3aecff/yarl-1.24.5-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:82632daed195dcc8ea664e8556dc9bdbd671960fb3776bd92806ce05792c2448", size = 103500, upload-time = "2026-07-20T02:06:07.556Z" }, - { url = "https://files.pythonhosted.org/packages/fb/9c/1e67084c2a6e2f2db0e3be798328cb3be42c0119b621d25461479a224d21/yarl-1.24.5-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:53e549287ef628fecba270045c9701b0c564563a9b0577d24a4ec75b8ab8040f", size = 115780, upload-time = "2026-07-20T02:06:09.599Z" }, - { url = "https://files.pythonhosted.org/packages/58/86/1f94664e147474337e3359f52012cf3d02f825f694317b178bfba1078c62/yarl-1.24.5-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:fcd3b77e2f17bbe4ca56ec7bcb07992647d19d0b9c05d84886dcd6f9eb810afd", size = 115308, upload-time = "2026-07-20T02:06:11.352Z" }, - { url = "https://files.pythonhosted.org/packages/0a/43/8e55ae7538ba5f28ccb3c845c6dd4549cf7016d5992e5326512519107cdd/yarl-1.24.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d46b86567dd4e248c6c159fcbcdcce01e0a5c8a7cd2334a0fff759d0fa075b16", size = 110574, upload-time = "2026-07-20T02:06:13.129Z" }, - { url = "https://files.pythonhosted.org/packages/ce/ba/a889ec8765cedcf2ac44dcb02d6a21e4861399b243b263c5f2dde27ee740/yarl-1.24.5-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:7f72c74aa99359e27a2ee8d6613fefa28b5f76a983c083074dfc2aaa4ab46213", size = 109914, upload-time = "2026-07-20T02:06:15.243Z" }, - { url = "https://files.pythonhosted.org/packages/9c/c3/e45f821af67b791c2dbbe4a9f4137a1d33f8d386654a05a0c3f47bdfa25d/yarl-1.24.5-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:3f45789ce415a7ec0820dc4f82925f9b5f7732070be1dec1f5f23ec381435a24", size = 107712, upload-time = "2026-07-20T02:06:17.443Z" }, - { url = "https://files.pythonhosted.org/packages/02/00/2ab0f42c9857fcb490bfaa6647b14540b53d241ab209f23220b958cc5832/yarl-1.24.5-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:6e73e7fe93f17a7b191f52ec9da9dd8c06a8fe735a1ecbd13b97d1c723bff385", size = 104251, upload-time = "2026-07-20T02:06:19.259Z" }, - { url = "https://files.pythonhosted.org/packages/7a/70/709d9a286e98af2c7fd8e4e6cada658b5c0e30d87dd7e2a63c2fb5767217/yarl-1.24.5-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:4a36f9becdd4c5c52a20c3e9484128b070b1dcfc8944c006f3a528295a359a9c", size = 115319, upload-time = "2026-07-20T02:06:21.207Z" }, - { url = "https://files.pythonhosted.org/packages/5c/6c/3eaa515142991fe84cfc483ff986492211f1978f90161ccefdbec919d09b/yarl-1.24.5-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:7bcbe0fcf850eae67b6b01749815a4f7161c560a844c769ad7b48fcd99f791c4", size = 109163, upload-time = "2026-07-20T02:06:23.006Z" }, - { url = "https://files.pythonhosted.org/packages/bb/64/711dafce66c323a3144d470547a71c5384c57623308ac8bb5e4b903ac148/yarl-1.24.5-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:24e861e9630e0daddcb9191fb187f60f034e17a4426f8101279f0c475cd74144", size = 115435, upload-time = "2026-07-20T02:06:24.923Z" }, - { url = "https://files.pythonhosted.org/packages/cf/f3/9b9d0e6d84bea851eb1ba99e4bdc755b86fd813e49ec86dfe42f26befdef/yarl-1.24.5-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9335a099ad87287c37fe5d1a982ff392fa5efe5d14b40a730b1ec1d6a41382b4", size = 110691, upload-time = "2026-07-20T02:06:26.973Z" }, - { url = "https://files.pythonhosted.org/packages/86/e4/62a06b7e87c4246ac76b7c2da136f972eb4a3a1fc94abb07e7022d6fdb0a/yarl-1.24.5-cp313-cp313-win_amd64.whl", hash = "sha256:2dbe06fc16bc91502bca713704022182e5729861ae00277c3a23354b40929740", size = 97454, upload-time = "2026-07-20T02:06:29.163Z" }, - { url = "https://files.pythonhosted.org/packages/9e/c9/5fc8025b318ab10db413b61056bd0d95c557a70e8df4210c7511f866329c/yarl-1.24.5-cp313-cp313-win_arm64.whl", hash = "sha256:6b8536851f9f65e7f00c7a1d49ba7f2be0ffe2c11555367fc9f50d9f842410a1", size = 92813, upload-time = "2026-07-20T02:06:31.113Z" }, - { url = "https://files.pythonhosted.org/packages/a9/08/5f3085fef9564217074db9dd8573de1795bc82cde61a7ad10b6a7234a569/yarl-1.24.5-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:2729fcfc4f6a596fb0c50f32090400aa9367774ac296a00387e65098c0befa76", size = 135680, upload-time = "2026-07-20T02:06:33.273Z" }, - { url = "https://files.pythonhosted.org/packages/98/35/ba9436e579bd48a8801f2021d842d9ab4994c26e4c7dd3a4c1f1bcb57a9e/yarl-1.24.5-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:ff330d3c30db4eb6b01d79e29d2d0b407a7ecad39cfd9ec993ece57396a2ec0d", size = 97395, upload-time = "2026-07-20T02:06:35.259Z" }, - { url = "https://files.pythonhosted.org/packages/18/a9/a07f76f3c44e02b25cc743af5ef93eef27f7013eadca770451b6a6ccb5db/yarl-1.24.5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:e42d75862735da90e7fc5a7b23db0c976f737113a54b3c9777a9b665e9cbff75", size = 97223, upload-time = "2026-07-20T02:06:37.216Z" }, - { url = "https://files.pythonhosted.org/packages/77/f7/a9a1d6fa7dd9e388f95b30f6ad3ec4e285f6c8f61f44ce16070c3fcfe414/yarl-1.24.5-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a3732e66413163e72508da9eff9ce9d2846fde51fae45d3605393d3e6cd303e9", size = 108777, upload-time = "2026-07-20T02:06:39.292Z" }, - { url = "https://files.pythonhosted.org/packages/2f/44/e0b86c302471fabd6f02808ecf2ac52b8412b624787849d4bf2cdb466f6f/yarl-1.24.5-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:5b8ee53be440a0cffc991a27be3057e0530122548dbe7c0892df08822fce5ede", size = 103119, upload-time = "2026-07-20T02:06:41.456Z" }, - { url = "https://files.pythonhosted.org/packages/d1/16/9c16d180bf8faaf223225eb50e1245870ff1ae0e302a27153988e65c51fd/yarl-1.24.5-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:af3aefa655adb5869491fa907e652290386800ae99cc50095cba71e2c6aefdca", size = 116471, upload-time = "2026-07-20T02:06:43.696Z" }, - { url = "https://files.pythonhosted.org/packages/d2/8d/b219b9df28a02ce95cfbdd41d2f7caa5669d0ff979c1c9975697145e33c5/yarl-1.24.5-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2120b96872df4a117cde97d270bac96aea7cc52205d305cf4611df694a487027", size = 115974, upload-time = "2026-07-20T02:06:45.874Z" }, - { url = "https://files.pythonhosted.org/packages/9b/e8/f20557aca240d88e69850ad1ee91756821d094bb1310565c04d25c6682a2/yarl-1.24.5-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:66410eb6345d467151934b49bfa70fb32f5b35a6140baa40ad97d6436abea2e9", size = 110830, upload-time = "2026-07-20T02:06:47.852Z" }, - { url = "https://files.pythonhosted.org/packages/db/18/199b85109a53eeca64ee19c9cca228287e8e4ab0cc1a09b28f530e65cce0/yarl-1.24.5-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:4af7b7e1be0a69bee8210735fe6dcfc38879adfac6d62e789d53ba432d1ffa41", size = 110054, upload-time = "2026-07-20T02:06:49.84Z" }, - { url = "https://files.pythonhosted.org/packages/aa/2f/ed28147f8cd7f48c49367c90713b30a555284b6105a6a56f3a05568da795/yarl-1.24.5-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:fa139875ff98ab97da323cfadfaff08900d1ad42f1b5087b0b812a55c5a06373", size = 108312, upload-time = "2026-07-20T02:06:51.835Z" }, - { url = "https://files.pythonhosted.org/packages/c5/c5/55e16ae0a5c227cea8df1c6871ba57d614a34243146c05729caf2a1bd9c5/yarl-1.24.5-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:0055afc45e864b92729ac7600e2d102c17bef060647e74bca75fa84d66b9ff36", size = 103662, upload-time = "2026-07-20T02:06:54.061Z" }, - { url = "https://files.pythonhosted.org/packages/8d/ea/dbd7c2caec459c9a426f18b02688ecbfb58620d0f6a3422d24769fbaf8ab/yarl-1.24.5-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:f0e466ed7511fe9d459a819edbc6c2585c0b6eabde9fa8a8947552468a7a6ef0", size = 116090, upload-time = "2026-07-20T02:06:56.015Z" }, - { url = "https://files.pythonhosted.org/packages/06/84/39ce4ce3059e07fece5fbdbee8c4053406af9aca911ce9fa5f8548aab6af/yarl-1.24.5-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:f141474e85b7e54998ec5180530a7cda99ab29e282fa50e0756d89981a9b43c5", size = 109523, upload-time = "2026-07-20T02:06:57.926Z" }, - { url = "https://files.pythonhosted.org/packages/a9/8b/71ff44137b405c64a7788075669c24010019f57a7464b78c3a6cbee539d9/yarl-1.24.5-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:e2935f8c39e3b03e83519292d78f075189978f3f4adc15a78144c7c8e2a1cba5", size = 116084, upload-time = "2026-07-20T02:06:59.868Z" }, - { url = "https://files.pythonhosted.org/packages/62/c0/423078fdd4042e1862c11f0ffd977a0ffa393783c12bee94685923bc189e/yarl-1.24.5-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:9d1216a7f6f77836617dba35687c5b78a4170afc3c3f18fc788f785ba26565c4", size = 111006, upload-time = "2026-07-20T02:07:01.907Z" }, - { url = "https://files.pythonhosted.org/packages/cf/52/6daa2ee9d95e5c98b8128f8df91eb692eb423ab274b8cf08db52152fad26/yarl-1.24.5-cp314-cp314-win_amd64.whl", hash = "sha256:5ba4f78df2bcc19f764a4b26a8a4f5049c110090ad5825993aacb052bf8003ad", size = 99215, upload-time = "2026-07-20T02:07:03.852Z" }, - { url = "https://files.pythonhosted.org/packages/ec/0e/464a847d7359e0da75dd9fc5c1d1aa35d0159ea31e5f8e66a3c1c29ff3d0/yarl-1.24.5-cp314-cp314-win_arm64.whl", hash = "sha256:9e4e16c73d717c5cf27626c524d0a2e261ad20e46932b2670f64ad5dde23e26f", size = 94566, upload-time = "2026-07-20T02:07:06.074Z" }, - { url = "https://files.pythonhosted.org/packages/e2/55/e03acc4446772660bc335e86e41ef31e4d0d838fd641531a11a5ee33b493/yarl-1.24.5-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:e1ae548a9d901adca07899a4147a7c826bbcc06239d3ce9a59f57886a28a4c88", size = 142533, upload-time = "2026-07-20T02:07:08.284Z" }, - { url = "https://files.pythonhosted.org/packages/ae/71/4acd3a1fc7cf14345cdb302665ecd2097f62c365b4f14ca17d4f37775cf9/yarl-1.24.5-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:ff405d91509d88e8d44129cd87b18d70acd1f0c1aeabd7bc3c46792b1fe2acba", size = 100776, upload-time = "2026-07-20T02:07:10.197Z" }, - { url = "https://files.pythonhosted.org/packages/ff/0b/cfb76b7fe99686db264bff829779a539d923e7564ffd7ef18da6c54c3774/yarl-1.24.5-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:47e98aab9d8d82ff682e7b0b5dded33bf138a32b817fcf7fa3b27b2d7c412928", size = 100913, upload-time = "2026-07-20T02:07:12.357Z" }, - { url = "https://files.pythonhosted.org/packages/8b/3f/7116e782992abbd4fb6948488aec72078895e929a23078290739e8396fce/yarl-1.24.5-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f0a658a6d3fafee5c6f63c58f3e785c8c43c93fbc02bf9f2b6663f8185e0971f", size = 106507, upload-time = "2026-07-20T02:07:14.173Z" }, - { url = "https://files.pythonhosted.org/packages/33/90/d4d2d73ee78229cc889872eb8e085d8f5c6f51abdb178409fd9b23cf74fd/yarl-1.24.5-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:4377407001ca3c057773f44d8ddd6358fa5f691407c1ba92210bd3cf8d9e4c95", size = 99219, upload-time = "2026-07-20T02:07:16.019Z" }, - { url = "https://files.pythonhosted.org/packages/3e/fa/a6df1a9bccd644eec00abee0dff4277416222cec435330fd1f2858523ec1/yarl-1.24.5-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:7c0494a31a1ac5461a226e7947a9c9b78c44e1dc7185164fa7e9651557a5d9bc", size = 111804, upload-time = "2026-07-20T02:07:18.141Z" }, - { url = "https://files.pythonhosted.org/packages/8a/9e/7b2a1f4bcc20e9447156dd2b1c4d01f70d9df0759025ee7d09a84ffae134/yarl-1.24.5-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a7cff474ab7cd149765bb784cf6d78b32e18e20473fb7bda860bce98ab58e9da", size = 110943, upload-time = "2026-07-20T02:07:20.06Z" }, - { url = "https://files.pythonhosted.org/packages/08/ff/22c92affb0f9b623ca753d27d968b5625b868f12c6378d049d55ae247643/yarl-1.24.5-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cbb833ccacdb5519eff9b8b71ee618cc2801c878e77e288775d77c3a2ced858a", size = 108251, upload-time = "2026-07-20T02:07:22.217Z" }, - { url = "https://files.pythonhosted.org/packages/45/44/5769b96298c1e195fb412997b6090af2a84105cf59c17613558a2d011d1f/yarl-1.24.5-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:82f75e05912e84b7a0fe57075d9c59de3cb352b928330f2eb69b2e1f54c3e1f0", size = 106025, upload-time = "2026-07-20T02:07:24.083Z" }, - { url = "https://files.pythonhosted.org/packages/4c/40/009e8e791fd9762c0e1567e69248acb4f49064597e1680874c16dd8bb798/yarl-1.24.5-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:16a2f5010280020e90f5330257e6944bc33e73593b136cc5a241e6c1dc292498", size = 106573, upload-time = "2026-07-20T02:07:26.248Z" }, - { url = "https://files.pythonhosted.org/packages/20/c6/b7480578f8a0a80946f36ad6df547ecec704f9ba69d2de60f8aa6f1c1cbf/yarl-1.24.5-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:ffcd54362564dc1a30fb74d8b8a6e5a6b11ebd5e27266adc3b7427a21a6c9104", size = 100751, upload-time = "2026-07-20T02:07:28.098Z" }, - { url = "https://files.pythonhosted.org/packages/d4/27/4476f3360b91a48c5cf125e91f59a3bd35299d84a431a258d57f5977bb11/yarl-1.24.5-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:0465ec8cedc2349b97a6b595ace64084a50c6e839eca40aa0626f38b8350e331", size = 111643, upload-time = "2026-07-20T02:07:30.88Z" }, - { url = "https://files.pythonhosted.org/packages/4c/4b/5cdd3e5ee944e8af31e52f6cd3d3af5fd7b937e036ccbbba2c9ffebede95/yarl-1.24.5-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:4db9aecb141cb7a5447171b57aa1ed3a8fee06af40b992ffc31206c0b0121550", size = 106312, upload-time = "2026-07-20T02:07:33.06Z" }, - { url = "https://files.pythonhosted.org/packages/18/86/f406b0c2a6f99575de2da671ef47aa06f89a5be83a27a46971c3b86cecdb/yarl-1.24.5-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:f540c013589084679a6c7fac07096b10159737918174f5dfc5e11bf5bca4dfe6", size = 110379, upload-time = "2026-07-20T02:07:35.155Z" }, - { url = "https://files.pythonhosted.org/packages/f0/6c/9f3adfbd3b30b4fa0f7ccb3a83eba2c1152d3fff554d535e640ba0f7ba2b/yarl-1.24.5-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:a61834fb15d81322d872eaafd333838ae7c9cea84067f232656f75965933d047", size = 108497, upload-time = "2026-07-20T02:07:37.35Z" }, - { url = "https://files.pythonhosted.org/packages/dd/37/91eb2e5ca883a529c1b390348a74cd9fc0512171727f547ce70bfe02be5c/yarl-1.24.5-cp314-cp314t-win_amd64.whl", hash = "sha256:5c88e5815a49d289e599f3513aa7fde0bc2092ff188f99c940f007f90f53d104", size = 102450, upload-time = "2026-07-20T02:07:39.578Z" }, - { url = "https://files.pythonhosted.org/packages/bf/f4/ed5c402ac8fde4403ed3366c2716bfddc8a6677ebd59f3d62772cc7fe468/yarl-1.24.5-cp314-cp314t-win_arm64.whl", hash = "sha256:cf139c02f5f23ef6532040a30ff662c00a318c952334f211046b8e60b7f17688", size = 97222, upload-time = "2026-07-20T02:07:41.55Z" }, - { url = "https://files.pythonhosted.org/packages/61/02/962c1cbfc401a30c1d034dc67ff395f64b52302c6d62de556c1fca99acc0/yarl-1.24.5-py3-none-any.whl", hash = "sha256:a33700d13d9b7d84fd10947b09ff69fb9a792e519c8cb9764a3ca70baa6c23a7", size = 58612, upload-time = "2026-07-20T02:07:43.461Z" }, + { url = "https://files.pythonhosted.org/packages/83/b3/2cea721d495ca57f8f414aa4867ee263f486b274e07463158cf52f02ba7f/yarl-1.25.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9d693bf4bf534e9ba3ae2780cfd577f5135629f7b5ac653490859d0b77864865", size = 143794, upload-time = "2026-09-15T19:30:26.946Z" }, + { url = "https://files.pythonhosted.org/packages/55/e6/cd145cff8e5cf60b8b3c41fbecfa2a45028a8dec3fbc52bec03595ff3d3b/yarl-1.25.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ab2054c5531af2a9ba7b69b8ec91e4f884420e83a8c5e579b013084cb57e5e5d", size = 103993, upload-time = "2026-09-15T19:30:28.661Z" }, + { url = "https://files.pythonhosted.org/packages/ce/7c/fbb40fe2d53747c40aa36a9e2bd2178a202f942bda0b670f3306d4aefbce/yarl-1.25.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:564fdc7085d2245ab84f88882fdb1d6ac0723124bff6ded35bfb1c00f812630d", size = 104010, upload-time = "2026-09-15T19:30:31.069Z" }, + { url = "https://files.pythonhosted.org/packages/f0/0b/5a516f70641092283f57cf3670bdb75e7327bcc0dcb5038697e4dfbfd569/yarl-1.25.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:acae6b45d1ace09b6ba3876da43b88366ef368f73b988c7f57e14231753d4420", size = 116444, upload-time = "2026-09-15T19:30:32.894Z" }, + { url = "https://files.pythonhosted.org/packages/b6/8a/d1a627f827b0a404ae0f5647cab0534959081cde13b0756a783469fb3b5e/yarl-1.25.1-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:1fb2a01ba8cd9c5d2c5dc1ec35e0fc951d04b4f037541d4ac090c993ce58b3d7", size = 107565, upload-time = "2026-09-15T19:30:35.188Z" }, + { url = "https://files.pythonhosted.org/packages/aa/cf/c8e0aaec886840a6c4480fe44eaec7cd4319f79a563b79321473be79c56f/yarl-1.25.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e92b6bcc741b86d67606c40d3cb9c7cc8e6c737f81e31f4a94efc204456c92e3", size = 125006, upload-time = "2026-09-15T19:30:37.1Z" }, + { url = "https://files.pythonhosted.org/packages/50/26/0cce366d54a93cdc8342965dc7663385e4db161625cc1e8b18e786753d24/yarl-1.25.1-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:72c34ac7ad4314c19362d5ce27626dcc8429bd30bbf8c179f4234078851f9492", size = 128717, upload-time = "2026-09-15T19:30:38.904Z" }, + { url = "https://files.pythonhosted.org/packages/95/0c/a71501bbc1a674ff72c4d6c2b75f4d9a5af819f5244c3a7558080a8802c5/yarl-1.25.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d5add7b4ca7afeea91d52e4d4e4db3b1fe9885b71f07054560d8c4296b7441a2", size = 117728, upload-time = "2026-09-15T19:30:40.809Z" }, + { url = "https://files.pythonhosted.org/packages/e7/6f/c3267ca01defeed9ed9c4ff9b17bd54915432c405945233265b707475d1c/yarl-1.25.1-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:def538065f9e4d4cf1ae164bd59aba00dfa84f03923e0de4c3788f252d6bcd17", size = 116224, upload-time = "2026-09-15T19:30:42.818Z" }, + { url = "https://files.pythonhosted.org/packages/8f/69/fad57ee52d648431718ee0f1f68966a99c1352c3924688ffbdcc9d3fe51a/yarl-1.25.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0a191bfdb30a79b98e5d175d75285f9fcb78bf0e46ba5efda042e1c72071a0de", size = 116299, upload-time = "2026-09-15T19:30:44.966Z" }, + { url = "https://files.pythonhosted.org/packages/2a/d4/6a8c1e29f33338687ca278cba0a8fbf6525a322c2c02a9a500ccbe041152/yarl-1.25.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:71f42c5b9a948c113bbdebfa544598321431d064ff959d32e99b1feb61d68345", size = 108625, upload-time = "2026-09-15T19:30:46.874Z" }, + { url = "https://files.pythonhosted.org/packages/e8/d2/3a35ae791c9cb6522c106923ff25c3230d999091e5e65511bca23bbd9914/yarl-1.25.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:72849d892954be4d09e569b8b831ac39ce58417fedc767d4308a0fe542018a40", size = 124515, upload-time = "2026-09-15T19:30:49.082Z" }, + { url = "https://files.pythonhosted.org/packages/be/fd/2b022109a6b4af0f7dc371cf7500af380b0d4f034010243e1b0ce218dc93/yarl-1.25.1-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:efb01a106f971cb3752856bca2318bbdf7f01bd8823779c461586cbe5ffd5258", size = 115711, upload-time = "2026-09-15T19:30:51.208Z" }, + { url = "https://files.pythonhosted.org/packages/18/59/f7586271136c3ddb0126bbfe661844699369b76b555fe38c4efe86870b2e/yarl-1.25.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:a1daf47cd95a7c3a63456336bc5aaa8c86dd3a47d07ed3d0e76132ae4666a5a1", size = 122751, upload-time = "2026-09-15T19:30:53.535Z" }, + { url = "https://files.pythonhosted.org/packages/a0/0b/07f7a2d881f7e16c385b47fc1753382600847cad305dcc7fa0c25828acf8/yarl-1.25.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:9489e6abf47ba37f332075a91444c7cfedb03e6ce99fbb2f116bfe1ce810da3b", size = 117983, upload-time = "2026-09-15T19:30:55.277Z" }, + { url = "https://files.pythonhosted.org/packages/aa/9d/8cdceec66a9b940700cb45931741403f045b162afd79bcb93c41cadd0972/yarl-1.25.1-cp311-cp311-win_amd64.whl", hash = "sha256:d7306dee25b8a0e737363f347362b875094b4dc4e367311470656ae420fdbf8e", size = 102894, upload-time = "2026-09-15T19:30:57.606Z" }, + { url = "https://files.pythonhosted.org/packages/17/f1/7ec357db1d3ad2863542d71e8fe64a126bbec17b134cd7d30951196809a5/yarl-1.25.1-cp311-cp311-win_arm64.whl", hash = "sha256:abb1384477f5901d436b5d2e5465954de46ea6098f59163d243660b5c4461d35", size = 98609, upload-time = "2026-09-15T19:30:59.705Z" }, + { url = "https://files.pythonhosted.org/packages/75/b3/cd32ac66ae622b854c2df0ac52106dda220d361b65a64fde7d5b3684aa3f/yarl-1.25.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:94d7aa6debf92a1dd14cb5280b083a764169a13cfb23a452111160274ed989f4", size = 144798, upload-time = "2026-09-15T19:31:01.821Z" }, + { url = "https://files.pythonhosted.org/packages/61/fb/a2c52a8007c2051ba74662afb112ecf3d00346af4c25e33df9d80fd14fb8/yarl-1.25.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:83d4a37e4b95da4d8bda930d6d35b75b4cdadbacbb4980cae290ea3100b5d51d", size = 104583, upload-time = "2026-09-15T19:31:04.05Z" }, + { url = "https://files.pythonhosted.org/packages/be/dd/ee38aec8e09fdf957e50d4085453fbe202f56c6c3b4cf07b81cdb4f09ee9/yarl-1.25.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:e029648f9c951db30e98a7d7ec90835db88ec4b32820efe2a9bdc2287e032eb6", size = 104325, upload-time = "2026-09-15T19:31:06.338Z" }, + { url = "https://files.pythonhosted.org/packages/1e/b3/058dbfb1857b484c9cf9cc135659f50b85ce66e03c99e44dc2f7b6161f55/yarl-1.25.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4d781294bb815ecb5ea57ff6bbf8038e0a31a95fdf3e1788f66e0dc100d64b58", size = 115358, upload-time = "2026-09-15T19:31:08.593Z" }, + { url = "https://files.pythonhosted.org/packages/db/39/29693446cf0cf6b15a0e2f75a5d40f93c56819b05b0622196f45e95b5cc0/yarl-1.25.1-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e12c538e00e7c1b286a07061046b90e8124e6a9793efae2c70db6a4aad07faad", size = 107658, upload-time = "2026-09-15T19:31:10.802Z" }, + { url = "https://files.pythonhosted.org/packages/86/b3/3c4dd7e1af43b931fba95e0a722737f2ea94a6d199c802585282831d7abd/yarl-1.25.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:7e4de3ac4adbad3d0bc7c6f4360a7dbff5de2f15e3b723be3198074e17fd9c40", size = 122660, upload-time = "2026-09-15T19:31:12.84Z" }, + { url = "https://files.pythonhosted.org/packages/bd/b5/1b60dbc3cfc9c5712b15148c206748f2bc93953ffdbe25ea75b63dfc89c9/yarl-1.25.1-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:419f392a1da624877975709e3864dfe833af6cc7671b39318086d456e288380c", size = 126506, upload-time = "2026-09-15T19:31:15.088Z" }, + { url = "https://files.pythonhosted.org/packages/bc/7b/ca212cbe170ac8b96e45317ecbcf9c3c3ecf0cdec98d5b088a9c4088929b/yarl-1.25.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c6f117789d22dce188e5754e8bc65b7e6ebf8cb73963b9fa761f672a5883769d", size = 117050, upload-time = "2026-09-15T19:31:17.241Z" }, + { url = "https://files.pythonhosted.org/packages/cb/c3/72b4938cdbe619ad71ac156182faef4908846b84dc3ca4dbb4c4e6f84014/yarl-1.25.1-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:80e47012e730da131c9f059c80936783f9659aae22dc31c03c0595590d11ed54", size = 114174, upload-time = "2026-09-15T19:31:19.294Z" }, + { url = "https://files.pythonhosted.org/packages/e8/43/268717870f9ba0cc9701a95181587f6dc8c5f387aab4aeecc83158f38a79/yarl-1.25.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e80f557716fd765439577131e526b8942ffc2c07bdbc5e39fa62f660ba1e963f", size = 114944, upload-time = "2026-09-15T19:31:21.414Z" }, + { url = "https://files.pythonhosted.org/packages/da/84/baa5bf504d51fe062c4bcaf62936da97fffb43285978d0b39984824231fd/yarl-1.25.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:f61964f235a43738bfac50da46fc4254943a7eea3051aeb0b6fc7c992c29fadc", size = 108263, upload-time = "2026-09-15T19:31:23.388Z" }, + { url = "https://files.pythonhosted.org/packages/a4/28/779a2ed9e0152a601a27039bed9aead3f0b79797a67e2c44bfa444622dd8/yarl-1.25.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:e546fe1d4a93ebc2910f0d768baff19faa09843ab3f2036a67ed6e69fae4419d", size = 122184, upload-time = "2026-09-15T19:31:25.343Z" }, + { url = "https://files.pythonhosted.org/packages/f8/1f/118e9e5b8f07694d63fd3222e801d7782270003f1a222aa798df3f8d5933/yarl-1.25.1-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:cce0727fd5ac04d372fa9bbfde9febc2bcf209aadfcf0468e45dec72719895d1", size = 114001, upload-time = "2026-09-15T19:31:27.465Z" }, + { url = "https://files.pythonhosted.org/packages/0f/ae/a4cf1cf372313734b17996d4007f9f73596e7a178b9485802e5494ecf484/yarl-1.25.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:af4ea5b37403ef4e30f3927eaed540db942bde01d8d3ff083527c0704d1c9c68", size = 120565, upload-time = "2026-09-15T19:31:29.47Z" }, + { url = "https://files.pythonhosted.org/packages/05/79/ad94f93ca731bc9e44d321833ab96b82a4f9f5f63cf773f81a4aeea5ecc1/yarl-1.25.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:68782fdb4027b8d1eee25ec35e9a6db05e863b899eb0310b3a33b6c3fef55707", size = 117060, upload-time = "2026-09-15T19:31:31.367Z" }, + { url = "https://files.pythonhosted.org/packages/bb/cc/51a7b4abf4ac593b8e7eb3794b28e5a35ae26eed8bc04787628d215af82f/yarl-1.25.1-cp312-cp312-win_amd64.whl", hash = "sha256:7d575b54cb3863ef9bc290ea4b009999d55dc237326131e4853cf33e888fee03", size = 102593, upload-time = "2026-09-15T19:31:33.329Z" }, + { url = "https://files.pythonhosted.org/packages/9d/21/0941a6b93a58b59a1ec75e5333bf06929b671309c43c0cd201c172d9c39f/yarl-1.25.1-cp312-cp312-win_arm64.whl", hash = "sha256:bc3ac7bf569f6b64dad04dd7808c7872dae8a97df657856eac05e9b7e3614a85", size = 97697, upload-time = "2026-09-15T19:31:35.855Z" }, + { url = "https://files.pythonhosted.org/packages/7b/ed/2f3129bbcc9a5c8ba12cc2b29d8060a3bab9c8043c456cfd4b5ca3188890/yarl-1.25.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:25868beca8b6765f8f7d0e11fe6dd7c66dd4b0793b9500286d20cc92352126a5", size = 143623, upload-time = "2026-09-15T19:31:37.966Z" }, + { url = "https://files.pythonhosted.org/packages/17/e1/f1bc3390fdca352826676b531d0712736f156919090206700421d46b2c37/yarl-1.25.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:10b2fd95332f0d716d5eee3c9fb2ce8eada19082de7fee83d32e37992fd75c26", size = 104011, upload-time = "2026-09-15T19:31:40.25Z" }, + { url = "https://files.pythonhosted.org/packages/a8/aa/50acc5c3e5da04172ae3c281c75405af4d2ca911e16120ab0563f4dffb66/yarl-1.25.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0f12afda4eea8c8994a76d4df1875c765194f5fbe8a9d197929ea303caee29ec", size = 103677, upload-time = "2026-09-15T19:31:42.46Z" }, + { url = "https://files.pythonhosted.org/packages/30/d2/7d1e0ab9f8390e1fbcede5a6dbf70d23c96ad09b8c5567f3a514d1ddb0e2/yarl-1.25.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:14b79a30a93a3ce2e8832603fd0ab780ada281b0ba5110b519a634f2d7d7d1fc", size = 115392, upload-time = "2026-09-15T19:31:44.371Z" }, + { url = "https://files.pythonhosted.org/packages/71/e1/5ba1e3a2a22139213655e760919038e8ed7e2d4a99826d0bbddb3beb96e5/yarl-1.25.1-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:4bd6340d20ae2c7ca719b87b426e808e90743b676d05d4c26c4fb5ca71f41184", size = 107493, upload-time = "2026-09-15T19:31:46.273Z" }, + { url = "https://files.pythonhosted.org/packages/f5/53/780653d5e0f73831f467cf13548912e5eec97f21dc49fc8daf21da027df4/yarl-1.25.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:126a2533570c554719ca40a1288fdee1700b6bc82e7131aa69fa85252d92e651", size = 122537, upload-time = "2026-09-15T19:31:48.654Z" }, + { url = "https://files.pythonhosted.org/packages/03/92/d54fa70236c6036271c9c9c09fd978df5cbe3ef49ef6c46e9b833476d215/yarl-1.25.1-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a3faadac7d812ddac258feb57b9846b60c1b437c4f4b9ad42595c6f6fe4390df", size = 126170, upload-time = "2026-09-15T19:31:50.872Z" }, + { url = "https://files.pythonhosted.org/packages/0e/b7/a82a49bf88340b837ef6972b508a1604ae377b9e6904b46b10cf5f1cf925/yarl-1.25.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:be80550d9bfe83d9b62398a37081a90434e6df2d978ec345c3d2820de6beddab", size = 117012, upload-time = "2026-09-15T19:31:53.189Z" }, + { url = "https://files.pythonhosted.org/packages/ef/78/5d684b411e3f3602464ee9b538db48205038f8605872985f61efb809ced0/yarl-1.25.1-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e07595c7d6f4db270ceede356a1bd1c07a34f1c26f958d1ed0cd7b48e0d2bba3", size = 114950, upload-time = "2026-09-15T19:31:55.694Z" }, + { url = "https://files.pythonhosted.org/packages/2f/11/51d82b852c64f7fad0fc7a7ff3031517204887e874c722bbca839c0b23ac/yarl-1.25.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:eb96ed1ae6c7d072d60840c0434aef07a2df611812810807fbc54263a6053e9a", size = 115428, upload-time = "2026-09-15T19:31:57.966Z" }, + { url = "https://files.pythonhosted.org/packages/e4/49/9d1978049bf646b9ea918313926453c6901b71c92f097467777d47d36a88/yarl-1.25.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:3feb99222553a8cbedfa52c2f59dd84c3f50d5b582c728d522caf8d72769a54b", size = 108428, upload-time = "2026-09-15T19:32:00.048Z" }, + { url = "https://files.pythonhosted.org/packages/43/35/7b8f1ebb45d7ec3dda7d1909bf44f458de41ef91e2937f107733582a5166/yarl-1.25.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:a2ed0ba415ccdf08f14bf544cb78346d0f76086707ffee24921a2c84dbf1305a", size = 121961, upload-time = "2026-09-15T19:32:02.436Z" }, + { url = "https://files.pythonhosted.org/packages/63/d6/d8b689ab7ca26edeb85f6ff28812aac7a25376eefc1780e303a7bfbaceff/yarl-1.25.1-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:2b49375d22299b0a834c2bca72f39aaecc270d96fb24c30424899676f487b22a", size = 114961, upload-time = "2026-09-15T19:32:04.456Z" }, + { url = "https://files.pythonhosted.org/packages/cf/d5/1a1798ea4dc6b7ee3260010a27907ebc697c95dae99817d817ed446d24aa/yarl-1.25.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:ef74070ac553c59eb4f04258722066d6c6135b7baa03b2e9f2da65c096e96d98", size = 120036, upload-time = "2026-09-15T19:32:06.5Z" }, + { url = "https://files.pythonhosted.org/packages/91/8d/b1b35ed7903da6669b1d367cb2c09436acd4ff508029b4f39a0c0c2058fc/yarl-1.25.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:0a66db89ea473abeac4b70523cafd94db3772380e565f9d28af7a179b7af71fa", size = 117276, upload-time = "2026-09-15T19:32:09.401Z" }, + { url = "https://files.pythonhosted.org/packages/3a/8f/4db01cef62caff0d7a4593ed694fb8a41a27a11158cab80d290221f13e57/yarl-1.25.1-cp313-cp313-win_amd64.whl", hash = "sha256:1f51020b2eb8a003c84925638ec63c21a750a4bddd3a22ec8eac6a742dadf1b9", size = 101945, upload-time = "2026-09-15T19:32:11.545Z" }, + { url = "https://files.pythonhosted.org/packages/c0/5e/3ce00497c5c0babb74d4130c10c3828ccd215b4819d12020c42429f991ac/yarl-1.25.1-cp313-cp313-win_arm64.whl", hash = "sha256:b10dd0557ba422715b5206b3743192135a6022acca8baec51aa127d0a75db8fe", size = 97270, upload-time = "2026-09-15T19:32:14.127Z" }, + { url = "https://files.pythonhosted.org/packages/80/cf/54023edfab7aa773b860503db0c56e962ccab0922803ee97988c176ea090/yarl-1.25.1-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:a9ca696eb02e5c02a8afd872ada510eba9b7fe6e68b9572c2e9a9b1941e31e2e", size = 143975, upload-time = "2026-09-15T19:32:16.416Z" }, + { url = "https://files.pythonhosted.org/packages/d7/a8/e6c1be0e6761d0f2d10bbf33a3e1e02b99dc83874d92945d7b461a72481e/yarl-1.25.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:a5877f2255aab518ebe528289037699201d5dc5f045f2396cb30aa02db22f57f", size = 104018, upload-time = "2026-09-15T19:32:18.364Z" }, + { url = "https://files.pythonhosted.org/packages/6e/bb/dda344765ffd3430afe1a1c66c866a57fae67786537d4f14607df6505ac1/yarl-1.25.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:7a5c3115595995779ee21f2567035793911c3802a43c74f3fbb0314929ec67ac", size = 104156, upload-time = "2026-09-15T19:32:20.459Z" }, + { url = "https://files.pythonhosted.org/packages/e5/5f/ed1538bcd06009fe990d6d283dd7667f639e62a81e35c6d8c6ef6c08fb3c/yarl-1.25.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:77e5099b99b37f3cf79c246998ca9f7313a78054cd1809ec46bc1afad47e1c4c", size = 116025, upload-time = "2026-09-15T19:32:22.766Z" }, + { url = "https://files.pythonhosted.org/packages/a2/af/2185daf56b99830d3356ecfada46faaa49945de6626e842b7728088d4980/yarl-1.25.1-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:6efaf45df6a849cef613a03a94c845647456662f85438c886bb67a9c027c8c2c", size = 106985, upload-time = "2026-09-15T19:32:24.749Z" }, + { url = "https://files.pythonhosted.org/packages/c1/65/bc1ae564fb4b04a30b6a8f250e787772581c57e4c3d5cf07ac3359de3103/yarl-1.25.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:d5f90e44653c4e0f78501ed9bb7d3fce835a8d62b7c6ed0cb16557534087e743", size = 123030, upload-time = "2026-09-15T19:32:27.084Z" }, + { url = "https://files.pythonhosted.org/packages/6a/3e/e2afcde10d74e53b3fa889960991efb3019beda2b1682a01de720a302056/yarl-1.25.1-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:632da579b2d879f6bad20f2cfa35ded1efe2f4f77f8abb26a6234a5b236acd2f", size = 126765, upload-time = "2026-09-15T19:32:29.332Z" }, + { url = "https://files.pythonhosted.org/packages/a2/be/415b00c0fe5a0615b062a456b26623d7ec91c2bee20faea1a14045aa0469/yarl-1.25.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:30eec96e8a91bd588ce897c9543f6d5d8d34b28fbcba28a4dedf20ebeae9fe57", size = 117199, upload-time = "2026-09-15T19:32:31.49Z" }, + { url = "https://files.pythonhosted.org/packages/97/27/3d8c63ddd3e8bcfd033748ab93876678ce59bacd66e4cb1ed851c9c5b37e/yarl-1.25.1-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:12b6bc4906e11f5e1a1cdcb12296e7afbd366c783cc8073403cd2fb74334e453", size = 115187, upload-time = "2026-09-15T19:32:34.137Z" }, + { url = "https://files.pythonhosted.org/packages/39/b7/7a81d0be1a502a26a0d4326c6f2ecb736c824f570ea1c6529f2b0b227b50/yarl-1.25.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:9d6ed3d17bccce4c05343e1ca8da13bc5c02c812a4e7282ddd05e8769322d3fc", size = 116085, upload-time = "2026-09-15T19:32:36.438Z" }, + { url = "https://files.pythonhosted.org/packages/f0/69/39fff459916aa0fab42215dc47b759586fd80f94aa56dfc4a7c15ba6e0dc/yarl-1.25.1-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:f38a70074041d3b7e138e452799f5174198bae5bd5ab2000917badf403908c5f", size = 107996, upload-time = "2026-09-15T19:32:38.959Z" }, + { url = "https://files.pythonhosted.org/packages/c0/39/80b9a55a3335590451d9ecf3eb593a8c635351f4c905ef056d7e8a8fd9e7/yarl-1.25.1-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:4ca89e4e21854ed27ec753297dde84b16c9f8e53b14a4866fb44457d643c19f8", size = 122549, upload-time = "2026-09-15T19:32:41.151Z" }, + { url = "https://files.pythonhosted.org/packages/42/7d/a179c6757818bb59372a4adafd09f7f26a3b4a0f04c3ae404b544c0b0c82/yarl-1.25.1-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:1ab7618921a93767387a4b83776f751588f5b5ae9bb5bc96620e2e2e00bca868", size = 115107, upload-time = "2026-09-15T19:32:43.072Z" }, + { url = "https://files.pythonhosted.org/packages/32/2b/a773ac867e4ab53a98ed98e5cefe3bae31e6f550252ca9d1de266f1a40c5/yarl-1.25.1-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:0ae12ff2b805fa02c4dab838005caef735e39986322698c48588d3beacb65c62", size = 120666, upload-time = "2026-09-15T19:32:45.061Z" }, + { url = "https://files.pythonhosted.org/packages/bc/41/52be6505e85b0f76b4f85b01b5de7e06a0512201abc2c95e14e099549174/yarl-1.25.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:90c30ed53546da833c700115c0064c22120d1b1560f474699fd31f22dd668233", size = 117505, upload-time = "2026-09-15T19:32:47.177Z" }, + { url = "https://files.pythonhosted.org/packages/f5/01/349c0386caedbbe488d519f252df54efac8a1459282d466c474bdd84a620/yarl-1.25.1-cp314-cp314-win_amd64.whl", hash = "sha256:acfa7e22aa6c6e7a5996a41d275bfa01efa7ea56ab890590280e9063e2cf5c1b", size = 103446, upload-time = "2026-09-15T19:32:49.615Z" }, + { url = "https://files.pythonhosted.org/packages/5c/f0/8ec63180f77912f0dc4e5a42760cb8c08d20da1d5ace3578a01b84d1f3d8/yarl-1.25.1-cp314-cp314-win_arm64.whl", hash = "sha256:8e7d98cdbb6d71e726f7d525952867096053d1f290dd4e3c50d7d313a136f414", size = 99159, upload-time = "2026-09-15T19:32:51.686Z" }, + { url = "https://files.pythonhosted.org/packages/47/7d/92d2220d6886b70ab1ed8579533ac2af2dfac716d5d929001daff7986df9/yarl-1.25.1-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:d21f0fa80a02d05299207eeaafef345d812ace96d5306e4ef265e1d419a615fa", size = 150071, upload-time = "2026-09-15T19:32:53.911Z" }, + { url = "https://files.pythonhosted.org/packages/64/fc/b245e448124bcda9340df38e3553fa222b50260fca027a84095e9bd8642d/yarl-1.25.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:17c9877a89fb6e2bca6f9087eb24cd7fb434653946ef5075e470d23d49b52287", size = 106780, upload-time = "2026-09-15T19:32:56.443Z" }, + { url = "https://files.pythonhosted.org/packages/51/e2/9a6ce2e334ebf218a30335ae76fb1696459430d42f733b8cb0d7d65b84d3/yarl-1.25.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:29273edf1530e397bd07cb784db1fbe0d2590b77569f2e24679a9c0a2d763b94", size = 107361, upload-time = "2026-09-15T19:32:58.827Z" }, + { url = "https://files.pythonhosted.org/packages/ed/70/66e8c76b569b450d16e190f15071c916c3df70b0e33927e415ac497cf0c2/yarl-1.25.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b7abffdf37af1cec6a2ad69b827aa84320db5894791bc8ed932dc93fb274b7e9", size = 114396, upload-time = "2026-09-15T19:33:02.24Z" }, + { url = "https://files.pythonhosted.org/packages/73/23/0d82838a05c57fdc05bc8b66e8c92dcc0df15e27463a5f163142d521c682/yarl-1.25.1-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:2239a02249d9326655419e0168a28ca9008938eaab31dc29fc875c217927a6c0", size = 104882, upload-time = "2026-09-15T19:33:04.494Z" }, + { url = "https://files.pythonhosted.org/packages/86/d4/ea08615c4edaa6049a13a2f1128944d068d1893abda7d708d4d7ea01599a/yarl-1.25.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:664ec6a520b74a1df2810666eb67695fcb77fa663e6ea0a25aaf2e529cb24dfa", size = 119485, upload-time = "2026-09-15T19:33:06.583Z" }, + { url = "https://files.pythonhosted.org/packages/1a/82/0898bdce9b1ae403b308b9c733d0d24af4a3464270c2c081f457b16c3e0d/yarl-1.25.1-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4f1c91f5a5980a937ff8e238e98e6897e1ad74a4b1e2c0d68c73b5ffbb3f5c0b", size = 122490, upload-time = "2026-09-15T19:33:08.653Z" }, + { url = "https://files.pythonhosted.org/packages/d1/38/97d79b81c342b78246cfedb74809e68841f3198d21653e10d3232bd9c622/yarl-1.25.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7c88edaec8c349ad4c5ad4c486a3defcc4b80ceb2f074436ffa0a87caf5e76a6", size = 115336, upload-time = "2026-09-15T19:33:11.056Z" }, + { url = "https://files.pythonhosted.org/packages/8e/9d/2577896554cd310dc470adb6da0b7dd0b435cb63e2565204a7ac240e504c/yarl-1.25.1-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:35dcbea443fafb3eece757ad4e514560ddeb6c34cfae1582c620d7b293d7feee", size = 111825, upload-time = "2026-09-15T19:33:13.204Z" }, + { url = "https://files.pythonhosted.org/packages/29/6b/7ac49d8ba84a5c4bd73415a4c949d22c749cb3762579b3d50e48019a78aa/yarl-1.25.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:882569ff613758cac762a457a5d72d6e211b28d4bcfea89d1d71ea942b02eac0", size = 114655, upload-time = "2026-09-15T19:33:15.553Z" }, + { url = "https://files.pythonhosted.org/packages/e5/18/e5942a16723f5b72f9b1297fd5a85a54f6300cd15c0dcb5005b90cd89156/yarl-1.25.1-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:d0f1489233a254bb3643d2f05de7d59019254d81daeca6b9162fe9edef57e0c7", size = 106395, upload-time = "2026-09-15T19:33:17.599Z" }, + { url = "https://files.pythonhosted.org/packages/7b/2d/549fa46240781513ebc47ae7eb418df428a163a2a3d644cc9cbb3ecb7846/yarl-1.25.1-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:f41753a76f4f63927d03a0d8ba8f5ce0f2083bec29a8cfaccc55371b1564b96b", size = 119277, upload-time = "2026-09-15T19:33:19.973Z" }, + { url = "https://files.pythonhosted.org/packages/76/16/4763f78dcdc0b3b9fb3842b04afe72b9320857c6a69300c62a0eab03d119/yarl-1.25.1-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:8fb0eb4955adf0579001581f2f71a126e8781ba61bcd120f127b0401163c6c2d", size = 112504, upload-time = "2026-09-15T19:33:22.464Z" }, + { url = "https://files.pythonhosted.org/packages/ae/b4/974e3edfe0d188393ce1cb9de400111c63fe61f4eb3b772a500d84c970d1/yarl-1.25.1-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:a1e32763e641a1566507d90a8d3b19bfc3cc04a9d4e5ae3e32189874ed4b58a3", size = 116243, upload-time = "2026-09-15T19:33:24.788Z" }, + { url = "https://files.pythonhosted.org/packages/b0/aa/157b940428da80c104ca09666a740e51c94963df65d5b112e06b52e4d7a8/yarl-1.25.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:65b5b2066651b7432d389e9799d979c703bcc6ef44266bb8153ef54e91e4aab3", size = 115822, upload-time = "2026-09-15T19:33:26.886Z" }, + { url = "https://files.pythonhosted.org/packages/7e/af/19fbdce41412e1b96825544cc52cd7029d3724655d0988237972f078bd29/yarl-1.25.1-cp314-cp314t-win_amd64.whl", hash = "sha256:734f6e5400352ac4254456003d462866c684703570929cff7a7bde015d0cb371", size = 107386, upload-time = "2026-09-15T19:33:29.009Z" }, + { url = "https://files.pythonhosted.org/packages/2a/99/f6431c8968e89be608d74b28ae2d024521b2953f27dd44e0dece5e04f67a/yarl-1.25.1-cp314-cp314t-win_arm64.whl", hash = "sha256:287e99ff5aa4dc1c7630bfc683ded6f106d756c99dec432a2d7f197a784f51c6", size = 102094, upload-time = "2026-09-15T19:33:31.151Z" }, + { url = "https://files.pythonhosted.org/packages/c7/3b/4f51eab40c2eabea6c3d5b121dff4b8988dc35087732ffede12d2be8b8dd/yarl-1.25.1-cp315-cp315-macosx_10_15_universal2.whl", hash = "sha256:9b1bdaae98bc016825dd3c9d8ee1832f829b3341f9cc6ebd1a1b0a7fef7367cc", size = 143875, upload-time = "2026-09-15T19:33:33.52Z" }, + { url = "https://files.pythonhosted.org/packages/41/05/bbd58fc063f5f299a883f810760b265ca26c8167c91cb9a494d0fe2387e1/yarl-1.25.1-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:e7011b8fb8c4054bf0c12e5edc6cd83778b0028e99ce59b18586ed036f92cfdc", size = 104028, upload-time = "2026-09-15T19:33:36.22Z" }, + { url = "https://files.pythonhosted.org/packages/12/ee/2fba0aecb52e7020e189f684148783aa0b9cfa3b3bfb0b400646eef70ad4/yarl-1.25.1-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:f074e8d4aa0a5798920ddb6de3d08b228c614ff3724c3e8bd7577f4bafea867b", size = 104041, upload-time = "2026-09-15T19:33:38.86Z" }, + { url = "https://files.pythonhosted.org/packages/38/35/884beab53ed88c7247d1671972b5ef116f7351fe0c7e6de8c3558372cb16/yarl-1.25.1-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7d42e7e3ca399555578b4d617e3a6ecf13371b3743a115995fa010c7bf341459", size = 116018, upload-time = "2026-09-15T19:33:44.265Z" }, + { url = "https://files.pythonhosted.org/packages/e2/cc/1a91b685afb55cc18608443ace95280e96e263a97565811732b6788d3269/yarl-1.25.1-cp315-cp315-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:aa4ed3dd308548f9e707d9caaf005d2d7f8c1e7868f858dfeb47fe76e16b391d", size = 107033, upload-time = "2026-09-15T19:33:46.45Z" }, + { url = "https://files.pythonhosted.org/packages/c5/c1/58b379fcb1d68d907b7fcf75200c44321896509b2a6a74abbb4b19d864d2/yarl-1.25.1-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:42a66563d8cc056ee32e6191e05097a7b2b3bc302e0bc3133daf8710eb18bd26", size = 123257, upload-time = "2026-09-15T19:33:48.631Z" }, + { url = "https://files.pythonhosted.org/packages/d7/2d/1fe96cf5c2aeab10095e48f38585cf5a8451fb7253234822398e52aa5336/yarl-1.25.1-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:98d370568f393215d605304cdb77b3d5539bd192c75b623c7304c42c8d6d8273", size = 126745, upload-time = "2026-09-15T19:33:50.999Z" }, + { url = "https://files.pythonhosted.org/packages/ad/60/8674394ce43f4dadae573a1d6f451716438e9eab7d7fe8d643c673a32d85/yarl-1.25.1-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:23bf5b403c879a54964e0feac7285688e04bb220074878d737d331522da0a5bf", size = 117255, upload-time = "2026-09-15T19:33:53.456Z" }, + { url = "https://files.pythonhosted.org/packages/2f/72/0faa30e02605d56127d42bb987dcc97da3863b7bf70b9bfbf5f739c05e30/yarl-1.25.1-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:d45673badd08456d0340e9364eddafe1c53a9d2896424294de4d7dd71ad3ee57", size = 115166, upload-time = "2026-09-15T19:33:55.669Z" }, + { url = "https://files.pythonhosted.org/packages/8c/90/9a46eac564c437e128285c5c1d7bb385d268394e9209d84f6bf4a14471ef/yarl-1.25.1-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:0136d640dfa9b0523853e411430a99f8a91eca85774c6420285a33b755bc6de3", size = 116082, upload-time = "2026-09-15T19:33:57.78Z" }, + { url = "https://files.pythonhosted.org/packages/ad/38/4b1a686a3758878f93d2f1ea943f5a165f3555769cd16e761cfd0efdca17/yarl-1.25.1-cp315-cp315-musllinux_1_2_armv7l.whl", hash = "sha256:59ba3a6e1aa8cfe5adf4bd270fd965db21955401b7ca6f1696010c55ed4daec2", size = 108048, upload-time = "2026-09-15T19:34:00.25Z" }, + { url = "https://files.pythonhosted.org/packages/da/14/f348eb967f31a58348612a2b93bd8a2ab664548e2b5e879cac7f592f7201/yarl-1.25.1-cp315-cp315-musllinux_1_2_ppc64le.whl", hash = "sha256:87796fedc3ba97ec14fab55acb48584276e6c1e4c1e89c422bda62c838e754a9", size = 122775, upload-time = "2026-09-15T19:34:02.455Z" }, + { url = "https://files.pythonhosted.org/packages/ab/e9/4f7b79700f88cb9e8bb66f8b54f9bce1844c013a2c39fdc47112e9334c95/yarl-1.25.1-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:bd0912757081f89b107d6c00b2ff8a194401b0b87eadcf4481de2b865a8fd44f", size = 115096, upload-time = "2026-09-15T19:34:05.283Z" }, + { url = "https://files.pythonhosted.org/packages/cf/37/f9cb020331997d3eb887bd28d5410ecfd3d80bf163c23d7cec490d78dade/yarl-1.25.1-cp315-cp315-musllinux_1_2_s390x.whl", hash = "sha256:b51c159a9794633f5e0db7ecec7b2b6e3734eca1f5d17dc989ff3552a43ff78b", size = 120655, upload-time = "2026-09-15T19:34:07.382Z" }, + { url = "https://files.pythonhosted.org/packages/12/83/52fceb22891a41f168db7ec22fd1d81e06b6a0b8d9f70921bd3e785defd0/yarl-1.25.1-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:319e070a01db9920fb63761843f96a104c8e2b9427266731810dc1e22595b17c", size = 117488, upload-time = "2026-09-15T19:34:09.988Z" }, + { url = "https://files.pythonhosted.org/packages/f5/5c/ce6c4ff1247fcbe4b33d462c23a097106d909b173fde7042bc52290466e2/yarl-1.25.1-cp315-cp315-win_amd64.whl", hash = "sha256:a2059a2d891bd156bc5184e7ab7a56e78a84dfcfdeac8c501b552533ad1c36ee", size = 103434, upload-time = "2026-09-15T19:34:12.56Z" }, + { url = "https://files.pythonhosted.org/packages/3c/a1/766a906b0704fb26d52b19dc22bed48a8ba0544203b70dcf44da350e8194/yarl-1.25.1-cp315-cp315-win_arm64.whl", hash = "sha256:a78b50b4f7918a3de71105d5c0b93bbc57bb8339a4d03a9dfd449f9068e76f3d", size = 99155, upload-time = "2026-09-15T19:34:15.132Z" }, + { url = "https://files.pythonhosted.org/packages/bd/d3/a1d09b32cb6ab14f66b44939f5b4255b8b9e747aef3974af1d5d80ccc2fd/yarl-1.25.1-cp315-cp315t-macosx_10_15_universal2.whl", hash = "sha256:b5402a340723fa7da00b5cff987ddab61276be6d11251ea71ae02bcac54890d8", size = 149284, upload-time = "2026-09-15T19:34:17.452Z" }, + { url = "https://files.pythonhosted.org/packages/7f/3b/fe554d879692650bca70bfbc0df124e82e4d2bb7456f698c7756f1279a96/yarl-1.25.1-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:eda19ea5ee88742f47a2340816e6f2d40b53bed3ab5b69794769f36af9f35bb4", size = 106399, upload-time = "2026-09-15T19:34:21.474Z" }, + { url = "https://files.pythonhosted.org/packages/e1/4b/e7af56177ac8d40094c82d7728224c0b8472157d50d362e5fb3b014b2bc8/yarl-1.25.1-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:75baa6cf9b6d1c52f3e111a130e202fd8cf0a5b3a066c3f73d615e885092e4ec", size = 106968, upload-time = "2026-09-15T19:34:23.619Z" }, + { url = "https://files.pythonhosted.org/packages/da/4f/2df41fd738d46f23ef829ae8b4468d94bb6070038fc6dfab6165ed44fea8/yarl-1.25.1-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:dbcef5a9119ef653653132cccaf999b30a0af6f33bb0a4ba80bec30056868487", size = 114717, upload-time = "2026-09-15T19:34:25.879Z" }, + { url = "https://files.pythonhosted.org/packages/69/ea/002b66df53bbd1aed1c23358ff99c9bdc744fe3f4d2740e1b2fdd7192885/yarl-1.25.1-cp315-cp315t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:7efc9f082dfed77c316edffa9deb52888e1bc6789171887cc1f68e06d65465c8", size = 105198, upload-time = "2026-09-15T19:34:28.204Z" }, + { url = "https://files.pythonhosted.org/packages/b1/7c/95c8bc0c8f97d71e59c94525ad60d76f5c57d3f2820f08137ca8b9f0542a/yarl-1.25.1-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:fe01645169a2112aa1d4ebc3e4c5f029c5c8f97adfc32e5d37c993b39a994d75", size = 120271, upload-time = "2026-09-15T19:34:30.5Z" }, + { url = "https://files.pythonhosted.org/packages/5d/7a/6fe9da56ec77927baa669fd86c39c567ce6205bab53d581082c6744c8ae7/yarl-1.25.1-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d1c557dfd5e3db046053a0bdc72261ade790ebe8e2c7a41b36b0ca1f14cb95f3", size = 123572, upload-time = "2026-09-15T19:34:32.73Z" }, + { url = "https://files.pythonhosted.org/packages/8b/83/35f222d17fa70a14c7c74fdf112ccf5515e0c2a87082b1f9b99f7693bf57/yarl-1.25.1-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8ce4d6ccafb33d39bd78444612d14938ead674c25702ded2ee9c54a47735d225", size = 115228, upload-time = "2026-09-15T19:34:35.344Z" }, + { url = "https://files.pythonhosted.org/packages/da/6f/fbaaf619423578a7d898d0f226ae47bc1906c293865c416d83c17b828b0e/yarl-1.25.1-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:80a063f8297fc796296f00f100be520f209b23dc98f93ce8eba6ee7122598209", size = 111618, upload-time = "2026-09-15T19:34:37.656Z" }, + { url = "https://files.pythonhosted.org/packages/ba/78/7383278f1b3cf8e0496bd95b3281a7b09b89217b6b428db24c6b99b3deca/yarl-1.25.1-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:7cb414a73e21a7ab58254926073f2930cb22f5b4314ea4260a687e2b3fd4dce3", size = 114839, upload-time = "2026-09-15T19:34:40.099Z" }, + { url = "https://files.pythonhosted.org/packages/62/49/5506e5b6d29aab91bd845cc9016d88c3d3f81b81bc242b8100bdd5737825/yarl-1.25.1-cp315-cp315t-musllinux_1_2_armv7l.whl", hash = "sha256:85a18376073f8a39aa07be34f9fc77e2869aa72c55c441efdd2cf79a0407504d", size = 106212, upload-time = "2026-09-15T19:34:42.768Z" }, + { url = "https://files.pythonhosted.org/packages/46/8a/19877c193b7c5929f4b07118c18bbe390f3fadd0f59dd98c0cd12b31fa5c/yarl-1.25.1-cp315-cp315t-musllinux_1_2_ppc64le.whl", hash = "sha256:77716e245c90f058466a05e6a465bb8600f767a8f4b18b4d40f3aff958e5f73c", size = 119985, upload-time = "2026-09-15T19:34:44.976Z" }, + { url = "https://files.pythonhosted.org/packages/4e/6c/0a46fbbf9ecbcbd0cc20d2193394254b9e19817f22c814aab60f99847400/yarl-1.25.1-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:1e80dcf1446e1b080b1932b0d103c464a04112f5bc31f0f983ad418172063cde", size = 112081, upload-time = "2026-09-15T19:34:47.45Z" }, + { url = "https://files.pythonhosted.org/packages/ef/30/93f5d471230c74ccd06255d0842739f86551f937f9e63a5e947853c6244a/yarl-1.25.1-cp315-cp315t-musllinux_1_2_s390x.whl", hash = "sha256:bdc8d8b8c22e9e43ac68316b5e6cf083dec537f4ec213cb4aa967b583bc3fa64", size = 116995, upload-time = "2026-09-15T19:34:49.972Z" }, + { url = "https://files.pythonhosted.org/packages/2b/80/c386593035ee3f9c6c6af0847b5578f2830c674794a9d7701b744a3ebd42/yarl-1.25.1-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:dfbf531053a0935f2e871bcd4753f90313688772ff8c017f5ea402e315a78c1f", size = 115570, upload-time = "2026-09-15T19:34:52.628Z" }, + { url = "https://files.pythonhosted.org/packages/38/02/eef443559563ef8f2e10469387b8b1e97cb5efee95b288a56da60801f7ee/yarl-1.25.1-cp315-cp315t-win_amd64.whl", hash = "sha256:b13b88747769537f3d32e89e3a735da10c0a9e35d7322928c701b5f93d3afffd", size = 106811, upload-time = "2026-09-15T19:34:54.935Z" }, + { url = "https://files.pythonhosted.org/packages/88/91/41e284ca2cf5211e05dae031d126a3668aea88fa759df56e7e35c6ad25ba/yarl-1.25.1-cp315-cp315t-win_arm64.whl", hash = "sha256:783dd1467083f4d3f7722ad6a313f24c173e7571372738fcb7a6e6d1ba48df25", size = 101804, upload-time = "2026-09-15T19:34:57.231Z" }, + { url = "https://files.pythonhosted.org/packages/54/22/318c7980066769c6bcd9221ed2248294f5698811da099013098c670565ed/yarl-1.25.1-py3-none-any.whl", hash = "sha256:681c758b0490f9e96b78e5fa8e8dc6e648e9185bb6eaebe73183c33ea0c445f3", size = 63617, upload-time = "2026-09-15T19:34:59.616Z" }, ] diff --git a/vendor/PATCHES.md b/vendor/PATCHES.md new file mode 100644 index 00000000000..e643fe597ec --- /dev/null +++ b/vendor/PATCHES.md @@ -0,0 +1,13 @@ +# Legacy TLS verifier backport + +`rustls-webpki-legacy` is the ISC-licensed0.102.8 crate, verified against its Cargo.lock SHA256. `SECURITY-BACKPORT.json` records provenance and all eight exact upstream0.103.16 SPKI byte-file hashes. Original license/copyright notices are retained. + +The two upstream path/anchor-SPKI checks are applied before path verification. They return the existing `UnknownIssuer` error to preserve this old branch API. Signature, hostname, expiry, trust-anchor and revocation checks remain enabled. This compatiblepatch changes only known compromised-key acceptance. + +The path patch is needed by libsql0.9.30/Rustls0.22.4. The modern branch stays on upstreamwebpki0.103.16. This backport does not fix every historical0.102.x nameconstraint/CRL advisory; qualify a supportedlibsql upgrade separately. Remove this patch when that supported migration no longerresolves0.102.x. + +Rollback: revert the pathpatch and its lockfile changes; restoringvulnerable verification is a securityregression, so retain isolation and patchedsystemroots. + +The upstream README setext headings and trailing spaces in documentation/OpenSSL PEM annotations are normalized for repository whitespace checks. Every encoded PEM block is verified unchanged; per-file before/after hashes are in SECURITY-BACKPORT.json. + +Remaining legacy advisories: https://github.com/advisories/GHSA-xgp8-3hg3-c2mh ; https://github.com/advisories/GHSA-965h-392x-2mh5 ; https://github.com/advisories/GHSA-82j2-j2ch-gfr8 ; https://github.com/advisories/GHSA-pwjx-qhcg-rvj4 . This fork disables issue tracking, so retain these explicit open findings until separately qualified. diff --git a/vendor/rustls-webpki-legacy/.cargo_vcs_info.json b/vendor/rustls-webpki-legacy/.cargo_vcs_info.json new file mode 100644 index 00000000000..a1692d05dba --- /dev/null +++ b/vendor/rustls-webpki-legacy/.cargo_vcs_info.json @@ -0,0 +1,6 @@ +{ + "git": { + "sha1": "5fedee2d5410a1c1d7e033ee7d35b3aecd756f27" + }, + "path_in_vcs": "" +} \ No newline at end of file diff --git a/vendor/rustls-webpki-legacy/Cargo.lock b/vendor/rustls-webpki-legacy/Cargo.lock new file mode 100644 index 00000000000..d19659518b3 --- /dev/null +++ b/vendor/rustls-webpki-legacy/Cargo.lock @@ -0,0 +1,460 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aws-lc-rs" +version = "1.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faac5829c2b74c28f830747e7818ccfb684261b5f48a1118b1e2a13d36dfab13" +dependencies = [ + "aws-lc-sys", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1622d8446a2d4b2ce0c7eefc73dd43a99779028d5ee5c2dd8073a658ba8a2bc" +dependencies = [ + "cc", + "cmake", + "dunce", + "fs_extra", + "pkg-config", +] + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bencher" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dfdb4953a096c551ce9ace855a604d702e6e62d77fac690575ae347571717f5" + +[[package]] +name = "bzip2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +dependencies = [ + "bzip2-sys", + "libc", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.13+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225bff33b2141874fe80d71e07d6eec4f85c5c216453dd96388240f96e1acc14" +dependencies = [ + "cc", + "pkg-config", +] + +[[package]] +name = "cc" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877bf67ac8e52449eb2f9e98a344ea163beb70dd1f9eebe3cc5357dcfeaee4df" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600" + +[[package]] +name = "cmake" +version = "0.1.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678" +dependencies = [ + "cc", +] + +[[package]] +name = "deranged" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e9de72ce2ad1f90dc62fa25f0f430ef85eb4b0d8fa0be4f30373bc40a21d28e" + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "find-msvc-tools" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c66915cc5391097de7a2b0b972e8505aa33c0df401fd3a6811dbdb32881ba48" + +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "libc", + "r-efi", +] + +[[package]] +name = "itoa" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "jobserver" +version = "0.1.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" +dependencies = [ + "getrandom 0.4.3", + "libc", +] + +[[package]] +name = "libc" +version = "0.2.191" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a" + +[[package]] +name = "memchr" +version = "2.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" + +[[package]] +name = "num-conv" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "pkg-config" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" + +[[package]] +name = "powerfmt" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a6394b9e965e73d0a289ee54f589087e2c676aedf60885baf52c76b771e4958" + +[[package]] +name = "proc-macro2" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "rcgen" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75e669e5202259b5314d1ea5397316ad400819437857b90861765f24c4cf80a2" +dependencies = [ + "aws-lc-rs", + "rustls-pki-types", + "time", + "yasna", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.17", + "libc", + "untrusted", + "windows-sys", +] + +[[package]] +name = "rustls-pki-types" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f4925028c7eb5d1fcdaf196971378ed9d2c1c4efc7dc5d011256f76c99c0a96" +dependencies = [ + "zeroize", +] + +[[package]] +name = "rustls-webpki" +version = "0.102.9+security.emudhra.1" +dependencies = [ + "aws-lc-rs", + "base64", + "bencher", + "bzip2", + "once_cell", + "rcgen", + "ring", + "rustls-pki-types", + "serde", + "serde_json", + "untrusted", + "webpki-roots", +] + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.154" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + +[[package]] +name = "syn" +version = "3.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "time" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134" +dependencies = [ + "deranged", + "num-conv", + "powerfmt", + "serde_core", + "time-core", +] + +[[package]] +name = "time-core" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" + +[[package]] +name = "unicode-ident" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "webpki-roots" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c1c8e20c8a38fc7d65abfe74eb7280e4aa667e8eec8bc84996d2874810748d9" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "yasna" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" +dependencies = [ + "time", +] + +[[package]] +name = "zeroize" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879" + +[[package]] +name = "zmij" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" diff --git a/vendor/rustls-webpki-legacy/Cargo.toml b/vendor/rustls-webpki-legacy/Cargo.toml new file mode 100644 index 00000000000..be4b1b12ef0 --- /dev/null +++ b/vendor/rustls-webpki-legacy/Cargo.toml @@ -0,0 +1,201 @@ +# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO +# +# When uploading crates to the registry Cargo will automatically +# "normalize" Cargo.toml files for maximal compatibility +# with all versions of Cargo and also rewrite `path` dependencies +# to registry (e.g., crates.io) dependencies. +# +# If you are reading this file be aware that the original Cargo.toml +# will likely look very different (and much more reasonable). +# See Cargo.toml.orig for the original contents. + +[package] +edition = "2021" +rust-version = "1.63" +name = "rustls-webpki" +version = "0.102.9+security.emudhra.1" +build = false +include = [ + "Cargo.toml", + "/LICENSE", + "README.md", + "src/aws_lc_rs_algs.rs", + "src/calendar.rs", + "src/cert.rs", + "src/crl/mod.rs", + "src/crl/types.rs", + "src/der.rs", + "src/end_entity.rs", + "src/error.rs", + "src/rpk_entity.rs", + "src/subject_name/dns_name.rs", + "src/subject_name/ip_address.rs", + "src/subject_name/mod.rs", + "src/subject_name/name.rs", + "src/subject_name/verify.rs", + "src/name/verify.rs", + "src/name/name.rs", + "src/signed_data.rs", + "src/ring_algs.rs", + "src/alg_tests.rs", + "src/time.rs", + "src/trust_anchor.rs", + "src/x509.rs", + "src/verify_cert.rs", + "src/lib.rs", + "src/data/**/*", + "tests/**", +] +autobins = false +autoexamples = false +autotests = false +autobenches = false +description = "Web PKI X.509 Certificate Verification." +readme = "README.md" +categories = [ + "cryptography", + "no-std", +] +license = "ISC" +repository = "https://github.com/rustls/webpki" + +[package.metadata.cargo_check_external_types] +allowed_external_types = [ + "rustls_pki_types::*", + "rustls_pki_types", +] + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = [ + "--cfg", + "docsrs", +] + +[profile.bench] +opt-level = 3 +lto = true +codegen-units = 1 +debug = 0 +debug-assertions = false +rpath = false + +[profile.release] +opt-level = 3 +lto = true +codegen-units = 1 +debug = 0 +debug-assertions = false +rpath = false + +[lib] +name = "webpki" +path = "src/lib.rs" + +[[test]] +name = "better_tls" +path = "tests/better_tls.rs" + +[[test]] +name = "cert_v1_unsupported" +path = "tests/cert_v1_unsupported.rs" + +[[test]] +name = "cert_without_extensions" +path = "tests/cert_without_extensions.rs" + +[[test]] +name = "client_auth" +path = "tests/client_auth.rs" + +[[test]] +name = "client_auth_revocation" +path = "tests/client_auth_revocation.rs" + +[[test]] +name = "crl_tests" +path = "tests/crl_tests.rs" + +[[test]] +name = "custom_ekus" +path = "tests/custom_ekus.rs" + +[[test]] +name = "integration" +path = "tests/integration.rs" + +[[test]] +name = "signatures" +path = "tests/signatures.rs" + +[[test]] +name = "tls_server_certs" +path = "tests/tls_server_certs.rs" + +[dependencies.aws-lc-rs] +version = "1.9" +features = ["aws-lc-sys"] +optional = true +default-features = false + +[dependencies.pki-types] +version = "1.7" +default-features = false +package = "rustls-pki-types" + +[dependencies.ring] +version = "0.17" +optional = true +default-features = false + +[dependencies.untrusted] +version = "0.9" + +[dev-dependencies.base64] +version = "0.22" + +[dev-dependencies.bencher] +version = "0.1.5" + +[dev-dependencies.bzip2] +version = "0.4.4" + +[dev-dependencies.once_cell] +version = "1.17.2" + +[dev-dependencies.rcgen] +version = "0.13" +features = ["aws_lc_rs"] +default-features = false + +[dev-dependencies.serde] +version = "1.0" +features = ["derive"] + +[dev-dependencies.serde_json] +version = "1.0" + +[features] +alloc = [ + "ring?/alloc", + "pki-types/alloc", +] +aws_lc_rs = ["dep:aws-lc-rs"] +default = [ + "std", + "ring", +] +ring = ["dep:ring"] +std = [ + "alloc", + "pki-types/std", +] + +[workspace] + +[dev-dependencies.webpki-roots] +version = "=1.0.10" + +[[test]] +name = "security_distrust" +path = "tests/security_distrust.rs" diff --git a/vendor/rustls-webpki-legacy/Cargo.toml.orig b/vendor/rustls-webpki-legacy/Cargo.toml.orig new file mode 100644 index 00000000000..8a20bd628d7 --- /dev/null +++ b/vendor/rustls-webpki-legacy/Cargo.toml.orig @@ -0,0 +1,116 @@ +# Copyright 2015 Brian Smith. +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +[package] +categories = ["cryptography", "no-std"] +description = "Web PKI X.509 Certificate Verification." +edition = "2021" +rust-version = "1.63" +license = "ISC" +name = "rustls-webpki" +readme = "README.md" +repository = "https://github.com/rustls/webpki" +version = "0.102.9+security.emudhra.1" + +include = [ + "Cargo.toml", + + "/LICENSE", + "README.md", + + "src/aws_lc_rs_algs.rs", + "src/calendar.rs", + "src/cert.rs", + "src/crl/mod.rs", + "src/crl/types.rs", + "src/der.rs", + "src/end_entity.rs", + "src/error.rs", + "src/rpk_entity.rs", + "src/subject_name/dns_name.rs", + "src/subject_name/ip_address.rs", + "src/subject_name/mod.rs", + "src/subject_name/name.rs", + "src/subject_name/verify.rs", + "src/name/verify.rs", + "src/name/name.rs", + "src/signed_data.rs", + "src/ring_algs.rs", + "src/alg_tests.rs", + "src/time.rs", + "src/trust_anchor.rs", + "src/x509.rs", + "src/verify_cert.rs", + "src/lib.rs", + + "src/data/**/*", + + "tests/**", +] + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] + +[package.metadata.cargo_check_external_types] +allowed_external_types = [ + "rustls_pki_types::*", + "rustls_pki_types", # To allow re-export. +] + +[lib] +name = "webpki" + +[features] +default = ["std", "ring"] +alloc = ["ring?/alloc", "pki-types/alloc"] +aws_lc_rs = ["dep:aws-lc-rs"] +ring = ["dep:ring"] +std = ["alloc", "pki-types/std"] + +[dependencies] +aws-lc-rs = { version = "1.9", optional = true, default-features = false, features = ["aws-lc-sys"] } +pki-types = { package = "rustls-pki-types", version = "1.7", default-features = false } +ring = { version = "0.17", default-features = false, optional = true } +untrusted = "0.9" + +[dev-dependencies] +base64 = "0.22" +bencher = "0.1.5" +bzip2 = "0.4.4" +once_cell = "1.17.2" +rcgen = { version = "0.13", default-features = false, features = ["aws_lc_rs"] } +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" + +[profile.bench] +opt-level = 3 +debug = false +rpath = false +lto = true +debug-assertions = false +codegen-units = 1 + +[profile.release] +opt-level = 3 +debug = false +rpath = false +lto = true +debug-assertions = false +codegen-units = 1 + +[[bench]] +name = "benchmarks" +path = "benches/benchmark.rs" +harness = false diff --git a/vendor/rustls-webpki-legacy/LICENSE b/vendor/rustls-webpki-legacy/LICENSE new file mode 100644 index 00000000000..cd87be1dbad --- /dev/null +++ b/vendor/rustls-webpki-legacy/LICENSE @@ -0,0 +1,19 @@ +Except as otherwise noted, this project is licensed under the following +(ISC-style) terms: + +Copyright 2015 Brian Smith. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +The files under third-party/chromium are licensed as described in +third-party/chromium/LICENSE. diff --git a/vendor/rustls-webpki-legacy/README.md b/vendor/rustls-webpki-legacy/README.md new file mode 100644 index 00000000000..bfbb86835c5 --- /dev/null +++ b/vendor/rustls-webpki-legacy/README.md @@ -0,0 +1,73 @@ +[![Build Status](https://github.com/rustls/webpki/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/rustls/webpki/actions/workflows/ci.yml?query=branch%3Amain) +[![Coverage Status (codecov.io)](https://codecov.io/gh/rustls/webpki/branch/main/graph/badge.svg)](https://codecov.io/gh/rustls/webpki/) +[![Documentation](https://docs.rs/rustls-webpki/badge.svg)](https://docs.rs/rustls-webpki/) +[![Chat](https://img.shields.io/discord/976380008299917365?logo=discord)](https://discord.gg/MCSB76RU96) + +webpki is a library that validates Web PKI (TLS/SSL) certificates. It's +used by [Rustls](https://github.com/rustls/rustls) to handle certificate-related +tasks required for implementing TLS clients and servers. + +webpki is written in [Rust](https://www.rust-lang.org/) and uses +[*ring*](https://github.com/briansmith/ring) for cryptographic operations and +low-level parsing. + +This is a fork of the [original webpki project](https://github.com/briansmith/webpki) +which adds a number of features required by the rustls project. This fork is +released as the `rustls-webpki` crate, with versions starting 0.100.0 so as to +not confusingly overlap with `webpki` versions. + + +## Features + +* Representing trust anchors - webpki requires the caller to bootstrap trust by + explicitly specifying a set of trust anchors using the `TrustAnchor` type. + +* Parsing certificates - webpki can convert from the raw encoded form of + a certificate into something that can be used for making trust decisions. + +* Path building - webpki can determine if a certificate for an end entity like + a website or client identity was issued by a trust anchor, or a series of + intermediate certificates the trust anchor has endorsed. + +* Name/usage validation - webpki can determine if a certificate is valid for + a given DNS name or IP address by considering the allowed usage of the + certificate and additional constraints. + + +## Limitations + +webpki offers a minimal feature set tailored to the needs of Rustls. Notably it +does not offer: + +* Support for self-signed certificates +* Certificate or keypair generation +* Access to arbitrary certificate extensions +* Parsing/representation of certificate subjects, or human-friendly display of + these fields + +For these tasks you may prefer using webpki in combination with libraries like +[x509-parser](https://github.com/rusticata/x509-parser) and +[rcgen](https://github.com/est31/rcgen). + + +## Changelog + +Release history can be found [on GitHub](https://github.com/rustls/webpki/releases). + + +## Demo + +See https://github.com/rustls/rustls#example-code for an example of using +webpki. + + +## License + +See [LICENSE](LICENSE). This project happily accepts pull requests without any +formal copyright/contributor license agreement. + + +## Bug Reporting + +Please refer to the [SECURITY](SECURITY.md) policy for security issues. All +other bugs should be reported as [GitHub issues](https://github.com/rustls/webpki/issues/new). diff --git a/vendor/rustls-webpki-legacy/SECURITY-BACKPORT.json b/vendor/rustls-webpki-legacy/SECURITY-BACKPORT.json new file mode 100644 index 00000000000..b04014f8a6b --- /dev/null +++ b/vendor/rustls-webpki-legacy/SECURITY-BACKPORT.json @@ -0,0 +1,269 @@ +{ + "upstream_legacy_crate": "rustls-webpki0.102.8", + "original_crate_sha256": "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9", + "backport_source": "https://github.com/rustls/webpki/releases/tag/v%2F0.103.16", + "upstream_spki_files": { + "EMDVTLSCAG3B.spki.der": "2d5f988ee3ceaf696845a34299ca3e05816429cdb5de92427889533175f97b95", + "EMDVTLSCAG3C.spki.der": "616e9a92539c40f454813f7fb8ae4a6db719498495215774f02d8b8b5a615d36", + "EMEVTLSCAG3B.spki.der": "bdf5ab18303069ebc3e3ddbb0fc0613693acef01b2fb7be1a0624aab60fbff0d", + "EMEVTLSCAG3C.spki.der": "b941c7577b918f7b9a9374aff3b02d8eda92545c86adb5b5268d1e121fe58ce2", + "EMOVTLSCAG3B.spki.der": "7f09de2d155cc9fbc2dc4585f2c134ea3fc04ea9d9b3e31fa2d6bf9fdc0a02a2", + "EMOVTLSCAG3C.spki.der": "6fc13706463e00b2cd2ae357f86de2441e59d501e322c7a02a531a9871e450f6", + "EMOVCSCAG3B.spki.der": "e8263cea915a92109a29fb497105dceeeb58fa099c2552c4082aff1e1a9a33b2", + "EMOVCSCAG3C.spki.der": "09f75d128061fcdc6d31d8317ce3fe0aea4dab2c66777ce548858dd23f763ce7" + }, + "downstream_version": "0.102.9+security.emudhra.1", + "diagnostic_compatibility": "Return existingUnknownIssuer for distrustedkeys; no newpublicerrorenum or callbackAPI. All signature/name/time checks stay enabled.", + "scope": "eMudhraSPKI distrust only; other legacywebpki advisories are not backported by this patch.", + "test_fixture_vcs_commit": "5fedee2d5410a1c1d7e033ee7d35b3aecd756f27", + "test_fixture_archive_url": "https://codeload.github.com/rustls/webpki/tar.gz/5fedee2d5410a1c1d7e033ee7d35b3aecd756f27", + "test_fixture_archive_sha256": "0235b5b3cfd6810990f2a141c0141de0a20b783880f88423f358889fad54492d", + "nonsemantic_text_normalization": [ + { + "file": "vendor/rustls-webpki-legacy/README.md", + "before_sha256": "084c37ee4b35887c813373cb98f3712e20d42e238cd16b59bd90dd8ae870dbf2", + "after_sha256": "9f8a6d04fbbacfa799bc163b56b67df8f7e064af86f82bd4bc1c69160eadf6b9", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-prime256v1-sha512-spki-params-null.pem", + "before_sha256": "6ac6f5033fa11fd1a7c6a4df5f7ee790e3e572dac0a43c1f85d767ddc5683c21", + "after_sha256": "849f08d596945e085b09566431e72384c96a9c74d8f83c7c8526b373d205a52a", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-prime256v1-sha512-unused-bits-signature.pem", + "before_sha256": "da3d8e9b8dddff9581c9218be447538e01cf84d629dab8b310a4c48e59689110", + "after_sha256": "1dd39929cc1d165463bfbcedeeeca181f581b769c695ad736226a0d544e0632a", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-prime256v1-sha512-using-ecdh-key.pem", + "before_sha256": "0ace58a75dcb69766e8ca5ef1e2ef936f4b54d2e3430db5bd1fa99745799af77", + "after_sha256": "c8bc531cf331a3ba65637c4fe1752e415760234b8bbf330268b60f6102799016", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-prime256v1-sha512-using-ecmqv-key.pem", + "before_sha256": "2b5f1f423e3483d6747d9c1bbf5ccb27db830cbb24635fa235da9ee7ffa007f6", + "after_sha256": "4929426d7ca2c9681bb1984b76343ec8a67b52735b8c004d0d149d24b200dc1e", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-prime256v1-sha512-using-rsa-algorithm.pem", + "before_sha256": "45cd7e8bcc1e98498e6bdf16c57dcf3067525e3767113ed1ce1e2fb9d0d01ce0", + "after_sha256": "3681903f1b60a9a7840373f8e3d37269b3d0d13ad88df7052a7c4b207f7e6db4", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-prime256v1-sha512-wrong-signature-format.pem", + "before_sha256": "cb3bfe67be334ce01968aa760138f02324105524516438d8610cbd2fe2360425", + "after_sha256": "61fc9dcae1a8de145aeca2020f437f2df412daaf68ecac1bf0adb1b0e74b654b", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-prime256v1-sha512.pem", + "before_sha256": "111a3dc873ba1a8dd1a9c931b82ce34f0039a08ff919e2cdd528501e58270ad9", + "after_sha256": "29b22dd0caaeb41757585b53a7403b03cc0a953424b744e7840b9e45883ba46b", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-secp384r1-sha256-corrupted-data.pem", + "before_sha256": "143d020b5588b2af8fbe18e65589057c732982b6885d4bf9dc5dd14edf142768", + "after_sha256": "93a01c394e06b201a46e57ad09a45038c6f91857389cfbb436fafbedb2ab1f18", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-secp384r1-sha256.pem", + "before_sha256": "96a6d3c113baa699e0187b0819cce1426523765f41d2287bd7f0902445d55878", + "after_sha256": "73fd29d6ec737a8ea7f2ed567228172f83897e2068f594900c3db2717ae5ada6", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-using-rsa-key.pem", + "before_sha256": "ce2c52394c03f95f3a121b18185d99069f3a108f9dd3bc7c66426afecf3a1b47", + "after_sha256": "c6f7eafa76a84a9170c45ebb514ff19db98cd21faf51a16fe55293228de90e10", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/ecdsa-prime256v1-sha256-compressed.pem", + "before_sha256": "0d5bc5c2db05ef39c2835de1003ef6722516f3db3a5ddb55688cff3e82621fa0", + "after_sha256": "4597fdec220fcf1d2a6c36727b510f252d00e43a3e8ce6afae82579c60bbb0f2", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/ecdsa-prime256v1-sha256-spki-inside-spki.pem", + "before_sha256": "524fd2cacb5b73f740170a24b4829736ac87517c750c4c702a2931c1dca1ce60", + "after_sha256": "901fe3ed06510b3ceb478bedbf92616a5b8b015ac82a9d2fbc52656ba4307663", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/ecdsa-prime256v1-sha256.pem", + "before_sha256": "089a6f368e5b9a9381f6932ca6cf8b91d9daf714ff8233c9b8cd797ad7b325a7", + "after_sha256": "e7d01ada7cd2cab6105a0e3acf28e2e70cfd411be0aae4ab1185dce8bc076831", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/rsa-pss-sha256-salt32-corrupted-data.pem", + "before_sha256": "8b5c942f19ae52eee1847515d4dd4970809768a7fcbcad691113e08ba90c6787", + "after_sha256": "24dfe0e0a9178ff5f72db0997d0fae4e2adfcbc444b8edfba477c83810d02a77", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/rsa-pss-sha256-salt32.pem", + "before_sha256": "3e68c625cfa80c7dd1aee27e0336892249e00b5f3604d5141e317f4416cef728", + "after_sha256": "acb3269f792675d14f93390fbc98313ec3465a9b78885cfced546dc94e98aee2", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/rsa-pss-sha384-salt48-corrupted-data.pem", + "before_sha256": "f624bc417b404cf6ebafd82cff02a611b3975af1217eca0aa88d37e0e8824b5a", + "after_sha256": "1ebb89f05e8c97c8d560dd15ab7da14f59031af64b03f591391068f481a71eb3", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/rsa-pss-sha384-salt48.pem", + "before_sha256": "3673206911aa4bd8b4da9e951e37bbe6258f718d5521dc01da21936a9c92d172", + "after_sha256": "70da96691aaa8cf5aebc8658fd89426fb9d8e5e66f5330b7666b0185dc5455bf", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/rsa-pss-sha512-salt64-corrupted-data.pem", + "before_sha256": "bdcbfdc14c1d6adf01a86b8e7803be9a76dceb788fbf029ac2f67e482c277483", + "after_sha256": "f0771f2f777fa3e520261b8067abe5f805a8dfa148ceffc1a32b5dd98bebd2f3", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/rsa-pss-sha512-salt64.pem", + "before_sha256": "1a817548b4dc518a09eba5365787dc49fe30d643b21d24bf905284f6d2713ae8", + "after_sha256": "51a47fd1b3fb635c542dd74bd37ae6faadfe7ddfa287344460b51b7314ba4d93", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha1-bad-key-der-length.pem", + "before_sha256": "d1b50934145834a4a7dedaf0a95ec557279721a2e7b91bd14fb2ba64393e8d32", + "after_sha256": "a3f03314e494a5d224ac7c065d0955844889239387c100e929471b105b8ef76a", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha1-bad-key-der-null.pem", + "before_sha256": "0c983dbd426b12b939e78c2149da2089250bac97af4b883aaae9bd27b01b761a", + "after_sha256": "18e44fa32ce3f9b7cb70039f5cae212c7e38d65adfa677bebbf86084a9a72bb2", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha1-key-params-absent.pem", + "before_sha256": "8f85c6ed8b3d8414b11c2881ac2945d59aab762671c847614a26d824110589c8", + "after_sha256": "c9694c86677c2d923f6380f9546939624668c705533038b48674bc3962829a3d", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha1-using-pss-key-no-params.pem", + "before_sha256": "773165ba6b867a71f88373a34b9dba676677ff5268b1ebd7e42f80ba323115de", + "after_sha256": "ec6cfa27e7999b3636e5f6bff0fd203c26655e64d0f8939980e3f46effd6e579", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha1-wrong-algorithm.pem", + "before_sha256": "bf0ca6fe4176e3ec0198d60d37def6b836a74bfd96efd2122fb1d1703320d9e3", + "after_sha256": "11ca1fd9bae03620bb8ce08537f5d61a75f65bdfd93cdf39737c06cc4b7f89f2", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha1.pem", + "before_sha256": "f2a649b1d73ce1de006a1f2f11650e5ddb90ccf7de73bb19a57c157af34316a2", + "after_sha256": "120123853440201b5c91ee885023e8da3465dbc81653a3d42aa85bdd312d2526", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha256-key-encoded-ber.pem", + "before_sha256": "df9b7c8cc7087a834dc2dd20431ceebf92aaf0e0c635ef367f116c39ca0e7a5b", + "after_sha256": "ea6f4b3475658c86d5768becfd51279974513979682d1402a9bee983d791b408", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha256-spki-non-null-params.pem", + "before_sha256": "1534fe211f08e732c202e65e674bef2606b3b638add7300b6f7df8417e5404dc", + "after_sha256": "ed52ef31b03f55c0da0a2f598e788ab0958d16bf9da30bda7bd6c432bb1edc20", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha256-using-ecdsa-algorithm.pem", + "before_sha256": "766d5e41e89bd69ef0cc804ef0de8bb7dc2cb99dca0b9b411a92b338ca5ea16e", + "after_sha256": "56066379173c688b69b7ca695224bff0124cf67e68c3cb0e5376462241ada1ce", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha256-using-id-ea-rsa.pem", + "before_sha256": "5457122a67150f0418d81fe2210cd6f4feedd59af243ef0ab196f808817f9446", + "after_sha256": "59932cebd4f588fa86e622e43fc33202b272dbdc52bacb6d3f7ed894f5c77d61", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha256.pem", + "before_sha256": "34238a932aae2aa81968830f95f1669183286a29e0d9a04000d224b2e4285c62", + "after_sha256": "737666900d4c3d9fd1109f0e5eb44d52625ce0dfb9fe107ae6e6dae74f69b2d3", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha1-salt20-using-pss-key-no-params.pem", + "before_sha256": "57c4b6652b6fc13f0f32265997a9fcb51fb873726fb97e1fc29d26593dfcd4c2", + "after_sha256": "26d379d10818e622a92f271a5321360f29b910a948d5fec22fcbe2d9edba7b17", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha1-salt20-using-pss-key-with-null-params.pem", + "before_sha256": "67ee8e6f97d7f65f1af0ed4a53cbeb500e5cc156d44490efab0330f8af7ed7a2", + "after_sha256": "f09e4272da038738817788159e45f2590d1f5a007f4d3e461cb7d2d63dbd68c4", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha1-salt20.pem", + "before_sha256": "94966ed94d5a59bbd47a06b33b716dd555a71b51bfc237d0ff45c3363cf21218", + "after_sha256": "b76dde242675ffede9d56bf1b4861f1dab4082b30f646be72f63a1eb0c2a3b20", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha1-wrong-salt.pem", + "before_sha256": "5583063ebca55b61a3f5f09d186dd250f8e8a29ce0beb7783f80ff5f77e1d9bb", + "after_sha256": "3e8a7ea1f6711b3d96a6d8cf8eedbbc62e2c8c6ce57dff5a8cc574637176d375", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha256-mgf1-sha512-salt33.pem", + "before_sha256": "7cb052b2cb306518397e227e53da76cc781a700b732b275e491cda9bd5844cd7", + "after_sha256": "aa589551586c6e175da3c075f2e50c1e7bb586b5dd4f818795dfc2e7a090cf1c", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha256-salt10-using-pss-key-with-params.pem", + "before_sha256": "4fd718a3ea88df68dfb384f7dc48c110dadca642f6265c997945fe2231fda422", + "after_sha256": "4616514886c5462f62e137ed4951be379d23c4c88048c1ee7777b8ee6c6a1473", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha256-salt10-using-pss-key-with-wrong-params.pem", + "before_sha256": "346695e766c3003c4d62a9a73016f8cab064b71bbde543cae904e4625dfa8b3b", + "after_sha256": "7a2d07fec42f775de1b3cb55e4588fcb78fc2aefe03275245e247a9407133c31", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha256-salt10.pem", + "before_sha256": "1c3ee38f92a74a85a5a5563211431c0ec0f240ebbc803fbc19272b0469ac016b", + "after_sha256": "be9433b3cbb26326b9f4bdbfa975e7c5356d6e2ff149083af1a1418ffe75020d", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-using-ec-key.pem", + "before_sha256": "6ef47d55e423c0e4e942388cd09aab942dc33f0bc522249118a9857470c5dce2", + "after_sha256": "c6b412966725dad15095f5b6626a0cd714cee1af18bda4bdd0421b40ec69a63a", + "PEM_encoded_blocks_unchanged": true + }, + { + "file": "vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa2048-pkcs1-sha512.pem", + "before_sha256": "4428f1b0ab076129bf728ae690b3b4469f9746f2e310911d89c2bba2942cd87d", + "after_sha256": "963ed9ae185ba8c2020cce31a071e63ad32e5071653ca00ad0f1bd1a291333bb", + "PEM_encoded_blocks_unchanged": true + } + ] +} \ No newline at end of file diff --git a/vendor/rustls-webpki-legacy/src/alg_tests.rs b/vendor/rustls-webpki-legacy/src/alg_tests.rs new file mode 100644 index 00000000000..03ba398ac6f --- /dev/null +++ b/vendor/rustls-webpki-legacy/src/alg_tests.rs @@ -0,0 +1,412 @@ +// Copyright 2015 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +#![allow(clippy::duplicate_mod)] + +use std::prelude::v1::*; + +use base64::{engine::general_purpose, Engine as _}; + +use crate::error::{DerTypeId, Error}; +use crate::verify_cert::Budget; +use crate::{der, signed_data}; + +use super::{ + INVALID_SIGNATURE_FOR_RSA_KEY, OK_IF_POINT_COMPRESSION_SUPPORTED, OK_IF_RSA_AVAILABLE, + SUPPORTED_ALGORITHMS_IN_TESTS, UNSUPPORTED_ECDSA_SHA512_SIGNATURE, + UNSUPPORTED_SIGNATURE_ALGORITHM_FOR_RSA_KEY, +}; + +macro_rules! test_file_bytes { + ( $file_name:expr ) => { + include_bytes!(concat!( + "../third-party/chromium/data/verify_signed_data/", + $file_name + )) + }; +} + +// TODO: The expected results need to be modified for SHA-1 deprecation. + +macro_rules! test_verify_signed_data { + ($fn_name:ident, $file_name:expr, $expected_result:expr) => { + #[test] + fn $fn_name() { + test_verify_signed_data(test_file_bytes!($file_name), $expected_result); + } + }; +} + +fn test_verify_signed_data(file_contents: &[u8], expected_result: Result<(), Error>) { + let tsd = parse_test_signed_data(file_contents); + let spki_value = untrusted::Input::from(&tsd.spki); + let spki_value = spki_value + .read_all(Error::BadDer, |input| { + der::expect_tag(input, der::Tag::Sequence) + }) + .unwrap(); + + // we can't use `parse_signed_data` because it requires `data` + // to be an ASN.1 SEQUENCE, and that isn't the case with + // Chromium's test data. TODO: The test data set should be + // expanded with SEQUENCE-wrapped data so that we can actually + // test `parse_signed_data`. + + let algorithm = untrusted::Input::from(&tsd.algorithm); + let algorithm = algorithm + .read_all( + Error::TrailingData(DerTypeId::SignatureAlgorithm), + |input| der::expect_tag(input, der::Tag::Sequence), + ) + .unwrap(); + + let signature = untrusted::Input::from(&tsd.signature); + let signature = signature + .read_all(Error::TrailingData(DerTypeId::Signature), |input| { + der::bit_string_with_no_unused_bits(input) + }) + .unwrap(); + + let signed_data = signed_data::SignedData { + data: untrusted::Input::from(&tsd.data), + algorithm, + signature, + }; + + assert_eq!( + expected_result, + signed_data::verify_signed_data( + SUPPORTED_ALGORITHMS_IN_TESTS, + spki_value, + &signed_data, + &mut Budget::default(), + ) + ); +} + +// XXX: This is testing code that isn't even in this module. +macro_rules! test_verify_signed_data_signature_outer { + ($fn_name:ident, $file_name:expr, $expected_result:expr) => { + #[test] + fn $fn_name() { + test_verify_signed_data_signature_outer(test_file_bytes!($file_name), $expected_result); + } + }; +} + +fn test_verify_signed_data_signature_outer(file_contents: &[u8], expected_error: Error) { + let tsd = parse_test_signed_data(file_contents); + let signature = untrusted::Input::from(&tsd.signature); + assert_eq!( + signature + .read_all(Error::TrailingData(DerTypeId::Signature), |input| { + der::bit_string_with_no_unused_bits(input) + }) + .unwrap_err(), + expected_error, + ); +} + +// XXX: This is testing code that is not even in this module. +macro_rules! test_parse_spki_bad_outer { + ($fn_name:ident, $file_name:expr, $error:expr) => { + #[test] + fn $fn_name() { + test_parse_spki_bad_outer(test_file_bytes!($file_name), $error) + } + }; +} + +fn test_parse_spki_bad_outer(file_contents: &[u8], expected_error: Error) { + let tsd = parse_test_signed_data(file_contents); + let spki = untrusted::Input::from(&tsd.spki); + assert_eq!( + spki.read_all(Error::BadDer, |input| { + der::expect_tag(input, der::Tag::Sequence) + }) + .unwrap_err(), + expected_error, + ); +} + +// XXX: Some of the BadDer tests should have better error codes, maybe? + +// XXX: We should have a variant of this test with a SHA-256 digest that gives +// `Error::UnsupportedSignatureAlgorithmForPublicKey`. +test_verify_signed_data!( + test_ecdsa_prime256v1_sha512_spki_params_null, + "ecdsa-prime256v1-sha512-spki-params-null.pem", + Err(UNSUPPORTED_ECDSA_SHA512_SIGNATURE) +); +test_verify_signed_data_signature_outer!( + test_ecdsa_prime256v1_sha512_unused_bits_signature, + "ecdsa-prime256v1-sha512-unused-bits-signature.pem", + Error::BadDer +); +// XXX: We should have a variant of this test with a SHA-256 digest that gives +// `Error::UnsupportedSignatureAlgorithmForPublicKey`. +test_verify_signed_data!( + test_ecdsa_prime256v1_sha512_using_ecdh_key, + "ecdsa-prime256v1-sha512-using-ecdh-key.pem", + Err(UNSUPPORTED_ECDSA_SHA512_SIGNATURE) +); +// XXX: We should have a variant of this test with a SHA-256 digest that gives +// `Error::UnsupportedSignatureAlgorithmForPublicKey`. +test_verify_signed_data!( + test_ecdsa_prime256v1_sha512_using_ecmqv_key, + "ecdsa-prime256v1-sha512-using-ecmqv-key.pem", + Err(UNSUPPORTED_ECDSA_SHA512_SIGNATURE) +); +test_verify_signed_data!( + test_ecdsa_prime256v1_sha512_using_rsa_algorithm, + "ecdsa-prime256v1-sha512-using-rsa-algorithm.pem", + Err(UNSUPPORTED_SIGNATURE_ALGORITHM_FOR_RSA_KEY) +); +// XXX: We should have a variant of this test with a SHA-256 digest that gives +// `Error::InvalidSignatureForPublicKey`. +test_verify_signed_data!( + test_ecdsa_prime256v1_sha512_wrong_signature_format, + "ecdsa-prime256v1-sha512-wrong-signature-format.pem", + Err(UNSUPPORTED_ECDSA_SHA512_SIGNATURE) +); +// Differs from Chromium because we don't support P-256 with SHA-512. +test_verify_signed_data!( + test_ecdsa_prime256v1_sha512, + "ecdsa-prime256v1-sha512.pem", + Err(UNSUPPORTED_ECDSA_SHA512_SIGNATURE) +); +test_verify_signed_data!( + test_ecdsa_secp384r1_sha256_corrupted_data, + "ecdsa-secp384r1-sha256-corrupted-data.pem", + Err(Error::InvalidSignatureForPublicKey) +); +test_verify_signed_data!( + test_ecdsa_secp384r1_sha256, + "ecdsa-secp384r1-sha256.pem", + Ok(()) +); +test_verify_signed_data!( + test_ecdsa_using_rsa_key, + "ecdsa-using-rsa-key.pem", + Err(Error::UnsupportedSignatureAlgorithmForPublicKey) +); + +test_parse_spki_bad_outer!( + test_rsa_pkcs1_sha1_bad_key_der_length, + "rsa-pkcs1-sha1-bad-key-der-length.pem", + Error::BadDer +); +test_parse_spki_bad_outer!( + test_rsa_pkcs1_sha1_bad_key_der_null, + "rsa-pkcs1-sha1-bad-key-der-null.pem", + Error::BadDer +); +test_verify_signed_data!( + test_rsa_pkcs1_sha1_key_params_absent, + "rsa-pkcs1-sha1-key-params-absent.pem", + Err(Error::UnsupportedSignatureAlgorithm) +); +test_verify_signed_data!( + test_rsa_pkcs1_sha1_using_pss_key_no_params, + "rsa-pkcs1-sha1-using-pss-key-no-params.pem", + Err(Error::UnsupportedSignatureAlgorithm) +); +test_verify_signed_data!( + test_rsa_pkcs1_sha1_wrong_algorithm, + "rsa-pkcs1-sha1-wrong-algorithm.pem", + Err(INVALID_SIGNATURE_FOR_RSA_KEY) +); +test_verify_signed_data!( + test_rsa_pkcs1_sha1, + "rsa-pkcs1-sha1.pem", + Err(Error::UnsupportedSignatureAlgorithm) +); +// XXX: RSA PKCS#1 with SHA-1 is a supported algorithm, but we only accept +// 2048-8192 bit keys, and this test file is using a 1024 bit key. Thus, +// our results differ from Chromium's. TODO: this means we need a 2048+ bit +// version of this test. +test_verify_signed_data!( + test_rsa_pkcs1_sha256, + "rsa-pkcs1-sha256.pem", + Err(INVALID_SIGNATURE_FOR_RSA_KEY) +); +test_parse_spki_bad_outer!( + test_rsa_pkcs1_sha256_key_encoded_ber, + "rsa-pkcs1-sha256-key-encoded-ber.pem", + Error::BadDer +); +test_verify_signed_data!( + test_rsa_pkcs1_sha256_spki_non_null_params, + "rsa-pkcs1-sha256-spki-non-null-params.pem", + Err(UNSUPPORTED_SIGNATURE_ALGORITHM_FOR_RSA_KEY) +); +test_verify_signed_data!( + test_rsa_pkcs1_sha256_using_ecdsa_algorithm, + "rsa-pkcs1-sha256-using-ecdsa-algorithm.pem", + Err(Error::UnsupportedSignatureAlgorithmForPublicKey) +); +test_verify_signed_data!( + test_rsa_pkcs1_sha256_using_id_ea_rsa, + "rsa-pkcs1-sha256-using-id-ea-rsa.pem", + Err(UNSUPPORTED_SIGNATURE_ALGORITHM_FOR_RSA_KEY) +); + +// Chromium's PSS test are for parameter combinations we don't support. +test_verify_signed_data!( + test_rsa_pss_sha1_salt20_using_pss_key_no_params, + "rsa-pss-sha1-salt20-using-pss-key-no-params.pem", + Err(Error::UnsupportedSignatureAlgorithm) +); +test_verify_signed_data!( + test_rsa_pss_sha1_salt20_using_pss_key_with_null_params, + "rsa-pss-sha1-salt20-using-pss-key-with-null-params.pem", + Err(Error::UnsupportedSignatureAlgorithm) +); +test_verify_signed_data!( + test_rsa_pss_sha1_salt20, + "rsa-pss-sha1-salt20.pem", + Err(Error::UnsupportedSignatureAlgorithm) +); +test_verify_signed_data!( + test_rsa_pss_sha1_wrong_salt, + "rsa-pss-sha1-wrong-salt.pem", + Err(Error::UnsupportedSignatureAlgorithm) +); +test_verify_signed_data!( + test_rsa_pss_sha256_mgf1_sha512_salt33, + "rsa-pss-sha256-mgf1-sha512-salt33.pem", + Err(Error::UnsupportedSignatureAlgorithm) +); +test_verify_signed_data!( + test_rsa_pss_sha256_salt10_using_pss_key_with_params, + "rsa-pss-sha256-salt10-using-pss-key-with-params.pem", + Err(Error::UnsupportedSignatureAlgorithm) +); +test_verify_signed_data!( + test_rsa_pss_sha256_salt10_using_pss_key_with_wrong_params, + "rsa-pss-sha256-salt10-using-pss-key-with-wrong-params.pem", + Err(Error::UnsupportedSignatureAlgorithm) +); +test_verify_signed_data!( + test_rsa_pss_sha256_salt10, + "rsa-pss-sha256-salt10.pem", + Err(Error::UnsupportedSignatureAlgorithm) +); + +// Our PSS tests that should work. +test_verify_signed_data!( + test_rsa_pss_sha256_salt32, + "ours/rsa-pss-sha256-salt32.pem", + OK_IF_RSA_AVAILABLE +); +test_verify_signed_data!( + test_rsa_pss_sha384_salt48, + "ours/rsa-pss-sha384-salt48.pem", + OK_IF_RSA_AVAILABLE +); +test_verify_signed_data!( + test_rsa_pss_sha512_salt64, + "ours/rsa-pss-sha512-salt64.pem", + OK_IF_RSA_AVAILABLE +); +test_verify_signed_data!( + test_rsa_pss_sha256_salt32_corrupted_data, + "ours/rsa-pss-sha256-salt32-corrupted-data.pem", + Err(INVALID_SIGNATURE_FOR_RSA_KEY) +); +test_verify_signed_data!( + test_rsa_pss_sha384_salt48_corrupted_data, + "ours/rsa-pss-sha384-salt48-corrupted-data.pem", + Err(INVALID_SIGNATURE_FOR_RSA_KEY) +); +test_verify_signed_data!( + test_rsa_pss_sha512_salt64_corrupted_data, + "ours/rsa-pss-sha512-salt64-corrupted-data.pem", + Err(INVALID_SIGNATURE_FOR_RSA_KEY) +); + +test_verify_signed_data!( + test_rsa_using_ec_key, + "rsa-using-ec-key.pem", + Err(UNSUPPORTED_SIGNATURE_ALGORITHM_FOR_RSA_KEY) +); +test_verify_signed_data!( + test_rsa2048_pkcs1_sha512, + "rsa2048-pkcs1-sha512.pem", + OK_IF_RSA_AVAILABLE +); + +test_verify_signed_data!( + test_ecdsa_prime256v1_sha256, + "ours/ecdsa-prime256v1-sha256.pem", + Ok(()) +); +test_verify_signed_data!( + test_ecdsa_prime256v1_sha256_compressed, + "ours/ecdsa-prime256v1-sha256-compressed.pem", + OK_IF_POINT_COMPRESSION_SUPPORTED +); +test_verify_signed_data!( + test_ecdsa_prime256v1_sha256_spki_inside_spki, + "ours/ecdsa-prime256v1-sha256-spki-inside-spki.pem", + Err(Error::InvalidSignatureForPublicKey) +); + +struct TestSignedData { + spki: Vec, + data: Vec, + algorithm: Vec, + signature: Vec, +} + +fn parse_test_signed_data(file_contents: &[u8]) -> TestSignedData { + let mut lines = core::str::from_utf8(file_contents).unwrap().lines(); + let spki = read_pem_section(&mut lines, "PUBLIC KEY"); + let algorithm = read_pem_section(&mut lines, "ALGORITHM"); + let data = read_pem_section(&mut lines, "DATA"); + let signature = read_pem_section(&mut lines, "SIGNATURE"); + + TestSignedData { + spki, + data, + algorithm, + signature, + } +} + +use alloc::str::Lines; + +fn read_pem_section(lines: &mut Lines<'_>, section_name: &str) -> Vec { + // Skip comments and header + let begin_section = format!("-----BEGIN {}-----", section_name); + loop { + let line = lines.next().unwrap(); + if line == begin_section { + break; + } + } + + let mut base64 = String::new(); + + let end_section = format!("-----END {}-----", section_name); + loop { + let line = lines.next().unwrap(); + if line == end_section { + break; + } + base64.push_str(line); + } + + general_purpose::STANDARD.decode(&base64).unwrap() +} diff --git a/vendor/rustls-webpki-legacy/src/aws_lc_rs_algs.rs b/vendor/rustls-webpki-legacy/src/aws_lc_rs_algs.rs new file mode 100644 index 00000000000..83cc76c365d --- /dev/null +++ b/vendor/rustls-webpki-legacy/src/aws_lc_rs_algs.rs @@ -0,0 +1,214 @@ +use aws_lc_rs::{signature, try_fips_mode}; +use pki_types::{AlgorithmIdentifier, InvalidSignature, SignatureVerificationAlgorithm}; + +use crate::signed_data::alg_id; + +// nb. aws-lc-rs has an API that is broadly compatible with *ring*, +// so this is very similar to ring_algs.rs. + +/// A `SignatureVerificationAlgorithm` implemented using aws-lc-rs. +#[derive(Debug)] +struct AwsLcRsAlgorithm { + public_key_alg_id: AlgorithmIdentifier, + signature_alg_id: AlgorithmIdentifier, + verification_alg: &'static dyn signature::VerificationAlgorithm, +} + +impl SignatureVerificationAlgorithm for AwsLcRsAlgorithm { + fn public_key_alg_id(&self) -> AlgorithmIdentifier { + self.public_key_alg_id + } + + fn signature_alg_id(&self) -> AlgorithmIdentifier { + self.signature_alg_id + } + + fn verify_signature( + &self, + public_key: &[u8], + message: &[u8], + signature: &[u8], + ) -> Result<(), InvalidSignature> { + if matches!( + self.public_key_alg_id, + alg_id::ECDSA_P256 | alg_id::ECDSA_P384 | alg_id::ECDSA_P521 + ) { + // Restrict the allowed encodings of EC public keys. + // + // "The first octet of the OCTET STRING indicates whether the key is + // compressed or uncompressed. The uncompressed form is indicated + // by 0x04 and the compressed form is indicated by either 0x02 or + // 0x03 (see 2.3.3 in [SEC1]). The public key MUST be rejected if + // any other value is included in the first octet." + // -- + match public_key.first() { + Some(0x04) | Some(0x02) | Some(0x03) => {} + _ => return Err(InvalidSignature), + }; + } + signature::UnparsedPublicKey::new(self.verification_alg, public_key) + .verify(message, signature) + .map_err(|_| InvalidSignature) + } + + fn fips(&self) -> bool { + try_fips_mode().is_ok() + } +} + +/// ECDSA signatures using the P-256 curve and SHA-256. +pub static ECDSA_P256_SHA256: &dyn SignatureVerificationAlgorithm = &AwsLcRsAlgorithm { + public_key_alg_id: alg_id::ECDSA_P256, + signature_alg_id: alg_id::ECDSA_SHA256, + verification_alg: &signature::ECDSA_P256_SHA256_ASN1, +}; + +/// ECDSA signatures using the P-256 curve and SHA-384. Deprecated. +pub static ECDSA_P256_SHA384: &dyn SignatureVerificationAlgorithm = &AwsLcRsAlgorithm { + public_key_alg_id: alg_id::ECDSA_P256, + signature_alg_id: alg_id::ECDSA_SHA384, + verification_alg: &signature::ECDSA_P256_SHA384_ASN1, +}; + +/// ECDSA signatures using the P-384 curve and SHA-256. Deprecated. +pub static ECDSA_P384_SHA256: &dyn SignatureVerificationAlgorithm = &AwsLcRsAlgorithm { + public_key_alg_id: alg_id::ECDSA_P384, + signature_alg_id: alg_id::ECDSA_SHA256, + verification_alg: &signature::ECDSA_P384_SHA256_ASN1, +}; + +/// ECDSA signatures using the P-384 curve and SHA-384. +pub static ECDSA_P384_SHA384: &dyn SignatureVerificationAlgorithm = &AwsLcRsAlgorithm { + public_key_alg_id: alg_id::ECDSA_P384, + signature_alg_id: alg_id::ECDSA_SHA384, + verification_alg: &signature::ECDSA_P384_SHA384_ASN1, +}; + +/// ECDSA signatures using the P-521 curve and SHA-256. +pub static ECDSA_P521_SHA256: &dyn SignatureVerificationAlgorithm = &AwsLcRsAlgorithm { + public_key_alg_id: alg_id::ECDSA_P521, + signature_alg_id: alg_id::ECDSA_SHA256, + verification_alg: &signature::ECDSA_P521_SHA256_ASN1, +}; + +/// ECDSA signatures using the P-521 curve and SHA-384. +pub static ECDSA_P521_SHA384: &dyn SignatureVerificationAlgorithm = &AwsLcRsAlgorithm { + public_key_alg_id: alg_id::ECDSA_P521, + signature_alg_id: alg_id::ECDSA_SHA384, + verification_alg: &signature::ECDSA_P521_SHA384_ASN1, +}; + +/// ECDSA signatures using the P-521 curve and SHA-512. +pub static ECDSA_P521_SHA512: &dyn SignatureVerificationAlgorithm = &AwsLcRsAlgorithm { + public_key_alg_id: alg_id::ECDSA_P521, + signature_alg_id: alg_id::ECDSA_SHA512, + verification_alg: &signature::ECDSA_P521_SHA512_ASN1, +}; + +/// RSA PKCS#1 1.5 signatures using SHA-256 for keys of 2048-8192 bits. +pub static RSA_PKCS1_2048_8192_SHA256: &dyn SignatureVerificationAlgorithm = &AwsLcRsAlgorithm { + public_key_alg_id: alg_id::RSA_ENCRYPTION, + signature_alg_id: alg_id::RSA_PKCS1_SHA256, + verification_alg: &signature::RSA_PKCS1_2048_8192_SHA256, +}; + +/// RSA PKCS#1 1.5 signatures using SHA-384 for keys of 2048-8192 bits. +pub static RSA_PKCS1_2048_8192_SHA384: &dyn SignatureVerificationAlgorithm = &AwsLcRsAlgorithm { + public_key_alg_id: alg_id::RSA_ENCRYPTION, + signature_alg_id: alg_id::RSA_PKCS1_SHA384, + verification_alg: &signature::RSA_PKCS1_2048_8192_SHA384, +}; + +/// RSA PKCS#1 1.5 signatures using SHA-512 for keys of 2048-8192 bits. +pub static RSA_PKCS1_2048_8192_SHA512: &dyn SignatureVerificationAlgorithm = &AwsLcRsAlgorithm { + public_key_alg_id: alg_id::RSA_ENCRYPTION, + signature_alg_id: alg_id::RSA_PKCS1_SHA512, + verification_alg: &signature::RSA_PKCS1_2048_8192_SHA512, +}; + +/// RSA PKCS#1 1.5 signatures using SHA-384 for keys of 3072-8192 bits. +pub static RSA_PKCS1_3072_8192_SHA384: &dyn SignatureVerificationAlgorithm = &AwsLcRsAlgorithm { + public_key_alg_id: alg_id::RSA_ENCRYPTION, + signature_alg_id: alg_id::RSA_PKCS1_SHA384, + verification_alg: &signature::RSA_PKCS1_3072_8192_SHA384, +}; + +/// RSA PSS signatures using SHA-256 for keys of 2048-8192 bits and of +/// type rsaEncryption; see [RFC 4055 Section 1.2]. +/// +/// [RFC 4055 Section 1.2]: https://tools.ietf.org/html/rfc4055#section-1.2 +pub static RSA_PSS_2048_8192_SHA256_LEGACY_KEY: &dyn SignatureVerificationAlgorithm = + &AwsLcRsAlgorithm { + public_key_alg_id: alg_id::RSA_ENCRYPTION, + signature_alg_id: alg_id::RSA_PSS_SHA256, + verification_alg: &signature::RSA_PSS_2048_8192_SHA256, + }; + +/// RSA PSS signatures using SHA-384 for keys of 2048-8192 bits and of +/// type rsaEncryption; see [RFC 4055 Section 1.2]. +/// +/// [RFC 4055 Section 1.2]: https://tools.ietf.org/html/rfc4055#section-1.2 +pub static RSA_PSS_2048_8192_SHA384_LEGACY_KEY: &dyn SignatureVerificationAlgorithm = + &AwsLcRsAlgorithm { + public_key_alg_id: alg_id::RSA_ENCRYPTION, + signature_alg_id: alg_id::RSA_PSS_SHA384, + verification_alg: &signature::RSA_PSS_2048_8192_SHA384, + }; + +/// RSA PSS signatures using SHA-512 for keys of 2048-8192 bits and of +/// type rsaEncryption; see [RFC 4055 Section 1.2]. +/// +/// [RFC 4055 Section 1.2]: https://tools.ietf.org/html/rfc4055#section-1.2 +pub static RSA_PSS_2048_8192_SHA512_LEGACY_KEY: &dyn SignatureVerificationAlgorithm = + &AwsLcRsAlgorithm { + public_key_alg_id: alg_id::RSA_ENCRYPTION, + signature_alg_id: alg_id::RSA_PSS_SHA512, + verification_alg: &signature::RSA_PSS_2048_8192_SHA512, + }; + +/// ED25519 signatures according to RFC 8410 +pub static ED25519: &dyn SignatureVerificationAlgorithm = &AwsLcRsAlgorithm { + public_key_alg_id: alg_id::ED25519, + signature_alg_id: alg_id::ED25519, + verification_alg: &signature::ED25519, +}; + +#[cfg(test)] +#[path = "."] +mod tests { + use crate::Error; + + static SUPPORTED_ALGORITHMS_IN_TESTS: &[&dyn super::SignatureVerificationAlgorithm] = &[ + // Reasonable algorithms. + super::ECDSA_P256_SHA256, + super::ECDSA_P384_SHA384, + super::ECDSA_P521_SHA256, + super::ECDSA_P521_SHA384, + super::ECDSA_P521_SHA512, + super::ED25519, + super::RSA_PKCS1_2048_8192_SHA256, + super::RSA_PKCS1_2048_8192_SHA384, + super::RSA_PKCS1_2048_8192_SHA512, + super::RSA_PKCS1_3072_8192_SHA384, + super::RSA_PSS_2048_8192_SHA256_LEGACY_KEY, + super::RSA_PSS_2048_8192_SHA384_LEGACY_KEY, + super::RSA_PSS_2048_8192_SHA512_LEGACY_KEY, + // Algorithms deprecated because they are nonsensical combinations. + super::ECDSA_P256_SHA384, // Truncates digest. + super::ECDSA_P384_SHA256, // Digest is unnecessarily short. + ]; + + const UNSUPPORTED_SIGNATURE_ALGORITHM_FOR_RSA_KEY: Error = + Error::UnsupportedSignatureAlgorithmForPublicKey; + + const UNSUPPORTED_ECDSA_SHA512_SIGNATURE: Error = + Error::UnsupportedSignatureAlgorithmForPublicKey; + + const INVALID_SIGNATURE_FOR_RSA_KEY: Error = Error::InvalidSignatureForPublicKey; + + const OK_IF_RSA_AVAILABLE: Result<(), Error> = Ok(()); + const OK_IF_POINT_COMPRESSION_SUPPORTED: Result<(), Error> = Ok(()); + + #[path = "alg_tests.rs"] + mod alg_tests; +} diff --git a/vendor/rustls-webpki-legacy/src/cert.rs b/vendor/rustls-webpki-legacy/src/cert.rs new file mode 100644 index 00000000000..966e22b385c --- /dev/null +++ b/vendor/rustls-webpki-legacy/src/cert.rs @@ -0,0 +1,692 @@ +// Copyright 2015 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +#[cfg(feature = "alloc")] +use pki_types::SubjectPublicKeyInfoDer; +use pki_types::{CertificateDer, DnsName}; + +use crate::der::{self, DerIterator, FromDer, Tag, CONSTRUCTED, CONTEXT_SPECIFIC}; +use crate::error::{DerTypeId, Error}; +use crate::public_values_eq; +use crate::signed_data::SignedData; +use crate::subject_name::{GeneralName, NameIterator, WildcardDnsNameRef}; +use crate::x509::{remember_extension, set_extension_once, DistributionPointName, Extension}; + +/// A parsed X509 certificate. +pub struct Cert<'a> { + pub(crate) serial: untrusted::Input<'a>, + pub(crate) signed_data: SignedData<'a>, + pub(crate) issuer: untrusted::Input<'a>, + pub(crate) validity: untrusted::Input<'a>, + pub(crate) subject: untrusted::Input<'a>, + pub(crate) spki: untrusted::Input<'a>, + + pub(crate) basic_constraints: Option>, + // key usage (KU) extension (if any). When validating certificate revocation lists (CRLs) this + // field will be consulted to determine if the cert is allowed to sign CRLs. For cert validation + // this field is ignored (for more detail see in `verify_cert.rs` and + // `check_issuer_independent_properties`). + pub(crate) key_usage: Option>, + pub(crate) eku: Option>, + pub(crate) name_constraints: Option>, + pub(crate) subject_alt_name: Option>, + pub(crate) crl_distribution_points: Option>, + + der: CertificateDer<'a>, +} + +impl<'a> Cert<'a> { + pub(crate) fn from_der(cert_der: untrusted::Input<'a>) -> Result { + let (tbs, signed_data) = + cert_der.read_all(Error::TrailingData(DerTypeId::Certificate), |cert_der| { + der::nested( + cert_der, + der::Tag::Sequence, + Error::TrailingData(DerTypeId::SignedData), + |der| { + // limited to SEQUENCEs of size 2^16 or less. + SignedData::from_der(der, der::TWO_BYTE_DER_SIZE) + }, + ) + })?; + + tbs.read_all( + Error::TrailingData(DerTypeId::CertificateTbsCertificate), + |tbs| { + version3(tbs)?; + + let serial = lenient_certificate_serial_number(tbs)?; + + let signature = der::expect_tag(tbs, der::Tag::Sequence)?; + // TODO: In mozilla::pkix, the comparison is done based on the + // normalized value (ignoring whether or not there is an optional NULL + // parameter for RSA-based algorithms), so this may be too strict. + if !public_values_eq(signature, signed_data.algorithm) { + return Err(Error::SignatureAlgorithmMismatch); + } + + let issuer = der::expect_tag(tbs, der::Tag::Sequence)?; + let validity = der::expect_tag(tbs, der::Tag::Sequence)?; + let subject = der::expect_tag(tbs, der::Tag::Sequence)?; + let spki = der::expect_tag(tbs, der::Tag::Sequence)?; + + // In theory there could be fields [1] issuerUniqueID and [2] + // subjectUniqueID, but in practice there never are, and to keep the + // code small and simple we don't accept any certificates that do + // contain them. + + let mut cert = Cert { + signed_data, + serial, + issuer, + validity, + subject, + spki, + + basic_constraints: None, + key_usage: None, + eku: None, + name_constraints: None, + subject_alt_name: None, + crl_distribution_points: None, + + der: CertificateDer::from(cert_der.as_slice_less_safe()), + }; + + if !tbs.at_end() { + der::nested( + tbs, + der::Tag::ContextSpecificConstructed3, + Error::TrailingData(DerTypeId::CertificateExtensions), + |tagged| { + der::nested_of_mut( + tagged, + der::Tag::Sequence, + der::Tag::Sequence, + Error::TrailingData(DerTypeId::Extension), + |extension| { + remember_cert_extension( + &mut cert, + &Extension::from_der(extension)?, + ) + }, + ) + }, + )?; + } + + Ok(cert) + }, + ) + } + + /// Returns a list of valid DNS names provided in the subject alternative names extension + /// + /// This function must not be used to implement custom DNS name verification. + /// Checking that a certificate is valid for a given subject name should always be done with + /// [EndEntityCert::verify_is_valid_for_subject_name]. + /// + /// [EndEntityCert::verify_is_valid_for_subject_name]: crate::EndEntityCert::verify_is_valid_for_subject_name + pub fn valid_dns_names(&self) -> impl Iterator { + NameIterator::new(Some(self.subject), self.subject_alt_name).filter_map(|result| { + let presented_id = match result.ok()? { + GeneralName::DnsName(presented) => presented, + _ => return None, + }; + + // if the name could be converted to a DNS name, return it; otherwise, + // keep going. + let dns_str = core::str::from_utf8(presented_id.as_slice_less_safe()).ok()?; + match DnsName::try_from(dns_str) { + Ok(_) => Some(dns_str), + Err(_) => { + match WildcardDnsNameRef::try_from_ascii(presented_id.as_slice_less_safe()) { + Ok(wildcard_dns_name) => Some(wildcard_dns_name.as_str()), + Err(_) => None, + } + } + } + }) + } + + /// Raw DER encoded certificate serial number. + pub fn serial(&self) -> &[u8] { + self.serial.as_slice_less_safe() + } + + /// Raw DER encoded certificate issuer. + pub fn issuer(&self) -> &[u8] { + self.issuer.as_slice_less_safe() + } + + /// Raw DER encoded certificate subject. + pub fn subject(&self) -> &[u8] { + self.subject.as_slice_less_safe() + } + + /// Get the RFC 5280-compliant [`SubjectPublicKeyInfoDer`] (SPKI) of this [`Cert`]. + #[cfg(feature = "alloc")] + pub fn subject_public_key_info(&self) -> SubjectPublicKeyInfoDer<'static> { + // Our SPKI representation contains only the content of the RFC 5280 SEQUENCE + // So we wrap the SPKI contents back into a properly-encoded ASN.1 SEQUENCE + SubjectPublicKeyInfoDer::from(der::asn1_wrap( + Tag::Sequence, + self.spki.as_slice_less_safe(), + )) + } + + /// Returns an iterator over the certificate's cRLDistributionPoints extension values, if any. + pub(crate) fn crl_distribution_points( + &self, + ) -> Option, Error>>> { + self.crl_distribution_points.map(DerIterator::new) + } + + /// Raw DER encoded representation of the certificate. + pub fn der(&self) -> CertificateDer<'a> { + self.der.clone() // This is cheap, just cloning a reference. + } +} + +// mozilla::pkix supports v1, v2, v3, and v4, including both the implicit +// (correct) and explicit (incorrect) encoding of v1. We allow only v3. +fn version3(input: &mut untrusted::Reader<'_>) -> Result<(), Error> { + der::nested( + input, + der::Tag::ContextSpecificConstructed0, + Error::UnsupportedCertVersion, + |input| { + let version = u8::from_der(input)?; + if version != 2 { + // v3 + return Err(Error::UnsupportedCertVersion); + } + Ok(()) + }, + ) +} + +pub(crate) fn lenient_certificate_serial_number<'a>( + input: &mut untrusted::Reader<'a>, +) -> Result, Error> { + // https://tools.ietf.org/html/rfc5280#section-4.1.2.2: + // * Conforming CAs MUST NOT use serialNumber values longer than 20 octets." + // * "The serial number MUST be a positive integer [...]" + // + // However, we don't enforce these constraints, as there are widely-deployed trust anchors + // and many X.509 implementations in common use that violate these constraints. This is called + // out by the same section of RFC 5280 as cited above: + // Note: Non-conforming CAs may issue certificates with serial numbers + // that are negative or zero. Certificate users SHOULD be prepared to + // gracefully handle such certificates. + der::expect_tag(input, Tag::Integer) +} + +fn remember_cert_extension<'a>( + cert: &mut Cert<'a>, + extension: &Extension<'a>, +) -> Result<(), Error> { + // We don't do anything with certificate policies so we can safely ignore + // all policy-related stuff. We assume that the policy-related extensions + // are not marked critical. + + remember_extension(extension, |id| { + let out = match id { + // id-ce-keyUsage 2.5.29.15. + 15 => &mut cert.key_usage, + + // id-ce-subjectAltName 2.5.29.17 + 17 => &mut cert.subject_alt_name, + + // id-ce-basicConstraints 2.5.29.19 + 19 => &mut cert.basic_constraints, + + // id-ce-nameConstraints 2.5.29.30 + 30 => &mut cert.name_constraints, + + // id-ce-cRLDistributionPoints 2.5.29.31 + 31 => &mut cert.crl_distribution_points, + + // id-ce-extKeyUsage 2.5.29.37 + 37 => &mut cert.eku, + + // Unsupported extension + _ => return extension.unsupported(), + }; + + set_extension_once(out, || { + extension.value.read_all(Error::BadDer, |value| match id { + // Unlike the other extensions we remember KU is a BitString and not a Sequence. We + // read the raw bytes here and parse at the time of use. + 15 => Ok(value.read_bytes_to_end()), + // All other remembered certificate extensions are wrapped in a Sequence. + _ => der::expect_tag(value, Tag::Sequence), + }) + }) + }) +} + +/// A certificate revocation list (CRL) distribution point, describing a source of +/// CRL information for a given certificate as described in RFC 5280 section 4.2.3.13[^1]. +/// +/// [^1]: +pub(crate) struct CrlDistributionPoint<'a> { + /// distributionPoint describes the location of CRL information. + distribution_point: Option>, + + /// reasons holds a bit flag set of certificate revocation reasons associated with the + /// CRL distribution point. + pub(crate) reasons: Option>, + + /// when the CRL issuer is not the certificate issuer, crl_issuer identifies the issuer of the + /// CRL. + pub(crate) crl_issuer: Option>, +} + +impl<'a> CrlDistributionPoint<'a> { + /// Return the distribution point names (if any). + pub(crate) fn names(&self) -> Result>, Error> { + self.distribution_point + .map(|input| DistributionPointName::from_der(&mut untrusted::Reader::new(input))) + .transpose() + } +} + +impl<'a> FromDer<'a> for CrlDistributionPoint<'a> { + fn from_der(reader: &mut untrusted::Reader<'a>) -> Result { + // RFC 5280 section §4.2.1.13: + // A DistributionPoint consists of three fields, each of which is optional: + // distributionPoint, reasons, and cRLIssuer. + let mut result = CrlDistributionPoint { + distribution_point: None, + reasons: None, + crl_issuer: None, + }; + + der::nested( + reader, + Tag::Sequence, + Error::TrailingData(Self::TYPE_ID), + |der| { + const DISTRIBUTION_POINT_TAG: u8 = CONTEXT_SPECIFIC | CONSTRUCTED; + const REASONS_TAG: u8 = CONTEXT_SPECIFIC | 1; + const CRL_ISSUER_TAG: u8 = CONTEXT_SPECIFIC | CONSTRUCTED | 2; + + while !der.at_end() { + let (tag, value) = der::read_tag_and_get_value(der)?; + match tag { + DISTRIBUTION_POINT_TAG => { + set_extension_once(&mut result.distribution_point, || Ok(value))? + } + REASONS_TAG => set_extension_once(&mut result.reasons, || { + der::bit_string_flags(value) + })?, + CRL_ISSUER_TAG => set_extension_once(&mut result.crl_issuer, || Ok(value))?, + _ => return Err(Error::BadDer), + } + } + + // RFC 5280 section §4.2.1.13: + // a DistributionPoint MUST NOT consist of only the reasons field; either distributionPoint or + // cRLIssuer MUST be present. + match (result.distribution_point, result.crl_issuer) { + (None, None) => Err(Error::MalformedExtensions), + _ => Ok(result), + } + }, + ) + } + + const TYPE_ID: DerTypeId = DerTypeId::CrlDistributionPoint; +} + +#[cfg(test)] +mod tests { + use super::*; + #[cfg(feature = "alloc")] + use crate::crl::RevocationReason; + use std::prelude::v1::*; + + #[test] + // Note: cert::parse_cert is crate-local visibility, and EndEntityCert doesn't expose the + // inner Cert, or the serial number. As a result we test that the raw serial value + // is read correctly here instead of in tests/integration.rs. + fn test_serial_read() { + let ee = include_bytes!("../tests/misc/serial_neg_ee.der"); + let cert = Cert::from_der(untrusted::Input::from(ee)).expect("failed to parse certificate"); + assert_eq!(cert.serial.as_slice_less_safe(), &[255, 33, 82, 65, 17]); + + let ee = include_bytes!("../tests/misc/serial_large_positive.der"); + let cert = Cert::from_der(untrusted::Input::from(ee)).expect("failed to parse certificate"); + assert_eq!( + cert.serial.as_slice_less_safe(), + &[ + 0, 230, 9, 254, 122, 234, 0, 104, 140, 224, 36, 180, 237, 32, 27, 31, 239, 82, 180, + 68, 209 + ] + ) + } + + #[cfg(feature = "alloc")] + #[test] + fn test_spki_read() { + let ee = include_bytes!("../tests/ed25519/ee.der"); + let cert = Cert::from_der(untrusted::Input::from(ee)).expect("failed to parse certificate"); + // How did I get this lovely string of hex bytes? + // openssl x509 -in tests/ed25519/ee.der -pubkey -noout > pubkey.pem + // openssl ec -pubin -in pubkey.pem -outform DER -out pubkey.der + // xxd -plain -cols 1 pubkey.der + let expected_spki = [ + 0x30, 0x2a, 0x30, 0x05, 0x06, 0x03, 0x2b, 0x65, 0x70, 0x03, 0x21, 0x00, 0xfe, 0x5a, + 0x1e, 0x36, 0x6c, 0x17, 0x27, 0x5b, 0xf1, 0x58, 0x1e, 0x3a, 0x0e, 0xe6, 0x56, 0x29, + 0x8d, 0x9e, 0x1b, 0x3f, 0xd3, 0x3f, 0x96, 0x46, 0xef, 0xbf, 0x04, 0x6b, 0xc7, 0x3d, + 0x47, 0x5c, + ]; + assert_eq!(expected_spki, *cert.subject_public_key_info()) + } + + #[test] + #[cfg(feature = "alloc")] + fn test_crl_distribution_point_netflix() { + let ee = include_bytes!("../tests/netflix/ee.der"); + let inter = include_bytes!("../tests/netflix/inter.der"); + let ee_cert = Cert::from_der(untrusted::Input::from(ee)).expect("failed to parse EE cert"); + let cert = + Cert::from_der(untrusted::Input::from(inter)).expect("failed to parse certificate"); + + // The end entity certificate shouldn't have a distribution point. + assert!(ee_cert.crl_distribution_points.is_none()); + + // We expect to be able to parse the intermediate certificate's CRL distribution points. + let crl_distribution_points = cert + .crl_distribution_points() + .expect("missing distribution points extension") + .collect::, Error>>() + .expect("failed to parse distribution points"); + + // There should be one distribution point present. + assert_eq!(crl_distribution_points.len(), 1); + let crl_distribution_point = crl_distribution_points + .first() + .expect("missing distribution point"); + + // The distribution point shouldn't have revocation reasons listed. + assert!(crl_distribution_point.reasons.is_none()); + + // The distribution point shouldn't have a CRL issuer listed. + assert!(crl_distribution_point.crl_issuer.is_none()); + + // We should be able to parse the distribution point name. + let distribution_point_name = crl_distribution_point + .names() + .expect("failed to parse distribution point names") + .expect("missing distribution point name"); + + // We expect the distribution point name to be a sequence of GeneralNames, not a name + // relative to the CRL issuer. + let names = match distribution_point_name { + DistributionPointName::NameRelativeToCrlIssuer => { + panic!("unexpected name relative to crl issuer") + } + DistributionPointName::FullName(names) => names, + }; + + // The general names should parse. + let names = names + .collect::, Error>>() + .expect("failed to parse general names"); + + // There should be one general name. + assert_eq!(names.len(), 1); + let name = names.first().expect("missing general name"); + + // The general name should be a URI matching the expected value. + match name { + GeneralName::UniformResourceIdentifier(uri) => { + assert_eq!( + uri.as_slice_less_safe(), + "http://s.symcb.com/pca3-g3.crl".as_bytes() + ); + } + _ => panic!("unexpected general name type"), + } + } + + #[test] + #[cfg(feature = "alloc")] + fn test_crl_distribution_point_with_reasons() { + let der = include_bytes!("../tests/crl_distrib_point/with_reasons.der"); + let cert = + Cert::from_der(untrusted::Input::from(der)).expect("failed to parse certificate"); + + // We expect to be able to parse the intermediate certificate's CRL distribution points. + let crl_distribution_points = cert + .crl_distribution_points() + .expect("missing distribution points extension") + .collect::, Error>>() + .expect("failed to parse distribution points"); + + // There should be one distribution point present. + assert_eq!(crl_distribution_points.len(), 1); + let crl_distribution_point = crl_distribution_points + .first() + .expect("missing distribution point"); + + // The distribution point should include the expected revocation reasons, and no others. + let reasons = crl_distribution_point + .reasons + .as_ref() + .expect("missing revocation reasons"); + let expected = &[ + RevocationReason::KeyCompromise, + RevocationReason::AffiliationChanged, + ]; + for reason in RevocationReason::iter() { + #[allow(clippy::as_conversions)] + // revocation reason is u8, infallible to convert to usize. + match expected.contains(&reason) { + true => assert!(reasons.bit_set(reason as usize)), + false => assert!(!reasons.bit_set(reason as usize)), + } + } + } + + #[test] + #[cfg(feature = "alloc")] + fn test_crl_distribution_point_with_crl_issuer() { + let der = include_bytes!("../tests/crl_distrib_point/with_crl_issuer.der"); + let cert = + Cert::from_der(untrusted::Input::from(der)).expect("failed to parse certificate"); + + // We expect to be able to parse the intermediate certificate's CRL distribution points. + let crl_distribution_points = cert + .crl_distribution_points() + .expect("missing distribution points extension") + .collect::, Error>>() + .expect("failed to parse distribution points"); + + // There should be one distribution point present. + assert_eq!(crl_distribution_points.len(), 1); + let crl_distribution_point = crl_distribution_points + .first() + .expect("missing distribution point"); + + // The CRL issuer should be present, but not anything else. + assert!(crl_distribution_point.crl_issuer.is_some()); + assert!(crl_distribution_point.distribution_point.is_none()); + assert!(crl_distribution_point.reasons.is_none()); + } + + #[test] + #[cfg(feature = "alloc")] + fn test_crl_distribution_point_bad_der() { + // Created w/ + // ascii2der -i tests/crl_distrib_point/unknown_tag.der.txt -o tests/crl_distrib_point/unknown_tag.der + let der = include_bytes!("../tests/crl_distrib_point/unknown_tag.der"); + let cert = + Cert::from_der(untrusted::Input::from(der)).expect("failed to parse certificate"); + + // We expect there to be a distribution point extension, but parsing it should fail + // due to the unknown tag in the SEQUENCE. + let result = cert + .crl_distribution_points() + .expect("missing distribution points extension") + .collect::, Error>>(); + assert!(matches!(result, Err(Error::BadDer))); + } + + #[test] + #[cfg(feature = "alloc")] + fn test_crl_distribution_point_only_reasons() { + // Created w/ + // ascii2der -i tests/crl_distrib_point/only_reasons.der.txt -o tests/crl_distrib_point/only_reasons.der + let der = include_bytes!("../tests/crl_distrib_point/only_reasons.der"); + let cert = + Cert::from_der(untrusted::Input::from(der)).expect("failed to parse certificate"); + + // We expect there to be a distribution point extension, but parsing it should fail + // because no distribution points or cRLIssuer are set in the SEQUENCE, just reason codes. + let result = cert + .crl_distribution_points() + .expect("missing distribution points extension") + .collect::, Error>>(); + assert!(matches!(result, Err(Error::MalformedExtensions))); + } + + #[test] + #[cfg(feature = "alloc")] + fn test_crl_distribution_point_name_relative_to_issuer() { + let der = include_bytes!("../tests/crl_distrib_point/dp_name_relative_to_issuer.der"); + let cert = + Cert::from_der(untrusted::Input::from(der)).expect("failed to parse certificate"); + + // We expect to be able to parse the intermediate certificate's CRL distribution points. + let crl_distribution_points = cert + .crl_distribution_points() + .expect("missing distribution points extension") + .collect::, Error>>() + .expect("failed to parse distribution points"); + + // There should be one distribution point present. + assert_eq!(crl_distribution_points.len(), 1); + let crl_distribution_point = crl_distribution_points + .first() + .expect("missing distribution point"); + + assert!(crl_distribution_point.crl_issuer.is_none()); + assert!(crl_distribution_point.reasons.is_none()); + + // We should be able to parse the distribution point name. + let distribution_point_name = crl_distribution_point + .names() + .expect("failed to parse distribution point names") + .expect("missing distribution point name"); + + // We expect the distribution point name to be a name relative to the CRL issuer. + assert!(matches!( + distribution_point_name, + DistributionPointName::NameRelativeToCrlIssuer + )); + } + + #[test] + #[cfg(feature = "alloc")] + fn test_crl_distribution_point_unknown_name_tag() { + // Created w/ + // ascii2der -i tests/crl_distrib_point/unknown_dp_name_tag.der.txt > tests/crl_distrib_point/unknown_dp_name_tag.der + let der = include_bytes!("../tests/crl_distrib_point/unknown_dp_name_tag.der"); + let cert = + Cert::from_der(untrusted::Input::from(der)).expect("failed to parse certificate"); + + // We expect to be able to parse the intermediate certificate's CRL distribution points. + let crl_distribution_points = cert + .crl_distribution_points() + .expect("missing distribution points extension") + .collect::, Error>>() + .expect("failed to parse distribution points"); + + // There should be one distribution point present. + assert_eq!(crl_distribution_points.len(), 1); + let crl_distribution_point = crl_distribution_points + .first() + .expect("missing distribution point"); + + // Parsing the distrubition point names should fail due to the unknown name tag. + let result = crl_distribution_point.names(); + assert!(matches!(result, Err(Error::BadDer))) + } + + #[test] + #[cfg(feature = "alloc")] + fn test_crl_distribution_point_multiple() { + let der = include_bytes!("../tests/crl_distrib_point/multiple_distribution_points.der"); + let cert = + Cert::from_der(untrusted::Input::from(der)).expect("failed to parse certificate"); + + // We expect to be able to parse the intermediate certificate's CRL distribution points. + let crl_distribution_points = cert + .crl_distribution_points() + .expect("missing distribution points extension") + .collect::, Error>>() + .expect("failed to parse distribution points"); + + // There should be two distribution points present. + let (point_a, point_b) = ( + crl_distribution_points + .first() + .expect("missing first distribution point"), + crl_distribution_points + .get(1) + .expect("missing second distribution point"), + ); + + fn get_names<'a>( + point: &'a CrlDistributionPoint<'a>, + ) -> impl Iterator, Error>> { + match point + .names() + .expect("failed to parse distribution point names") + .expect("missing distribution point name") + { + DistributionPointName::NameRelativeToCrlIssuer => { + panic!("unexpected relative name") + } + DistributionPointName::FullName(names) => names, + } + } + + fn uri_bytes<'a>(name: &'a GeneralName<'a>) -> &'a [u8] { + match name { + GeneralName::UniformResourceIdentifier(uri) => uri.as_slice_less_safe(), + _ => panic!("unexpected name type"), + } + } + + // We expect to find three URIs across the two distribution points. + let expected_names = [ + "http://example.com/crl.1.der".as_bytes(), + "http://example.com/crl.2.der".as_bytes(), + "http://example.com/crl.3.der".as_bytes(), + ]; + let all_names = get_names(point_a) + .chain(get_names(point_b)) + .collect::, Error>>() + .expect("failed to parse names"); + + assert_eq!( + all_names.iter().map(uri_bytes).collect::>(), + expected_names + ); + } +} diff --git a/vendor/rustls-webpki-legacy/src/crl/mod.rs b/vendor/rustls-webpki-legacy/src/crl/mod.rs new file mode 100644 index 00000000000..84c9bbbeec9 --- /dev/null +++ b/vendor/rustls-webpki-legacy/src/crl/mod.rs @@ -0,0 +1,366 @@ +// Copyright 2023 Daniel McCarney. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +use pki_types::{SignatureVerificationAlgorithm, UnixTime}; + +use crate::error::Error; +use crate::verify_cert::{Budget, PathNode, Role}; +use crate::{der, public_values_eq}; + +use core::fmt::Debug; + +mod types; +pub use types::{ + BorrowedCertRevocationList, BorrowedRevokedCert, CertRevocationList, RevocationReason, +}; +#[cfg(feature = "alloc")] +pub use types::{OwnedCertRevocationList, OwnedRevokedCert}; + +/// Builds a RevocationOptions instance to control how revocation checking is performed. +#[derive(Debug, Copy, Clone)] +pub struct RevocationOptionsBuilder<'a> { + crls: &'a [&'a CertRevocationList<'a>], + + depth: RevocationCheckDepth, + + status_policy: UnknownStatusPolicy, + + expiration_policy: ExpirationPolicy, +} + +impl<'a> RevocationOptionsBuilder<'a> { + /// Create a builder that will perform revocation checking using the provided certificate + /// revocation lists (CRLs). At least one CRL must be provided. + /// + /// Use [RevocationOptionsBuilder::build] to create a [RevocationOptions] instance. + /// + /// By default revocation checking will be performed on both the end-entity (leaf) certificate + /// and intermediate certificates. This can be customized using the + /// [RevocationOptionsBuilder::with_depth] method. + /// + /// By default revocation checking will fail if the revocation status of a certificate cannot + /// be determined. This can be customized using the + /// [RevocationOptionsBuilder::with_status_policy] method. + /// + /// By default revocation checking will *not* fail if the verification time is beyond the time + /// in the CRL nextUpdate field. This can be customized using the + /// [RevocationOptionsBuilder::with_expiration_policy] method. + pub fn new(crls: &'a [&'a CertRevocationList<'a>]) -> Result { + if crls.is_empty() { + return Err(CrlsRequired(())); + } + + Ok(Self { + crls, + depth: RevocationCheckDepth::Chain, + status_policy: UnknownStatusPolicy::Deny, + expiration_policy: ExpirationPolicy::Ignore, + }) + } + + /// Customize the depth at which revocation checking will be performed, controlling + /// whether only the end-entity (leaf) certificate in the chain to a trust anchor will + /// have its revocation status checked, or whether the intermediate certificates will as well. + pub fn with_depth(mut self, depth: RevocationCheckDepth) -> Self { + self.depth = depth; + self + } + + /// Customize whether unknown revocation status is an error, or permitted. + pub fn with_status_policy(mut self, policy: UnknownStatusPolicy) -> Self { + self.status_policy = policy; + self + } + + /// Customize whether the CRL nextUpdate field (i.e. expiration) is enforced. + pub fn with_expiration_policy(mut self, policy: ExpirationPolicy) -> Self { + self.expiration_policy = policy; + self + } + + /// Construct a [RevocationOptions] instance based on the builder's configuration. + pub fn build(self) -> RevocationOptions<'a> { + RevocationOptions { + crls: self.crls, + depth: self.depth, + status_policy: self.status_policy, + expiration_policy: self.expiration_policy, + } + } +} + +/// Describes how revocation checking is performed, if at all. Can be constructed with a +/// [RevocationOptionsBuilder] instance. +#[derive(Debug, Copy, Clone)] +pub struct RevocationOptions<'a> { + pub(crate) crls: &'a [&'a CertRevocationList<'a>], + pub(crate) depth: RevocationCheckDepth, + pub(crate) status_policy: UnknownStatusPolicy, + pub(crate) expiration_policy: ExpirationPolicy, +} + +impl<'a> RevocationOptions<'a> { + #[allow(clippy::too_many_arguments)] + pub(crate) fn check( + &self, + path: &PathNode<'_>, + issuer_subject: untrusted::Input<'_>, + issuer_spki: untrusted::Input<'_>, + issuer_ku: Option>, + supported_sig_algs: &[&dyn SignatureVerificationAlgorithm], + budget: &mut Budget, + time: UnixTime, + ) -> Result, Error> { + assert!(public_values_eq(path.cert.issuer, issuer_subject)); + + // If the policy only specifies checking EndEntity revocation state and we're looking at an + // issuer certificate, return early without considering the certificate's revocation state. + if let (RevocationCheckDepth::EndEntity, Role::Issuer) = (self.depth, path.role()) { + return Ok(None); + } + + let crl = self + .crls + .iter() + .find(|candidate_crl| candidate_crl.authoritative(path)); + + use UnknownStatusPolicy::*; + let crl = match (crl, self.status_policy) { + (Some(crl), _) => crl, + // If the policy allows unknown, return Ok(None) to indicate that the certificate + // was not confirmed as CertNotRevoked, but that this isn't an error condition. + (None, Allow) => return Ok(None), + // Otherwise, this is an error condition based on the provided policy. + (None, _) => return Err(Error::UnknownRevocationStatus), + }; + + // Verify the CRL signature with the issuer SPKI. + // TODO(XXX): consider whether we can refactor so this happens once up-front, instead + // of per-lookup. + // https://github.com/rustls/webpki/issues/81 + crl.verify_signature(supported_sig_algs, issuer_spki, budget) + .map_err(crl_signature_err)?; + + if self.expiration_policy == ExpirationPolicy::Enforce { + crl.check_expiration(time)?; + } + + // Verify that if the issuer has a KeyUsage bitstring it asserts cRLSign. + KeyUsageMode::CrlSign.check(issuer_ku)?; + + // Try to find the cert serial in the verified CRL contents. + let cert_serial = path.cert.serial.as_slice_less_safe(); + match crl.find_serial(cert_serial)? { + None => Ok(Some(CertNotRevoked::assertion())), + Some(_) => Err(Error::CertRevoked), + } + } +} + +// https://www.rfc-editor.org/rfc/rfc5280#section-4.2.1.3 +#[repr(u8)] +#[derive(Clone, Copy)] +enum KeyUsageMode { + // DigitalSignature = 0, + // ContentCommitment = 1, + // KeyEncipherment = 2, + // DataEncipherment = 3, + // KeyAgreement = 4, + // CertSign = 5, + CrlSign = 6, + // EncipherOnly = 7, + // DecipherOnly = 8, +} + +impl KeyUsageMode { + // https://www.rfc-editor.org/rfc/rfc5280#section-4.2.1.3 + fn check(self, input: Option>) -> Result<(), Error> { + let bit_string = match input { + Some(input) => { + der::expect_tag(&mut untrusted::Reader::new(input), der::Tag::BitString)? + } + // While RFC 5280 requires KeyUsage be present, historically the absence of a KeyUsage + // has been treated as "Any Usage". We follow that convention here and assume the absence + // of KeyUsage implies the required_ku_bit_if_present we're checking for. + None => return Ok(()), + }; + + let flags = der::bit_string_flags(bit_string)?; + #[allow(clippy::as_conversions)] // u8 always fits in usize. + match flags.bit_set(self as usize) { + true => Ok(()), + false => Err(Error::IssuerNotCrlSigner), + } + } +} + +// When verifying CRL signed data we want to disambiguate the context of possible errors by mapping +// them to CRL specific variants that a consumer can use to tell the issue was with the CRL's +// signature, not a certificate. +fn crl_signature_err(err: Error) -> Error { + match err { + Error::UnsupportedSignatureAlgorithm => Error::UnsupportedCrlSignatureAlgorithm, + Error::UnsupportedSignatureAlgorithmForPublicKey => { + Error::UnsupportedCrlSignatureAlgorithmForPublicKey + } + Error::InvalidSignatureForPublicKey => Error::InvalidCrlSignatureForPublicKey, + _ => err, + } +} + +/// Describes how much of a certificate chain is checked for revocation status. +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub enum RevocationCheckDepth { + /// Only check the end entity (leaf) certificate's revocation status. + EndEntity, + /// Check the revocation status of the end entity (leaf) and all intermediates. + Chain, +} + +/// Describes how to handle the case where a certificate's revocation status is unknown. +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub enum UnknownStatusPolicy { + /// Treat unknown revocation status permissively, acting as if the certificate were + /// not revoked. + Allow, + /// Treat unknown revocation status as an error condition, yielding + /// [Error::UnknownRevocationStatus]. + Deny, +} + +/// Describes how to handle the nextUpdate field of the CRL (i.e. expiration). +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub enum ExpirationPolicy { + /// Enforce the verification time is before the time in the nextUpdate field. + /// Treats an expired CRL as an error condition yielding [Error::CrlExpired]. + Enforce, + /// Ignore the CRL nextUpdate field. + Ignore, +} + +// Zero-sized marker type representing positive assertion that revocation status was checked +// for a certificate and the result was that the certificate is not revoked. +pub(crate) struct CertNotRevoked(()); + +impl CertNotRevoked { + // Construct a CertNotRevoked marker. + fn assertion() -> Self { + Self(()) + } +} + +#[derive(Debug, Copy, Clone)] +/// An opaque error indicating the caller must provide at least one CRL when building a +/// [RevocationOptions] instance. +pub struct CrlsRequired(pub(crate) ()); + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + // redundant clone, clone_on_copy allowed to verify derived traits. + #[allow(clippy::redundant_clone, clippy::clone_on_copy)] + fn test_revocation_opts_builder() { + // Trying to build a RevocationOptionsBuilder w/o CRLs should err. + let result = RevocationOptionsBuilder::new(&[]); + assert!(matches!(result, Err(CrlsRequired(_)))); + + // The CrlsRequired error should be debug and clone when alloc is enabled. + #[cfg(feature = "alloc")] + { + let err = result.unwrap_err(); + std::println!("{:?}", err.clone()); + } + + // It should be possible to build a revocation options builder with defaults. + let crl = include_bytes!("../../tests/crls/crl.valid.der"); + let crl = BorrowedCertRevocationList::from_der(&crl[..]) + .unwrap() + .into(); + let crls = [&crl]; + let builder = RevocationOptionsBuilder::new(&crls).unwrap(); + #[cfg(feature = "alloc")] + { + // The builder should be debug, and clone when alloc is enabled + std::println!("{:?}", builder); + _ = builder.clone(); + } + let opts = builder.build(); + assert_eq!(opts.depth, RevocationCheckDepth::Chain); + assert_eq!(opts.status_policy, UnknownStatusPolicy::Deny); + assert_eq!(opts.expiration_policy, ExpirationPolicy::Ignore); + assert_eq!(opts.crls.len(), 1); + + // It should be possible to build a revocation options builder with custom depth. + let opts = RevocationOptionsBuilder::new(&crls) + .unwrap() + .with_depth(RevocationCheckDepth::EndEntity) + .build(); + assert_eq!(opts.depth, RevocationCheckDepth::EndEntity); + assert_eq!(opts.status_policy, UnknownStatusPolicy::Deny); + assert_eq!(opts.expiration_policy, ExpirationPolicy::Ignore); + assert_eq!(opts.crls.len(), 1); + + // It should be possible to build a revocation options builder that allows unknown + // revocation status. + let opts = RevocationOptionsBuilder::new(&crls) + .unwrap() + .with_status_policy(UnknownStatusPolicy::Allow) + .build(); + assert_eq!(opts.depth, RevocationCheckDepth::Chain); + assert_eq!(opts.status_policy, UnknownStatusPolicy::Allow); + assert_eq!(opts.expiration_policy, ExpirationPolicy::Ignore); + assert_eq!(opts.crls.len(), 1); + + // It should be possible to specify both depth and unknown status policy together. + let opts = RevocationOptionsBuilder::new(&crls) + .unwrap() + .with_status_policy(UnknownStatusPolicy::Allow) + .with_depth(RevocationCheckDepth::EndEntity) + .build(); + assert_eq!(opts.depth, RevocationCheckDepth::EndEntity); + assert_eq!(opts.status_policy, UnknownStatusPolicy::Allow); + assert_eq!(opts.expiration_policy, ExpirationPolicy::Ignore); + assert_eq!(opts.crls.len(), 1); + + // The same should be true for explicitly forbidding unknown status. + let opts = RevocationOptionsBuilder::new(&crls) + .unwrap() + .with_status_policy(UnknownStatusPolicy::Deny) + .with_depth(RevocationCheckDepth::EndEntity) + .build(); + assert_eq!(opts.depth, RevocationCheckDepth::EndEntity); + assert_eq!(opts.status_policy, UnknownStatusPolicy::Deny); + assert_eq!(opts.expiration_policy, ExpirationPolicy::Ignore); + assert_eq!(opts.crls.len(), 1); + + // It should be possible to build a revocation options builder that allows unknown + // revocation status. + let opts = RevocationOptionsBuilder::new(&crls) + .unwrap() + .with_expiration_policy(ExpirationPolicy::Enforce) + .build(); + assert_eq!(opts.depth, RevocationCheckDepth::Chain); + assert_eq!(opts.status_policy, UnknownStatusPolicy::Deny); + assert_eq!(opts.expiration_policy, ExpirationPolicy::Enforce); + assert_eq!(opts.crls.len(), 1); + + // Built revocation options should be debug and clone when alloc is enabled. + #[cfg(feature = "alloc")] + { + std::println!("{:?}", opts.clone()); + } + } +} diff --git a/vendor/rustls-webpki-legacy/src/crl/types.rs b/vendor/rustls-webpki-legacy/src/crl/types.rs new file mode 100644 index 00000000000..7774f4f1f08 --- /dev/null +++ b/vendor/rustls-webpki-legacy/src/crl/types.rs @@ -0,0 +1,1280 @@ +#[cfg(feature = "alloc")] +use alloc::collections::BTreeMap; +#[cfg(feature = "alloc")] +use alloc::vec::Vec; +use core::fmt::Debug; + +use pki_types::{SignatureVerificationAlgorithm, UnixTime}; + +use crate::cert::lenient_certificate_serial_number; +use crate::crl::crl_signature_err; +use crate::der::{self, DerIterator, FromDer, Tag, CONSTRUCTED, CONTEXT_SPECIFIC}; +use crate::error::{DerTypeId, Error}; +use crate::public_values_eq; +use crate::signed_data::{self, SignedData}; +use crate::subject_name::GeneralName; +use crate::verify_cert::{Budget, PathNode, Role}; +use crate::x509::{remember_extension, set_extension_once, DistributionPointName, Extension}; + +/// A RFC 5280[^1] profile Certificate Revocation List (CRL). +/// +/// May be either an owned, or a borrowed representation. +/// +/// [^1]: +#[derive(Debug)] +pub enum CertRevocationList<'a> { + /// An owned representation of a CRL. + #[cfg(feature = "alloc")] + Owned(OwnedCertRevocationList), + /// A borrowed representation of a CRL. + Borrowed(BorrowedCertRevocationList<'a>), +} + +#[cfg(feature = "alloc")] +impl From for CertRevocationList<'_> { + fn from(crl: OwnedCertRevocationList) -> Self { + Self::Owned(crl) + } +} + +impl<'a> From> for CertRevocationList<'a> { + fn from(crl: BorrowedCertRevocationList<'a>) -> Self { + Self::Borrowed(crl) + } +} + +impl<'a> CertRevocationList<'a> { + /// Return the DER encoded issuer of the CRL. + pub fn issuer(&self) -> &[u8] { + match self { + #[cfg(feature = "alloc")] + CertRevocationList::Owned(crl) => crl.issuer.as_ref(), + CertRevocationList::Borrowed(crl) => crl.issuer.as_slice_less_safe(), + } + } + + /// Return the DER encoded issuing distribution point of the CRL, if any. + pub fn issuing_distribution_point(&self) -> Option<&[u8]> { + match self { + #[cfg(feature = "alloc")] + CertRevocationList::Owned(crl) => crl.issuing_distribution_point.as_deref(), + CertRevocationList::Borrowed(crl) => crl + .issuing_distribution_point + .map(|idp| idp.as_slice_less_safe()), + } + } + + /// Try to find a revoked certificate in the CRL by DER encoded serial number. This + /// may yield an error if the CRL has malformed revoked certificates. + pub fn find_serial(&self, serial: &[u8]) -> Result>, Error> { + match self { + #[cfg(feature = "alloc")] + CertRevocationList::Owned(crl) => crl.find_serial(serial), + CertRevocationList::Borrowed(crl) => crl.find_serial(serial), + } + } + + /// Returns true if the CRL can be considered authoritative for the given certificate. + /// + /// A CRL is considered authoritative for a certificate when: + /// * The certificate issuer matches the CRL issuer and, + /// * The certificate has no CRL distribution points, and the CRL has no issuing distribution + /// point extension. + /// * Or, the certificate has no CRL distribution points, but the the CRL has an issuing + /// distribution point extension with a scope that includes the certificate. + /// * Or, the certificate has CRL distribution points, and the CRL has an issuing + /// distribution point extension with a scope that includes the certificate, and at least + /// one distribution point full name is a URI type general name that can also be found in + /// the CRL issuing distribution point full name general name sequence. + /// * Or, the certificate has CRL distribution points, and the CRL has no issuing + /// distribution point extension. + /// + /// In all other circumstances the CRL is not considered authoritative. + pub(crate) fn authoritative(&self, path: &PathNode<'_>) -> bool { + // In all cases we require that the authoritative CRL have the same issuer + // as the certificate. Recall we do not support indirect CRLs. + if self.issuer() != path.cert.issuer() { + return false; + } + + let crl_idp = match self.issuing_distribution_point() { + // If the CRL has an issuing distribution point, parse it so we can consider its scope + // and compare against the cert CRL distribution points, if present. + Some(crl_idp) => { + match IssuingDistributionPoint::from_der(untrusted::Input::from(crl_idp)) { + Ok(crl_idp) => crl_idp, + Err(_) => return false, // Note: shouldn't happen - we verify IDP at CRL-load. + } + } + // If the CRL has no issuing distribution point we assume the CRL scope + // to be "everything" and consider the CRL authoritative for the cert based on the + // issuer matching. We do not need to consider the certificate's CRL distribution point + // extension (see also https://github.com/rustls/webpki/issues/228). + None => return true, + }; + + crl_idp.authoritative_for(path) + } + + /// Verify the CRL signature using the issuer certificate and a list of supported signature + /// verification algorithms, consuming signature operations from the [`Budget`]. + pub(crate) fn verify_signature( + &self, + supported_sig_algs: &[&dyn SignatureVerificationAlgorithm], + issuer_spki: untrusted::Input<'_>, + budget: &mut Budget, + ) -> Result<(), Error> { + signed_data::verify_signed_data( + supported_sig_algs, + issuer_spki, + &match self { + #[cfg(feature = "alloc")] + CertRevocationList::Owned(crl) => crl.signed_data.borrow(), + CertRevocationList::Borrowed(crl) => SignedData { + data: crl.signed_data.data, + algorithm: crl.signed_data.algorithm, + signature: crl.signed_data.signature, + }, + }, + budget, + ) + .map_err(crl_signature_err) + } + + /// Checks the verification time is before the time in the CRL nextUpdate field. + pub(crate) fn check_expiration(&self, time: UnixTime) -> Result<(), Error> { + let next_update = match self { + #[cfg(feature = "alloc")] + CertRevocationList::Owned(crl) => crl.next_update, + CertRevocationList::Borrowed(crl) => crl.next_update, + }; + + if time >= next_update { + return Err(Error::CrlExpired); + } + + Ok(()) + } +} + +/// Owned representation of a RFC 5280[^1] profile Certificate Revocation List (CRL). +/// +/// [^1]: +#[cfg(feature = "alloc")] +#[derive(Debug, Clone)] +pub struct OwnedCertRevocationList { + /// A map of the revoked certificates contained in then CRL, keyed by the DER encoding + /// of the revoked cert's serial number. + revoked_certs: BTreeMap, OwnedRevokedCert>, + + issuer: Vec, + + issuing_distribution_point: Option>, + + signed_data: signed_data::OwnedSignedData, + + next_update: UnixTime, +} + +#[cfg(feature = "alloc")] +impl OwnedCertRevocationList { + /// Try to parse the given bytes as a RFC 5280[^1] profile Certificate Revocation List (CRL). + /// + /// Webpki does not support: + /// * CRL versions other than version 2. + /// * CRLs missing the next update field. + /// * CRLs missing certificate revocation list extensions. + /// * Delta CRLs. + /// * CRLs larger than (2^32)-1 bytes in size. + /// + /// See [BorrowedCertRevocationList::from_der] for more details. + /// + /// [^1]: + pub fn from_der(crl_der: &[u8]) -> Result { + BorrowedCertRevocationList::from_der(crl_der)?.to_owned() + } + + fn find_serial(&self, serial: &[u8]) -> Result>, Error> { + // note: this is infallible for the owned representation because we process all + // revoked certificates at the time of construction to build the `revoked_certs` map, + // returning any encountered errors at that time. + Ok(self + .revoked_certs + .get(serial) + .map(|owned_revoked_cert| owned_revoked_cert.borrow())) + } +} + +/// Borrowed representation of a RFC 5280[^1] profile Certificate Revocation List (CRL). +/// +/// [^1]: +#[derive(Debug)] +pub struct BorrowedCertRevocationList<'a> { + /// A `SignedData` structure that can be passed to `verify_signed_data`. + signed_data: SignedData<'a>, + + /// Identifies the entity that has signed and issued this + /// CRL. + issuer: untrusted::Input<'a>, + + /// An optional CRL extension that identifies the CRL distribution point and scope for the CRL. + issuing_distribution_point: Option>, + + /// List of certificates revoked by the issuer in this CRL. + revoked_certs: untrusted::Input<'a>, + + next_update: UnixTime, +} + +impl<'a> BorrowedCertRevocationList<'a> { + /// Try to parse the given bytes as a RFC 5280[^1] profile Certificate Revocation List (CRL). + /// + /// Webpki does not support: + /// * CRL versions other than version 2. + /// * CRLs missing the next update field. + /// * CRLs missing certificate revocation list extensions. + /// * Delta CRLs. + /// * CRLs larger than (2^32)-1 bytes in size. + /// + /// [^1]: + pub fn from_der(crl_der: &'a [u8]) -> Result { + der::read_all(untrusted::Input::from(crl_der)) + } + + /// Convert the CRL to an [`OwnedCertRevocationList`]. This may error if any of the revoked + /// certificates in the CRL are malformed or contain unsupported features. + #[cfg(feature = "alloc")] + pub fn to_owned(&self) -> Result { + // Parse and collect the CRL's revoked cert entries, ensuring there are no errors. With + // the full set in-hand, create a lookup map by serial number for fast revocation checking. + let revoked_certs = self + .into_iter() + .collect::, _>>()? + .iter() + .map(|revoked_cert| (revoked_cert.serial_number.to_vec(), revoked_cert.to_owned())) + .collect::>(); + + Ok(OwnedCertRevocationList { + signed_data: self.signed_data.to_owned(), + issuer: self.issuer.as_slice_less_safe().to_vec(), + issuing_distribution_point: self + .issuing_distribution_point + .map(|idp| idp.as_slice_less_safe().to_vec()), + revoked_certs, + next_update: self.next_update, + }) + } + + fn remember_extension(&mut self, extension: &Extension<'a>) -> Result<(), Error> { + remember_extension(extension, |id| { + match id { + // id-ce-cRLNumber 2.5.29.20 - RFC 5280 §5.2.3 + 20 => { + // RFC 5280 §5.2.3: + // CRL verifiers MUST be able to handle CRLNumber values + // up to 20 octets. Conforming CRL issuers MUST NOT use CRLNumber + // values longer than 20 octets. + // + extension.value.read_all(Error::InvalidCrlNumber, |der| { + let crl_number = der::nonnegative_integer(der) + .map_err(|_| Error::InvalidCrlNumber)? + .as_slice_less_safe(); + if crl_number.len() <= 20 { + Ok(crl_number) + } else { + Err(Error::InvalidCrlNumber) + } + })?; + // We enforce the cRLNumber is sensible, but don't retain the value for use. + Ok(()) + } + + // id-ce-deltaCRLIndicator 2.5.29.27 - RFC 5280 §5.2.4 + // We explicitly do not support delta CRLs. + 27 => Err(Error::UnsupportedDeltaCrl), + + // id-ce-issuingDistributionPoint 2.5.29.28 - RFC 5280 §5.2.4 + // We recognize the extension and retain its value for use. + 28 => { + set_extension_once(&mut self.issuing_distribution_point, || Ok(extension.value)) + } + + // id-ce-authorityKeyIdentifier 2.5.29.35 - RFC 5280 §5.2.1, §4.2.1.1 + // We recognize the extension but don't retain its value for use. + 35 => Ok(()), + + // Unsupported extension + _ => extension.unsupported(), + } + }) + } + + fn find_serial(&self, serial: &[u8]) -> Result>, Error> { + for revoked_cert_result in self { + match revoked_cert_result { + Err(e) => return Err(e), + Ok(revoked_cert) => { + if revoked_cert.serial_number.eq(serial) { + return Ok(Some(revoked_cert)); + } + } + } + } + + Ok(None) + } +} + +impl<'a> FromDer<'a> for BorrowedCertRevocationList<'a> { + /// Try to parse the given bytes as a RFC 5280[^1] profile Certificate Revocation List (CRL). + /// + /// Webpki does not support: + /// * CRL versions other than version 2. + /// * CRLs missing the next update field. + /// * CRLs missing certificate revocation list extensions. + /// * Delta CRLs. + /// * CRLs larger than (2^32)-1 bytes in size. + /// + /// [^1]: + fn from_der(reader: &mut untrusted::Reader<'a>) -> Result { + let (tbs_cert_list, signed_data) = der::nested_limited( + reader, + Tag::Sequence, + Error::TrailingData(Self::TYPE_ID), + |signed_der| SignedData::from_der(signed_der, der::MAX_DER_SIZE), + der::MAX_DER_SIZE, + )?; + + let crl = tbs_cert_list.read_all(Error::BadDer, |tbs_cert_list| { + // RFC 5280 §5.1.2.1: + // This optional field describes the version of the encoded CRL. When + // extensions are used, as required by this profile, this field MUST be + // present and MUST specify version 2 (the integer value is 1). + // RFC 5280 §5.2: + // Conforming CRL issuers are REQUIRED to include the authority key + // identifier (Section 5.2.1) and the CRL number (Section 5.2.3) + // extensions in all CRLs issued. + // As a result of the above we parse this as a required section, not OPTIONAL. + // NOTE: Encoded value of version 2 is 1. + if u8::from_der(tbs_cert_list)? != 1 { + return Err(Error::UnsupportedCrlVersion); + } + + // RFC 5280 §5.1.2.2: + // This field MUST contain the same algorithm identifier as the + // signatureAlgorithm field in the sequence CertificateList + let signature = der::expect_tag(tbs_cert_list, Tag::Sequence)?; + if !public_values_eq(signature, signed_data.algorithm) { + return Err(Error::SignatureAlgorithmMismatch); + } + + // RFC 5280 §5.1.2.3: + // The issuer field MUST contain a non-empty X.500 distinguished name (DN). + let issuer = der::expect_tag(tbs_cert_list, Tag::Sequence)?; + + // RFC 5280 §5.1.2.4: + // This field indicates the issue date of this CRL. thisUpdate may be + // encoded as UTCTime or GeneralizedTime. + // We do not presently enforce the correct choice of UTCTime or GeneralizedTime based on + // whether the date is post 2050. + UnixTime::from_der(tbs_cert_list)?; + + // While OPTIONAL in the ASN.1 module, RFC 5280 §5.1.2.5 says: + // Conforming CRL issuers MUST include the nextUpdate field in all CRLs. + // We do not presently enforce the correct choice of UTCTime or GeneralizedTime based on + // whether the date is post 2050. + let next_update = UnixTime::from_der(tbs_cert_list)?; + + // RFC 5280 §5.1.2.6: + // When there are no revoked certificates, the revoked certificates list + // MUST be absent + // TODO(@cpu): Do we care to support empty CRLs if we don't support delta CRLs? + let revoked_certs = if tbs_cert_list.peek(Tag::Sequence.into()) { + der::expect_tag_and_get_value_limited( + tbs_cert_list, + Tag::Sequence, + der::MAX_DER_SIZE, + )? + } else { + untrusted::Input::from(&[]) + }; + + let mut crl = BorrowedCertRevocationList { + signed_data, + issuer, + revoked_certs, + issuing_distribution_point: None, + next_update, + }; + + // RFC 5280 §5.1.2.7: + // This field may only appear if the version is 2 (Section 5.1.2.1). If + // present, this field is a sequence of one or more CRL extensions. + // RFC 5280 §5.2: + // Conforming CRL issuers are REQUIRED to include the authority key + // identifier (Section 5.2.1) and the CRL number (Section 5.2.3) + // extensions in all CRLs issued. + // As a result of the above we parse this as a required section, not OPTIONAL. + der::nested( + tbs_cert_list, + Tag::ContextSpecificConstructed0, + Error::MalformedExtensions, + |tagged| { + der::nested_of_mut( + tagged, + Tag::Sequence, + Tag::Sequence, + Error::TrailingData(DerTypeId::CertRevocationListExtension), + |extension| { + // RFC 5280 §5.2: + // If a CRL contains a critical extension + // that the application cannot process, then the application MUST NOT + // use that CRL to determine the status of certificates. However, + // applications may ignore unrecognized non-critical extensions. + crl.remember_extension(&Extension::from_der(extension)?) + }, + ) + }, + )?; + + Ok(crl) + })?; + + // If an issuing distribution point extension is present, parse it up-front to validate + // that it only uses well-formed and supported features. + if let Some(der) = crl.issuing_distribution_point { + IssuingDistributionPoint::from_der(der)?; + } + + Ok(crl) + } + + const TYPE_ID: DerTypeId = DerTypeId::CertRevocationList; +} + +impl<'a> IntoIterator for &'a BorrowedCertRevocationList<'a> { + type Item = Result, Error>; + type IntoIter = DerIterator<'a, BorrowedRevokedCert<'a>>; + + fn into_iter(self) -> Self::IntoIter { + DerIterator::new(self.revoked_certs) + } +} + +pub(crate) struct IssuingDistributionPoint<'a> { + distribution_point: Option>, + pub(crate) only_contains_user_certs: bool, + pub(crate) only_contains_ca_certs: bool, + pub(crate) only_some_reasons: Option>, + pub(crate) indirect_crl: bool, + pub(crate) only_contains_attribute_certs: bool, +} + +impl<'a> IssuingDistributionPoint<'a> { + pub(crate) fn from_der(der: untrusted::Input<'a>) -> Result { + const DISTRIBUTION_POINT_TAG: u8 = CONTEXT_SPECIFIC | CONSTRUCTED; + const ONLY_CONTAINS_USER_CERTS_TAG: u8 = CONTEXT_SPECIFIC | 1; + const ONLY_CONTAINS_CA_CERTS_TAG: u8 = CONTEXT_SPECIFIC | 2; + const ONLY_CONTAINS_SOME_REASONS_TAG: u8 = CONTEXT_SPECIFIC | 3; + const INDIRECT_CRL_TAG: u8 = CONTEXT_SPECIFIC | 4; + const ONLY_CONTAINS_ATTRIBUTE_CERTS_TAG: u8 = CONTEXT_SPECIFIC | 5; + + let mut result = IssuingDistributionPoint { + distribution_point: None, + only_contains_user_certs: false, + only_contains_ca_certs: false, + only_some_reasons: None, + indirect_crl: false, + only_contains_attribute_certs: false, + }; + + // Note: we can't use der::optional_boolean here because the distribution point + // booleans are context specific primitives and der::optional_boolean expects + // to unwrap a Tag::Boolean constructed value. + fn decode_bool(value: untrusted::Input<'_>) -> Result { + let mut reader = untrusted::Reader::new(value); + let value = reader.read_byte().map_err(der::end_of_input_err)?; + if !reader.at_end() { + return Err(Error::BadDer); + } + match value { + 0xFF => Ok(true), + 0x00 => Ok(false), // non-conformant explicit encoding allowed for compat. + _ => Err(Error::BadDer), + } + } + + // RFC 5280 section §4.2.1.13: + der::nested( + &mut untrusted::Reader::new(der), + Tag::Sequence, + Error::TrailingData(DerTypeId::IssuingDistributionPoint), + |der| { + while !der.at_end() { + let (tag, value) = der::read_tag_and_get_value(der)?; + match tag { + DISTRIBUTION_POINT_TAG => { + set_extension_once(&mut result.distribution_point, || Ok(value))? + } + ONLY_CONTAINS_USER_CERTS_TAG => { + result.only_contains_user_certs = decode_bool(value)? + } + ONLY_CONTAINS_CA_CERTS_TAG => { + result.only_contains_ca_certs = decode_bool(value)? + } + ONLY_CONTAINS_SOME_REASONS_TAG => { + set_extension_once(&mut result.only_some_reasons, || { + der::bit_string_flags(value) + })? + } + INDIRECT_CRL_TAG => result.indirect_crl = decode_bool(value)?, + ONLY_CONTAINS_ATTRIBUTE_CERTS_TAG => { + result.only_contains_attribute_certs = decode_bool(value)? + } + _ => return Err(Error::BadDer), + } + } + + Ok(()) + }, + )?; + + // RFC 5280 4.2.1.10: + // Conforming CRLs issuers MUST set the onlyContainsAttributeCerts boolean to FALSE. + if result.only_contains_attribute_certs { + return Err(Error::MalformedExtensions); + } + + // We don't support indirect CRLs. + if result.indirect_crl { + return Err(Error::UnsupportedIndirectCrl); + } + + // We don't support CRLs partitioned by revocation reason. + if result.only_some_reasons.is_some() { + return Err(Error::UnsupportedRevocationReasonsPartitioning); + } + + // We require a distribution point, and it must be a full name. + use DistributionPointName::*; + match result.names() { + Ok(Some(FullName(_))) => Ok(result), + Ok(Some(NameRelativeToCrlIssuer)) | Ok(None) => { + Err(Error::UnsupportedCrlIssuingDistributionPoint) + } + Err(_) => Err(Error::MalformedExtensions), + } + } + + /// Return the distribution point names (if any). + pub(crate) fn names(&self) -> Result>, Error> { + self.distribution_point + .map(|input| DistributionPointName::from_der(&mut untrusted::Reader::new(input))) + .transpose() + } + + /// Returns true if the CRL can be considered authoritative for the given certificate. We make + /// this determination using the certificate and CRL issuers, and the distribution point names + /// that may be present in extensions found on both. + /// + /// We consider the CRL authoritative for the certificate if the CRL issuing distribution point + /// has a scope that could include the cert and if the cert has CRL distribution points, that + /// at least one CRL DP has a valid distribution point full name where one of the general names + /// is a Uniform Resource Identifier (URI) general name that can also be found in the CRL + /// issuing distribution point. + /// + /// We do not consider: + /// * Distribution point names relative to an issuer. + /// * General names of a type other than URI. + /// * Malformed names or invalid IDP or CRL DP extensions. + pub(crate) fn authoritative_for(&self, node: &PathNode<'a>) -> bool { + assert!(!self.only_contains_attribute_certs); // We check this at time of parse. + + // Check that the scope of the CRL issuing distribution point could include the cert. + if self.only_contains_ca_certs && node.role() != Role::Issuer + || self.only_contains_user_certs && node.role() != Role::EndEntity + { + return false; + } + + let cert_dps = match node.cert.crl_distribution_points() { + // If the certificate has no distribution points, then the CRL can be authoritative + // based on the issuer matching and the scope including the cert. + None => return true, + Some(cert_dps) => cert_dps, + }; + + let mut idp_general_names = match self.names() { + Ok(Some(DistributionPointName::FullName(general_names))) => general_names, + _ => return false, // Note: Either no full names, or malformed. Shouldn't occur, we check at CRL parse time. + }; + + for cert_dp in cert_dps { + let cert_dp = match cert_dp { + Ok(cert_dp) => cert_dp, + // certificate CRL DP was invalid, can't match. + Err(_) => return false, + }; + + // If the certificate CRL DP was for an indirect CRL, or a CRL + // sharded by revocation reason, it can't match. + if cert_dp.crl_issuer.is_some() || cert_dp.reasons.is_some() { + return false; + } + + let mut dp_general_names = match cert_dp.names() { + Ok(Some(DistributionPointName::FullName(general_names))) => general_names, + _ => return false, // Either no full names, or malformed. + }; + + // At least one URI type name in the IDP full names must match a URI type name in the + // DP full names. + if Self::uri_name_in_common(&mut idp_general_names, &mut dp_general_names) { + return true; + } + } + + false + } + + fn uri_name_in_common( + idp_general_names: &mut DerIterator<'a, GeneralName<'a>>, + dp_general_names: &mut DerIterator<'a, GeneralName<'a>>, + ) -> bool { + use GeneralName::UniformResourceIdentifier; + for name in idp_general_names.flatten() { + let uri = match name { + UniformResourceIdentifier(uri) => uri, + _ => continue, + }; + + for other_name in (&mut *dp_general_names).flatten() { + match other_name { + UniformResourceIdentifier(other_uri) + if uri.as_slice_less_safe() == other_uri.as_slice_less_safe() => + { + return true + } + _ => continue, + } + } + } + false + } +} + +/// Owned representation of a RFC 5280[^1] profile Certificate Revocation List (CRL) revoked +/// certificate entry. +/// +/// Only available when the "alloc" feature is enabled. +/// +/// [^1]: +#[cfg(feature = "alloc")] +#[derive(Clone, Debug)] +pub struct OwnedRevokedCert { + /// Serial number of the revoked certificate. + pub serial_number: Vec, + + /// The date at which the CA processed the revocation. + pub revocation_date: UnixTime, + + /// Identifies the reason for the certificate revocation. When absent, the revocation reason + /// is assumed to be RevocationReason::Unspecified. For consistency with other extensions + /// and to ensure only one revocation reason extension may be present we maintain this field + /// as optional instead of defaulting to unspecified. + pub reason_code: Option, + + /// Provides the date on which it is known or suspected that the private key was compromised or + /// that the certificate otherwise became invalid. This date may be earlier than the revocation + /// date which is the date at which the CA processed the revocation. + pub invalidity_date: Option, +} + +#[cfg(feature = "alloc")] +impl OwnedRevokedCert { + /// Convert the owned representation of this revoked cert to a borrowed version. + pub fn borrow(&self) -> BorrowedRevokedCert<'_> { + BorrowedRevokedCert { + serial_number: &self.serial_number, + revocation_date: self.revocation_date, + reason_code: self.reason_code, + invalidity_date: self.invalidity_date, + } + } +} + +/// Borrowed representation of a RFC 5280[^1] profile Certificate Revocation List (CRL) revoked +/// certificate entry. +/// +/// [^1]: +#[derive(Debug)] +pub struct BorrowedRevokedCert<'a> { + /// Serial number of the revoked certificate. + pub serial_number: &'a [u8], + + /// The date at which the CA processed the revocation. + pub revocation_date: UnixTime, + + /// Identifies the reason for the certificate revocation. When absent, the revocation reason + /// is assumed to be RevocationReason::Unspecified. For consistency with other extensions + /// and to ensure only one revocation reason extension may be present we maintain this field + /// as optional instead of defaulting to unspecified. + pub reason_code: Option, + + /// Provides the date on which it is known or suspected that the private key was compromised or + /// that the certificate otherwise became invalid. This date may be earlier than the revocation + /// date which is the date at which the CA processed the revocation. + pub invalidity_date: Option, +} + +impl<'a> BorrowedRevokedCert<'a> { + /// Construct an owned representation of the revoked certificate. + #[cfg(feature = "alloc")] + pub fn to_owned(&self) -> OwnedRevokedCert { + OwnedRevokedCert { + serial_number: self.serial_number.to_vec(), + revocation_date: self.revocation_date, + reason_code: self.reason_code, + invalidity_date: self.invalidity_date, + } + } + + fn remember_extension(&mut self, extension: &Extension<'a>) -> Result<(), Error> { + remember_extension(extension, |id| { + match id { + // id-ce-cRLReasons 2.5.29.21 - RFC 5280 §5.3.1. + 21 => set_extension_once(&mut self.reason_code, || der::read_all(extension.value)), + + // id-ce-invalidityDate 2.5.29.24 - RFC 5280 §5.3.2. + 24 => set_extension_once(&mut self.invalidity_date, || { + extension.value.read_all(Error::BadDer, UnixTime::from_der) + }), + + // id-ce-certificateIssuer 2.5.29.29 - RFC 5280 §5.3.3. + // This CRL entry extension identifies the certificate issuer associated + // with an entry in an indirect CRL, that is, a CRL that has the + // indirectCRL indicator set in its issuing distribution point + // extension. + // We choose not to support indirect CRLs and so turn this into a more specific + // error rather than simply letting it fail as an unsupported critical extension. + 29 => Err(Error::UnsupportedIndirectCrl), + + // Unsupported extension + _ => extension.unsupported(), + } + }) + } +} + +impl<'a> FromDer<'a> for BorrowedRevokedCert<'a> { + fn from_der(reader: &mut untrusted::Reader<'a>) -> Result { + der::nested( + reader, + Tag::Sequence, + Error::TrailingData(DerTypeId::RevokedCertEntry), + |der| { + // RFC 5280 §4.1.2.2: + // Certificate users MUST be able to handle serialNumber values up to 20 octets. + // Conforming CAs MUST NOT use serialNumber values longer than 20 octets. + // + // Note: Non-conforming CAs may issue certificates with serial numbers + // that are negative or zero. Certificate users SHOULD be prepared to + // gracefully handle such certificates. + // Like the handling in cert.rs we choose to be lenient here, not enforcing the length + // of a CRL revoked certificate's serial number is less than 20 octets in encoded form. + let serial_number = lenient_certificate_serial_number(der) + .map_err(|_| Error::InvalidSerialNumber)? + .as_slice_less_safe(); + + let revocation_date = UnixTime::from_der(der)?; + + let mut revoked_cert = BorrowedRevokedCert { + serial_number, + revocation_date, + reason_code: None, + invalidity_date: None, + }; + + // RFC 5280 §5.3: + // Support for the CRL entry extensions defined in this specification is + // optional for conforming CRL issuers and applications. However, CRL + // issuers SHOULD include reason codes (Section 5.3.1) and invalidity + // dates (Section 5.3.2) whenever this information is available. + if der.at_end() { + return Ok(revoked_cert); + } + + // It would be convenient to use der::nested_of_mut here to unpack a SEQUENCE of one or + // more SEQUENCEs, however CAs have been mis-encoding the absence of extensions as an + // empty SEQUENCE so we must be tolerant of that. + let ext_seq = der::expect_tag(der, Tag::Sequence)?; + if ext_seq.is_empty() { + return Ok(revoked_cert); + } + + let mut reader = untrusted::Reader::new(ext_seq); + loop { + der::nested( + &mut reader, + Tag::Sequence, + Error::TrailingData(DerTypeId::RevokedCertificateExtension), + |ext_der| { + // RFC 5280 §5.3: + // If a CRL contains a critical CRL entry extension that the application cannot + // process, then the application MUST NOT use that CRL to determine the + // status of any certificates. However, applications may ignore + // unrecognized non-critical CRL entry extensions. + revoked_cert.remember_extension(&Extension::from_der(ext_der)?) + }, + )?; + if reader.at_end() { + break; + } + } + + Ok(revoked_cert) + }, + ) + } + + const TYPE_ID: DerTypeId = DerTypeId::RevokedCertificate; +} + +/// Identifies the reason a certificate was revoked. +/// See [RFC 5280 §5.3.1][1] +/// +/// [1]: +#[derive(Debug, Clone, Copy, Eq, PartialEq)] +#[allow(missing_docs)] // Not much to add above the code name. +pub enum RevocationReason { + /// Unspecified should not be used, and is instead assumed by the absence of a RevocationReason + /// extension. + Unspecified = 0, + KeyCompromise = 1, + CaCompromise = 2, + AffiliationChanged = 3, + Superseded = 4, + CessationOfOperation = 5, + CertificateHold = 6, + // 7 is not used. + /// RemoveFromCrl only appears in delta CRLs that are unsupported. + RemoveFromCrl = 8, + PrivilegeWithdrawn = 9, + AaCompromise = 10, +} + +impl RevocationReason { + /// Return an iterator over all possible [RevocationReason] variants. + pub fn iter() -> impl Iterator { + use RevocationReason::*; + [ + Unspecified, + KeyCompromise, + CaCompromise, + AffiliationChanged, + Superseded, + CessationOfOperation, + CertificateHold, + RemoveFromCrl, + PrivilegeWithdrawn, + AaCompromise, + ] + .into_iter() + } +} + +impl<'a> FromDer<'a> for RevocationReason { + // RFC 5280 §5.3.1. + fn from_der(reader: &mut untrusted::Reader<'a>) -> Result { + let input = der::expect_tag(reader, Tag::Enum)?; + Self::try_from(input.read_all(Error::BadDer, |reason| { + reason.read_byte().map_err(|_| Error::BadDer) + })?) + } + + const TYPE_ID: DerTypeId = DerTypeId::RevocationReason; +} + +impl TryFrom for RevocationReason { + type Error = Error; + + fn try_from(value: u8) -> Result { + // See https://www.rfc-editor.org/rfc/rfc5280#section-5.3.1 + match value { + 0 => Ok(Self::Unspecified), + 1 => Ok(Self::KeyCompromise), + 2 => Ok(Self::CaCompromise), + 3 => Ok(Self::AffiliationChanged), + 4 => Ok(Self::Superseded), + 5 => Ok(Self::CessationOfOperation), + 6 => Ok(Self::CertificateHold), + // 7 is not used. + 8 => Ok(Self::RemoveFromCrl), + 9 => Ok(Self::PrivilegeWithdrawn), + 10 => Ok(Self::AaCompromise), + _ => Err(Error::UnsupportedRevocationReason), + } + } +} + +#[cfg(feature = "alloc")] +#[cfg(test)] +mod tests { + use std::time::Duration; + + use pki_types::CertificateDer; + use std::prelude::v1::*; + use std::println; + + use super::*; + use crate::cert::Cert; + use crate::end_entity::EndEntityCert; + use crate::verify_cert::PartialPath; + + #[test] + fn parse_issuing_distribution_point_ext() { + let crl = include_bytes!("../../tests/crls/crl.idp.valid.der"); + let crl = BorrowedCertRevocationList::from_der(&crl[..]).unwrap(); + + // We should be able to parse the issuing distribution point extension. + let crl_issuing_dp = crl + .issuing_distribution_point + .expect("missing crl distribution point DER"); + + #[cfg(feature = "alloc")] + { + // We should also be able to find the distribution point extensions bytes from + // an owned representation of the CRL. + let owned_crl = crl.to_owned().unwrap(); + assert!(owned_crl.issuing_distribution_point.is_some()); + } + + let crl_issuing_dp = IssuingDistributionPoint::from_der(untrusted::Input::from( + crl_issuing_dp.as_slice_less_safe(), + )) + .expect("failed to parse issuing distribution point DER"); + + // We don't expect any of the bool fields to have been set true. + assert!(!crl_issuing_dp.only_contains_user_certs); + assert!(!crl_issuing_dp.only_contains_ca_certs); + assert!(!crl_issuing_dp.indirect_crl); + + // Since the issuing distribution point doesn't specify the optional onlySomeReasons field, + // we shouldn't find that it was parsed. + assert!(crl_issuing_dp.only_some_reasons.is_none()); + + // We should find the expected URI distribution point name. + let dp_name = crl_issuing_dp + .names() + .expect("failed to parse distribution point names") + .expect("missing distribution point name"); + let uri = match dp_name { + DistributionPointName::NameRelativeToCrlIssuer => { + panic!("unexpected relative dp name") + } + DistributionPointName::FullName(general_names) => { + general_names.map(|general_name| match general_name { + Ok(GeneralName::UniformResourceIdentifier(uri)) => uri.as_slice_less_safe(), + _ => panic!("unexpected general name type"), + }) + } + } + .collect::>(); + let expected = &["http://crl.trustcor.ca/sub/dv-ssl-rsa-s-0.crl".as_bytes()]; + assert_eq!(uri, expected); + } + + #[test] + fn test_issuing_distribution_point_only_user_certs() { + let crl = include_bytes!("../../tests/crls/crl.idp.only_user_certs.der"); + let crl = BorrowedCertRevocationList::from_der(&crl[..]).unwrap(); + + // We should be able to parse the issuing distribution point extension. + let crl_issuing_dp = crl + .issuing_distribution_point + .expect("missing crl distribution point DER"); + let crl_issuing_dp = IssuingDistributionPoint::from_der(crl_issuing_dp) + .expect("failed to parse issuing distribution point DER"); + + // We should find the expected bool state. + assert!(crl_issuing_dp.only_contains_user_certs); + + // The IDP shouldn't be considered authoritative for a CA Cert. + let ee = CertificateDer::from( + &include_bytes!("../../tests/client_auth_revocation/no_crl_ku_chain.ee.der")[..], + ); + let ee = EndEntityCert::try_from(&ee).unwrap(); + let ca = include_bytes!("../../tests/client_auth_revocation/no_crl_ku_chain.int.a.ca.der"); + let ca = Cert::from_der(untrusted::Input::from(&ca[..])).unwrap(); + + let mut path = PartialPath::new(&ee); + path.push(ca).unwrap(); + + assert!(!crl_issuing_dp.authoritative_for(&path.node())); + } + + #[test] + fn test_issuing_distribution_point_only_ca_certs() { + let crl = include_bytes!("../../tests/crls/crl.idp.only_ca_certs.der"); + let crl = BorrowedCertRevocationList::from_der(&crl[..]).unwrap(); + + // We should be able to parse the issuing distribution point extension. + let crl_issuing_dp = crl + .issuing_distribution_point + .expect("missing crl distribution point DER"); + let crl_issuing_dp = IssuingDistributionPoint::from_der(crl_issuing_dp) + .expect("failed to parse issuing distribution point DER"); + + // We should find the expected bool state. + assert!(crl_issuing_dp.only_contains_ca_certs); + + // The IDP shouldn't be considered authoritative for an EE Cert. + let ee = CertificateDer::from( + &include_bytes!("../../tests/client_auth_revocation/no_crl_ku_chain.ee.der")[..], + ); + let ee = EndEntityCert::try_from(&ee).unwrap(); + let path = PartialPath::new(&ee); + + assert!(!crl_issuing_dp.authoritative_for(&path.node())); + } + + #[test] + fn test_issuing_distribution_point_indirect() { + let crl = include_bytes!("../../tests/crls/crl.idp.indirect_crl.der"); + // We should encounter an error parsing a CRL with an IDP extension that indicates it's an + // indirect CRL. + let result = BorrowedCertRevocationList::from_der(&crl[..]); + assert!(matches!(result, Err(Error::UnsupportedIndirectCrl))); + } + + #[test] + fn test_issuing_distribution_only_attribute_certs() { + let crl = include_bytes!("../../tests/crls/crl.idp.only_attribute_certs.der"); + // We should find an error when we parse a CRL with an IDP extension that indicates it only + // contains attribute certs. + let result = BorrowedCertRevocationList::from_der(&crl[..]); + assert!(matches!(result, Err(Error::MalformedExtensions))); + } + + #[test] + fn test_issuing_distribution_only_some_reasons() { + let crl = include_bytes!("../../tests/crls/crl.idp.only_some_reasons.der"); + // We should encounter an error parsing a CRL with an IDP extension that indicates it's + // partitioned by revocation reason. + let result = BorrowedCertRevocationList::from_der(&crl[..]); + assert!(matches!( + result, + Err(Error::UnsupportedRevocationReasonsPartitioning) + )); + } + + #[test] + fn test_issuing_distribution_invalid_bool() { + // Created w/ + // ascii2der -i tests/crls/crl.idp.invalid.bool.der.txt -o tests/crls/crl.idp.invalid.bool.der + let crl = include_bytes!("../../tests/crls/crl.idp.invalid.bool.der"); + // We should encounter an error parsing a CRL with an IDP extension with an invalid encoded boolean. + let result = BorrowedCertRevocationList::from_der(&crl[..]); + assert!(matches!(result, Err(Error::BadDer))) + } + + #[test] + fn test_issuing_distribution_explicit_false_bool() { + // Created w/ + // ascii2der -i tests/crls/crl.idp.explicit.false.bool.der.txt -o tests/crls/crl.idp.explicit.false.bool.der + let crl = include_bytes!("../../tests/crls/crl.idp.explicit.false.bool.der"); + let crl = BorrowedCertRevocationList::from_der(&crl[..]).unwrap(); + + // We should be able to parse the issuing distribution point extension. + let crl_issuing_dp = crl + .issuing_distribution_point + .expect("missing crl distribution point DER"); + assert!(IssuingDistributionPoint::from_der(crl_issuing_dp).is_ok()); + } + + #[test] + fn test_issuing_distribution_unknown_tag() { + // Created w/ + // ascii2der -i tests/crls/crl.idp.unknown.tag.der.txt -o tests/crls/crl.idp.unknown.tag.der + let crl = include_bytes!("../../tests/crls/crl.idp.unknown.tag.der"); + // We should encounter an error parsing a CRL with an invalid IDP extension. + let result = BorrowedCertRevocationList::from_der(&crl[..]); + assert!(matches!(result, Err(Error::BadDer))); + } + + #[test] + fn test_issuing_distribution_invalid_name() { + // Created w/ + // ascii2der -i tests/crls/crl.idp.invalid.name.der.txt -o tests/crls/crl.idp.invalid.name.der + let crl = include_bytes!("../../tests/crls/crl.idp.invalid.name.der"); + + // We should encounter an error parsing a CRL with an invalid issuing distribution point name. + let result = BorrowedCertRevocationList::from_der(&crl[..]); + assert!(matches!(result, Err(Error::MalformedExtensions))) + } + + #[test] + fn test_issuing_distribution_relative_name() { + let crl = include_bytes!("../../tests/crls/crl.idp.name_relative_to_issuer.der"); + // We should encounter an error parsing a CRL with an issuing distribution point extension + // that has a distribution point name relative to an issuer. + let result = BorrowedCertRevocationList::from_der(&crl[..]); + assert!(matches!( + result, + Err(Error::UnsupportedCrlIssuingDistributionPoint) + )) + } + + #[test] + fn test_issuing_distribution_no_name() { + let crl = include_bytes!("../../tests/crls/crl.idp.no_distribution_point_name.der"); + // We should encounter an error parsing a CRL with an issuing distribution point extension + // that has no distribution point name. + let result = BorrowedCertRevocationList::from_der(&crl[..]); + assert!(matches!( + result, + Err(Error::UnsupportedCrlIssuingDistributionPoint) + )) + } + + #[test] + fn revocation_reasons() { + // Test that we can convert the allowed u8 revocation reason code values into the expected + // revocation reason variant. + let testcases: Vec<(u8, RevocationReason)> = vec![ + (0, RevocationReason::Unspecified), + (1, RevocationReason::KeyCompromise), + (2, RevocationReason::CaCompromise), + (3, RevocationReason::AffiliationChanged), + (4, RevocationReason::Superseded), + (5, RevocationReason::CessationOfOperation), + (6, RevocationReason::CertificateHold), + // Note: 7 is unused. + (8, RevocationReason::RemoveFromCrl), + (9, RevocationReason::PrivilegeWithdrawn), + (10, RevocationReason::AaCompromise), + ]; + for tc in testcases.iter() { + let (id, expected) = tc; + let actual = >::try_into(*id) + .expect("unexpected reason code conversion error"); + assert_eq!(actual, *expected); + #[cfg(feature = "alloc")] + { + // revocation reasons should be Debug. + println!("{:?}", actual); + } + } + + // Unsupported/unknown revocation reason codes should produce an error. + let res = >::try_into(7); + assert!(matches!(res, Err(Error::UnsupportedRevocationReason))); + + // The iterator should produce all possible revocation reason variants. + let expected = testcases + .iter() + .map(|(_, reason)| *reason) + .collect::>(); + let actual = RevocationReason::iter().collect::>(); + assert_eq!(actual, expected); + } + + #[test] + // redundant clone, clone_on_copy allowed to verify derived traits. + #[allow(clippy::redundant_clone, clippy::clone_on_copy)] + fn test_derived_traits() { + let crl = + BorrowedCertRevocationList::from_der(include_bytes!("../../tests/crls/crl.valid.der")) + .unwrap(); + println!("{:?}", crl); // BorrowedCertRevocationList should be debug. + + let owned_crl = crl.to_owned().unwrap(); + println!("{:?}", owned_crl); // OwnedCertRevocationList should be debug. + let _ = owned_crl.clone(); // OwnedCertRevocationList should be clone. + + let mut revoked_certs = crl.into_iter(); + println!("{:?}", revoked_certs); // RevokedCert should be debug. + + let revoked_cert = revoked_certs.next().unwrap().unwrap(); + println!("{:?}", revoked_cert); // BorrowedRevokedCert should be debug. + + let owned_revoked_cert = revoked_cert.to_owned(); + println!("{:?}", owned_revoked_cert); // OwnedRevokedCert should be debug. + let _ = owned_revoked_cert.clone(); // OwnedRevokedCert should be clone. + } + + #[test] + fn test_enum_conversions() { + let crl = + include_bytes!("../../tests/client_auth_revocation/ee_revoked_crl_ku_ee_depth.crl.der"); + let borrowed_crl = BorrowedCertRevocationList::from_der(&crl[..]).unwrap(); + let owned_crl = borrowed_crl.to_owned().unwrap(); + + // It should be possible to convert a BorrowedCertRevocationList to a CertRevocationList. + let _crl = CertRevocationList::from(borrowed_crl); + // And similar for an OwnedCertRevocationList. + let _crl = CertRevocationList::from(owned_crl); + } + + #[test] + fn test_crl_authoritative_issuer_mismatch() { + let crl = include_bytes!("../../tests/crls/crl.valid.der"); + let crl = CertRevocationList::from(BorrowedCertRevocationList::from_der(&crl[..]).unwrap()); + + let ee = CertificateDer::from( + &include_bytes!("../../tests/client_auth_revocation/no_ku_chain.ee.der")[..], + ); + let ee = EndEntityCert::try_from(&ee).unwrap(); + let path = PartialPath::new(&ee); + + // The CRL should not be authoritative for an EE issued by a different issuer. + assert!(!crl.authoritative(&path.node())); + } + + #[test] + fn test_crl_authoritative_no_idp_no_cert_dp() { + let crl = + include_bytes!("../../tests/client_auth_revocation/ee_revoked_crl_ku_ee_depth.crl.der"); + let crl = CertRevocationList::from(BorrowedCertRevocationList::from_der(&crl[..]).unwrap()); + + let ee = CertificateDer::from( + &include_bytes!("../../tests/client_auth_revocation/ku_chain.ee.der")[..], + ); + let ee = EndEntityCert::try_from(&ee).unwrap(); + let path = PartialPath::new(&ee); + + // The CRL should be considered authoritative, the issuers match, the CRL has no IDP and the + // cert has no CRL DPs. + assert!(crl.authoritative(&path.node())); + } + + #[test] + fn test_crl_expired() { + let crl = include_bytes!("../../tests/crls/crl.valid.der"); + let crl = CertRevocationList::from(BorrowedCertRevocationList::from_der(&crl[..]).unwrap()); + // Friday, February 2, 2024 8:26:19 PM GMT + let time = UnixTime::since_unix_epoch(Duration::from_secs(1_706_905_579)); + + assert!(matches!(crl.check_expiration(time), Err(Error::CrlExpired))); + } + + #[test] + fn test_crl_not_expired() { + let crl = include_bytes!("../../tests/crls/crl.valid.der"); + let crl = CertRevocationList::from(BorrowedCertRevocationList::from_der(&crl[..]).unwrap()); + // Wednesday, October 19, 2022 8:12:06 PM GMT + let expiration_time = 1_666_210_326; + let time = UnixTime::since_unix_epoch(Duration::from_secs(expiration_time - 1000)); + + assert!(matches!(crl.check_expiration(time), Ok(()))); + } + + #[test] + fn test_construct_owned_crl() { + // It should be possible to construct an owned CRL directly from DER without needing + // to build a borrowed representation first. + let crl = + include_bytes!("../../tests/client_auth_revocation/ee_revoked_crl_ku_ee_depth.crl.der"); + assert!(OwnedCertRevocationList::from_der(crl).is_ok()) + } +} diff --git a/vendor/rustls-webpki-legacy/src/data/README.md b/vendor/rustls-webpki-legacy/src/data/README.md new file mode 100644 index 00000000000..78fc7788d37 --- /dev/null +++ b/vendor/rustls-webpki-legacy/src/data/README.md @@ -0,0 +1,21 @@ +These files contain the binary DER encoding of the *values* of some +ASN.1 [`AlgorithmIdentifier`]s, without the outer `SEQUENCE` tag or the outer +length component. + +These files were encoded with the help of [der-ascii]. They can be decoded +using: + +```sh +go get github.com/google/der-ascii/cmd/der2ascii +der2ascii -i -o .ascii +``` + +New or modified der-ascii files can be encoded using: + +```sh +go get github.com/google/der-ascii/cmd/ascii2der +ascii2der i .ascii -o +``` + +[`AlgorithmIdentifier`]: https://tools.ietf.org/html/rfc5280#section-4.1.1.2] +[der-ascii]: https://github.com/google/der-ascii diff --git a/vendor/rustls-webpki-legacy/src/data/alg-ecdsa-p256.der b/vendor/rustls-webpki-legacy/src/data/alg-ecdsa-p256.der new file mode 100644 index 00000000000..d49c30da3df --- /dev/null +++ b/vendor/rustls-webpki-legacy/src/data/alg-ecdsa-p256.der @@ -0,0 +1 @@ +*†HÎ=*†HÎ= \ No newline at end of file diff --git a/vendor/rustls-webpki-legacy/src/data/alg-ecdsa-p384.der b/vendor/rustls-webpki-legacy/src/data/alg-ecdsa-p384.der new file mode 100644 index 00000000000..8b24916caf9 Binary files /dev/null and b/vendor/rustls-webpki-legacy/src/data/alg-ecdsa-p384.der differ diff --git a/vendor/rustls-webpki-legacy/src/data/alg-ecdsa-p521.der b/vendor/rustls-webpki-legacy/src/data/alg-ecdsa-p521.der new file mode 100644 index 00000000000..9ad544c2c77 Binary files /dev/null and b/vendor/rustls-webpki-legacy/src/data/alg-ecdsa-p521.der differ diff --git a/vendor/rustls-webpki-legacy/src/data/alg-ecdsa-sha256.der b/vendor/rustls-webpki-legacy/src/data/alg-ecdsa-sha256.der new file mode 100644 index 00000000000..b2ee1289144 --- /dev/null +++ b/vendor/rustls-webpki-legacy/src/data/alg-ecdsa-sha256.der @@ -0,0 +1 @@ +*†HÎ= \ No newline at end of file diff --git a/vendor/rustls-webpki-legacy/src/data/alg-ecdsa-sha384.der b/vendor/rustls-webpki-legacy/src/data/alg-ecdsa-sha384.der new file mode 100644 index 00000000000..7c61d3aabdb --- /dev/null +++ b/vendor/rustls-webpki-legacy/src/data/alg-ecdsa-sha384.der @@ -0,0 +1 @@ +*†HÎ= \ No newline at end of file diff --git a/vendor/rustls-webpki-legacy/src/data/alg-ecdsa-sha512.der b/vendor/rustls-webpki-legacy/src/data/alg-ecdsa-sha512.der new file mode 100644 index 00000000000..d87b89921f5 --- /dev/null +++ b/vendor/rustls-webpki-legacy/src/data/alg-ecdsa-sha512.der @@ -0,0 +1 @@ +*†HÎ= \ No newline at end of file diff --git a/vendor/rustls-webpki-legacy/src/data/alg-ed25519.der b/vendor/rustls-webpki-legacy/src/data/alg-ed25519.der new file mode 100644 index 00000000000..7ca46fd9522 --- /dev/null +++ b/vendor/rustls-webpki-legacy/src/data/alg-ed25519.der @@ -0,0 +1 @@ ++ep \ No newline at end of file diff --git a/vendor/rustls-webpki-legacy/src/data/alg-rsa-encryption.der b/vendor/rustls-webpki-legacy/src/data/alg-rsa-encryption.der new file mode 100644 index 00000000000..77d159a1c6f Binary files /dev/null and b/vendor/rustls-webpki-legacy/src/data/alg-rsa-encryption.der differ diff --git a/vendor/rustls-webpki-legacy/src/data/alg-rsa-pkcs1-sha256.der b/vendor/rustls-webpki-legacy/src/data/alg-rsa-pkcs1-sha256.der new file mode 100644 index 00000000000..ab52bcd80b6 Binary files /dev/null and b/vendor/rustls-webpki-legacy/src/data/alg-rsa-pkcs1-sha256.der differ diff --git a/vendor/rustls-webpki-legacy/src/data/alg-rsa-pkcs1-sha384.der b/vendor/rustls-webpki-legacy/src/data/alg-rsa-pkcs1-sha384.der new file mode 100644 index 00000000000..c0d43b17fd5 Binary files /dev/null and b/vendor/rustls-webpki-legacy/src/data/alg-rsa-pkcs1-sha384.der differ diff --git a/vendor/rustls-webpki-legacy/src/data/alg-rsa-pkcs1-sha512.der b/vendor/rustls-webpki-legacy/src/data/alg-rsa-pkcs1-sha512.der new file mode 100644 index 00000000000..71aded5b9ec Binary files /dev/null and b/vendor/rustls-webpki-legacy/src/data/alg-rsa-pkcs1-sha512.der differ diff --git a/vendor/rustls-webpki-legacy/src/data/alg-rsa-pss-sha256.der b/vendor/rustls-webpki-legacy/src/data/alg-rsa-pss-sha256.der new file mode 100644 index 00000000000..87328f7c64b Binary files /dev/null and b/vendor/rustls-webpki-legacy/src/data/alg-rsa-pss-sha256.der differ diff --git a/vendor/rustls-webpki-legacy/src/data/alg-rsa-pss-sha384.der b/vendor/rustls-webpki-legacy/src/data/alg-rsa-pss-sha384.der new file mode 100644 index 00000000000..9c3b170f2be Binary files /dev/null and b/vendor/rustls-webpki-legacy/src/data/alg-rsa-pss-sha384.der differ diff --git a/vendor/rustls-webpki-legacy/src/data/alg-rsa-pss-sha512.der b/vendor/rustls-webpki-legacy/src/data/alg-rsa-pss-sha512.der new file mode 100644 index 00000000000..c0ad57d612a Binary files /dev/null and b/vendor/rustls-webpki-legacy/src/data/alg-rsa-pss-sha512.der differ diff --git a/vendor/rustls-webpki-legacy/src/data/distrusted/EMDVTLSCAG3B.spki.der b/vendor/rustls-webpki-legacy/src/data/distrusted/EMDVTLSCAG3B.spki.der new file mode 100644 index 00000000000..33f6d1118dc Binary files /dev/null and b/vendor/rustls-webpki-legacy/src/data/distrusted/EMDVTLSCAG3B.spki.der differ diff --git a/vendor/rustls-webpki-legacy/src/data/distrusted/EMDVTLSCAG3C.spki.der b/vendor/rustls-webpki-legacy/src/data/distrusted/EMDVTLSCAG3C.spki.der new file mode 100644 index 00000000000..9ffbb63d66a Binary files /dev/null and b/vendor/rustls-webpki-legacy/src/data/distrusted/EMDVTLSCAG3C.spki.der differ diff --git a/vendor/rustls-webpki-legacy/src/data/distrusted/EMEVTLSCAG3B.spki.der b/vendor/rustls-webpki-legacy/src/data/distrusted/EMEVTLSCAG3B.spki.der new file mode 100644 index 00000000000..19a7e655cdf Binary files /dev/null and b/vendor/rustls-webpki-legacy/src/data/distrusted/EMEVTLSCAG3B.spki.der differ diff --git a/vendor/rustls-webpki-legacy/src/data/distrusted/EMEVTLSCAG3C.spki.der b/vendor/rustls-webpki-legacy/src/data/distrusted/EMEVTLSCAG3C.spki.der new file mode 100644 index 00000000000..a8f458ece15 Binary files /dev/null and b/vendor/rustls-webpki-legacy/src/data/distrusted/EMEVTLSCAG3C.spki.der differ diff --git a/vendor/rustls-webpki-legacy/src/data/distrusted/EMOVCSCAG3B.spki.der b/vendor/rustls-webpki-legacy/src/data/distrusted/EMOVCSCAG3B.spki.der new file mode 100644 index 00000000000..af9359da8fb Binary files /dev/null and b/vendor/rustls-webpki-legacy/src/data/distrusted/EMOVCSCAG3B.spki.der differ diff --git a/vendor/rustls-webpki-legacy/src/data/distrusted/EMOVCSCAG3C.spki.der b/vendor/rustls-webpki-legacy/src/data/distrusted/EMOVCSCAG3C.spki.der new file mode 100644 index 00000000000..f3691d21164 Binary files /dev/null and b/vendor/rustls-webpki-legacy/src/data/distrusted/EMOVCSCAG3C.spki.der differ diff --git a/vendor/rustls-webpki-legacy/src/data/distrusted/EMOVTLSCAG3B.spki.der b/vendor/rustls-webpki-legacy/src/data/distrusted/EMOVTLSCAG3B.spki.der new file mode 100644 index 00000000000..20cebe1afa3 Binary files /dev/null and b/vendor/rustls-webpki-legacy/src/data/distrusted/EMOVTLSCAG3B.spki.der differ diff --git a/vendor/rustls-webpki-legacy/src/data/distrusted/EMOVTLSCAG3C.spki.der b/vendor/rustls-webpki-legacy/src/data/distrusted/EMOVTLSCAG3C.spki.der new file mode 100644 index 00000000000..dd3f0dd4f2e Binary files /dev/null and b/vendor/rustls-webpki-legacy/src/data/distrusted/EMOVTLSCAG3C.spki.der differ diff --git a/vendor/rustls-webpki-legacy/src/der.rs b/vendor/rustls-webpki-legacy/src/der.rs new file mode 100644 index 00000000000..977d54e5fc9 --- /dev/null +++ b/vendor/rustls-webpki-legacy/src/der.rs @@ -0,0 +1,876 @@ +// Copyright 2015 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +#[cfg(feature = "alloc")] +use alloc::vec::Vec; +use core::marker::PhantomData; + +use crate::{error::DerTypeId, Error}; + +#[derive(Debug)] +pub struct DerIterator<'a, T> { + reader: untrusted::Reader<'a>, + marker: PhantomData, +} + +impl<'a, T> DerIterator<'a, T> { + /// [`DerIterator`] will consume all of the bytes in `input` reading values of type `T`. + pub(crate) fn new(input: untrusted::Input<'a>) -> Self { + Self { + reader: untrusted::Reader::new(input), + marker: PhantomData, + } + } +} + +impl<'a, T: FromDer<'a>> Iterator for DerIterator<'a, T> { + type Item = Result; + + fn next(&mut self) -> Option { + (!self.reader.at_end()).then(|| T::from_der(&mut self.reader)) + } +} + +pub(crate) trait FromDer<'a>: Sized + 'a { + /// Parse a value of type `Self` from the given DER-encoded input. + fn from_der(reader: &mut untrusted::Reader<'a>) -> Result; + + const TYPE_ID: DerTypeId; +} + +pub(crate) fn read_all<'a, T: FromDer<'a>>(input: untrusted::Input<'a>) -> Result { + input.read_all(Error::TrailingData(T::TYPE_ID), T::from_der) +} + +// Copied (and extended) from ring's src/der.rs +#[allow(clippy::upper_case_acronyms)] +#[derive(Clone, Copy, Eq, PartialEq)] +#[repr(u8)] +pub(crate) enum Tag { + Boolean = 0x01, + Integer = 0x02, + BitString = 0x03, + OctetString = 0x04, + OID = 0x06, + Enum = 0x0A, + Sequence = CONSTRUCTED | 0x10, // 0x30 + UTCTime = 0x17, + GeneralizedTime = 0x18, + + #[allow(clippy::identity_op)] + ContextSpecificConstructed0 = CONTEXT_SPECIFIC | CONSTRUCTED | 0, + ContextSpecificConstructed1 = CONTEXT_SPECIFIC | CONSTRUCTED | 1, + ContextSpecificConstructed3 = CONTEXT_SPECIFIC | CONSTRUCTED | 3, +} + +pub(crate) const CONSTRUCTED: u8 = 0x20; +pub(crate) const CONTEXT_SPECIFIC: u8 = 0x80; + +impl From for usize { + #[allow(clippy::as_conversions)] + fn from(tag: Tag) -> Self { + tag as Self + } +} + +impl From for u8 { + #[allow(clippy::as_conversions)] + fn from(tag: Tag) -> Self { + tag as Self + } // XXX: narrowing conversion. +} + +#[inline(always)] +pub(crate) fn expect_tag_and_get_value_limited<'a>( + input: &mut untrusted::Reader<'a>, + tag: Tag, + size_limit: usize, +) -> Result, Error> { + let (actual_tag, inner) = read_tag_and_get_value_limited(input, size_limit)?; + if usize::from(tag) != usize::from(actual_tag) { + return Err(Error::BadDer); + } + Ok(inner) +} + +pub(crate) fn nested_limited<'a, R>( + input: &mut untrusted::Reader<'a>, + tag: Tag, + error: Error, + decoder: impl FnOnce(&mut untrusted::Reader<'a>) -> Result, + size_limit: usize, +) -> Result { + expect_tag_and_get_value_limited(input, tag, size_limit) + .map_err(|_| error)? + .read_all(error, decoder) +} + +// TODO: investigate taking decoder as a reference to reduce generated code +// size. +pub(crate) fn nested<'a, R>( + input: &mut untrusted::Reader<'a>, + tag: Tag, + error: Error, + decoder: impl FnOnce(&mut untrusted::Reader<'a>) -> Result, +) -> Result { + nested_limited(input, tag, error, decoder, TWO_BYTE_DER_SIZE) +} + +pub(crate) fn expect_tag<'a>( + input: &mut untrusted::Reader<'a>, + tag: Tag, +) -> Result, Error> { + let (actual_tag, value) = read_tag_and_get_value_limited(input, TWO_BYTE_DER_SIZE)?; + if usize::from(tag) != usize::from(actual_tag) { + return Err(Error::BadDer); + } + + Ok(value) +} + +#[inline(always)] +pub(crate) fn read_tag_and_get_value<'a>( + input: &mut untrusted::Reader<'a>, +) -> Result<(u8, untrusted::Input<'a>), Error> { + read_tag_and_get_value_limited(input, TWO_BYTE_DER_SIZE) +} + +#[inline(always)] +pub(crate) fn read_tag_and_get_value_limited<'a>( + input: &mut untrusted::Reader<'a>, + size_limit: usize, +) -> Result<(u8, untrusted::Input<'a>), Error> { + let tag = input.read_byte().map_err(end_of_input_err)?; + if (tag & HIGH_TAG_RANGE_START) == HIGH_TAG_RANGE_START { + return Err(Error::BadDer); // High tag number form is not allowed. + } + + // If the high order bit of the first byte is set to zero then the length + // is encoded in the seven remaining bits of that byte. Otherwise, those + // seven bits represent the number of bytes used to encode the length. + let length = match input.read_byte().map_err(end_of_input_err)? { + n if (n & SHORT_FORM_LEN_MAX) == 0 => usize::from(n), + LONG_FORM_LEN_ONE_BYTE => { + let length_byte = input.read_byte().map_err(end_of_input_err)?; + if length_byte < SHORT_FORM_LEN_MAX { + return Err(Error::BadDer); // Not the canonical encoding. + } + usize::from(length_byte) + } + LONG_FORM_LEN_TWO_BYTES => { + let length_byte_one = usize::from(input.read_byte().map_err(end_of_input_err)?); + let length_byte_two = usize::from(input.read_byte().map_err(end_of_input_err)?); + let combined = (length_byte_one << 8) | length_byte_two; + if combined <= LONG_FORM_LEN_ONE_BYTE_MAX { + return Err(Error::BadDer); // Not the canonical encoding. + } + combined + } + LONG_FORM_LEN_THREE_BYTES => { + let length_byte_one = usize::from(input.read_byte().map_err(end_of_input_err)?); + let length_byte_two = usize::from(input.read_byte().map_err(end_of_input_err)?); + let length_byte_three = usize::from(input.read_byte().map_err(end_of_input_err)?); + let combined = (length_byte_one << 16) | (length_byte_two << 8) | length_byte_three; + if combined <= LONG_FORM_LEN_TWO_BYTES_MAX { + return Err(Error::BadDer); // Not the canonical encoding. + } + combined + } + LONG_FORM_LEN_FOUR_BYTES => { + let length_byte_one = usize::from(input.read_byte().map_err(end_of_input_err)?); + let length_byte_two = usize::from(input.read_byte().map_err(end_of_input_err)?); + let length_byte_three = usize::from(input.read_byte().map_err(end_of_input_err)?); + let length_byte_four = usize::from(input.read_byte().map_err(end_of_input_err)?); + let combined = (length_byte_one << 24) + | (length_byte_two << 16) + | (length_byte_three << 8) + | length_byte_four; + if combined <= LONG_FORM_LEN_THREE_BYTES_MAX { + return Err(Error::BadDer); // Not the canonical encoding. + } + combined + } + _ => { + return Err(Error::BadDer); // We don't support longer lengths. + } + }; + + if length >= size_limit { + return Err(Error::BadDer); // The length is larger than the caller accepts. + } + + let inner = input.read_bytes(length).map_err(end_of_input_err)?; + Ok((tag, inner)) +} + +/// Prepend `bytes` with the given ASN.1 [`Tag`] and appropriately encoded length byte(s). +/// Useful for "adding back" ASN.1 bytes to parsed content. +#[cfg(feature = "alloc")] +#[allow(clippy::as_conversions)] +pub(crate) fn asn1_wrap(tag: Tag, bytes: &[u8]) -> Vec { + let len = bytes.len(); + // The length is encoded differently depending on how many bytes there are + if len < SHORT_FORM_LEN_MAX.into() { + // Short form: the length is encoded using a single byte + // Contents: Tag byte, single length byte, and passed bytes + let mut ret = Vec::with_capacity(2 + len); + ret.push(tag.into()); // Tag byte + ret.push(len as u8); // Single length byte + ret.extend_from_slice(bytes); // Passed bytes + ret + } else { + // Long form: The length is encoded using multiple bytes + // Contents: Tag byte, number-of-length-bytes byte, length bytes, and passed bytes + // The first byte indicates how many more bytes will be used to encode the length + // First, get a big-endian representation of the byte slice's length + let size = len.to_be_bytes(); + // Find the number of leading empty bytes in that representation + // This will determine the smallest number of bytes we need to encode the length + let leading_zero_bytes = size + .iter() + .position(|&byte| byte != 0) + .unwrap_or(size.len()); + assert!(leading_zero_bytes < size.len()); + // Number of bytes used - number of not needed bytes = smallest number needed + let encoded_bytes = size.len() - leading_zero_bytes; + let mut ret = Vec::with_capacity(2 + encoded_bytes + len); + // Indicate this is a number-of-length-bytes byte by setting the high order bit + let number_of_length_bytes_byte = SHORT_FORM_LEN_MAX + encoded_bytes as u8; + ret.push(tag.into()); // Tag byte + ret.push(number_of_length_bytes_byte); // Number-of-length-bytes byte + ret.extend_from_slice(&size[leading_zero_bytes..]); // Length bytes + ret.extend_from_slice(bytes); // Passed bytes + ret + } +} + +// Long-form DER encoded lengths of two bytes can express lengths up to the following limit. +// +// The upstream ring::io::der::read_tag_and_get_value() function limits itself to up to two byte +// long-form DER lengths, and so this limit represents the maximum length that was possible to +// read before the introduction of the read_tag_and_get_value_limited function. +pub(crate) const TWO_BYTE_DER_SIZE: usize = LONG_FORM_LEN_TWO_BYTES_MAX; + +// The maximum size of a DER value that Webpki can support reading. +// +// Webpki limits itself to four byte long-form DER lengths, and so this limit represents +// the maximum size tagged DER value that can be read for any purpose. +pub(crate) const MAX_DER_SIZE: usize = LONG_FORM_LEN_FOUR_BYTES_MAX; + +// DER Tag identifiers have two forms: +// * Low tag number form (for tags values in the range [0..30] +// * High tag number form (for tag values in the range [31..] +// We only support low tag number form. +const HIGH_TAG_RANGE_START: u8 = 31; + +// DER length octets have two forms: +// * Short form: 1 octet supporting lengths between 0 and 127. +// * Long definite form: 2 to 127 octets, number of octets encoded into first octet. +const SHORT_FORM_LEN_MAX: u8 = 128; + +// Leading octet for long definite form DER length expressed in second byte. +const LONG_FORM_LEN_ONE_BYTE: u8 = 0x81; + +// Maximum size that can be expressed in a one byte long form len. +const LONG_FORM_LEN_ONE_BYTE_MAX: usize = 0xff; + +// Leading octet for long definite form DER length expressed in subsequent two bytes. +const LONG_FORM_LEN_TWO_BYTES: u8 = 0x82; + +// Maximum size that can be expressed in a two byte long form len. +const LONG_FORM_LEN_TWO_BYTES_MAX: usize = 0xff_ff; + +// Leading octet for long definite form DER length expressed in subsequent three bytes. +const LONG_FORM_LEN_THREE_BYTES: u8 = 0x83; + +// Maximum size that can be expressed in a three byte long form len. +const LONG_FORM_LEN_THREE_BYTES_MAX: usize = 0xff_ff_ff; + +// Leading octet for long definite form DER length expressed in subsequent four bytes. +const LONG_FORM_LEN_FOUR_BYTES: u8 = 0x84; + +// Maximum size that can be expressed in a four byte long form der len. +const LONG_FORM_LEN_FOUR_BYTES_MAX: usize = 0xff_ff_ff_ff; + +// TODO: investigate taking decoder as a reference to reduce generated code +// size. +pub(crate) fn nested_of_mut<'a>( + input: &mut untrusted::Reader<'a>, + outer_tag: Tag, + inner_tag: Tag, + error: Error, + mut decoder: impl FnMut(&mut untrusted::Reader<'a>) -> Result<(), Error>, +) -> Result<(), Error> { + nested(input, outer_tag, error, |outer| { + loop { + nested(outer, inner_tag, error, |inner| decoder(inner))?; + if outer.at_end() { + break; + } + } + Ok(()) + }) +} + +pub(crate) fn bit_string_with_no_unused_bits<'a>( + input: &mut untrusted::Reader<'a>, +) -> Result, Error> { + nested( + input, + Tag::BitString, + Error::TrailingData(DerTypeId::BitString), + |value| { + let unused_bits_at_end = value.read_byte().map_err(|_| Error::BadDer)?; + if unused_bits_at_end != 0 { + return Err(Error::BadDer); + } + Ok(value.read_bytes_to_end()) + }, + ) +} + +pub(crate) struct BitStringFlags<'a> { + raw_bits: &'a [u8], +} + +impl<'a> BitStringFlags<'a> { + pub(crate) fn bit_set(&self, bit: usize) -> bool { + let byte_index = bit / 8; + let bit_shift = 7 - (bit % 8); + + if self.raw_bits.len() < (byte_index + 1) { + false + } else { + ((self.raw_bits[byte_index] >> bit_shift) & 1) != 0 + } + } +} + +// ASN.1 BIT STRING fields for sets of flags are encoded in DER with some peculiar details related +// to padding. Notably this means we expect an indicator of the number of bits of padding, and then +// the actual bit values. See this Stack Overflow discussion[0], and ITU X690-0207[1] Section 8.6 +// and Section 11.2 for more information. +// +// [0]: https://security.stackexchange.com/a/10396 +// [1]: https://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf +pub(crate) fn bit_string_flags(input: untrusted::Input<'_>) -> Result, Error> { + input.read_all(Error::BadDer, |bit_string| { + // ITU X690-0207 11.2: + // "The initial octet shall encode, as an unsigned binary integer with bit 1 as the least + // significant bit, the number of unused bits in the final subsequent octet. + // The number shall be in the range zero to seven" + let padding_bits = bit_string.read_byte().map_err(|_| Error::BadDer)?; + let raw_bits = bit_string.read_bytes_to_end().as_slice_less_safe(); + + // It's illegal to have more than 7 bits of padding. Similarly, if the raw bitflags + // are empty there should be no padding. + if padding_bits > 7 || (raw_bits.is_empty() && padding_bits != 0) { + return Err(Error::BadDer); + } + + // If there are padding bits then the last bit of the last raw byte must be 0 or the + // distinguished encoding rules are not being followed. + let last_byte = raw_bits[raw_bits.len() - 1]; + let padding_mask = (1 << padding_bits) - 1; + + match padding_bits > 0 && (last_byte & padding_mask) != 0 { + true => Err(Error::BadDer), + false => Ok(BitStringFlags { raw_bits }), + } + }) +} + +impl<'a> FromDer<'a> for u8 { + fn from_der(reader: &mut untrusted::Reader<'a>) -> Result { + match *nonnegative_integer(reader)?.as_slice_less_safe() { + [b] => Ok(b), + _ => Err(Error::BadDer), + } + } + + const TYPE_ID: DerTypeId = DerTypeId::U8; +} + +pub(crate) fn nonnegative_integer<'a>( + input: &mut untrusted::Reader<'a>, +) -> Result, Error> { + let value = expect_tag(input, Tag::Integer)?; + match value + .as_slice_less_safe() + .split_first() + .ok_or(Error::BadDer)? + { + // Zero or leading zero. + (0, rest) => { + match rest.first() { + // Zero + None => Ok(value), + // Necessary leading zero. + Some(&second) if second & 0x80 == 0x80 => Ok(untrusted::Input::from(rest)), + // Unnecessary leading zero. + _ => Err(Error::BadDer), + } + } + // Positive value with no leading zero. + (first, _) if first & 0x80 == 0x00 => Ok(value), + // Negative value. + (_, _) => Err(Error::BadDer), + } +} + +pub(crate) fn end_of_input_err(_: untrusted::EndOfInput) -> Error { + Error::BadDer +} + +// Like mozilla::pkix, we accept the nonconformant explicit encoding of +// the default value (false) for compatibility with real-world certificates. +impl<'a> FromDer<'a> for bool { + fn from_der(reader: &mut untrusted::Reader<'a>) -> Result { + if !reader.peek(Tag::Boolean.into()) { + return Ok(false); + } + + nested( + reader, + Tag::Boolean, + Error::TrailingData(Self::TYPE_ID), + |input| match input.read_byte() { + Ok(0xff) => Ok(true), + Ok(0x00) => Ok(false), + _ => Err(Error::BadDer), + }, + ) + } + + const TYPE_ID: DerTypeId = DerTypeId::Bool; +} + +macro_rules! oid { + ( $first:expr, $second:expr, $( $tail:expr ),* ) => + ( + [(40 * $first) + $second, $( $tail ),*] + ) +} + +#[cfg(test)] +mod tests { + use super::DerTypeId; + use std::prelude::v1::*; + + #[cfg(feature = "alloc")] + #[test] + fn test_asn1_wrap() { + // Prepend stuff to `bytes` to put it in a DER SEQUENCE. + let wrap_in_sequence = |bytes: &[u8]| super::asn1_wrap(super::Tag::Sequence, bytes); + + // Empty slice + assert_eq!(vec![0x30, 0x00], wrap_in_sequence(&[])); + + // Small size + assert_eq!( + vec![0x30, 0x04, 0x00, 0x11, 0x22, 0x33], + wrap_in_sequence(&[0x00, 0x11, 0x22, 0x33]) + ); + + // Medium size + let mut val = Vec::new(); + val.resize(255, 0x12); + assert_eq!( + vec![0x30, 0x81, 0xff, 0x12, 0x12, 0x12], + wrap_in_sequence(&val)[..6] + ); + + // Large size + let mut val = Vec::new(); + val.resize(4660, 0x12); + wrap_in_sequence(&val); + assert_eq!( + vec![0x30, 0x82, 0x12, 0x34, 0x12, 0x12], + wrap_in_sequence(&val)[..6] + ); + + // Huge size + let mut val = Vec::new(); + val.resize(0xffff, 0x12); + let result = wrap_in_sequence(&val); + assert_eq!(vec![0x30, 0x82, 0xff, 0xff, 0x12, 0x12], result[..6]); + assert_eq!(result.len(), 0xffff + 4); + + // Gigantic size + let mut val = Vec::new(); + val.resize(0x100000, 0x12); + let result = wrap_in_sequence(&val); + assert_eq!(vec![0x30, 0x83, 0x10, 0x00, 0x00, 0x12, 0x12], result[..7]); + assert_eq!(result.len(), 0x100000 + 5); + + // Ludicrous size + let mut val = Vec::new(); + val.resize(0x1000000, 0x12); + let result = wrap_in_sequence(&val); + assert_eq!( + vec![0x30, 0x84, 0x01, 0x00, 0x00, 0x00, 0x12, 0x12], + result[..8] + ); + assert_eq!(result.len(), 0x1000000 + 6); + } + + #[test] + fn test_optional_boolean() { + use super::{Error, FromDer}; + + // Empty input results in false + assert!(!bool::from_der(&mut bytes_reader(&[])).unwrap()); + + // Optional, so another data type results in false + assert!(!bool::from_der(&mut bytes_reader(&[0x05, 0x00])).unwrap()); + + // Only 0x00 and 0xff are accepted values + assert_eq!( + Err(Error::BadDer), + bool::from_der(&mut bytes_reader(&[0x01, 0x01, 0x42])) + ); + + // True + assert!(bool::from_der(&mut bytes_reader(&[0x01, 0x01, 0xff])).unwrap()); + + // False + assert!(!bool::from_der(&mut bytes_reader(&[0x01, 0x01, 0x00])).unwrap()); + } + + #[test] + fn test_bit_string_with_no_unused_bits() { + use super::{bit_string_with_no_unused_bits, Error}; + + // Unexpected type + assert_eq!( + bit_string_with_no_unused_bits(&mut bytes_reader(&[0x01, 0x01, 0xff])).unwrap_err(), + Error::TrailingData(DerTypeId::BitString), + ); + + // Unexpected nonexistent type + assert_eq!( + bit_string_with_no_unused_bits(&mut bytes_reader(&[0x42, 0xff, 0xff])).unwrap_err(), + Error::TrailingData(DerTypeId::BitString), + ); + + // Unexpected empty input + assert_eq!( + bit_string_with_no_unused_bits(&mut bytes_reader(&[])).unwrap_err(), + Error::TrailingData(DerTypeId::BitString), + ); + + // Valid input with non-zero unused bits + assert_eq!( + bit_string_with_no_unused_bits(&mut bytes_reader(&[0x03, 0x03, 0x04, 0x12, 0x34])) + .unwrap_err(), + Error::BadDer, + ); + + // Valid input + assert_eq!( + bit_string_with_no_unused_bits(&mut bytes_reader(&[0x03, 0x03, 0x00, 0x12, 0x34])) + .unwrap() + .as_slice_less_safe(), + &[0x12, 0x34], + ); + } + + fn bytes_reader(bytes: &[u8]) -> untrusted::Reader<'_> { + return untrusted::Reader::new(untrusted::Input::from(bytes)); + } + + #[test] + fn read_tag_and_get_value_default_limit() { + use super::{read_tag_and_get_value, Error}; + + let inputs = &[ + // DER with short-form length encoded as three bytes. + &[EXAMPLE_TAG, 0x83, 0xFF, 0xFF, 0xFF].as_slice(), + // DER with short-form length encoded as four bytes. + &[EXAMPLE_TAG, 0x84, 0xFF, 0xFF, 0xFF, 0xFF].as_slice(), + ]; + + for input in inputs { + let mut bytes = untrusted::Reader::new(untrusted::Input::from(input)); + // read_tag_and_get_value should reject DER with encoded lengths larger than two + // bytes as BadDer. + assert!(matches!( + read_tag_and_get_value(&mut bytes), + Err(Error::BadDer) + )); + } + } + + #[test] + fn read_tag_and_get_value_limited_high_form() { + use super::{read_tag_and_get_value_limited, Error, LONG_FORM_LEN_TWO_BYTES_MAX}; + + let mut bytes = untrusted::Reader::new(untrusted::Input::from(&[0xFF])); + // read_tag_and_get_value_limited_high_form should reject DER with "high tag number form" tags. + assert!(matches!( + read_tag_and_get_value_limited(&mut bytes, LONG_FORM_LEN_TWO_BYTES_MAX), + Err(Error::BadDer) + )); + } + + #[test] + fn read_tag_and_get_value_limited_non_canonical() { + use super::{read_tag_and_get_value_limited, Error, LONG_FORM_LEN_TWO_BYTES_MAX}; + + let inputs = &[ + // Two byte length, with expressed length < 128. + &[EXAMPLE_TAG, 0x81, 0x01].as_slice(), + // Three byte length, with expressed length < 256. + &[EXAMPLE_TAG, 0x82, 0x00, 0x01].as_slice(), + // Four byte length, with expressed length, < 65536. + &[EXAMPLE_TAG, 0x83, 0x00, 0x00, 0x01].as_slice(), + // Five byte length, with expressed length < 16777216. + &[EXAMPLE_TAG, 0x84, 0x00, 0x00, 0x00, 0x01].as_slice(), + ]; + + for input in inputs { + let mut bytes = untrusted::Reader::new(untrusted::Input::from(input)); + // read_tag_and_get_value_limited should reject DER with non-canonical lengths. + assert!(matches!( + read_tag_and_get_value_limited(&mut bytes, LONG_FORM_LEN_TWO_BYTES_MAX), + Err(Error::BadDer) + )); + } + } + + #[test] + #[cfg(feature = "alloc")] + fn read_tag_and_get_value_limited_limits() { + use super::{read_tag_and_get_value_limited, Error}; + + let short_input = &[0xFF]; + let short_input_encoded = &[ + &[EXAMPLE_TAG], + der_encode_length(short_input.len()).as_slice(), + short_input, + ] + .concat(); + + let long_input = &[1_u8; 65537]; + let long_input_encoded = &[ + &[EXAMPLE_TAG], + der_encode_length(long_input.len()).as_slice(), + long_input, + ] + .concat(); + + struct Testcase<'a> { + input: &'a [u8], + limit: usize, + err: Option, + } + + let testcases = &[ + Testcase { + input: short_input_encoded, + limit: 1, + err: Some(Error::BadDer), + }, + Testcase { + input: short_input_encoded, + limit: short_input_encoded.len() + 1, + err: None, + }, + Testcase { + input: long_input_encoded, + limit: long_input.len(), + err: Some(Error::BadDer), + }, + Testcase { + input: long_input_encoded, + limit: long_input.len() + 1, + err: None, + }, + ]; + + for tc in testcases { + let mut bytes = untrusted::Reader::new(untrusted::Input::from(tc.input)); + + let res = read_tag_and_get_value_limited(&mut bytes, tc.limit); + match tc.err { + None => assert!(res.is_ok()), + Some(e) => { + let actual = res.unwrap_err(); + assert_eq!(actual, e) + } + } + } + } + + #[allow(clippy::as_conversions)] // infallible. + const EXAMPLE_TAG: u8 = super::Tag::Sequence as u8; + + #[cfg(feature = "alloc")] + #[allow(clippy::as_conversions)] // test code. + fn der_encode_length(length: usize) -> Vec { + if length < 128 { + vec![length as u8] + } else { + let mut encoded: Vec = Vec::new(); + let mut remaining_length = length; + + while remaining_length > 0 { + let byte = (remaining_length & 0xFF) as u8; + encoded.insert(0, byte); + remaining_length >>= 8; + } + + let length_octet = encoded.len() as u8 | 0x80; + encoded.insert(0, length_octet); + + encoded + } + } + + #[test] + fn misencoded_bit_string_flags() { + use super::{bit_string_flags, Error}; + + let bad_padding_example = untrusted::Input::from(&[ + 0x08, // 8 bit of padding (illegal!). + 0x06, // 1 byte of bit flags asserting bits 5 and 6. + ]); + assert!(matches!( + bit_string_flags(bad_padding_example), + Err(Error::BadDer) + )); + + let bad_padding_example = untrusted::Input::from(&[ + 0x01, // 1 bit of padding. + // No flags value (illegal with padding!). + ]); + assert!(matches!( + bit_string_flags(bad_padding_example), + Err(Error::BadDer) + )); + } + + #[test] + fn valid_bit_string_flags() { + use super::bit_string_flags; + + let example_key_usage = untrusted::Input::from(&[ + 0x01, // 1 bit of padding. + 0x06, // 1 byte of bit flags asserting bits 5 and 6. + ]); + let res = bit_string_flags(example_key_usage).unwrap(); + + assert!(!res.bit_set(0)); + assert!(!res.bit_set(1)); + assert!(!res.bit_set(2)); + assert!(!res.bit_set(3)); + assert!(!res.bit_set(4)); + // NB: Bits 5 and 6 should be set. + assert!(res.bit_set(5)); + assert!(res.bit_set(6)); + assert!(!res.bit_set(7)); + assert!(!res.bit_set(8)); + // Bits outside the range of values shouldn't be considered set. + assert!(!res.bit_set(256)); + } + + #[test] + fn test_small_nonnegative_integer() { + use super::{Error, FromDer, Tag}; + + for value in 0..=127 { + let data = [Tag::Integer.into(), 1, value]; + let mut rd = untrusted::Reader::new(untrusted::Input::from(&data)); + assert_eq!(u8::from_der(&mut rd), Ok(value),); + } + + for value in 128..=255 { + let data = [Tag::Integer.into(), 2, 0x00, value]; + let mut rd = untrusted::Reader::new(untrusted::Input::from(&data)); + assert_eq!(u8::from_der(&mut rd), Ok(value),); + } + + // not an integer + assert_eq!( + u8::from_der(&mut untrusted::Reader::new(untrusted::Input::from(&[ + Tag::Sequence.into(), + 1, + 1 + ]))), + Err(Error::BadDer) + ); + + // negative + assert_eq!( + u8::from_der(&mut untrusted::Reader::new(untrusted::Input::from(&[ + Tag::Integer.into(), + 1, + 0xff + ]))), + Err(Error::BadDer) + ); + + // positive but too large + assert_eq!( + u8::from_der(&mut untrusted::Reader::new(untrusted::Input::from(&[ + Tag::Integer.into(), + 2, + 0x01, + 0x00 + ]))), + Err(Error::BadDer) + ); + + // unnecessary leading zero + assert_eq!( + u8::from_der(&mut untrusted::Reader::new(untrusted::Input::from(&[ + Tag::Integer.into(), + 2, + 0x00, + 0x05 + ]))), + Err(Error::BadDer) + ); + + // truncations + assert_eq!( + u8::from_der(&mut untrusted::Reader::new(untrusted::Input::from(&[]))), + Err(Error::BadDer) + ); + + assert_eq!( + u8::from_der(&mut untrusted::Reader::new(untrusted::Input::from(&[ + Tag::Integer.into(), + ]))), + Err(Error::BadDer) + ); + + assert_eq!( + u8::from_der(&mut untrusted::Reader::new(untrusted::Input::from(&[ + Tag::Integer.into(), + 1, + ]))), + Err(Error::BadDer) + ); + + assert_eq!( + u8::from_der(&mut untrusted::Reader::new(untrusted::Input::from(&[ + Tag::Integer.into(), + 2, + 0 + ]))), + Err(Error::BadDer) + ); + } +} diff --git a/vendor/rustls-webpki-legacy/src/end_entity.rs b/vendor/rustls-webpki-legacy/src/end_entity.rs new file mode 100644 index 00000000000..38c7136dfe6 --- /dev/null +++ b/vendor/rustls-webpki-legacy/src/end_entity.rs @@ -0,0 +1,245 @@ +// Copyright 2015-2021 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +use core::ops::Deref; + +use pki_types::{ + CertificateDer, ServerName, SignatureVerificationAlgorithm, TrustAnchor, UnixTime, +}; + +use crate::crl::RevocationOptions; +use crate::error::Error; +use crate::subject_name::{verify_dns_names, verify_ip_address_names, NameIterator}; +use crate::verify_cert::{self, KeyUsage, VerifiedPath}; +use crate::{cert, signed_data}; + +/// An end-entity certificate. +/// +/// Server certificate processing in a TLS connection consists of several +/// steps. All of these steps are necessary: +/// +/// * [`EndEntityCert::verify_for_usage()`]: Verify that the peer's certificate +/// is valid for the current usage scenario. For server authentication, use +/// [`KeyUsage::server_auth()`]. +/// * [`EndEntityCert::verify_is_valid_for_subject_name()`]: Verify that the server's +/// certificate is valid for the host or IP address that is being connected to. +/// * [`EndEntityCert::verify_signature()`]: Verify that the signature of server's +/// `ServerKeyExchange` message is valid for the server's certificate. +/// +/// Client certificate processing in a TLS connection consists of analogous +/// steps. All of these steps are necessary: +/// +/// * [`EndEntityCert::verify_for_usage()`]: Verify that the peer's certificate +/// is valid for the current usage scenario. For client authentication, use +/// [`KeyUsage::client_auth()`]. +/// * [`EndEntityCert::verify_signature()`]: Verify that the signature of client's +/// `CertificateVerify` message is valid using the public key from the +/// client's certificate. +/// +/// Although it would be less error-prone to combine all these steps into a +/// single function call, some significant optimizations are possible if the +/// three steps are processed separately (in parallel). It does not matter much +/// which order the steps are done in, but **all of these steps must completed +/// before application data is sent and before received application data is +/// processed**. The [`TryFrom`] conversion from `&CertificateDer<'_>` is an +/// inexpensive operation and is deterministic, so if these tasks are done in +/// multiple threads, it is probably best to just create multiple [`EndEntityCert`] +/// instances for the same DER-encoded ASN.1 certificate bytes. +pub struct EndEntityCert<'a> { + inner: cert::Cert<'a>, +} + +impl<'a> TryFrom<&'a CertificateDer<'a>> for EndEntityCert<'a> { + type Error = Error; + + /// Parse the ASN.1 DER-encoded X.509 encoding of the certificate + /// `cert_der`. + fn try_from(cert: &'a CertificateDer<'a>) -> Result { + Ok(Self { + inner: cert::Cert::from_der(untrusted::Input::from(cert.as_ref()))?, + }) + } +} + +impl<'a> EndEntityCert<'a> { + /// Verifies that the end-entity certificate is valid for use against the + /// specified Extended Key Usage (EKU). + /// + /// * `supported_sig_algs` is the list of signature algorithms that are + /// trusted for use in certificate signatures; the end-entity certificate's + /// public key is not validated against this list. + /// * `trust_anchors` is the list of root CAs to trust in the built path. + /// * `intermediate_certs` is the sequence of intermediate certificates that + /// a peer sent for the purpose of path building. + /// * `time` is the time for which the validation is effective (usually the + /// current time). + /// * `usage` is the intended usage of the certificate, indicating what kind + /// of usage we're verifying the certificate for. + /// * `crls` is the list of certificate revocation lists to check + /// the certificate against. + /// * `verify_path` is an optional verification function for path candidates. + /// + /// If successful, yields a `VerifiedPath` type that can be used to inspect a verified chain + /// of certificates that leads from the `end_entity` to one of the `self.trust_anchors`. + /// + /// `verify_path` will only be called for potentially verified paths, that is, paths that + /// have been verified up to the trust anchor. As such, `verify_path()` cannot be used to + /// verify a path that doesn't satisfy the constraints listed above; it can only be used to + /// reject a path that does satisfy the aforementioned constraints. If `verify_path` returns + /// an error, path building will continue in order to try other options. + #[allow(clippy::too_many_arguments)] + pub fn verify_for_usage<'p>( + &'p self, + supported_sig_algs: &[&dyn SignatureVerificationAlgorithm], + trust_anchors: &'p [TrustAnchor<'_>], + intermediate_certs: &'p [CertificateDer<'p>], + time: UnixTime, + usage: KeyUsage, + revocation: Option>, + verify_path: Option<&dyn Fn(&VerifiedPath<'_>) -> Result<(), Error>>, + ) -> Result, Error> { + verify_cert::ChainOptions { + eku: usage, + supported_sig_algs, + trust_anchors, + intermediate_certs, + revocation, + } + .build_chain(self, time, verify_path) + } + + /// Verifies that the certificate is valid for the given Subject Name. + pub fn verify_is_valid_for_subject_name( + &self, + server_name: &ServerName<'_>, + ) -> Result<(), Error> { + match server_name { + ServerName::DnsName(dns_name) => verify_dns_names( + dns_name, + NameIterator::new(Some(self.inner.subject), self.inner.subject_alt_name), + ), + // IP addresses are not compared against the subject field; + // only against Subject Alternative Names. + ServerName::IpAddress(ip_address) => verify_ip_address_names( + ip_address, + NameIterator::new(None, self.inner.subject_alt_name), + ), + _ => Err(Error::UnsupportedNameType), + } + } + + /// Verifies the signature `signature` of message `msg` using the + /// certificate's public key. + /// + /// `signature_alg` is the algorithm to use to + /// verify the signature; the certificate's public key is verified to be + /// compatible with this algorithm. + /// + /// For TLS 1.2, `signature` corresponds to TLS's + /// `DigitallySigned.signature` and `signature_alg` corresponds to TLS's + /// `DigitallySigned.algorithm` of TLS type `SignatureAndHashAlgorithm`. In + /// TLS 1.2 a single `SignatureAndHashAlgorithm` may map to multiple + /// `SignatureVerificationAlgorithm`s. For example, a TLS 1.2 + /// `SignatureAndHashAlgorithm` of (ECDSA, SHA-256) may map to any or all + /// of {`ECDSA_P256_SHA256`, `ECDSA_P384_SHA256`}, depending on how the TLS + /// implementation is configured. + /// + /// For current TLS 1.3 drafts, `signature_alg` corresponds to TLS's + /// `algorithm` fields of type `SignatureScheme`. There is (currently) a + /// one-to-one correspondence between TLS 1.3's `SignatureScheme` and + /// `SignatureVerificationAlgorithm`. + pub fn verify_signature( + &self, + signature_alg: &dyn SignatureVerificationAlgorithm, + msg: &[u8], + signature: &[u8], + ) -> Result<(), Error> { + signed_data::verify_signature( + signature_alg, + self.inner.spki, + untrusted::Input::from(msg), + untrusted::Input::from(signature), + ) + } +} + +impl<'a> Deref for EndEntityCert<'a> { + type Target = cert::Cert<'a>; + + fn deref(&self) -> &Self::Target { + &self.inner + } +} + +#[cfg(feature = "alloc")] +#[cfg(test)] +mod tests { + use super::*; + use crate::test_utils; + use crate::test_utils::RCGEN_SIGNATURE_ALG; + use std::prelude::v1::*; + + // This test reproduces https://github.com/rustls/webpki/issues/167 --- an + // end-entity cert where the common name is a `PrintableString` rather than + // a `UTF8String` cannot iterate over its subject alternative names. + #[test] + fn printable_string_common_name() { + const DNS_NAME: &str = "test.example.com"; + + let issuer = test_utils::make_issuer("Test"); + + let ee_cert = { + let mut params = test_utils::end_entity_params(vec![DNS_NAME.to_string()]); + // construct a certificate that uses `PrintableString` as the + // common name value, rather than `UTF8String`. + params.distinguished_name.push( + rcgen::DnType::CommonName, + rcgen::DnValue::PrintableString( + rcgen::PrintableString::try_from("example.com").unwrap(), + ), + ); + params + .signed_by( + &rcgen::KeyPair::generate_for(RCGEN_SIGNATURE_ALG).unwrap(), + &issuer.cert, + &issuer.key_pair, + ) + .expect("failed to make ee cert (this is a test bug)") + }; + + expect_dns_name(ee_cert.der(), DNS_NAME); + } + + // This test reproduces https://github.com/rustls/webpki/issues/167 --- an + // end-entity cert where the common name is an empty SEQUENCE. + #[test] + fn empty_sequence_common_name() { + let ee_cert_der = { + // handcrafted cert DER produced using `ascii2der`, since `rcgen` is + // unwilling to generate this particular weird cert. + let bytes = include_bytes!("../tests/misc/empty_sequence_common_name.der"); + CertificateDer::from(&bytes[..]) + }; + expect_dns_name(&ee_cert_der, "example.com"); + } + + fn expect_dns_name(der: &CertificateDer<'_>, name: &str) { + let cert = + EndEntityCert::try_from(der).expect("should parse end entity certificate correctly"); + + let mut names = cert.valid_dns_names(); + assert_eq!(names.next(), Some(name)); + assert_eq!(names.next(), None); + } +} diff --git a/vendor/rustls-webpki-legacy/src/error.rs b/vendor/rustls-webpki-legacy/src/error.rs new file mode 100644 index 00000000000..33f6effbe16 --- /dev/null +++ b/vendor/rustls-webpki-legacy/src/error.rs @@ -0,0 +1,334 @@ +// Copyright 2015 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +use core::fmt; +use core::ops::ControlFlow; + +/// An error that occurs during certificate validation or name validation. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[non_exhaustive] +pub enum Error { + /// The encoding of some ASN.1 DER-encoded item is invalid. + BadDer, + + /// The encoding of an ASN.1 DER-encoded time is invalid. + BadDerTime, + + /// A CA certificate is being used as an end-entity certificate. + CaUsedAsEndEntity, + + /// The certificate is expired; i.e. the time it is being validated for is + /// later than the certificate's notAfter time. + CertExpired, + + /// The certificate is not valid for the name it is being validated for. + CertNotValidForName, + + /// The certificate is not valid yet; i.e. the time it is being validated + /// for is earlier than the certificate's notBefore time. + CertNotValidYet, + + /// The certificate, or one of its issuers, has been revoked. + CertRevoked, + + /// The CRL is expired; i.e. the verification time is not before the time + /// in the CRL nextUpdate field. + CrlExpired, + + /// An end-entity certificate is being used as a CA certificate. + EndEntityUsedAsCa, + + /// An X.509 extension is invalid. + ExtensionValueInvalid, + + /// The certificate validity period (notBefore, notAfter) is invalid; e.g. + /// the notAfter time is earlier than the notBefore time. + InvalidCertValidity, + + /// A CRL number extension was invalid: + /// - it was mis-encoded + /// - it was negative + /// - it was too long + InvalidCrlNumber, + + /// A iPAddress name constraint was invalid: + /// - it had a sparse network mask (ie, cannot be written in CIDR form). + /// - it was too long or short + InvalidNetworkMaskConstraint, + + /// A serial number was invalid: + /// - it was misencoded + /// - it was negative + /// - it was too long + InvalidSerialNumber, + + /// The CRL signature is invalid for the issuer's public key. + InvalidCrlSignatureForPublicKey, + + /// The signature is invalid for the given public key. + InvalidSignatureForPublicKey, + + /// A CRL was signed by an issuer that has a KeyUsage bitstring that does not include + /// the cRLSign key usage bit. + IssuerNotCrlSigner, + + /// A presented or reference DNS identifier was malformed, potentially + /// containing invalid characters or invalid labels. + MalformedDnsIdentifier, + + /// The certificate extensions are malformed. + /// + /// In particular, webpki requires the DNS name(s) be in the subjectAltName + /// extension as required by the CA/Browser Forum Baseline Requirements + /// and as recommended by RFC6125. + MalformedExtensions, + + /// A name constraint was malformed, potentially containing invalid characters or + /// invalid labels. + MalformedNameConstraint, + + /// The maximum number of name constraint comparisons has been reached. + MaximumNameConstraintComparisonsExceeded, + + /// The maximum number of internal path building calls has been reached. Path complexity is too great. + MaximumPathBuildCallsExceeded, + + /// The path search was terminated because it became too deep. + MaximumPathDepthExceeded, + + /// The maximum number of signature checks has been reached. Path complexity is too great. + MaximumSignatureChecksExceeded, + + /// The certificate violates one or more name constraints. + NameConstraintViolation, + + /// The certificate violates one or more path length constraints. + PathLenConstraintViolated, + + /// The certificate is not valid for the Extended Key Usage for which it is + /// being validated. + RequiredEkuNotFound, + + /// The algorithm in the TBSCertificate "signature" field of a certificate + /// does not match the algorithm in the signature of the certificate. + SignatureAlgorithmMismatch, + + /// Trailing data was found while parsing DER-encoded input for the named type. + TrailingData(DerTypeId), + + /// A valid issuer for the certificate could not be found. + UnknownIssuer, + + /// The certificate's revocation status could not be determined. + UnknownRevocationStatus, + + /// The certificate is not a v3 X.509 certificate. + /// + /// This error may be also reported if the certificate version field + /// is malformed. + UnsupportedCertVersion, + + /// The certificate contains an unsupported critical extension. + UnsupportedCriticalExtension, + + /// The CRL contains an issuing distribution point with no distribution point name, + /// or a distribution point name relative to an issuer. + UnsupportedCrlIssuingDistributionPoint, + + /// The CRL is not a v2 X.509 CRL. + /// + /// The RFC 5280 web PKI profile mandates only version 2 be used. See section + /// 5.1.2.1 for more information. + /// + /// This error may also be reported if the CRL version field is malformed. + UnsupportedCrlVersion, + + /// The CRL is an unsupported "delta" CRL. + UnsupportedDeltaCrl, + + /// The CRL contains unsupported "indirect" entries. + UnsupportedIndirectCrl, + + /// The `ServerName` contained an unsupported type of value. + UnsupportedNameType, + + /// The revocation reason is not in the set of supported revocation reasons. + UnsupportedRevocationReason, + + /// The CRL is partitioned by revocation reasons. + UnsupportedRevocationReasonsPartitioning, + + /// The signature algorithm for a signature over a CRL is not in the set of supported + /// signature algorithms given. + UnsupportedCrlSignatureAlgorithm, + + /// The signature algorithm for a signature is not in the set of supported + /// signature algorithms given. + UnsupportedSignatureAlgorithm, + + /// The CRL signature's algorithm does not match the algorithm of the issuer + /// public key it is being validated for. This may be because the public key + /// algorithm's OID isn't recognized (e.g. DSA), or the public key + /// algorithm's parameters don't match the supported parameters for that + /// algorithm (e.g. ECC keys for unsupported curves), or the public key + /// algorithm and the signature algorithm simply don't match (e.g. + /// verifying an RSA signature with an ECC public key). + UnsupportedCrlSignatureAlgorithmForPublicKey, + + /// The signature's algorithm does not match the algorithm of the public + /// key it is being validated for. This may be because the public key + /// algorithm's OID isn't recognized (e.g. DSA), or the public key + /// algorithm's parameters don't match the supported parameters for that + /// algorithm (e.g. ECC keys for unsupported curves), or the public key + /// algorithm and the signature algorithm simply don't match (e.g. + /// verifying an RSA signature with an ECC public key). + UnsupportedSignatureAlgorithmForPublicKey, +} + +impl Error { + // Compare the Error with the new error by rank, returning the higher rank of the two as + // the most specific error. + pub(crate) fn most_specific(self, new: Self) -> Self { + // Assign an error a numeric value ranking it by specificity. + if self.rank() >= new.rank() { + self + } else { + new + } + } + + // Return a numeric indication of how specific the error is, where an error with a higher rank + // is considered more useful to an end user than an error with a lower rank. This is used by + // Error::most_specific to compare two errors in order to return which is more specific. + #[allow(clippy::as_conversions)] // We won't exceed u32 errors. + pub(crate) fn rank(&self) -> u32 { + match &self { + // Errors related to certificate validity + Self::CertNotValidYet | Self::CertExpired => 290, + Self::CertNotValidForName => 280, + Self::CertRevoked | Self::UnknownRevocationStatus | Self::CrlExpired => 270, + Self::InvalidCrlSignatureForPublicKey | Self::InvalidSignatureForPublicKey => 260, + Self::SignatureAlgorithmMismatch => 250, + Self::RequiredEkuNotFound => 240, + Self::NameConstraintViolation => 230, + Self::PathLenConstraintViolated => 220, + Self::CaUsedAsEndEntity | Self::EndEntityUsedAsCa => 210, + Self::IssuerNotCrlSigner => 200, + + // Errors related to supported features used in an invalid way. + Self::InvalidCertValidity => 190, + Self::InvalidNetworkMaskConstraint => 180, + Self::InvalidSerialNumber => 170, + Self::InvalidCrlNumber => 160, + + // Errors related to unsupported features. + Self::UnsupportedCrlSignatureAlgorithmForPublicKey + | Self::UnsupportedSignatureAlgorithmForPublicKey => 150, + Self::UnsupportedCrlSignatureAlgorithm | Self::UnsupportedSignatureAlgorithm => 140, + Self::UnsupportedCriticalExtension => 130, + Self::UnsupportedCertVersion => 130, + Self::UnsupportedCrlVersion => 120, + Self::UnsupportedDeltaCrl => 110, + Self::UnsupportedIndirectCrl => 100, + Self::UnsupportedNameType => 95, + Self::UnsupportedRevocationReason => 90, + Self::UnsupportedRevocationReasonsPartitioning => 80, + Self::UnsupportedCrlIssuingDistributionPoint => 70, + Self::MaximumPathDepthExceeded => 61, + + // Errors related to malformed data. + Self::MalformedDnsIdentifier => 60, + Self::MalformedNameConstraint => 50, + Self::MalformedExtensions | Self::TrailingData(_) => 40, + Self::ExtensionValueInvalid => 30, + + // Generic DER errors. + Self::BadDerTime => 20, + Self::BadDer => 10, + + // Special case errors - not subject to ranking. + Self::MaximumSignatureChecksExceeded => 0, + Self::MaximumPathBuildCallsExceeded => 0, + Self::MaximumNameConstraintComparisonsExceeded => 0, + + // Default catch all error - should be renamed in the future. + Self::UnknownIssuer => 0, + } + } + + /// Returns true for errors that should be considered fatal during path building. Errors of + /// this class should halt any further path building and be returned immediately. + #[inline] + pub(crate) fn is_fatal(&self) -> bool { + matches!( + self, + Self::MaximumSignatureChecksExceeded + | Self::MaximumPathBuildCallsExceeded + | Self::MaximumNameConstraintComparisonsExceeded + ) + } +} + +impl From for ControlFlow { + fn from(value: Error) -> Self { + match value { + // If an error is fatal, we've exhausted the potential for continued search. + err if err.is_fatal() => Self::Break(err), + // Otherwise we've rejected one candidate chain, but may continue to search for others. + err => Self::Continue(err), + } + } +} + +impl fmt::Display for Error { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{:?}", self) + } +} + +#[cfg(feature = "std")] +impl ::std::error::Error for Error {} + +/// Trailing data was found while parsing DER-encoded input for the named type. +#[allow(missing_docs)] +#[non_exhaustive] +#[derive(Clone, Copy, Debug, Eq, PartialEq)] +pub enum DerTypeId { + BitString, + Bool, + Certificate, + CertificateExtensions, + CertificateTbsCertificate, + CertRevocationList, + CertRevocationListExtension, + CrlDistributionPoint, + CommonNameInner, + CommonNameOuter, + DistributionPointName, + Extension, + GeneralName, + RevocationReason, + Signature, + SignatureAlgorithm, + SignedData, + SubjectPublicKeyInfo, + Time, + TrustAnchorV1, + TrustAnchorV1TbsCertificate, + U8, + RevokedCertificate, + RevokedCertificateExtension, + RevokedCertEntry, + IssuingDistributionPoint, +} diff --git a/vendor/rustls-webpki-legacy/src/lib.rs b/vendor/rustls-webpki-legacy/src/lib.rs new file mode 100644 index 00000000000..1251ffc89e5 --- /dev/null +++ b/vendor/rustls-webpki-legacy/src/lib.rs @@ -0,0 +1,183 @@ +// Copyright 2015 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +//! webpki: Web PKI X.509 Certificate Validation. +//! +//! See `EndEntityCert`'s documentation for a description of the certificate +//! processing steps necessary for a TLS connection. +//! +//! # Features +//! +//! | Feature | Description | +//! | ------- | ----------- | +//! | `alloc` | Enable features that require use of the heap. Currently all RSA signature algorithms require this feature. | +//! | `std` | Enable features that require libstd. Implies `alloc`. | +//! | `ring` | Enable use of the *ring* crate for cryptography. | +//! | `aws_lc_rs` | Enable use of the aws-lc-rs crate for cryptography. | + +#![no_std] +#![warn(elided_lifetimes_in_paths, unreachable_pub, clippy::use_self)] +#![deny(missing_docs, clippy::as_conversions)] +#![allow( + clippy::len_without_is_empty, + clippy::new_without_default, + clippy::single_match, + clippy::single_match_else, + clippy::type_complexity, + clippy::upper_case_acronyms +)] +// Enable documentation for all features on docs.rs +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + +#[cfg(any(feature = "std", test))] +extern crate std; + +#[cfg(any(test, feature = "alloc"))] +#[cfg_attr(test, macro_use)] +extern crate alloc; + +#[macro_use] +mod der; + +#[cfg(feature = "aws_lc_rs")] +mod aws_lc_rs_algs; +mod cert; +mod end_entity; +mod error; +#[cfg(feature = "ring")] +mod ring_algs; +mod rpk_entity; +mod signed_data; +mod subject_name; +mod time; +mod trust_anchor; + +mod crl; +mod verify_cert; +mod x509; + +#[cfg(test)] +pub(crate) mod test_utils; + +pub use { + cert::Cert, + crl::{ + BorrowedCertRevocationList, BorrowedRevokedCert, CertRevocationList, ExpirationPolicy, + RevocationCheckDepth, RevocationOptions, RevocationOptionsBuilder, RevocationReason, + UnknownStatusPolicy, + }, + end_entity::EndEntityCert, + error::{DerTypeId, Error}, + rpk_entity::RawPublicKeyEntity, + signed_data::alg_id, + trust_anchor::anchor_from_trusted_cert, + verify_cert::KeyUsage, + verify_cert::VerifiedPath, +}; + +pub use pki_types as types; + +#[cfg(feature = "alloc")] +pub use crl::{OwnedCertRevocationList, OwnedRevokedCert}; + +#[cfg(feature = "ring")] +/// Signature verification algorithm implementations using the *ring* crypto library. +pub mod ring { + pub use super::ring_algs::{ + ECDSA_P256_SHA256, ECDSA_P256_SHA384, ECDSA_P384_SHA256, ECDSA_P384_SHA384, ED25519, + }; + + #[cfg(feature = "alloc")] + pub use super::ring_algs::{ + RSA_PKCS1_2048_8192_SHA256, RSA_PKCS1_2048_8192_SHA384, RSA_PKCS1_2048_8192_SHA512, + RSA_PKCS1_3072_8192_SHA384, RSA_PSS_2048_8192_SHA256_LEGACY_KEY, + RSA_PSS_2048_8192_SHA384_LEGACY_KEY, RSA_PSS_2048_8192_SHA512_LEGACY_KEY, + }; +} + +#[cfg(feature = "aws_lc_rs")] +/// Signature verification algorithm implementations using the aws-lc-rs crypto library. +pub mod aws_lc_rs { + pub use super::aws_lc_rs_algs::{ + ECDSA_P256_SHA256, ECDSA_P256_SHA384, ECDSA_P384_SHA256, ECDSA_P384_SHA384, + ECDSA_P521_SHA256, ECDSA_P521_SHA384, ECDSA_P521_SHA512, ED25519, + RSA_PKCS1_2048_8192_SHA256, RSA_PKCS1_2048_8192_SHA384, RSA_PKCS1_2048_8192_SHA512, + RSA_PKCS1_3072_8192_SHA384, RSA_PSS_2048_8192_SHA256_LEGACY_KEY, + RSA_PSS_2048_8192_SHA384_LEGACY_KEY, RSA_PSS_2048_8192_SHA512_LEGACY_KEY, + }; +} + +/// An array of all the verification algorithms exported by this crate. +/// +/// This will be empty if the crate is built without the `ring` and `aws_lc_rs` features. +pub static ALL_VERIFICATION_ALGS: &[&dyn types::SignatureVerificationAlgorithm] = &[ + #[cfg(feature = "ring")] + ring::ECDSA_P256_SHA256, + #[cfg(feature = "ring")] + ring::ECDSA_P256_SHA384, + #[cfg(feature = "ring")] + ring::ECDSA_P384_SHA256, + #[cfg(feature = "ring")] + ring::ECDSA_P384_SHA384, + #[cfg(feature = "ring")] + ring::ED25519, + #[cfg(all(feature = "ring", feature = "alloc"))] + ring::RSA_PKCS1_2048_8192_SHA256, + #[cfg(all(feature = "ring", feature = "alloc"))] + ring::RSA_PKCS1_2048_8192_SHA384, + #[cfg(all(feature = "ring", feature = "alloc"))] + ring::RSA_PKCS1_2048_8192_SHA512, + #[cfg(all(feature = "ring", feature = "alloc"))] + ring::RSA_PKCS1_3072_8192_SHA384, + #[cfg(all(feature = "ring", feature = "alloc"))] + ring::RSA_PSS_2048_8192_SHA256_LEGACY_KEY, + #[cfg(all(feature = "ring", feature = "alloc"))] + ring::RSA_PSS_2048_8192_SHA384_LEGACY_KEY, + #[cfg(all(feature = "ring", feature = "alloc"))] + ring::RSA_PSS_2048_8192_SHA512_LEGACY_KEY, + #[cfg(feature = "aws_lc_rs")] + aws_lc_rs::ECDSA_P256_SHA256, + #[cfg(feature = "aws_lc_rs")] + aws_lc_rs::ECDSA_P256_SHA384, + #[cfg(feature = "aws_lc_rs")] + aws_lc_rs::ECDSA_P384_SHA256, + #[cfg(feature = "aws_lc_rs")] + aws_lc_rs::ECDSA_P384_SHA384, + #[cfg(feature = "aws_lc_rs")] + aws_lc_rs::ECDSA_P521_SHA256, + #[cfg(feature = "aws_lc_rs")] + aws_lc_rs::ECDSA_P521_SHA384, + #[cfg(feature = "aws_lc_rs")] + aws_lc_rs::ECDSA_P521_SHA512, + #[cfg(feature = "aws_lc_rs")] + aws_lc_rs::ED25519, + #[cfg(feature = "aws_lc_rs")] + aws_lc_rs::RSA_PKCS1_2048_8192_SHA256, + #[cfg(feature = "aws_lc_rs")] + aws_lc_rs::RSA_PKCS1_2048_8192_SHA384, + #[cfg(feature = "aws_lc_rs")] + aws_lc_rs::RSA_PKCS1_2048_8192_SHA512, + #[cfg(feature = "aws_lc_rs")] + aws_lc_rs::RSA_PKCS1_3072_8192_SHA384, + #[cfg(feature = "aws_lc_rs")] + aws_lc_rs::RSA_PSS_2048_8192_SHA256_LEGACY_KEY, + #[cfg(feature = "aws_lc_rs")] + aws_lc_rs::RSA_PSS_2048_8192_SHA384_LEGACY_KEY, + #[cfg(feature = "aws_lc_rs")] + aws_lc_rs::RSA_PSS_2048_8192_SHA512_LEGACY_KEY, +]; + +fn public_values_eq(a: untrusted::Input<'_>, b: untrusted::Input<'_>) -> bool { + a.as_slice_less_safe() == b.as_slice_less_safe() +} diff --git a/vendor/rustls-webpki-legacy/src/ring_algs.rs b/vendor/rustls-webpki-legacy/src/ring_algs.rs new file mode 100644 index 00000000000..2b1e6fd394a --- /dev/null +++ b/vendor/rustls-webpki-legacy/src/ring_algs.rs @@ -0,0 +1,206 @@ +// Copyright 2015 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +use pki_types::{AlgorithmIdentifier, InvalidSignature, SignatureVerificationAlgorithm}; +use ring::signature; + +use crate::signed_data::alg_id; + +/// A `SignatureVerificationAlgorithm` implemented using *ring*. +#[derive(Debug)] +struct RingAlgorithm { + public_key_alg_id: AlgorithmIdentifier, + signature_alg_id: AlgorithmIdentifier, + verification_alg: &'static dyn signature::VerificationAlgorithm, +} + +impl SignatureVerificationAlgorithm for RingAlgorithm { + fn public_key_alg_id(&self) -> AlgorithmIdentifier { + self.public_key_alg_id + } + + fn signature_alg_id(&self) -> AlgorithmIdentifier { + self.signature_alg_id + } + + fn verify_signature( + &self, + public_key: &[u8], + message: &[u8], + signature: &[u8], + ) -> Result<(), InvalidSignature> { + signature::UnparsedPublicKey::new(self.verification_alg, public_key) + .verify(message, signature) + .map_err(|_| InvalidSignature) + } +} + +/// ECDSA signatures using the P-256 curve and SHA-256. +pub static ECDSA_P256_SHA256: &dyn SignatureVerificationAlgorithm = &RingAlgorithm { + public_key_alg_id: alg_id::ECDSA_P256, + signature_alg_id: alg_id::ECDSA_SHA256, + verification_alg: &signature::ECDSA_P256_SHA256_ASN1, +}; + +/// ECDSA signatures using the P-256 curve and SHA-384. Deprecated. +pub static ECDSA_P256_SHA384: &dyn SignatureVerificationAlgorithm = &RingAlgorithm { + public_key_alg_id: alg_id::ECDSA_P256, + signature_alg_id: alg_id::ECDSA_SHA384, + verification_alg: &signature::ECDSA_P256_SHA384_ASN1, +}; + +/// ECDSA signatures using the P-384 curve and SHA-256. Deprecated. +pub static ECDSA_P384_SHA256: &dyn SignatureVerificationAlgorithm = &RingAlgorithm { + public_key_alg_id: alg_id::ECDSA_P384, + signature_alg_id: alg_id::ECDSA_SHA256, + verification_alg: &signature::ECDSA_P384_SHA256_ASN1, +}; + +/// ECDSA signatures using the P-384 curve and SHA-384. +pub static ECDSA_P384_SHA384: &dyn SignatureVerificationAlgorithm = &RingAlgorithm { + public_key_alg_id: alg_id::ECDSA_P384, + signature_alg_id: alg_id::ECDSA_SHA384, + verification_alg: &signature::ECDSA_P384_SHA384_ASN1, +}; + +/// RSA PKCS#1 1.5 signatures using SHA-256 for keys of 2048-8192 bits. +#[cfg(feature = "alloc")] +pub static RSA_PKCS1_2048_8192_SHA256: &dyn SignatureVerificationAlgorithm = &RingAlgorithm { + public_key_alg_id: alg_id::RSA_ENCRYPTION, + signature_alg_id: alg_id::RSA_PKCS1_SHA256, + verification_alg: &signature::RSA_PKCS1_2048_8192_SHA256, +}; + +/// RSA PKCS#1 1.5 signatures using SHA-384 for keys of 2048-8192 bits. +#[cfg(feature = "alloc")] +pub static RSA_PKCS1_2048_8192_SHA384: &dyn SignatureVerificationAlgorithm = &RingAlgorithm { + public_key_alg_id: alg_id::RSA_ENCRYPTION, + signature_alg_id: alg_id::RSA_PKCS1_SHA384, + verification_alg: &signature::RSA_PKCS1_2048_8192_SHA384, +}; + +/// RSA PKCS#1 1.5 signatures using SHA-512 for keys of 2048-8192 bits. +#[cfg(feature = "alloc")] +pub static RSA_PKCS1_2048_8192_SHA512: &dyn SignatureVerificationAlgorithm = &RingAlgorithm { + public_key_alg_id: alg_id::RSA_ENCRYPTION, + signature_alg_id: alg_id::RSA_PKCS1_SHA512, + verification_alg: &signature::RSA_PKCS1_2048_8192_SHA512, +}; + +/// RSA PKCS#1 1.5 signatures using SHA-384 for keys of 3072-8192 bits. +#[cfg(feature = "alloc")] +pub static RSA_PKCS1_3072_8192_SHA384: &dyn SignatureVerificationAlgorithm = &RingAlgorithm { + public_key_alg_id: alg_id::RSA_ENCRYPTION, + signature_alg_id: alg_id::RSA_PKCS1_SHA384, + verification_alg: &signature::RSA_PKCS1_3072_8192_SHA384, +}; + +/// RSA PSS signatures using SHA-256 for keys of 2048-8192 bits and of +/// type rsaEncryption; see [RFC 4055 Section 1.2]. +/// +/// [RFC 4055 Section 1.2]: https://tools.ietf.org/html/rfc4055#section-1.2 +#[cfg(feature = "alloc")] +pub static RSA_PSS_2048_8192_SHA256_LEGACY_KEY: &dyn SignatureVerificationAlgorithm = + &RingAlgorithm { + public_key_alg_id: alg_id::RSA_ENCRYPTION, + signature_alg_id: alg_id::RSA_PSS_SHA256, + verification_alg: &signature::RSA_PSS_2048_8192_SHA256, + }; + +/// RSA PSS signatures using SHA-384 for keys of 2048-8192 bits and of +/// type rsaEncryption; see [RFC 4055 Section 1.2]. +/// +/// [RFC 4055 Section 1.2]: https://tools.ietf.org/html/rfc4055#section-1.2 +#[cfg(feature = "alloc")] +pub static RSA_PSS_2048_8192_SHA384_LEGACY_KEY: &dyn SignatureVerificationAlgorithm = + &RingAlgorithm { + public_key_alg_id: alg_id::RSA_ENCRYPTION, + signature_alg_id: alg_id::RSA_PSS_SHA384, + verification_alg: &signature::RSA_PSS_2048_8192_SHA384, + }; + +/// RSA PSS signatures using SHA-512 for keys of 2048-8192 bits and of +/// type rsaEncryption; see [RFC 4055 Section 1.2]. +/// +/// [RFC 4055 Section 1.2]: https://tools.ietf.org/html/rfc4055#section-1.2 +#[cfg(feature = "alloc")] +pub static RSA_PSS_2048_8192_SHA512_LEGACY_KEY: &dyn SignatureVerificationAlgorithm = + &RingAlgorithm { + public_key_alg_id: alg_id::RSA_ENCRYPTION, + signature_alg_id: alg_id::RSA_PSS_SHA512, + verification_alg: &signature::RSA_PSS_2048_8192_SHA512, + }; + +/// ED25519 signatures according to RFC 8410 +pub static ED25519: &dyn SignatureVerificationAlgorithm = &RingAlgorithm { + public_key_alg_id: alg_id::ED25519, + signature_alg_id: alg_id::ED25519, + verification_alg: &signature::ED25519, +}; + +#[cfg(test)] +#[path = "."] +mod tests { + use crate::Error; + + static SUPPORTED_ALGORITHMS_IN_TESTS: &[&dyn super::SignatureVerificationAlgorithm] = &[ + // Reasonable algorithms. + super::ECDSA_P256_SHA256, + super::ECDSA_P384_SHA384, + super::ED25519, + #[cfg(feature = "alloc")] + super::RSA_PKCS1_2048_8192_SHA256, + #[cfg(feature = "alloc")] + super::RSA_PKCS1_2048_8192_SHA384, + #[cfg(feature = "alloc")] + super::RSA_PKCS1_2048_8192_SHA512, + #[cfg(feature = "alloc")] + super::RSA_PKCS1_3072_8192_SHA384, + #[cfg(feature = "alloc")] + super::RSA_PSS_2048_8192_SHA256_LEGACY_KEY, + #[cfg(feature = "alloc")] + super::RSA_PSS_2048_8192_SHA384_LEGACY_KEY, + #[cfg(feature = "alloc")] + super::RSA_PSS_2048_8192_SHA512_LEGACY_KEY, + // Algorithms deprecated because they are nonsensical combinations. + super::ECDSA_P256_SHA384, // Truncates digest. + super::ECDSA_P384_SHA256, // Digest is unnecessarily short. + ]; + + const UNSUPPORTED_SIGNATURE_ALGORITHM_FOR_RSA_KEY: Error = if cfg!(feature = "alloc") { + Error::UnsupportedSignatureAlgorithmForPublicKey + } else { + Error::UnsupportedSignatureAlgorithm + }; + + const UNSUPPORTED_ECDSA_SHA512_SIGNATURE: Error = Error::UnsupportedSignatureAlgorithm; + + const INVALID_SIGNATURE_FOR_RSA_KEY: Error = if cfg!(feature = "alloc") { + Error::InvalidSignatureForPublicKey + } else { + Error::UnsupportedSignatureAlgorithm + }; + + const OK_IF_RSA_AVAILABLE: Result<(), Error> = if cfg!(feature = "alloc") { + Ok(()) + } else { + Err(Error::UnsupportedSignatureAlgorithm) + }; + + const OK_IF_POINT_COMPRESSION_SUPPORTED: Result<(), Error> = + Err(Error::InvalidSignatureForPublicKey); + + #[path = "alg_tests.rs"] + mod alg_tests; +} diff --git a/vendor/rustls-webpki-legacy/src/rpk_entity.rs b/vendor/rustls-webpki-legacy/src/rpk_entity.rs new file mode 100644 index 00000000000..339616eb28f --- /dev/null +++ b/vendor/rustls-webpki-legacy/src/rpk_entity.rs @@ -0,0 +1,84 @@ +use crate::error::Error; +use crate::signed_data::SubjectPublicKeyInfo; +use crate::{der, signed_data, DerTypeId}; +use pki_types::{SignatureVerificationAlgorithm, SubjectPublicKeyInfoDer}; + +/// A Raw Public Key, used for connections using raw public keys as specified +/// in [RFC 7250](https://www.rfc-editor.org/rfc/rfc7250). +#[derive(Debug)] +pub struct RawPublicKeyEntity<'a> { + inner: untrusted::Input<'a>, +} + +impl<'a> TryFrom<&'a SubjectPublicKeyInfoDer<'a>> for RawPublicKeyEntity<'a> { + type Error = Error; + + /// Parse the ASN.1 DER-encoded SPKI encoding of the raw public key `spki`. + /// Since we are parsing a raw public key, we first strip the outer sequence tag. + fn try_from(spki: &'a SubjectPublicKeyInfoDer<'a>) -> Result { + let input = untrusted::Input::from(spki.as_ref()); + let spki = input.read_all( + Error::TrailingData(DerTypeId::SubjectPublicKeyInfo), + |reader| { + let untagged_spki = der::expect_tag(reader, der::Tag::Sequence)?; + der::read_all::>(untagged_spki)?; + Ok(untagged_spki) + }, + )?; + Ok(Self { inner: spki }) + } +} + +impl<'a> RawPublicKeyEntity<'a> { + /// Verifies the signature `signature` of message `msg` using a raw public key, + /// supporting RFC 7250. + /// + /// For more information on `signature_alg` and `signature` see the documentation for [`crate::end_entity::EndEntityCert::verify_signature`]. + pub fn verify_signature( + &self, + signature_alg: &dyn SignatureVerificationAlgorithm, + msg: &[u8], + signature: &[u8], + ) -> Result<(), Error> { + signed_data::verify_signature( + signature_alg, + self.inner, + untrusted::Input::from(msg), + untrusted::Input::from(signature), + ) + } +} + +#[cfg(feature = "alloc")] +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_ee_read_for_rpk() { + // Try to read an end entity certificate into a RawPublicKeyEntity. + // It will fail to parse the key value since we expect no unused bits. + let ee = include_bytes!("../tests/ed25519/ee.der"); + let ee_der = SubjectPublicKeyInfoDer::from(ee.as_slice()); + assert_eq!( + RawPublicKeyEntity::try_from(&ee_der).expect_err("unexpectedly parsed certificate"), + Error::TrailingData(DerTypeId::BitString) + ); + } + + #[test] + fn test_spki_read_for_rpk() { + let pubkey = include_bytes!("../tests/ed25519/ee-pubkey.der"); + let spki_der = SubjectPublicKeyInfoDer::from(pubkey.as_slice()); + let rpk = RawPublicKeyEntity::try_from(&spki_der).expect("failed to parse rpk"); + + // Retrieved the SPKI from the pubkey.der using the following commands (as in [`cert::test_spki_read`]): + // xxd -plain -cols 1 tests/ed255519/ee-pubkey.der + let expected_spki = [ + 0x30, 0x05, 0x06, 0x03, 0x2b, 0x65, 0x70, 0x03, 0x21, 0x00, 0xfe, 0x5a, 0x1e, 0x36, + 0x6c, 0x17, 0x27, 0x5b, 0xf1, 0x58, 0x1e, 0x3a, 0x0e, 0xe6, 0x56, 0x29, 0x8d, 0x9e, + 0x1b, 0x3f, 0xd3, 0x3f, 0x96, 0x46, 0xef, 0xbf, 0x04, 0x6b, 0xc7, 0x3d, 0x47, 0x5c, + ]; + assert_eq!(expected_spki, rpk.inner.as_slice_less_safe()) + } +} diff --git a/vendor/rustls-webpki-legacy/src/signed_data.rs b/vendor/rustls-webpki-legacy/src/signed_data.rs new file mode 100644 index 00000000000..cec292525b7 --- /dev/null +++ b/vendor/rustls-webpki-legacy/src/signed_data.rs @@ -0,0 +1,329 @@ +// Copyright 2015 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +use crate::der::{self, FromDer}; +use crate::error::{DerTypeId, Error}; +use crate::verify_cert::Budget; + +use pki_types::{AlgorithmIdentifier, SignatureVerificationAlgorithm}; + +#[cfg(feature = "alloc")] +use alloc::vec::Vec; + +/// X.509 certificates and related items that are signed are almost always +/// encoded in the format "tbs||signatureAlgorithm||signature". This structure +/// captures this pattern as an owned data type. +#[cfg(feature = "alloc")] +#[derive(Clone, Debug)] +pub(crate) struct OwnedSignedData { + /// The signed data. This would be `tbsCertificate` in the case of an X.509 + /// certificate, `tbsResponseData` in the case of an OCSP response, `tbsCertList` + /// in the case of a CRL, and the data nested in the `digitally-signed` construct for + /// TLS 1.2 signed data. + pub(crate) data: Vec, + + /// The value of the `AlgorithmIdentifier`. This would be + /// `signatureAlgorithm` in the case of an X.509 certificate, OCSP + /// response or CRL. This would have to be synthesized in the case of TLS 1.2 + /// signed data, since TLS does not identify algorithms by ASN.1 OIDs. + pub(crate) algorithm: Vec, + + /// The value of the signature. This would be `signature` in an X.509 + /// certificate, OCSP response or CRL. This would be the value of + /// `DigitallySigned.signature` for TLS 1.2 signed data. + pub(crate) signature: Vec, +} + +#[cfg(feature = "alloc")] +impl OwnedSignedData { + /// Return a borrowed [`SignedData`] from the owned representation. + pub(crate) fn borrow(&self) -> SignedData<'_> { + SignedData { + data: untrusted::Input::from(&self.data), + algorithm: untrusted::Input::from(&self.algorithm), + signature: untrusted::Input::from(&self.signature), + } + } +} + +/// X.509 certificates and related items that are signed are almost always +/// encoded in the format "tbs||signatureAlgorithm||signature". This structure +/// captures this pattern. +#[derive(Debug)] +pub(crate) struct SignedData<'a> { + /// The signed data. This would be `tbsCertificate` in the case of an X.509 + /// certificate, `tbsResponseData` in the case of an OCSP response, `tbsCertList` + /// in the case of a CRL, and the data nested in the `digitally-signed` construct for + /// TLS 1.2 signed data. + pub(crate) data: untrusted::Input<'a>, + + /// The value of the `AlgorithmIdentifier`. This would be + /// `signatureAlgorithm` in the case of an X.509 certificate, OCSP + /// response or CRL. This would have to be synthesized in the case of TLS 1.2 + /// signed data, since TLS does not identify algorithms by ASN.1 OIDs. + pub(crate) algorithm: untrusted::Input<'a>, + + /// The value of the signature. This would be `signature` in an X.509 + /// certificate, OCSP response or CRL. This would be the value of + /// `DigitallySigned.signature` for TLS 1.2 signed data. + pub(crate) signature: untrusted::Input<'a>, +} + +impl<'a> SignedData<'a> { + /// Parses the concatenation of "tbs||signatureAlgorithm||signature" that + /// is common in the X.509 certificate and OCSP response syntaxes. + /// + /// X.509 Certificates (RFC 5280) look like this: + /// + /// ```ASN.1 + /// Certificate (SEQUENCE) { + /// tbsCertificate TBSCertificate, + /// signatureAlgorithm AlgorithmIdentifier, + /// signatureValue BIT STRING + /// } + /// ``` + /// + /// OCSP responses (RFC 6960) look like this: + /// ```ASN.1 + /// BasicOCSPResponse { + /// tbsResponseData ResponseData, + /// signatureAlgorithm AlgorithmIdentifier, + /// signature BIT STRING, + /// certs [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL + /// } + /// ``` + /// + /// Note that this function does NOT parse the outermost `SEQUENCE` or the + /// `certs` value. + /// + /// The return value's first component is the contents of + /// `tbsCertificate`/`tbsResponseData`; the second component is a `SignedData` + /// structure that can be passed to `verify_signed_data`. + /// + /// The provided size_limit will enforce the largest possible outermost `SEQUENCE` this + /// function will read. + pub(crate) fn from_der( + der: &mut untrusted::Reader<'a>, + size_limit: usize, + ) -> Result<(untrusted::Input<'a>, Self), Error> { + let (data, tbs) = der.read_partial(|input| { + der::expect_tag_and_get_value_limited(input, der::Tag::Sequence, size_limit) + })?; + let algorithm = der::expect_tag(der, der::Tag::Sequence)?; + let signature = der::bit_string_with_no_unused_bits(der)?; + + Ok(( + tbs, + SignedData { + data, + algorithm, + signature, + }, + )) + } + + /// Convert the borrowed signed data to an [`OwnedSignedData`]. + #[cfg(feature = "alloc")] + pub(crate) fn to_owned(&self) -> OwnedSignedData { + OwnedSignedData { + data: self.data.as_slice_less_safe().to_vec(), + algorithm: self.algorithm.as_slice_less_safe().to_vec(), + signature: self.signature.as_slice_less_safe().to_vec(), + } + } +} + +/// Verify `signed_data` using the public key in the DER-encoded +/// SubjectPublicKeyInfo `spki` using one of the algorithms in +/// `supported_algorithms`. +/// +/// The algorithm is chosen based on the algorithm information encoded in the +/// algorithm identifiers in `public_key` and `signed_data.algorithm`. The +/// ordering of the algorithms in `supported_algorithms` does not really matter, +/// but generally more common algorithms should go first, as it is scanned +/// linearly for matches. +pub(crate) fn verify_signed_data( + supported_algorithms: &[&dyn SignatureVerificationAlgorithm], + spki_value: untrusted::Input<'_>, + signed_data: &SignedData<'_>, + budget: &mut Budget, +) -> Result<(), Error> { + budget.consume_signature()?; + + // We need to verify the signature in `signed_data` using the public key + // in `public_key`. In order to know which *ring* signature verification + // algorithm to use, we need to know the public key algorithm (ECDSA, + // RSA PKCS#1, etc.), the curve (if applicable), and the digest algorithm. + // `signed_data` identifies only the public key algorithm and the digest + // algorithm, and `public_key` identifies only the public key algorithm and + // the curve (if any). Thus, we have to combine information from both + // inputs to figure out which `ring::signature::VerificationAlgorithm` to + // use to verify the signature. + // + // This is all further complicated by the fact that we don't have any + // implicit knowledge about any algorithms or identifiers, since all of + // that information is encoded in `supported_algorithms.` In particular, we + // avoid hard-coding any of that information so that (link-time) dead code + // elimination will work effectively in eliminating code for unused + // algorithms. + + // Parse the signature. + // + let mut found_signature_alg_match = false; + for supported_alg in supported_algorithms + .iter() + .filter(|alg| alg.signature_alg_id().as_ref() == signed_data.algorithm.as_slice_less_safe()) + { + match verify_signature( + *supported_alg, + spki_value, + signed_data.data, + signed_data.signature, + ) { + Err(Error::UnsupportedSignatureAlgorithmForPublicKey) => { + found_signature_alg_match = true; + continue; + } + result => { + return result; + } + } + } + + if found_signature_alg_match { + Err(Error::UnsupportedSignatureAlgorithmForPublicKey) + } else { + Err(Error::UnsupportedSignatureAlgorithm) + } +} + +pub(crate) fn verify_signature( + signature_alg: &dyn SignatureVerificationAlgorithm, + spki_value: untrusted::Input<'_>, + msg: untrusted::Input<'_>, + signature: untrusted::Input<'_>, +) -> Result<(), Error> { + let spki = der::read_all::>(spki_value)?; + if signature_alg.public_key_alg_id().as_ref() != spki.algorithm_id_value.as_slice_less_safe() { + return Err(Error::UnsupportedSignatureAlgorithmForPublicKey); + } + + signature_alg + .verify_signature( + spki.key_value.as_slice_less_safe(), + msg.as_slice_less_safe(), + signature.as_slice_less_safe(), + ) + .map_err(|_| Error::InvalidSignatureForPublicKey) +} + +pub(crate) struct SubjectPublicKeyInfo<'a> { + algorithm_id_value: untrusted::Input<'a>, + key_value: untrusted::Input<'a>, +} + +impl<'a> FromDer<'a> for SubjectPublicKeyInfo<'a> { + // Parse the public key into an algorithm OID, an optional curve OID, and the + // key value. The caller needs to check whether these match the + // `PublicKeyAlgorithm` for the `SignatureVerificationAlgorithm` that is matched when + // parsing the signature. + fn from_der(reader: &mut untrusted::Reader<'a>) -> Result { + let algorithm_id_value = der::expect_tag(reader, der::Tag::Sequence)?; + let key_value = der::bit_string_with_no_unused_bits(reader)?; + Ok(SubjectPublicKeyInfo { + algorithm_id_value, + key_value, + }) + } + + const TYPE_ID: DerTypeId = DerTypeId::SubjectPublicKeyInfo; +} + +/// Encodings of the PKIX AlgorithmIdentifier type. +/// +/// This module contains a set of common values, and exists to keep the +/// names of these separate from the actual algorithm implementations. +pub mod alg_id { + use super::AlgorithmIdentifier; + + // See src/data/README.md. + + /// AlgorithmIdentifier for `id-ecPublicKey` with named curve `secp256r1`. + pub const ECDSA_P256: AlgorithmIdentifier = + AlgorithmIdentifier::from_slice(include_bytes!("data/alg-ecdsa-p256.der")); + + /// AlgorithmIdentifier for `id-ecPublicKey` with named curve `secp384r1`. + pub const ECDSA_P384: AlgorithmIdentifier = + AlgorithmIdentifier::from_slice(include_bytes!("data/alg-ecdsa-p384.der")); + + /// AlgorithmIdentifier for `id-ecPublicKey` with named curve `secp521r1`. + pub const ECDSA_P521: AlgorithmIdentifier = + AlgorithmIdentifier::from_slice(include_bytes!("data/alg-ecdsa-p521.der")); + + /// AlgorithmIdentifier for `ecdsa-with-SHA256`. + pub const ECDSA_SHA256: AlgorithmIdentifier = + AlgorithmIdentifier::from_slice(include_bytes!("data/alg-ecdsa-sha256.der")); + + /// AlgorithmIdentifier for `ecdsa-with-SHA384`. + pub const ECDSA_SHA384: AlgorithmIdentifier = + AlgorithmIdentifier::from_slice(include_bytes!("data/alg-ecdsa-sha384.der")); + + /// AlgorithmIdentifier for `ecdsa-with-SHA512`. + pub const ECDSA_SHA512: AlgorithmIdentifier = + AlgorithmIdentifier::from_slice(include_bytes!("data/alg-ecdsa-sha512.der")); + + /// AlgorithmIdentifier for `rsaEncryption`. + pub const RSA_ENCRYPTION: AlgorithmIdentifier = + AlgorithmIdentifier::from_slice(include_bytes!("data/alg-rsa-encryption.der")); + + /// AlgorithmIdentifier for `sha256WithRSAEncryption`. + pub const RSA_PKCS1_SHA256: AlgorithmIdentifier = + AlgorithmIdentifier::from_slice(include_bytes!("data/alg-rsa-pkcs1-sha256.der")); + + /// AlgorithmIdentifier for `sha384WithRSAEncryption`. + pub const RSA_PKCS1_SHA384: AlgorithmIdentifier = + AlgorithmIdentifier::from_slice(include_bytes!("data/alg-rsa-pkcs1-sha384.der")); + + /// AlgorithmIdentifier for `sha512WithRSAEncryption`. + pub const RSA_PKCS1_SHA512: AlgorithmIdentifier = + AlgorithmIdentifier::from_slice(include_bytes!("data/alg-rsa-pkcs1-sha512.der")); + + /// AlgorithmIdentifier for `rsassaPss` with: + /// + /// - hashAlgorithm: sha256 + /// - maskGenAlgorithm: mgf1 with sha256 + /// - saltLength: 32 + pub const RSA_PSS_SHA256: AlgorithmIdentifier = + AlgorithmIdentifier::from_slice(include_bytes!("data/alg-rsa-pss-sha256.der")); + + /// AlgorithmIdentifier for `rsassaPss` with: + /// + /// - hashAlgorithm: sha384 + /// - maskGenAlgorithm: mgf1 with sha384 + /// - saltLength: 48 + pub const RSA_PSS_SHA384: AlgorithmIdentifier = + AlgorithmIdentifier::from_slice(include_bytes!("data/alg-rsa-pss-sha384.der")); + + /// AlgorithmIdentifier for `rsassaPss` with: + /// + /// - hashAlgorithm: sha512 + /// - maskGenAlgorithm: mgf1 with sha512 + /// - saltLength: 64 + pub const RSA_PSS_SHA512: AlgorithmIdentifier = + AlgorithmIdentifier::from_slice(include_bytes!("data/alg-rsa-pss-sha512.der")); + + /// AlgorithmIdentifier for `ED25519`. + pub const ED25519: AlgorithmIdentifier = + AlgorithmIdentifier::from_slice(include_bytes!("data/alg-ed25519.der")); +} diff --git a/vendor/rustls-webpki-legacy/src/subject_name/dns_name.rs b/vendor/rustls-webpki-legacy/src/subject_name/dns_name.rs new file mode 100644 index 00000000000..c71555c7745 --- /dev/null +++ b/vendor/rustls-webpki-legacy/src/subject_name/dns_name.rs @@ -0,0 +1,961 @@ +// Copyright 2015-2020 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +use core::fmt::Write; + +use pki_types::{DnsName, InvalidDnsNameError}; + +use super::verify::{GeneralName, NameIterator}; +use crate::Error; + +pub(crate) fn verify_dns_names( + reference: &DnsName<'_>, + mut names: NameIterator<'_>, +) -> Result<(), Error> { + let dns_name = untrusted::Input::from(reference.as_ref().as_bytes()); + names + .find_map(|result| { + let name = match result { + Ok(name) => name, + Err(err) => return Some(Err(err)), + }; + + let presented_id = match name { + GeneralName::DnsName(presented) => presented, + _ => return None, + }; + + match presented_id_matches_reference_id(presented_id, IdRole::Reference, dns_name) { + Ok(true) => Some(Ok(())), + Ok(false) | Err(Error::MalformedDnsIdentifier) => None, + Err(e) => Some(Err(e)), + } + }) + .unwrap_or(Err(Error::CertNotValidForName)) +} + +/// A reference to a DNS Name presented by a server that may include a wildcard. +/// +/// A `WildcardDnsNameRef` is guaranteed to be syntactically valid. The validity rules +/// are specified in [RFC 5280 Section 7.2], except that underscores are also +/// allowed. +/// +/// Additionally, while [RFC6125 Section 4.1] says that a wildcard label may be of the form +/// `*.`, where `` and/or `` may be empty, we follow a stricter policy common +/// to most validation libraries (e.g. NSS) and only accept wildcard labels that are exactly `*`. +/// +/// [RFC 5280 Section 7.2]: https://tools.ietf.org/html/rfc5280#section-7.2 +/// [RFC 6125 Section 4.1]: https://www.rfc-editor.org/rfc/rfc6125#section-4.1 +#[derive(Clone, Copy, Eq, PartialEq, Hash)] +pub(crate) struct WildcardDnsNameRef<'a>(&'a [u8]); + +impl<'a> WildcardDnsNameRef<'a> { + /// Constructs a `WildcardDnsNameRef` from the given input if the input is a + /// syntactically-valid DNS name. + pub(crate) fn try_from_ascii(dns_name: &'a [u8]) -> Result { + if !is_valid_dns_id( + untrusted::Input::from(dns_name), + IdRole::Reference, + Wildcards::Allow, + ) { + return Err(InvalidDnsNameError); + } + + Ok(Self(dns_name)) + } + + /// Yields a reference to the DNS name as a `&str`. + pub(crate) fn as_str(&self) -> &'a str { + // The unwrap won't fail because a `WildcardDnsNameRef` is guaranteed to be ASCII and + // ASCII is a subset of UTF-8. + core::str::from_utf8(self.0).unwrap() + } +} + +impl core::fmt::Debug for WildcardDnsNameRef<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> Result<(), core::fmt::Error> { + f.write_str("WildcardDnsNameRef(\"")?; + + // Convert each byte of the underlying ASCII string to a `char` and + // downcase it prior to formatting it. We avoid self.to_owned() since + // it requires allocation. + for &ch in self.0 { + f.write_char(char::from(ch).to_ascii_lowercase())?; + } + + f.write_str("\")") + } +} + +// We assume that both presented_dns_id and reference_dns_id are encoded in +// such a way that US-ASCII (7-bit) characters are encoded in one byte and no +// encoding of a non-US-ASCII character contains a code point in the range +// 0-127. For example, UTF-8 is OK but UTF-16 is not. +// +// RFC6125 says that a wildcard label may be of the form *., where +// and/or may be empty. However, NSS requires to be empty, and we +// follow NSS's stricter policy by accepting wildcards only of the form +// *., where may be empty. +// +// An relative presented DNS ID matches both an absolute reference ID and a +// relative reference ID. Absolute presented DNS IDs are not supported: +// +// Presented ID Reference ID Result +// ------------------------------------- +// example.com example.com Match +// example.com. example.com Mismatch +// example.com example.com. Match +// example.com. example.com. Mismatch +// +// There are more subtleties documented inline in the code. +// +// Name constraints /////////////////////////////////////////////////////////// +// +// This is all RFC 5280 has to say about dNSName constraints: +// +// DNS name restrictions are expressed as host.example.com. Any DNS +// name that can be constructed by simply adding zero or more labels to +// the left-hand side of the name satisfies the name constraint. For +// example, www.host.example.com would satisfy the constraint but +// host1.example.com would not. +// +// This lack of specificity has lead to a lot of uncertainty regarding +// subdomain matching. In particular, the following questions have been +// raised and answered: +// +// Q: Does a presented identifier equal (case insensitive) to the name +// constraint match the constraint? For example, does the presented +// ID "host.example.com" match a "host.example.com" constraint? +// A: Yes. RFC5280 says "by simply adding zero or more labels" and this +// is the case of adding zero labels. +// +// Q: When the name constraint does not start with ".", do subdomain +// presented identifiers match it? For example, does the presented +// ID "www.host.example.com" match a "host.example.com" constraint? +// A: Yes. RFC5280 says "by simply adding zero or more labels" and this +// is the case of adding more than zero labels. The example is the +// one from RFC 5280. +// +// Q: When the name constraint does not start with ".", does a +// non-subdomain prefix match it? For example, does "bigfoo.bar.com" +// match "foo.bar.com"? [4] +// A: No. We interpret RFC 5280's language of "adding zero or more labels" +// to mean that whole labels must be prefixed. +// +// (Note that the above three scenarios are the same as the RFC 6265 +// domain matching rules [0].) +// +// Q: Is a name constraint that starts with "." valid, and if so, what +// semantics does it have? For example, does a presented ID of +// "www.example.com" match a constraint of ".example.com"? Does a +// presented ID of "example.com" match a constraint of ".example.com"? +// A: This implementation, NSS[1], and SChannel[2] all support a +// leading ".", but OpenSSL[3] does not yet. Amongst the +// implementations that support it, a leading "." is legal and means +// the same thing as when the "." is omitted, EXCEPT that a +// presented identifier equal (case insensitive) to the name +// constraint is not matched; i.e. presented dNSName identifiers +// must be subdomains. Some CAs in Mozilla's CA program (e.g. HARICA) +// have name constraints with the leading "." in their root +// certificates. The name constraints imposed on DCISS by Mozilla also +// have the it, so supporting this is a requirement for backward +// compatibility, even if it is not yet standardized. So, for example, a +// presented ID of "www.example.com" matches a constraint of +// ".example.com" but a presented ID of "example.com" does not. +// +// Q: Is there a way to prevent subdomain matches? +// A: Yes. +// +// Some people have proposed that dNSName constraints that do not +// start with a "." should be restricted to exact (case insensitive) +// matches. However, such a change of semantics from what RFC5280 +// specifies would be a non-backward-compatible change in the case of +// permittedSubtrees constraints, and it would be a security issue for +// excludedSubtrees constraints. +// +// However, it can be done with a combination of permittedSubtrees and +// excludedSubtrees, e.g. "example.com" in permittedSubtrees and +// ".example.com" in excludedSubtrees. +// +// Q: Are name constraints allowed to be specified as absolute names? +// For example, does a presented ID of "example.com" match a name +// constraint of "example.com." and vice versa. +// A: Absolute names are not supported as presented IDs or name +// constraints. Only reference IDs may be absolute. +// +// Q: Is "" a valid dNSName constraint? If so, what does it mean? +// A: Yes. Any valid presented dNSName can be formed "by simply adding zero +// or more labels to the left-hand side" of "". In particular, an +// excludedSubtrees dNSName constraint of "" forbids all dNSNames. +// +// Q: Is "." a valid dNSName constraint? If so, what does it mean? +// A: No, because absolute names are not allowed (see above). +// +// [0] RFC 6265 (Cookies) Domain Matching rules: +// http://tools.ietf.org/html/rfc6265#section-5.1.3 +// [1] NSS source code: +// https://mxr.mozilla.org/nss/source/lib/certdb/genname.c?rev=2a7348f013cb#1209 +// [2] Description of SChannel's behavior from Microsoft: +// http://www.imc.org/ietf-pkix/mail-archive/msg04668.html +// [3] Proposal to add such support to OpenSSL: +// http://www.mail-archive.com/openssl-dev%40openssl.org/msg36204.html +// https://rt.openssl.org/Ticket/Display.html?id=3562 +// [4] Feedback on the lack of clarify in the definition that never got +// incorporated into the spec: +// https://www.ietf.org/mail-archive/web/pkix/current/msg21192.html +pub(super) fn presented_id_matches_reference_id( + presented_dns_id: untrusted::Input<'_>, + reference_dns_id_role: IdRole, + reference_dns_id: untrusted::Input<'_>, +) -> Result { + if !is_valid_dns_id(presented_dns_id, IdRole::Presented, Wildcards::Allow) { + return Err(Error::MalformedDnsIdentifier); + } + + if !is_valid_dns_id(reference_dns_id, reference_dns_id_role, Wildcards::Deny) { + return Err(match reference_dns_id_role { + IdRole::NameConstraint => Error::MalformedNameConstraint, + _ => Error::MalformedDnsIdentifier, + }); + } + + let mut presented = untrusted::Reader::new(presented_dns_id); + let mut reference = untrusted::Reader::new(reference_dns_id); + + match reference_dns_id_role { + IdRole::Reference => (), + + IdRole::NameConstraint if presented_dns_id.len() > reference_dns_id.len() => { + if reference_dns_id.is_empty() { + // An empty constraint matches everything. + return Ok(true); + } + + // If the reference ID starts with a dot then skip the prefix of + // the presented ID and start the comparison at the position of + // that dot. Examples: + // + // Matches Doesn't Match + // ----------------------------------------------------------- + // original presented ID: www.example.com badexample.com + // skipped: www ba + // presented ID w/o prefix: .example.com dexample.com + // reference ID: .example.com .example.com + // + // If the reference ID does not start with a dot then we skip + // the prefix of the presented ID but also verify that the + // prefix ends with a dot. Examples: + // + // Matches Doesn't Match + // ----------------------------------------------------------- + // original presented ID: www.example.com badexample.com + // skipped: www ba + // must be '.': . d + // presented ID w/o prefix: example.com example.com + // reference ID: example.com example.com + // + if reference.peek(b'.') { + if presented + .skip(presented_dns_id.len() - reference_dns_id.len()) + .is_err() + { + unreachable!(); + } + } else { + if presented + .skip(presented_dns_id.len() - reference_dns_id.len() - 1) + .is_err() + { + unreachable!(); + } + if presented.read_byte() != Ok(b'.') { + return Ok(false); + } + } + } + + IdRole::NameConstraint => (), + + IdRole::Presented => unreachable!(), + } + + // Only allow wildcard labels that consist only of '*'. + if presented.peek(b'*') { + if presented.skip(1).is_err() { + unreachable!(); + } + + loop { + if reference.read_byte().is_err() { + return Ok(false); + } + if reference.peek(b'.') { + break; + } + } + } + + loop { + let presented_byte = match (presented.read_byte(), reference.read_byte()) { + (Ok(p), Ok(r)) if ascii_lower(p) == ascii_lower(r) => p, + _ => { + return Ok(false); + } + }; + + if presented.at_end() { + // Don't allow presented IDs to be absolute. + if presented_byte == b'.' { + return Err(Error::MalformedDnsIdentifier); + } + break; + } + } + + // Allow a relative presented DNS ID to match an absolute reference DNS ID, + // unless we're matching a name constraint. + if !reference.at_end() { + if reference_dns_id_role != IdRole::NameConstraint { + match reference.read_byte() { + Ok(b'.') => (), + _ => { + return Ok(false); + } + }; + } + if !reference.at_end() { + return Ok(false); + } + } + + assert!(presented.at_end()); + assert!(reference.at_end()); + + Ok(true) +} + +#[inline] +fn ascii_lower(b: u8) -> u8 { + match b { + b'A'..=b'Z' => b + b'a' - b'A', + _ => b, + } +} + +#[derive(Clone, Copy, PartialEq)] +enum Wildcards { + Deny, + Allow, +} + +#[derive(Clone, Copy, PartialEq)] +pub(super) enum IdRole { + Reference, + Presented, + NameConstraint, +} + +// https://tools.ietf.org/html/rfc5280#section-4.2.1.6: +// +// When the subjectAltName extension contains a domain name system +// label, the domain name MUST be stored in the dNSName (an IA5String). +// The name MUST be in the "preferred name syntax", as specified by +// Section 3.5 of [RFC1034] and as modified by Section 2.1 of +// [RFC1123]. +// +// https://bugzilla.mozilla.org/show_bug.cgi?id=1136616: As an exception to the +// requirement above, underscores are also allowed in names for compatibility. +fn is_valid_dns_id( + hostname: untrusted::Input<'_>, + id_role: IdRole, + allow_wildcards: Wildcards, +) -> bool { + // https://blogs.msdn.microsoft.com/oldnewthing/20120412-00/?p=7873/ + if hostname.len() > 253 { + return false; + } + + let mut input = untrusted::Reader::new(hostname); + + if id_role == IdRole::NameConstraint && input.at_end() { + return true; + } + + let mut dot_count = 0; + let mut label_length = 0; + let mut label_is_all_numeric = false; + let mut label_ends_with_hyphen = false; + + // Only presented IDs are allowed to have wildcard labels. And, like + // Chromium, be stricter than RFC 6125 requires by insisting that a + // wildcard label consist only of '*'. + let is_wildcard = allow_wildcards == Wildcards::Allow && input.peek(b'*'); + let mut is_first_byte = !is_wildcard; + if is_wildcard { + if input.read_byte() != Ok(b'*') || input.read_byte() != Ok(b'.') { + return false; + } + dot_count += 1; + } + + loop { + const MAX_LABEL_LENGTH: usize = 63; + + match input.read_byte() { + Ok(b'-') => { + if label_length == 0 { + return false; // Labels must not start with a hyphen. + } + label_is_all_numeric = false; + label_ends_with_hyphen = true; + label_length += 1; + if label_length > MAX_LABEL_LENGTH { + return false; + } + } + + Ok(b'0'..=b'9') => { + if label_length == 0 { + label_is_all_numeric = true; + } + label_ends_with_hyphen = false; + label_length += 1; + if label_length > MAX_LABEL_LENGTH { + return false; + } + } + + Ok(b'a'..=b'z') | Ok(b'A'..=b'Z') | Ok(b'_') => { + label_is_all_numeric = false; + label_ends_with_hyphen = false; + label_length += 1; + if label_length > MAX_LABEL_LENGTH { + return false; + } + } + + Ok(b'.') => { + dot_count += 1; + if label_length == 0 && (id_role != IdRole::NameConstraint || !is_first_byte) { + return false; + } + if label_ends_with_hyphen { + return false; // Labels must not end with a hyphen. + } + label_length = 0; + } + + _ => { + return false; + } + } + is_first_byte = false; + + if input.at_end() { + break; + } + } + + // Only reference IDs, not presented IDs or name constraints, may be + // absolute. + if label_length == 0 && id_role != IdRole::Reference { + return false; + } + + if label_ends_with_hyphen { + return false; // Labels must not end with a hyphen. + } + + if label_is_all_numeric { + return false; // Last label must not be all numeric. + } + + if is_wildcard { + // If the DNS ID ends with a dot, the last dot signifies an absolute ID. + let label_count = if label_length == 0 { + dot_count + } else { + dot_count + 1 + }; + + // Like NSS, require at least two labels to follow the wildcard label. + // TODO: Allow the TrustDomain to control this on a per-eTLD+1 basis, + // similar to Chromium. Even then, it might be better to still enforce + // that there are at least two labels after the wildcard. + if label_count < 3 { + return false; + } + } + + true +} + +#[cfg(test)] +mod tests { + use super::*; + + #[allow(clippy::type_complexity)] + const PRESENTED_MATCHES_REFERENCE: &[(&[u8], &[u8], Result)] = &[ + (b"", b"a", Err(Error::MalformedDnsIdentifier)), + (b"a", b"a", Ok(true)), + (b"b", b"a", Ok(false)), + (b"*.b.a", b"c.b.a", Ok(true)), + (b"*.b.a", b"b.a", Ok(false)), + (b"*.b.a", b"b.a.", Ok(false)), + // Wildcard not in leftmost label + (b"d.c.b.a", b"d.c.b.a", Ok(true)), + (b"d.*.b.a", b"d.c.b.a", Err(Error::MalformedDnsIdentifier)), + (b"d.c*.b.a", b"d.c.b.a", Err(Error::MalformedDnsIdentifier)), + (b"d.c*.b.a", b"d.cc.b.a", Err(Error::MalformedDnsIdentifier)), + // case sensitivity + ( + b"abcdefghijklmnopqrstuvwxyz", + b"ABCDEFGHIJKLMNOPQRSTUVWXYZ", + Ok(true), + ), + ( + b"ABCDEFGHIJKLMNOPQRSTUVWXYZ", + b"abcdefghijklmnopqrstuvwxyz", + Ok(true), + ), + (b"aBc", b"Abc", Ok(true)), + // digits + (b"a1", b"a1", Ok(true)), + // A trailing dot indicates an absolute name, and absolute names can match + // relative names, and vice-versa. + (b"example", b"example", Ok(true)), + (b"example.", b"example.", Err(Error::MalformedDnsIdentifier)), + (b"example", b"example.", Ok(true)), + (b"example.", b"example", Err(Error::MalformedDnsIdentifier)), + (b"example.com", b"example.com", Ok(true)), + ( + b"example.com.", + b"example.com.", + Err(Error::MalformedDnsIdentifier), + ), + (b"example.com", b"example.com.", Ok(true)), + ( + b"example.com.", + b"example.com", + Err(Error::MalformedDnsIdentifier), + ), + ( + b"example.com..", + b"example.com.", + Err(Error::MalformedDnsIdentifier), + ), + ( + b"example.com..", + b"example.com", + Err(Error::MalformedDnsIdentifier), + ), + ( + b"example.com...", + b"example.com.", + Err(Error::MalformedDnsIdentifier), + ), + // xn-- IDN prefix + (b"x*.b.a", b"xa.b.a", Err(Error::MalformedDnsIdentifier)), + (b"x*.b.a", b"xna.b.a", Err(Error::MalformedDnsIdentifier)), + (b"x*.b.a", b"xn-a.b.a", Err(Error::MalformedDnsIdentifier)), + (b"x*.b.a", b"xn--a.b.a", Err(Error::MalformedDnsIdentifier)), + (b"xn*.b.a", b"xn--a.b.a", Err(Error::MalformedDnsIdentifier)), + ( + b"xn-*.b.a", + b"xn--a.b.a", + Err(Error::MalformedDnsIdentifier), + ), + ( + b"xn--*.b.a", + b"xn--a.b.a", + Err(Error::MalformedDnsIdentifier), + ), + (b"xn*.b.a", b"xn--a.b.a", Err(Error::MalformedDnsIdentifier)), + ( + b"xn-*.b.a", + b"xn--a.b.a", + Err(Error::MalformedDnsIdentifier), + ), + ( + b"xn--*.b.a", + b"xn--a.b.a", + Err(Error::MalformedDnsIdentifier), + ), + ( + b"xn---*.b.a", + b"xn--a.b.a", + Err(Error::MalformedDnsIdentifier), + ), + // "*" cannot expand to nothing. + (b"c*.b.a", b"c.b.a", Err(Error::MalformedDnsIdentifier)), + // -------------------------------------------------------------------------- + // The rest of these are test cases adapted from Chromium's + // x509_certificate_unittest.cc. The parameter order is the opposite in + // Chromium's tests. Also, they Ok tests were modified to fit into this + // framework or due to intentional differences between mozilla::pkix and + // Chromium. + (b"foo.com", b"foo.com", Ok(true)), + (b"f", b"f", Ok(true)), + (b"i", b"h", Ok(false)), + (b"*.foo.com", b"bar.foo.com", Ok(true)), + (b"*.test.fr", b"www.test.fr", Ok(true)), + (b"*.test.FR", b"wwW.tESt.fr", Ok(true)), + (b".uk", b"f.uk", Err(Error::MalformedDnsIdentifier)), + ( + b"?.bar.foo.com", + b"w.bar.foo.com", + Err(Error::MalformedDnsIdentifier), + ), + ( + b"(www|ftp).foo.com", + b"www.foo.com", + Err(Error::MalformedDnsIdentifier), + ), // regex! + ( + b"www.foo.com\0", + b"www.foo.com", + Err(Error::MalformedDnsIdentifier), + ), + ( + b"www.foo.com\0*.foo.com", + b"www.foo.com", + Err(Error::MalformedDnsIdentifier), + ), + (b"ww.house.example", b"www.house.example", Ok(false)), + (b"www.test.org", b"test.org", Ok(false)), + (b"*.test.org", b"test.org", Ok(false)), + (b"*.org", b"test.org", Err(Error::MalformedDnsIdentifier)), + // '*' must be the only character in the wildcard label + ( + b"w*.bar.foo.com", + b"w.bar.foo.com", + Err(Error::MalformedDnsIdentifier), + ), + ( + b"ww*ww.bar.foo.com", + b"www.bar.foo.com", + Err(Error::MalformedDnsIdentifier), + ), + ( + b"ww*ww.bar.foo.com", + b"wwww.bar.foo.com", + Err(Error::MalformedDnsIdentifier), + ), + ( + b"w*w.bar.foo.com", + b"wwww.bar.foo.com", + Err(Error::MalformedDnsIdentifier), + ), + ( + b"w*w.bar.foo.c0m", + b"wwww.bar.foo.com", + Err(Error::MalformedDnsIdentifier), + ), + ( + b"wa*.bar.foo.com", + b"WALLY.bar.foo.com", + Err(Error::MalformedDnsIdentifier), + ), + ( + b"*Ly.bar.foo.com", + b"wally.bar.foo.com", + Err(Error::MalformedDnsIdentifier), + ), + // Chromium does URL decoding of the reference ID, but we don't, and we also + // require that the reference ID is valid, so we can't test these two. + // (b"www.foo.com", b"ww%57.foo.com", Ok(true)), + // (b"www&.foo.com", b"www%26.foo.com", Ok(true)), + (b"*.test.de", b"www.test.co.jp", Ok(false)), + ( + b"*.jp", + b"www.test.co.jp", + Err(Error::MalformedDnsIdentifier), + ), + (b"www.test.co.uk", b"www.test.co.jp", Ok(false)), + ( + b"www.*.co.jp", + b"www.test.co.jp", + Err(Error::MalformedDnsIdentifier), + ), + (b"www.bar.foo.com", b"www.bar.foo.com", Ok(true)), + (b"*.foo.com", b"www.bar.foo.com", Ok(false)), + ( + b"*.*.foo.com", + b"www.bar.foo.com", + Err(Error::MalformedDnsIdentifier), + ), + // Our matcher requires the reference ID to be a valid DNS name, so we cannot + // test this case. + // (b"*.*.bar.foo.com", b"*..bar.foo.com", Ok(false)), + (b"www.bath.org", b"www.bath.org", Ok(true)), + // Our matcher requires the reference ID to be a valid DNS name, so we cannot + // test these cases. + // DNS_ID_MISMATCH("www.bath.org", ""), + // (b"www.bath.org", b"20.30.40.50", Ok(false)), + // (b"www.bath.org", b"66.77.88.99", Ok(false)), + + // IDN tests + ( + b"xn--poema-9qae5a.com.br", + b"xn--poema-9qae5a.com.br", + Ok(true), + ), + ( + b"*.xn--poema-9qae5a.com.br", + b"www.xn--poema-9qae5a.com.br", + Ok(true), + ), + ( + b"*.xn--poema-9qae5a.com.br", + b"xn--poema-9qae5a.com.br", + Ok(false), + ), + ( + b"xn--poema-*.com.br", + b"xn--poema-9qae5a.com.br", + Err(Error::MalformedDnsIdentifier), + ), + ( + b"xn--*-9qae5a.com.br", + b"xn--poema-9qae5a.com.br", + Err(Error::MalformedDnsIdentifier), + ), + ( + b"*--poema-9qae5a.com.br", + b"xn--poema-9qae5a.com.br", + Err(Error::MalformedDnsIdentifier), + ), + // The following are adapted from the examples quoted from + // http://tools.ietf.org/html/rfc6125#section-6.4.3 + // (e.g., *.example.com would match foo.example.com but + // not bar.foo.example.com or example.com). + (b"*.example.com", b"foo.example.com", Ok(true)), + (b"*.example.com", b"bar.foo.example.com", Ok(false)), + (b"*.example.com", b"example.com", Ok(false)), + ( + b"baz*.example.net", + b"baz1.example.net", + Err(Error::MalformedDnsIdentifier), + ), + ( + b"*baz.example.net", + b"foobaz.example.net", + Err(Error::MalformedDnsIdentifier), + ), + ( + b"b*z.example.net", + b"buzz.example.net", + Err(Error::MalformedDnsIdentifier), + ), + // Wildcards should not be valid for public registry controlled domains, + // and unknown/unrecognized domains, at least three domain components must + // be present. For mozilla::pkix and NSS, there must always be at least two + // labels after the wildcard label. + (b"*.test.example", b"www.test.example", Ok(true)), + (b"*.example.co.uk", b"test.example.co.uk", Ok(true)), + ( + b"*.example", + b"test.example", + Err(Error::MalformedDnsIdentifier), + ), + // The result is different than Chromium, because Chromium takes into account + // the additional knowledge it has that "co.uk" is a TLD. mozilla::pkix does + // not know that. + (b"*.co.uk", b"example.co.uk", Ok(true)), + (b"*.com", b"foo.com", Err(Error::MalformedDnsIdentifier)), + (b"*.us", b"foo.us", Err(Error::MalformedDnsIdentifier)), + (b"*", b"foo", Err(Error::MalformedDnsIdentifier)), + // IDN variants of wildcards and registry controlled domains. + ( + b"*.xn--poema-9qae5a.com.br", + b"www.xn--poema-9qae5a.com.br", + Ok(true), + ), + ( + b"*.example.xn--mgbaam7a8h", + b"test.example.xn--mgbaam7a8h", + Ok(true), + ), + // RFC6126 allows this, and NSS accepts it, but Chromium disallows it. + // TODO: File bug against Chromium. + (b"*.com.br", b"xn--poema-9qae5a.com.br", Ok(true)), + ( + b"*.xn--mgbaam7a8h", + b"example.xn--mgbaam7a8h", + Err(Error::MalformedDnsIdentifier), + ), + // Wildcards should be permissible for 'private' registry-controlled + // domains. (In mozilla::pkix, we do not know if it is a private registry- + // controlled domain or not.) + (b"*.appspot.com", b"www.appspot.com", Ok(true)), + (b"*.s3.amazonaws.com", b"foo.s3.amazonaws.com", Ok(true)), + // Multiple wildcards are not valid. + ( + b"*.*.com", + b"foo.example.com", + Err(Error::MalformedDnsIdentifier), + ), + ( + b"*.bar.*.com", + b"foo.bar.example.com", + Err(Error::MalformedDnsIdentifier), + ), + // Absolute vs relative DNS name tests. Although not explicitly specified + // in RFC 6125, absolute reference names (those ending in a .) should + // match either absolute or relative presented names. + // TODO: File errata against RFC 6125 about this. + (b"foo.com.", b"foo.com", Err(Error::MalformedDnsIdentifier)), + (b"foo.com", b"foo.com.", Ok(true)), + (b"foo.com.", b"foo.com.", Err(Error::MalformedDnsIdentifier)), + (b"f.", b"f", Err(Error::MalformedDnsIdentifier)), + (b"f", b"f.", Ok(true)), + (b"f.", b"f.", Err(Error::MalformedDnsIdentifier)), + ( + b"*.bar.foo.com.", + b"www-3.bar.foo.com", + Err(Error::MalformedDnsIdentifier), + ), + (b"*.bar.foo.com", b"www-3.bar.foo.com.", Ok(true)), + ( + b"*.bar.foo.com.", + b"www-3.bar.foo.com.", + Err(Error::MalformedDnsIdentifier), + ), + // We require the reference ID to be a valid DNS name, so we cannot test this + // case. + // (b".", b".", Ok(false)), + ( + b"*.com.", + b"example.com", + Err(Error::MalformedDnsIdentifier), + ), + ( + b"*.com", + b"example.com.", + Err(Error::MalformedDnsIdentifier), + ), + ( + b"*.com.", + b"example.com.", + Err(Error::MalformedDnsIdentifier), + ), + (b"*.", b"foo.", Err(Error::MalformedDnsIdentifier)), + (b"*.", b"foo", Err(Error::MalformedDnsIdentifier)), + // The result is different than Chromium because we don't know that co.uk is + // a TLD. + ( + b"*.co.uk.", + b"foo.co.uk", + Err(Error::MalformedDnsIdentifier), + ), + ( + b"*.co.uk.", + b"foo.co.uk.", + Err(Error::MalformedDnsIdentifier), + ), + ]; + + #[test] + fn presented_matches_reference_test() { + for &(presented, reference, expected_result) in PRESENTED_MATCHES_REFERENCE { + let actual_result = presented_id_matches_reference_id( + untrusted::Input::from(presented), + IdRole::Reference, + untrusted::Input::from(reference), + ); + assert_eq!( + actual_result, expected_result, + "presented_id_matches_reference_id(\"{:?}\", \"{:?}\")", + presented, reference + ); + } + } + + // (presented_name, constraint, expected_matches) + #[allow(clippy::type_complexity)] + const PRESENTED_MATCHES_CONSTRAINT: &[(&[u8], &[u8], Result)] = &[ + // No absolute presented IDs allowed + (b".", b"", Err(Error::MalformedDnsIdentifier)), + (b"www.example.com.", b"", Err(Error::MalformedDnsIdentifier)), + ( + b"www.example.com.", + b"www.example.com.", + Err(Error::MalformedDnsIdentifier), + ), + // No absolute constraints allowed + ( + b"www.example.com", + b".", + Err(Error::MalformedNameConstraint), + ), + ( + b"www.example.com", + b"www.example.com.", + Err(Error::MalformedNameConstraint), + ), + // No wildcard in constraints allowed + ( + b"www.example.com", + b"*.example.com", + Err(Error::MalformedNameConstraint), + ), + // No empty presented IDs allowed + (b"", b"", Err(Error::MalformedDnsIdentifier)), + // Empty constraints match everything allowed + (b"example.com", b"", Ok(true)), + (b"*.example.com", b"", Ok(true)), + // Constraints that start with a dot + (b"www.example.com", b".example.com", Ok(true)), + (b"www.example.com", b".EXAMPLE.COM", Ok(true)), + (b"www.example.com", b".axample.com", Ok(false)), + (b"www.example.com", b".xample.com", Ok(false)), + (b"www.example.com", b".exampl.com", Ok(false)), + (b"badexample.com", b".example.com", Ok(false)), + // Constraints that do not start with a dot + (b"www.example.com", b"example.com", Ok(true)), + (b"www.example.com", b"EXAMPLE.COM", Ok(true)), + (b"www.example.com", b"axample.com", Ok(false)), + (b"www.example.com", b"xample.com", Ok(false)), + (b"www.example.com", b"exampl.com", Ok(false)), + (b"badexample.com", b"example.com", Ok(false)), + // Presented IDs with wildcard + (b"*.example.com", b".example.com", Ok(true)), + (b"*.example.com", b"example.com", Ok(true)), + (b"*.example.com", b"www.example.com", Ok(true)), + (b"*.example.com", b"www.EXAMPLE.COM", Ok(true)), + (b"*.example.com", b"www.axample.com", Ok(false)), + (b"*.example.com", b".xample.com", Ok(false)), + (b"*.example.com", b"xample.com", Ok(false)), + (b"*.example.com", b".exampl.com", Ok(false)), + (b"*.example.com", b"exampl.com", Ok(false)), + // Matching IDs + (b"www.example.com", b"www.example.com", Ok(true)), + ]; + + #[test] + fn presented_matches_constraint_test() { + for &(presented, constraint, expected_result) in PRESENTED_MATCHES_CONSTRAINT { + let actual_result = presented_id_matches_reference_id( + untrusted::Input::from(presented), + IdRole::NameConstraint, + untrusted::Input::from(constraint), + ); + assert_eq!( + actual_result, expected_result, + "presented_id_matches_constraint(\"{:?}\", \"{:?}\")", + presented, constraint, + ); + } + } +} diff --git a/vendor/rustls-webpki-legacy/src/subject_name/ip_address.rs b/vendor/rustls-webpki-legacy/src/subject_name/ip_address.rs new file mode 100644 index 00000000000..428c28fef1e --- /dev/null +++ b/vendor/rustls-webpki-legacy/src/subject_name/ip_address.rs @@ -0,0 +1,689 @@ +// Copyright 2015-2020 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +use pki_types::IpAddr; + +use super::verify::{GeneralName, NameIterator}; +use crate::Error; + +pub(crate) fn verify_ip_address_names( + reference: &IpAddr, + mut names: NameIterator<'_>, +) -> Result<(), Error> { + let ip_address = match reference { + IpAddr::V4(ip) => untrusted::Input::from(ip.as_ref()), + IpAddr::V6(ip) => untrusted::Input::from(ip.as_ref()), + }; + + names + .find_map(|result| { + let name = match result { + Ok(name) => name, + Err(err) => return Some(Err(err)), + }; + + let presented_id = match name { + GeneralName::IpAddress(presented) => presented, + _ => return None, + }; + + match presented_id_matches_reference_id(presented_id, ip_address) { + true => Some(Ok(())), + false => None, + } + }) + .unwrap_or(Err(Error::CertNotValidForName)) +} + +// https://tools.ietf.org/html/rfc5280#section-4.2.1.6 says: +// When the subjectAltName extension contains an iPAddress, the address +// MUST be stored in the octet string in "network byte order", as +// specified in [RFC791]. The least significant bit (LSB) of each octet +// is the LSB of the corresponding byte in the network address. For IP +// version 4, as specified in [RFC791], the octet string MUST contain +// exactly four octets. For IP version 6, as specified in +// [RFC2460], the octet string MUST contain exactly sixteen octets. +fn presented_id_matches_reference_id( + presented_id: untrusted::Input<'_>, + reference_id: untrusted::Input<'_>, +) -> bool { + match (presented_id.len(), reference_id.len()) { + (4, 4) => (), + (16, 16) => (), + _ => { + return false; + } + }; + + let mut presented_ip_address = untrusted::Reader::new(presented_id); + let mut reference_ip_address = untrusted::Reader::new(reference_id); + while !presented_ip_address.at_end() { + let presented_ip_address_byte = presented_ip_address.read_byte().unwrap(); + let reference_ip_address_byte = reference_ip_address.read_byte().unwrap(); + if presented_ip_address_byte != reference_ip_address_byte { + return false; + } + } + + true +} + +// https://tools.ietf.org/html/rfc5280#section-4.2.1.10 says: +// +// For IPv4 addresses, the iPAddress field of GeneralName MUST contain +// eight (8) octets, encoded in the style of RFC 4632 (CIDR) to represent +// an address range [RFC4632]. For IPv6 addresses, the iPAddress field +// MUST contain 32 octets similarly encoded. For example, a name +// constraint for "class C" subnet 192.0.2.0 is represented as the +// octets C0 00 02 00 FF FF FF 00, representing the CIDR notation +// 192.0.2.0/24 (mask 255.255.255.0). +pub(super) fn presented_id_matches_constraint( + name: untrusted::Input<'_>, + constraint: untrusted::Input<'_>, +) -> Result { + match (name.len(), constraint.len()) { + (4, 8) => (), + (16, 32) => (), + + // an IPv4 address never matches an IPv6 constraint, and vice versa. + (4, 32) | (16, 8) => { + return Ok(false); + } + + // invalid constraint length + (4, _) | (16, _) => { + return Err(Error::InvalidNetworkMaskConstraint); + } + + // invalid name length, or anything else + _ => { + return Err(Error::BadDer); + } + }; + + let (constraint_address, constraint_mask) = constraint.read_all(Error::BadDer, |value| { + let address = value.read_bytes(constraint.len() / 2).unwrap(); + let mask = value.read_bytes(constraint.len() / 2).unwrap(); + Ok((address, mask)) + })?; + + let mut name = untrusted::Reader::new(name); + let mut constraint_address = untrusted::Reader::new(constraint_address); + let mut constraint_mask = untrusted::Reader::new(constraint_mask); + let mut seen_zero_bit = false; + + loop { + // Iterate through the name, constraint address, and constraint mask + // a byte at a time. + let name_byte = name.read_byte().unwrap(); + let constraint_address_byte = constraint_address.read_byte().unwrap(); + let constraint_mask_byte = constraint_mask.read_byte().unwrap(); + + // A valid mask consists of a sequence of 1 bits, followed by a + // sequence of 0 bits. Either sequence could be empty. + + let leading = constraint_mask_byte.leading_ones(); + let trailing = constraint_mask_byte.trailing_zeros(); + + // At the resolution of a single octet, a valid mask is one where + // leading_ones() and trailing_zeros() sums to 8. + // This includes all-ones and all-zeroes. + if leading + trailing != 8 { + return Err(Error::InvalidNetworkMaskConstraint); + } + + // There should be no bits set after the first octet with a zero bit is seen. + if seen_zero_bit && constraint_mask_byte != 0x00 { + return Err(Error::InvalidNetworkMaskConstraint); + } + + // Note when a zero bit is seen for later octets. + if constraint_mask_byte != 0xff { + seen_zero_bit = true; + } + + if ((name_byte ^ constraint_address_byte) & constraint_mask_byte) != 0 { + return Ok(false); + } + if name.at_end() { + break; + } + } + + Ok(true) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn presented_id_matches_constraint_ipv4_test() { + let names_and_constraints = vec![ + ( + // 192.0.2.0 matches constraint 192.0.2.0/24 + [0xC0, 0x00, 0x02, 0x00], + [0xC0, 0x00, 0x02, 0x00, 0xFF, 0xFF, 0xFF, 0x00], + Ok(true), + ), + ( + // 192.0.2.1 matches constraint 192.0.2.0/24 + [0xC0, 0x00, 0x02, 0x01], + [0xC0, 0x00, 0x02, 0x00, 0xFF, 0xFF, 0xFF, 0x00], + Ok(true), + ), + ( + // 192.0.2.255 matches constraint 192.0.2.0/24 + [0xC0, 0x00, 0x02, 0xFF], + [0xC0, 0x00, 0x02, 0x00, 0xFF, 0xFF, 0xFF, 0x00], + Ok(true), + ), + ( + // 192.0.1.255 does not match constraint 192.0.2.0/24 + [0xC0, 0x00, 0x01, 0xFF], + [0xC0, 0x00, 0x02, 0x00, 0xFF, 0xFF, 0xFF, 0x00], + Ok(false), + ), + ( + // 192.0.3.0 does not match constraint 192.0.2.0/24 + [0xC0, 0x00, 0x03, 0x00], + [0xC0, 0x00, 0x02, 0x00, 0xFF, 0xFF, 0xFF, 0x00], + Ok(false), + ), + ]; + for (name, constraint, match_result) in names_and_constraints { + assert_eq!( + presented_id_matches_constraint( + untrusted::Input::from(&name), + untrusted::Input::from(&constraint), + ), + match_result + ) + } + + // Invalid name length (shorter) + assert_eq!( + presented_id_matches_constraint( + untrusted::Input::from(&[0xC0, 0x00, 0x02]), + untrusted::Input::from(&[0xC0, 0x00, 0x02, 0x00, 0xFF, 0xFF, 0xFF, 0x00]), + ), + Err(Error::BadDer), + ); + + // Invalid name length (longer) + assert_eq!( + presented_id_matches_constraint( + untrusted::Input::from(&[0xC0, 0x00, 0x02, 0x00, 0x00]), + untrusted::Input::from(&[0xC0, 0x00, 0x02, 0x00, 0xFF, 0xFF, 0xFF, 0x00]), + ), + Err(Error::BadDer), + ); + + // Unmatching constraint size (shorter) + assert_eq!( + presented_id_matches_constraint( + untrusted::Input::from(&[0xC0, 0x00, 0x02, 0x00]), + untrusted::Input::from(&[0xC0, 0x00, 0x02, 0x00, 0xFF, 0xFF, 0xFF]), + ), + Err(Error::InvalidNetworkMaskConstraint), + ); + + // Unmatching constraint size (longer) + assert_eq!( + presented_id_matches_constraint( + untrusted::Input::from(&[0xC0, 0x00, 0x02, 0x00]), + untrusted::Input::from(&[0xC0, 0x00, 0x02, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00]), + ), + Err(Error::InvalidNetworkMaskConstraint), + ); + + // Unmatching constraint size (IPv6 constraint for IPv4 address) + assert_eq!( + presented_id_matches_constraint( + untrusted::Input::from(&[0xC0, 0x00, 0x02, 0x00]), + untrusted::Input::from(&[ + 0x20, 0x01, 0x0D, 0xB8, 0xAB, 0xCD, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + ]), + ), + Ok(false), + ); + } + + #[test] + fn presented_id_matches_constraint_ipv6_test() { + let names_and_constraints = vec![ + ( + // 2001:0DB8:ABCD:0012:0000:0000:0000:0000 matches constraint + // 2001:0DB8:ABCD:0012:0000:0000:0000:0000/64 + [ + 0x20, 0x01, 0x0D, 0xB8, 0xAB, 0xCD, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + ], + [ + 0x20, 0x01, 0x0D, 0xB8, 0xAB, 0xCD, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + ], + Ok(true), + ), + ( + // 2001:0DB8:ABCD:0012:0000:0000:0000:0001 matches constraint + // 2001:0DB8:ABCD:0012:0000:0000:0000:0000/64 + [ + 0x20, 0x01, 0x0D, 0xB8, 0xAB, 0xCD, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, + ], + [ + 0x20, 0x01, 0x0D, 0xB8, 0xAB, 0xCD, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + ], + Ok(true), + ), + ( + // 2001:0DB8:ABCD:0012:FFFF:FFFF:FFFF:FFFF matches constraint + // 2001:0DB8:ABCD:0012:0000:0000:0000:0000/64 + [ + 0x20, 0x01, 0x0D, 0xB8, 0xAB, 0xCD, 0x00, 0x12, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, + ], + [ + 0x20, 0x01, 0x0D, 0xB8, 0xAB, 0xCD, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + ], + Ok(true), + ), + ( + // 2001:0DB8:ABCD:0011:0000:0000:0000:0000 does not match constraint + // 2001:0DB8:ABCD:0012:0000:0000:0000:0000/64 + [ + 0x20, 0x01, 0x0D, 0xB8, 0xAB, 0xCD, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + ], + [ + 0x20, 0x01, 0x0D, 0xB8, 0xAB, 0xCD, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + ], + Ok(false), + ), + ( + // 2001:0DB8:ABCD:0013:0000:0000:0000:0000 does not match constraint + // 2001:0DB8:ABCD:0012:0000:0000:0000:0000/64 + [ + 0x20, 0x01, 0x0D, 0xB8, 0xAB, 0xCD, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + ], + [ + 0x20, 0x01, 0x0D, 0xB8, 0xAB, 0xCD, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + ], + Ok(false), + ), + ]; + for (name, constraint, match_result) in names_and_constraints { + assert_eq!( + presented_id_matches_constraint( + untrusted::Input::from(&name), + untrusted::Input::from(&constraint), + ), + match_result + ) + } + + // Invalid name length (shorter) + assert_eq!( + presented_id_matches_constraint( + untrusted::Input::from(&[ + 0x20, 0x01, 0x0D, 0xB8, 0xAB, 0xCD, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00 + ]), + untrusted::Input::from(&[ + 0x20, 0x01, 0x0D, 0xB8, 0xAB, 0xCD, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + ]), + ), + Err(Error::BadDer), + ); + + // Invalid name length (longer) + assert_eq!( + presented_id_matches_constraint( + untrusted::Input::from(&[ + 0x20, 0x01, 0x0D, 0xB8, 0xAB, 0xCD, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00 + ]), + untrusted::Input::from(&[ + 0x20, 0x01, 0x0D, 0xB8, 0xAB, 0xCD, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + ]), + ), + Err(Error::BadDer), + ); + + // Unmatching constraint size (shorter) + assert_eq!( + presented_id_matches_constraint( + untrusted::Input::from(&[ + 0x20, 0x01, 0x0D, 0xB8, 0xAB, 0xCD, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + ]), + untrusted::Input::from(&[ + 0x20, 0x01, 0x0D, 0xB8, 0xAB, 0xCD, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00 + ]), + ), + Err(Error::InvalidNetworkMaskConstraint), + ); + + // Unmatching constraint size (longer) + assert_eq!( + presented_id_matches_constraint( + untrusted::Input::from(&[ + 0x20, 0x01, 0x0D, 0xB8, 0xAB, 0xCD, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + ]), + untrusted::Input::from(&[ + 0x20, 0x01, 0x0D, 0xB8, 0xAB, 0xCD, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + ]), + ), + Err(Error::InvalidNetworkMaskConstraint), + ); + + // Unmatching constraint size (IPv4 constraint for IPv6 address) + assert_eq!( + presented_id_matches_constraint( + untrusted::Input::from(&[ + 0x20, 0x01, 0x0D, 0xB8, 0xAB, 0xCD, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + ]), + untrusted::Input::from(&[0xC0, 0x00, 0x02, 0x00, 0xFF, 0xFF, 0xFF, 0x00]), + ), + Ok(false), + ); + } + + #[test] + fn test_presented_id_matches_reference_id() { + assert!(!presented_id_matches_reference_id( + untrusted::Input::from(&[]), + untrusted::Input::from(&[]), + )); + + assert!(!presented_id_matches_reference_id( + untrusted::Input::from(&[0x01]), + untrusted::Input::from(&[]) + )); + + assert!(!presented_id_matches_reference_id( + untrusted::Input::from(&[]), + untrusted::Input::from(&[0x01]) + )); + + assert!(presented_id_matches_reference_id( + untrusted::Input::from(&[1, 2, 3, 4]), + untrusted::Input::from(&[1, 2, 3, 4]) + )); + + assert!(!presented_id_matches_reference_id( + untrusted::Input::from(&[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]), + untrusted::Input::from(&[1, 2, 3, 4]) + )); + + assert!(!presented_id_matches_reference_id( + untrusted::Input::from(&[1, 2, 3, 4]), + untrusted::Input::from(&[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]) + )); + + assert!(presented_id_matches_reference_id( + untrusted::Input::from(&[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]), + untrusted::Input::from(&[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]) + )); + } + + #[test] + fn presented_id_matches_constraint_rejects_incorrect_length_arguments() { + // wrong length names + assert_eq!( + presented_id_matches_constraint( + untrusted::Input::from(b"\x00\x00\x00"), + untrusted::Input::from(b"") + ), + Err(Error::BadDer) + ); + assert_eq!( + presented_id_matches_constraint( + untrusted::Input::from(b"\x00\x00\x00\x00\x00"), + untrusted::Input::from(b"") + ), + Err(Error::BadDer) + ); + + assert_eq!( + presented_id_matches_constraint( + untrusted::Input::from( + b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + ), + untrusted::Input::from(b"") + ), + Err(Error::BadDer) + ); + assert_eq!( + presented_id_matches_constraint( + untrusted::Input::from( + b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + ), + untrusted::Input::from(b"") + ), + Err(Error::BadDer) + ); + + // wrong length constraints + assert_eq!( + presented_id_matches_constraint( + untrusted::Input::from(b"\x00\x00\x00\x00"), + untrusted::Input::from(b"\x00\x00\x00\x00\xff\xff\xff") + ), + Err(Error::InvalidNetworkMaskConstraint) + ); + assert_eq!( + presented_id_matches_constraint( + untrusted::Input::from(b"\x00\x00\x00\x00"), + untrusted::Input::from(b"\x00\x00\x00\x00\xff\xff\xff\xff\x00") + ), + Err(Error::InvalidNetworkMaskConstraint) + ); + assert_eq!( + presented_id_matches_constraint(untrusted::Input::from(b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"), + untrusted::Input::from(b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ + \xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff")), + Err(Error::InvalidNetworkMaskConstraint) + ); + assert_eq!( + presented_id_matches_constraint(untrusted::Input::from(b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"), + untrusted::Input::from(b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ + \xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff")), + Err(Error::InvalidNetworkMaskConstraint) + ); + + // ipv4-length not considered for ipv6-length name, and vv + assert_eq!( + presented_id_matches_constraint(untrusted::Input::from(b"\x00\x00\x00\x00"), + untrusted::Input::from(b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ + \xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff")), + Ok(false) + ); + assert_eq!( + presented_id_matches_constraint( + untrusted::Input::from( + b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + ), + untrusted::Input::from(b"\x00\x00\x00\x00\xff\xff\xff\xff") + ), + Ok(false) + ); + } +} + +#[cfg(all(test, feature = "alloc"))] +mod alloc_tests { + use super::*; + + // (presented_address, constraint_address, constraint_mask, expected_result) + const PRESENTED_MATCHES_CONSTRAINT: &[(&str, &str, &str, Result)] = &[ + // Cannot mix IpV4 with IpV6 and viceversa + ("2001:db8::", "8.8.8.8", "255.255.255.255", Ok(false)), + ("8.8.8.8", "2001:db8::", "ffff::", Ok(false)), + // IpV4 non-contiguous masks + ( + "8.8.8.8", + "8.8.8.8", + "255.255.255.1", + Err(Error::InvalidNetworkMaskConstraint), + ), + ( + "8.8.8.8", + "8.8.8.8", + "255.255.0.255", + Err(Error::InvalidNetworkMaskConstraint), + ), + ( + "8.8.8.8", + "8.8.8.8", + "255.0.255.255", + Err(Error::InvalidNetworkMaskConstraint), + ), + ( + "8.8.8.8", + "8.8.8.8", + "0.255.255.255", + Err(Error::InvalidNetworkMaskConstraint), + ), + ( + "8.8.8.8", + "8.8.8.8", + "1.255.255.255", + Err(Error::InvalidNetworkMaskConstraint), + ), + ( + "8.8.8.8", + "8.8.8.8", + "128.128.128.128", + Err(Error::InvalidNetworkMaskConstraint), + ), + // IpV4 + ("8.8.8.8", "8.8.8.8", "255.255.255.255", Ok(true)), + ("8.8.8.9", "8.8.8.8", "255.255.255.255", Ok(false)), + ("8.8.8.9", "8.8.8.8", "255.255.255.254", Ok(true)), + ("8.8.8.10", "8.8.8.8", "255.255.255.254", Ok(false)), + ("8.8.8.10", "8.8.8.8", "255.255.255.0", Ok(true)), + ("8.8.15.10", "8.8.8.8", "255.255.248.0", Ok(true)), + ("8.8.16.10", "8.8.8.8", "255.255.248.0", Ok(false)), + ("8.8.16.10", "8.8.8.8", "255.255.0.0", Ok(true)), + ("8.31.16.10", "8.8.8.8", "255.224.0.0", Ok(true)), + ("8.32.16.10", "8.8.8.8", "255.224.0.0", Ok(false)), + ("8.32.16.10", "8.8.8.8", "255.0.0.0", Ok(true)), + ("63.32.16.10", "8.8.8.8", "192.0.0.0", Ok(true)), + ("64.32.16.10", "8.8.8.8", "192.0.0.0", Ok(false)), + ("64.32.16.10", "8.8.8.8", "0.0.0.0", Ok(true)), + // IpV6 non-contiguous masks + ( + "2001:db8::", + "2001:db8::", + "fffe:ffff::", + Err(Error::InvalidNetworkMaskConstraint), + ), + ( + "2001:db8::", + "2001:db8::", + "ffff:fdff::", + Err(Error::InvalidNetworkMaskConstraint), + ), + ( + "2001:db8::", + "2001:db8::", + "ffff:feff::", + Err(Error::InvalidNetworkMaskConstraint), + ), + ( + "2001:db8::", + "2001:db8::", + "ffff:fcff::", + Err(Error::InvalidNetworkMaskConstraint), + ), + ( + "2001:db8::", + "2001:db8::", + "7fff:ffff::", + Err(Error::InvalidNetworkMaskConstraint), + ), + // IpV6 + ("2001:db8::", "2001:db8::", "ffff:ffff::", Ok(true)), + ("2001:db9::", "2001:db8::", "ffff:ffff::", Ok(false)), + ("2001:db9::", "2001:db8::", "ffff:fffe::", Ok(true)), + ("2001:dba::", "2001:db8::", "ffff:fffe::", Ok(false)), + ("2001:dba::", "2001:db8::", "ffff:ff00::", Ok(true)), + ("2001:dca::", "2001:db8::", "ffff:fe00::", Ok(true)), + ("2001:fca::", "2001:db8::", "ffff:fe00::", Ok(false)), + ("2001:fca::", "2001:db8::", "ffff:0000::", Ok(true)), + ("2000:fca::", "2001:db8::", "fffe:0000::", Ok(true)), + ("2003:fca::", "2001:db8::", "fffe:0000::", Ok(false)), + ("2003:fca::", "2001:db8::", "ff00:0000::", Ok(true)), + ("1003:fca::", "2001:db8::", "e000:0000::", Ok(false)), + ("1003:fca::", "2001:db8::", "0000:0000::", Ok(true)), + ]; + + #[cfg(feature = "std")] + #[test] + fn presented_matches_constraint_test() { + use std::boxed::Box; + use std::net::IpAddr; + + for &(presented, constraint_address, constraint_mask, expected_result) in + PRESENTED_MATCHES_CONSTRAINT + { + let presented_bytes: Box<[u8]> = match presented.parse::().unwrap() { + IpAddr::V4(p) => Box::new(p.octets()), + IpAddr::V6(p) => Box::new(p.octets()), + }; + let ca_bytes: Box<[u8]> = match constraint_address.parse::().unwrap() { + IpAddr::V4(ca) => Box::new(ca.octets()), + IpAddr::V6(ca) => Box::new(ca.octets()), + }; + let cm_bytes: Box<[u8]> = match constraint_mask.parse::().unwrap() { + IpAddr::V4(cm) => Box::new(cm.octets()), + IpAddr::V6(cm) => Box::new(cm.octets()), + }; + let constraint_bytes = [ca_bytes, cm_bytes].concat(); + let actual_result = presented_id_matches_constraint( + untrusted::Input::from(&presented_bytes), + untrusted::Input::from(&constraint_bytes), + ); + assert_eq!( + actual_result, expected_result, + "presented_id_matches_constraint(\"{:?}\", \"{:?}\")", + presented_bytes, constraint_bytes + ); + } + } +} diff --git a/vendor/rustls-webpki-legacy/src/subject_name/mod.rs b/vendor/rustls-webpki-legacy/src/subject_name/mod.rs new file mode 100644 index 00000000000..fc64b94c042 --- /dev/null +++ b/vendor/rustls-webpki-legacy/src/subject_name/mod.rs @@ -0,0 +1,22 @@ +// Copyright 2022 Rafael Fernández López. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +mod dns_name; +pub(crate) use dns_name::{verify_dns_names, WildcardDnsNameRef}; + +mod ip_address; +pub(crate) use ip_address::verify_ip_address_names; + +mod verify; +pub(super) use verify::{check_name_constraints, GeneralName, NameIterator}; diff --git a/vendor/rustls-webpki-legacy/src/subject_name/verify.rs b/vendor/rustls-webpki-legacy/src/subject_name/verify.rs new file mode 100644 index 00000000000..17b178e18d7 --- /dev/null +++ b/vendor/rustls-webpki-legacy/src/subject_name/verify.rs @@ -0,0 +1,297 @@ +// Copyright 2015 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +use super::dns_name::{self, IdRole}; +use super::ip_address; +use crate::der::{self, FromDer}; +use crate::error::{DerTypeId, Error}; +use crate::verify_cert::{Budget, PathNode}; + +// https://tools.ietf.org/html/rfc5280#section-4.2.1.10 +pub(crate) fn check_name_constraints( + constraints: Option<&mut untrusted::Reader<'_>>, + path: &PathNode<'_>, + budget: &mut Budget, +) -> Result<(), Error> { + let constraints = match constraints { + Some(input) => input, + None => return Ok(()), + }; + + fn parse_subtrees<'b>( + inner: &mut untrusted::Reader<'b>, + subtrees_tag: der::Tag, + ) -> Result>, Error> { + if !inner.peek(subtrees_tag.into()) { + return Ok(None); + } + der::expect_tag(inner, subtrees_tag).map(Some) + } + + let permitted_subtrees = parse_subtrees(constraints, der::Tag::ContextSpecificConstructed0)?; + let excluded_subtrees = parse_subtrees(constraints, der::Tag::ContextSpecificConstructed1)?; + + for path in path.iter() { + let result = NameIterator::new(Some(path.cert.subject), path.cert.subject_alt_name) + .find_map(|result| { + let name = match result { + Ok(name) => name, + Err(err) => return Some(Err(err)), + }; + + check_presented_id_conforms_to_constraints( + name, + permitted_subtrees, + excluded_subtrees, + budget, + ) + }); + + if let Some(Err(err)) = result { + return Err(err); + } + } + + Ok(()) +} + +fn check_presented_id_conforms_to_constraints( + name: GeneralName<'_>, + permitted_subtrees: Option>, + excluded_subtrees: Option>, + budget: &mut Budget, +) -> Option> { + let subtrees = [ + (Subtrees::PermittedSubtrees, permitted_subtrees), + (Subtrees::ExcludedSubtrees, excluded_subtrees), + ]; + + fn general_subtree<'b>(input: &mut untrusted::Reader<'b>) -> Result, Error> { + der::read_all(der::expect_tag(input, der::Tag::Sequence)?) + } + + for (subtrees, constraints) in subtrees { + let mut constraints = match constraints { + Some(constraints) => untrusted::Reader::new(constraints), + None => continue, + }; + + let mut has_permitted_subtrees_match = false; + let mut has_permitted_subtrees_mismatch = false; + while !constraints.at_end() { + if let Err(e) = budget.consume_name_constraint_comparison() { + return Some(Err(e)); + } + + // http://tools.ietf.org/html/rfc5280#section-4.2.1.10: "Within this + // profile, the minimum and maximum fields are not used with any name + // forms, thus, the minimum MUST be zero, and maximum MUST be absent." + // + // Since the default value isn't allowed to be encoded according to the + // DER encoding rules for DEFAULT, this is equivalent to saying that + // neither minimum or maximum must be encoded. + let base = match general_subtree(&mut constraints) { + Ok(base) => base, + Err(err) => return Some(Err(err)), + }; + + let matches = match (name, base) { + (GeneralName::DnsName(name), GeneralName::DnsName(base)) => { + dns_name::presented_id_matches_reference_id(name, IdRole::NameConstraint, base) + } + + (GeneralName::DirectoryName, GeneralName::DirectoryName) => Ok( + // Reject any uses of directory name constraints; we don't implement this. + // + // Rejecting everything technically confirms to RFC5280: + // + // "If a name constraints extension that is marked as critical imposes constraints + // on a particular name form, and an instance of that name form appears in the + // subject field or subjectAltName extension of a subsequent certificate, then + // the application MUST either process the constraint or _reject the certificate_." + // + // TODO: rustls/webpki#19 + // + // Rejection is achieved by not matching any PermittedSubtrees, and matching all + // ExcludedSubtrees. + match subtrees { + Subtrees::PermittedSubtrees => false, + Subtrees::ExcludedSubtrees => true, + }, + ), + + (GeneralName::IpAddress(name), GeneralName::IpAddress(base)) => { + ip_address::presented_id_matches_constraint(name, base) + } + + // RFC 4280 says "If a name constraints extension that is marked as + // critical imposes constraints on a particular name form, and an + // instance of that name form appears in the subject field or + // subjectAltName extension of a subsequent certificate, then the + // application MUST either process the constraint or reject the + // certificate." Later, the CABForum agreed to support non-critical + // constraints, so it is important to reject the cert without + // considering whether the name constraint it critical. + (GeneralName::Unsupported(name_tag), GeneralName::Unsupported(base_tag)) + if name_tag == base_tag => + { + Err(Error::NameConstraintViolation) + } + + _ => { + // mismatch between constraint and name types; continue with current + // name and next constraint + continue; + } + }; + + match (subtrees, matches) { + (Subtrees::PermittedSubtrees, Ok(true)) => { + has_permitted_subtrees_match = true; + } + + (Subtrees::PermittedSubtrees, Ok(false)) => { + has_permitted_subtrees_mismatch = true; + } + + (Subtrees::ExcludedSubtrees, Ok(true)) => { + return Some(Err(Error::NameConstraintViolation)); + } + + (Subtrees::ExcludedSubtrees, Ok(false)) => (), + (_, Err(err)) => return Some(Err(err)), + } + } + + if has_permitted_subtrees_mismatch && !has_permitted_subtrees_match { + // If there was any entry of the given type in permittedSubtrees, then + // it required that at least one of them must match. Since none of them + // did, we have a failure. + return Some(Err(Error::NameConstraintViolation)); + } + } + + None +} + +#[derive(Clone, Copy)] +enum Subtrees { + PermittedSubtrees, + ExcludedSubtrees, +} + +pub(crate) struct NameIterator<'a> { + subject_alt_name: Option>, + subject_directory_name: Option>, +} + +impl<'a> NameIterator<'a> { + pub(crate) fn new( + subject: Option>, + subject_alt_name: Option>, + ) -> Self { + NameIterator { + subject_alt_name: subject_alt_name.map(untrusted::Reader::new), + + // If `subject` is present, we always consider it as a `DirectoryName`. + subject_directory_name: subject, + } + } +} + +impl<'a> Iterator for NameIterator<'a> { + type Item = Result, Error>; + + fn next(&mut self) -> Option { + if let Some(subject_alt_name) = &mut self.subject_alt_name { + // https://bugzilla.mozilla.org/show_bug.cgi?id=1143085: An empty + // subjectAltName is not legal, but some certificates have an empty + // subjectAltName. Since we don't support CN-IDs, the certificate + // will be rejected either way, but checking `at_end` before + // attempting to parse the first entry allows us to return a better + // error code. + + if !subject_alt_name.at_end() { + let err = match GeneralName::from_der(subject_alt_name) { + Ok(name) => return Some(Ok(name)), + Err(err) => err, + }; + + // Make sure we don't yield any items after this error. + self.subject_alt_name = None; + self.subject_directory_name = None; + return Some(Err(err)); + } else { + self.subject_alt_name = None; + } + } + + if self.subject_directory_name.take().is_some() { + return Some(Ok(GeneralName::DirectoryName)); + } + + None + } +} + +// It is *not* valid to derive `Eq`, `PartialEq, etc. for this type. In +// particular, for the types of `GeneralName`s that we don't understand, we +// don't even store the value. Also, the meaning of a `GeneralName` in a name +// constraint is different than the meaning of the identically-represented +// `GeneralName` in other contexts. +#[derive(Clone, Copy)] +pub(crate) enum GeneralName<'a> { + DnsName(untrusted::Input<'a>), + DirectoryName, + IpAddress(untrusted::Input<'a>), + UniformResourceIdentifier(untrusted::Input<'a>), + + // The value is the `tag & ~(der::CONTEXT_SPECIFIC | der::CONSTRUCTED)` so + // that the name constraint checking matches tags regardless of whether + // those bits are set. + Unsupported(u8), +} + +impl<'a> FromDer<'a> for GeneralName<'a> { + fn from_der(reader: &mut untrusted::Reader<'a>) -> Result { + use der::{CONSTRUCTED, CONTEXT_SPECIFIC}; + use GeneralName::*; + + #[allow(clippy::identity_op)] + const OTHER_NAME_TAG: u8 = CONTEXT_SPECIFIC | CONSTRUCTED | 0; + const RFC822_NAME_TAG: u8 = CONTEXT_SPECIFIC | 1; + const DNS_NAME_TAG: u8 = CONTEXT_SPECIFIC | 2; + const X400_ADDRESS_TAG: u8 = CONTEXT_SPECIFIC | CONSTRUCTED | 3; + const DIRECTORY_NAME_TAG: u8 = CONTEXT_SPECIFIC | CONSTRUCTED | 4; + const EDI_PARTY_NAME_TAG: u8 = CONTEXT_SPECIFIC | CONSTRUCTED | 5; + const UNIFORM_RESOURCE_IDENTIFIER_TAG: u8 = CONTEXT_SPECIFIC | 6; + const IP_ADDRESS_TAG: u8 = CONTEXT_SPECIFIC | 7; + const REGISTERED_ID_TAG: u8 = CONTEXT_SPECIFIC | 8; + + let (tag, value) = der::read_tag_and_get_value(reader)?; + Ok(match tag { + DNS_NAME_TAG => DnsName(value), + DIRECTORY_NAME_TAG => DirectoryName, + IP_ADDRESS_TAG => IpAddress(value), + UNIFORM_RESOURCE_IDENTIFIER_TAG => UniformResourceIdentifier(value), + + OTHER_NAME_TAG | RFC822_NAME_TAG | X400_ADDRESS_TAG | EDI_PARTY_NAME_TAG + | REGISTERED_ID_TAG => Unsupported(tag & !(CONTEXT_SPECIFIC | CONSTRUCTED)), + + _ => return Err(Error::BadDer), + }) + } + + const TYPE_ID: DerTypeId = DerTypeId::GeneralName; +} diff --git a/vendor/rustls-webpki-legacy/src/test_utils.rs b/vendor/rustls-webpki-legacy/src/test_utils.rs new file mode 100644 index 00000000000..0cb8db16982 --- /dev/null +++ b/vendor/rustls-webpki-legacy/src/test_utils.rs @@ -0,0 +1,50 @@ +#![cfg(feature = "alloc")] +use std::prelude::v1::*; + +#[cfg_attr(not(feature = "ring"), allow(dead_code))] +pub(crate) fn make_end_entity( + issuer: &rcgen::Certificate, + issuer_key: &rcgen::KeyPair, +) -> rcgen::CertifiedKey { + let key_pair = rcgen::KeyPair::generate_for(RCGEN_SIGNATURE_ALG).unwrap(); + rcgen::CertifiedKey { + cert: end_entity_params(vec!["example.com".into()]) + .signed_by(&key_pair, issuer, issuer_key) + .unwrap(), + key_pair, + } +} + +pub(crate) fn make_issuer(org_name: impl Into) -> rcgen::CertifiedKey { + let key_pair = rcgen::KeyPair::generate_for(RCGEN_SIGNATURE_ALG).unwrap(); + rcgen::CertifiedKey { + cert: issuer_params(org_name).self_signed(&key_pair).unwrap(), + key_pair, + } +} + +/// Populate a [CertificateParams] that describes an unconstrained issuer certificate capable +/// of signing other certificates and CRLs, with the given `org_name` as an organization distinguished +/// subject name. +pub(crate) fn issuer_params(org_name: impl Into) -> rcgen::CertificateParams { + let mut ca_params = rcgen::CertificateParams::new(Vec::new()).unwrap(); + ca_params + .distinguished_name + .push(rcgen::DnType::OrganizationName, org_name); + ca_params.is_ca = rcgen::IsCa::Ca(rcgen::BasicConstraints::Unconstrained); + ca_params.key_usages = vec![ + rcgen::KeyUsagePurpose::KeyCertSign, + rcgen::KeyUsagePurpose::DigitalSignature, + rcgen::KeyUsagePurpose::CrlSign, + ]; + ca_params +} + +pub(crate) fn end_entity_params(subject_alt_names: Vec) -> rcgen::CertificateParams { + let mut ee_params = rcgen::CertificateParams::new(subject_alt_names).unwrap(); + ee_params.is_ca = rcgen::IsCa::ExplicitNoCa; + ee_params +} + +/// Signature algorithm used by certificates and parameters generated using the test utils helpers. +pub(crate) static RCGEN_SIGNATURE_ALG: &rcgen::SignatureAlgorithm = &rcgen::PKCS_ECDSA_P256_SHA256; diff --git a/vendor/rustls-webpki-legacy/src/time.rs b/vendor/rustls-webpki-legacy/src/time.rs new file mode 100644 index 00000000000..f96aeb62622 --- /dev/null +++ b/vendor/rustls-webpki-legacy/src/time.rs @@ -0,0 +1,283 @@ +// Copyright 2015-2016 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +//! Conversions into the library's time type. + +use core::time::Duration; + +use pki_types::UnixTime; + +use crate::der::{self, FromDer, Tag}; +use crate::error::{DerTypeId, Error}; + +impl<'a> FromDer<'a> for UnixTime { + fn from_der(input: &mut untrusted::Reader<'a>) -> Result { + let is_utc_time = input.peek(Tag::UTCTime.into()); + let expected_tag = if is_utc_time { + Tag::UTCTime + } else { + Tag::GeneralizedTime + }; + + fn read_digit(inner: &mut untrusted::Reader<'_>) -> Result { + const DIGIT: core::ops::RangeInclusive = b'0'..=b'9'; + let b = inner.read_byte().map_err(|_| Error::BadDerTime)?; + if DIGIT.contains(&b) { + return Ok(u64::from(b - DIGIT.start())); + } + Err(Error::BadDerTime) + } + + fn read_two_digits( + inner: &mut untrusted::Reader<'_>, + min: u64, + max: u64, + ) -> Result { + let hi = read_digit(inner)?; + let lo = read_digit(inner)?; + let value = (hi * 10) + lo; + if value < min || value > max { + return Err(Error::BadDerTime); + } + Ok(value) + } + + der::nested( + input, + expected_tag, + Error::TrailingData(Self::TYPE_ID), + |value| { + let (year_hi, year_lo) = if is_utc_time { + let lo = read_two_digits(value, 0, 99)?; + let hi = if lo >= 50 { 19 } else { 20 }; + (hi, lo) + } else { + let hi = read_two_digits(value, 0, 99)?; + let lo = read_two_digits(value, 0, 99)?; + (hi, lo) + }; + + let year = (year_hi * 100) + year_lo; + let month = read_two_digits(value, 1, 12)?; + let days_in_month = days_in_month(year, month); + let day_of_month = read_two_digits(value, 1, days_in_month)?; + let hours = read_two_digits(value, 0, 23)?; + let minutes = read_two_digits(value, 0, 59)?; + let seconds = read_two_digits(value, 0, 59)?; + + let time_zone = value.read_byte().map_err(|_| Error::BadDerTime)?; + if time_zone != b'Z' { + return Err(Error::BadDerTime); + } + + time_from_ymdhms_utc(year, month, day_of_month, hours, minutes, seconds) + }, + ) + } + + const TYPE_ID: DerTypeId = DerTypeId::Time; +} + +pub(crate) fn time_from_ymdhms_utc( + year: u64, + month: u64, + day_of_month: u64, + hours: u64, + minutes: u64, + seconds: u64, +) -> Result { + let days_before_year_since_unix_epoch = days_before_year_since_unix_epoch(year)?; + + const JAN: u64 = 31; + let feb = days_in_feb(year); + const MAR: u64 = 31; + const APR: u64 = 30; + const MAY: u64 = 31; + const JUN: u64 = 30; + const JUL: u64 = 31; + const AUG: u64 = 31; + const SEP: u64 = 30; + const OCT: u64 = 31; + const NOV: u64 = 30; + let days_before_month_in_year = match month { + 1 => 0, + 2 => JAN, + 3 => JAN + feb, + 4 => JAN + feb + MAR, + 5 => JAN + feb + MAR + APR, + 6 => JAN + feb + MAR + APR + MAY, + 7 => JAN + feb + MAR + APR + MAY + JUN, + 8 => JAN + feb + MAR + APR + MAY + JUN + JUL, + 9 => JAN + feb + MAR + APR + MAY + JUN + JUL + AUG, + 10 => JAN + feb + MAR + APR + MAY + JUN + JUL + AUG + SEP, + 11 => JAN + feb + MAR + APR + MAY + JUN + JUL + AUG + SEP + OCT, + 12 => JAN + feb + MAR + APR + MAY + JUN + JUL + AUG + SEP + OCT + NOV, + _ => unreachable!(), // `read_two_digits` already bounds-checked it. + }; + + let days_before = + days_before_year_since_unix_epoch + days_before_month_in_year + day_of_month - 1; + + let seconds_since_unix_epoch = + (days_before * 24 * 60 * 60) + (hours * 60 * 60) + (minutes * 60) + seconds; + + Ok(UnixTime::since_unix_epoch(Duration::from_secs( + seconds_since_unix_epoch, + ))) +} + +fn days_before_year_since_unix_epoch(year: u64) -> Result { + // We don't support dates before January 1, 1970 because that is the + // Unix epoch. It is likely that other software won't deal well with + // certificates that have dates before the epoch. + if year < UNIX_EPOCH_YEAR { + return Err(Error::BadDerTime); + } + let days_before_year_ad = days_before_year_ad(year); + debug_assert!(days_before_year_ad >= DAYS_BEFORE_UNIX_EPOCH_AD); + Ok(days_before_year_ad - DAYS_BEFORE_UNIX_EPOCH_AD) +} + +const UNIX_EPOCH_YEAR: u64 = 1970; + +fn days_before_year_ad(year: u64) -> u64 { + ((year - 1) * 365) + + ((year - 1) / 4) // leap years are every 4 years, + - ((year - 1) / 100) // except years divisible by 100, + + ((year - 1) / 400) // except years divisible by 400. +} + +pub(crate) fn days_in_month(year: u64, month: u64) -> u64 { + match month { + 1 | 3 | 5 | 7 | 8 | 10 | 12 => 31, + 4 | 6 | 9 | 11 => 30, + 2 => days_in_feb(year), + _ => unreachable!(), // `read_two_digits` already bounds-checked it. + } +} + +fn days_in_feb(year: u64) -> u64 { + if (year % 4 == 0) && ((year % 100 != 0) || (year % 400 == 0)) { + 29 + } else { + 28 + } +} + +/// All the days up to and including 1969, plus the 477 leap days since AD began +/// (calculated in Gregorian rules). +const DAYS_BEFORE_UNIX_EPOCH_AD: u64 = 1969 * 365 + 477; + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_days_before_unix_epoch() { + assert_eq!( + DAYS_BEFORE_UNIX_EPOCH_AD, + days_before_year_ad(UNIX_EPOCH_YEAR) + ); + } + + #[test] + fn test_days_before_year_since_unix_epoch() { + assert_eq!(Ok(0), days_before_year_since_unix_epoch(UNIX_EPOCH_YEAR)); + assert_eq!( + Ok(365), + days_before_year_since_unix_epoch(UNIX_EPOCH_YEAR + 1) + ); + assert_eq!( + Err(Error::BadDerTime), + days_before_year_since_unix_epoch(UNIX_EPOCH_YEAR - 1) + ); + } + + #[test] + fn test_days_in_month() { + assert_eq!(days_in_month(2017, 1), 31); + assert_eq!(days_in_month(2017, 2), 28); + assert_eq!(days_in_month(2017, 3), 31); + assert_eq!(days_in_month(2017, 4), 30); + assert_eq!(days_in_month(2017, 5), 31); + assert_eq!(days_in_month(2017, 6), 30); + assert_eq!(days_in_month(2017, 7), 31); + assert_eq!(days_in_month(2017, 8), 31); + assert_eq!(days_in_month(2017, 9), 30); + assert_eq!(days_in_month(2017, 10), 31); + assert_eq!(days_in_month(2017, 11), 30); + assert_eq!(days_in_month(2017, 12), 31); + + // leap cases + assert_eq!(days_in_month(2000, 2), 29); + assert_eq!(days_in_month(2004, 2), 29); + assert_eq!(days_in_month(2016, 2), 29); + assert_eq!(days_in_month(2100, 2), 28); + } + + #[test] + fn test_time_from_ymdhms_utc() { + // 1969-12-31 00:00:00 + assert_eq!( + Err(Error::BadDerTime), + time_from_ymdhms_utc(UNIX_EPOCH_YEAR - 1, 1, 1, 0, 0, 0) + ); + + // 1969-12-31 23:59:59 + assert_eq!( + Err(Error::BadDerTime), + time_from_ymdhms_utc(UNIX_EPOCH_YEAR - 1, 12, 31, 23, 59, 59) + ); + + // 1970-01-01 00:00:00 + assert_eq!( + UnixTime::since_unix_epoch(Duration::from_secs(0)), + time_from_ymdhms_utc(UNIX_EPOCH_YEAR, 1, 1, 0, 0, 0).unwrap() + ); + + // 1970-01-01 00:00:01 + assert_eq!( + UnixTime::since_unix_epoch(Duration::from_secs(1)), + time_from_ymdhms_utc(UNIX_EPOCH_YEAR, 1, 1, 0, 0, 1).unwrap() + ); + + // 1971-01-01 00:00:00 + assert_eq!( + UnixTime::since_unix_epoch(Duration::from_secs(365 * 86400)), + time_from_ymdhms_utc(UNIX_EPOCH_YEAR + 1, 1, 1, 0, 0, 0).unwrap() + ); + + // year boundary + assert_eq!( + UnixTime::since_unix_epoch(Duration::from_secs(1_483_228_799)), + time_from_ymdhms_utc(2016, 12, 31, 23, 59, 59).unwrap() + ); + assert_eq!( + UnixTime::since_unix_epoch(Duration::from_secs(1_483_228_800)), + time_from_ymdhms_utc(2017, 1, 1, 0, 0, 0).unwrap() + ); + + // not a leap year + assert_eq!( + UnixTime::since_unix_epoch(Duration::from_secs(1_492_449_162)), + time_from_ymdhms_utc(2017, 4, 17, 17, 12, 42).unwrap() + ); + + // leap year, post-feb + assert_eq!( + UnixTime::since_unix_epoch(Duration::from_secs(1_460_913_162)), + time_from_ymdhms_utc(2016, 4, 17, 17, 12, 42).unwrap() + ); + } +} diff --git a/vendor/rustls-webpki-legacy/src/trust_anchor.rs b/vendor/rustls-webpki-legacy/src/trust_anchor.rs new file mode 100644 index 00000000000..c2320f1ec78 --- /dev/null +++ b/vendor/rustls-webpki-legacy/src/trust_anchor.rs @@ -0,0 +1,103 @@ +use pki_types::{CertificateDer, TrustAnchor}; + +use crate::cert::{lenient_certificate_serial_number, Cert}; +use crate::der; +use crate::error::{DerTypeId, Error}; + +/// Interprets the given pre-validated DER-encoded certificate as a `TrustAnchor`. +/// +/// This function extracts the components of a trust anchor (see [RFC 5280 6.1.1]) from +/// an X.509 certificate obtained from a source trusted to have appropriately validated +/// the subject name, public key, and name constraints in the certificate, for example your +/// operating system's trust store. +/// +/// No additional checks on the content of the certificate, including whether it is self-signed, +/// or has a basic constraints extension indicating the `cA` boolean is true, will be performed. +/// [RFC 5280 6.2] notes: +/// > Implementations that use self-signed certificates to specify trust +/// > anchor information are free to process or ignore such information. +/// +/// This function is intended for users constructing `TrustAnchor`'s from existing trust stores +/// that express trust anchors as X.509 certificates. It should **not** be used to treat an +/// end-entity certificate as a `TrustAnchor` in an effort to validate the same end-entity +/// certificate during path building. Webpki has no support for self-signed certificates. +/// +/// [RFC 5280 6.1.1]: +/// [RFC 5280 6.2]: +pub fn anchor_from_trusted_cert<'a>( + cert: &'a CertificateDer<'a>, +) -> Result, Error> { + let cert_der = untrusted::Input::from(cert.as_ref()); + + // v1 certificates will result in `Error::BadDer` because `parse_cert` will + // expect a version field that isn't there. In that case, try to parse the + // certificate using a special parser for v1 certificates. Notably, that + // parser doesn't allow extensions, so there's no need to worry about + // embedded name constraints in a v1 certificate. + match Cert::from_der(cert_der) { + Ok(cert) => Ok(TrustAnchor::from(cert)), + Err(Error::UnsupportedCertVersion) => { + extract_trust_anchor_from_v1_cert_der(cert_der).or(Err(Error::BadDer)) + } + Err(err) => Err(err), + } +} + +/// Parses a v1 certificate directly into a TrustAnchor. +fn extract_trust_anchor_from_v1_cert_der( + cert_der: untrusted::Input<'_>, +) -> Result, Error> { + // X.509 Certificate: https://tools.ietf.org/html/rfc5280#section-4.1. + cert_der.read_all(Error::BadDer, |cert_der| { + der::nested( + cert_der, + der::Tag::Sequence, + Error::TrailingData(DerTypeId::TrustAnchorV1), + |cert_der| { + let anchor = der::nested( + cert_der, + der::Tag::Sequence, + Error::TrailingData(DerTypeId::TrustAnchorV1TbsCertificate), + |tbs| { + // The version number field does not appear in v1 certificates. + lenient_certificate_serial_number(tbs)?; + + skip(tbs, der::Tag::Sequence)?; // signature. + skip(tbs, der::Tag::Sequence)?; // issuer. + skip(tbs, der::Tag::Sequence)?; // validity. + let subject = der::expect_tag(tbs, der::Tag::Sequence)?; + let spki = der::expect_tag(tbs, der::Tag::Sequence)?; + + Ok(TrustAnchor { + subject: subject.as_slice_less_safe().into(), + subject_public_key_info: spki.as_slice_less_safe().into(), + name_constraints: None, + }) + }, + ); + + // read and discard signatureAlgorithm + signature + skip(cert_der, der::Tag::Sequence)?; + skip(cert_der, der::Tag::BitString)?; + + anchor + }, + ) + }) +} + +impl<'a> From> for TrustAnchor<'a> { + fn from(cert: Cert<'a>) -> Self { + Self { + subject: cert.subject.as_slice_less_safe().into(), + subject_public_key_info: cert.spki.as_slice_less_safe().into(), + name_constraints: cert + .name_constraints + .map(|nc| nc.as_slice_less_safe().into()), + } + } +} + +fn skip(input: &mut untrusted::Reader<'_>, tag: der::Tag) -> Result<(), Error> { + der::expect_tag(input, tag).map(|_| ()) +} diff --git a/vendor/rustls-webpki-legacy/src/verify_cert.rs b/vendor/rustls-webpki-legacy/src/verify_cert.rs new file mode 100644 index 00000000000..113622a378d --- /dev/null +++ b/vendor/rustls-webpki-legacy/src/verify_cert.rs @@ -0,0 +1,1162 @@ +// Copyright 2015 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +use core::ops::ControlFlow; + +use pki_types::{CertificateDer, SignatureVerificationAlgorithm, TrustAnchor, UnixTime}; + +use crate::cert::Cert; +use crate::crl::RevocationOptions; +use crate::der::{self, FromDer}; +use crate::end_entity::EndEntityCert; +use crate::error::Error; +use crate::{public_values_eq, signed_data, subject_name}; + +// Use `'a` for lifetimes that we don't care about, `'p` for lifetimes that become a part of +// the `VerifiedPath`. +pub(crate) struct ChainOptions<'a, 'p> { + pub(crate) eku: KeyUsage, + pub(crate) supported_sig_algs: &'a [&'a dyn SignatureVerificationAlgorithm], + pub(crate) trust_anchors: &'p [TrustAnchor<'p>], + pub(crate) intermediate_certs: &'p [CertificateDer<'p>], + pub(crate) revocation: Option>, +} + +impl<'a, 'p: 'a> ChainOptions<'a, 'p> { + pub(crate) fn build_chain( + &self, + end_entity: &'p EndEntityCert<'p>, + time: UnixTime, + verify_path: Option<&dyn Fn(&VerifiedPath<'_>) -> Result<(), Error>>, + ) -> Result, Error> { + let mut path = PartialPath::new(end_entity); + match self.build_chain_inner(&mut path, time, verify_path, 0, &mut Budget::default()) { + Ok(anchor) => Ok(VerifiedPath::new(end_entity, anchor, path)), + Err(ControlFlow::Break(err)) | Err(ControlFlow::Continue(err)) => Err(err), + } + } + + fn build_chain_inner( + &self, + path: &mut PartialPath<'p>, + time: UnixTime, + verify_path: Option<&dyn Fn(&VerifiedPath<'_>) -> Result<(), Error>>, + sub_ca_count: usize, + budget: &mut Budget, + ) -> Result<&'p TrustAnchor<'p>, ControlFlow> { + // Backport upstream 0.103.16 SPKI distrust before issuer/path processing. + if DISTRUSTED_SPKIS.contains(&path.head().spki.as_slice_less_safe()) { + return Err(Error::UnknownIssuer.into()); + } + + let role = path.node().role(); + + check_issuer_independent_properties(path.head(), time, role, sub_ca_count, self.eku.inner)?; + + // TODO: HPKP checks. + + let result = + loop_while_non_fatal_error(Error::UnknownIssuer, self.trust_anchors, |trust_anchor| { + let trust_anchor_subject = untrusted::Input::from(trust_anchor.subject.as_ref()); + if !public_values_eq(path.head().issuer, trust_anchor_subject) { + return Err(Error::UnknownIssuer.into()); + } + + if DISTRUSTED_SPKIS.contains(&trust_anchor.subject_public_key_info.as_ref()) { + return Err(Error::UnknownIssuer.into()); + } + + let node = path.node(); + self.check_signed_chain(&node, time, trust_anchor, budget)?; + check_signed_chain_name_constraints(&node, trust_anchor, budget)?; + + let verify = match verify_path { + Some(verify) => verify, + None => return Ok(trust_anchor), + }; + + let candidate = VerifiedPath { + end_entity: path.end_entity, + intermediates: Intermediates::Borrowed(&path.intermediates[..path.used]), + anchor: trust_anchor, + }; + + match verify(&candidate) { + Ok(()) => Ok(trust_anchor), + Err(err) => Err(ControlFlow::Continue(err)), + } + }); + + let err = match result { + Ok(anchor) => return Ok(anchor), + // Fatal errors should halt further path building. + res @ Err(ControlFlow::Break(_)) => return res, + // Non-fatal errors should be carried forward as the default_error for subsequent + // loop_while_non_fatal_error processing and only returned once all other path-building + // options have been exhausted. + Err(ControlFlow::Continue(err)) => err, + }; + + loop_while_non_fatal_error(err, self.intermediate_certs, |cert_der| { + let potential_issuer = Cert::from_der(untrusted::Input::from(cert_der))?; + if !public_values_eq(potential_issuer.subject, path.head().issuer) { + return Err(Error::UnknownIssuer.into()); + } + + // Prevent loops; see RFC 4158 section 5.2. + if path.node().iter().any(|prev| { + public_values_eq(potential_issuer.spki, prev.cert.spki) + && public_values_eq(potential_issuer.subject, prev.cert.subject) + }) { + return Err(Error::UnknownIssuer.into()); + } + + let next_sub_ca_count = match role { + Role::EndEntity => sub_ca_count, + Role::Issuer => sub_ca_count + 1, + }; + + budget.consume_build_chain_call()?; + path.push(potential_issuer)?; + let result = self.build_chain_inner(path, time, verify_path, next_sub_ca_count, budget); + if result.is_err() { + path.pop(); + } + + result + }) + } + + fn check_signed_chain( + &self, + path: &PathNode<'_>, + time: UnixTime, + trust_anchor: &TrustAnchor<'_>, + budget: &mut Budget, + ) -> Result<(), ControlFlow> { + let mut spki_value = untrusted::Input::from(trust_anchor.subject_public_key_info.as_ref()); + let mut issuer_subject = untrusted::Input::from(trust_anchor.subject.as_ref()); + let mut issuer_key_usage = None; // TODO(XXX): Consider whether to track TrustAnchor KU. + for path in path.iter() { + signed_data::verify_signed_data( + self.supported_sig_algs, + spki_value, + &path.cert.signed_data, + budget, + )?; + + if let Some(revocation_opts) = &self.revocation { + revocation_opts.check( + &path, + issuer_subject, + spki_value, + issuer_key_usage, + self.supported_sig_algs, + budget, + time, + )?; + } + + spki_value = path.cert.spki; + issuer_subject = path.cert.subject; + issuer_key_usage = path.cert.key_usage; + } + + Ok(()) + } +} + +/// Path from end-entity certificate to trust anchor that's been verified. +/// +/// See [`EndEntityCert::verify_for_usage()`] for more details on what verification entails. +pub struct VerifiedPath<'p> { + end_entity: &'p EndEntityCert<'p>, + intermediates: Intermediates<'p>, + anchor: &'p TrustAnchor<'p>, +} + +impl<'p> VerifiedPath<'p> { + fn new( + end_entity: &'p EndEntityCert<'p>, + anchor: &'p TrustAnchor<'p>, + partial: PartialPath<'p>, + ) -> Self { + Self { + end_entity, + intermediates: Intermediates::Owned { + certs: partial.intermediates, + used: partial.used, + }, + anchor, + } + } + + /// Yields a (double-ended) iterator over the intermediate certificates in this path. + pub fn intermediate_certificates(&'p self) -> IntermediateIterator<'p> { + IntermediateIterator { + intermediates: self.intermediates.as_ref(), + } + } + + /// Yields the end-entity certificate for this path. + pub fn end_entity(&self) -> &'p EndEntityCert<'p> { + self.end_entity + } + + /// Yields the trust anchor for this path. + pub fn anchor(&self) -> &'p TrustAnchor<'p> { + self.anchor + } +} + +/// Iterator over a path's intermediate certificates. +/// +/// Implements [`DoubleEndedIterator`] so it can be traversed in both directions. +pub struct IntermediateIterator<'a> { + /// Invariant: all of these `Option`s are `Some`. + intermediates: &'a [Option>], +} + +impl<'a> Iterator for IntermediateIterator<'a> { + type Item = &'a Cert<'a>; + + fn next(&mut self) -> Option { + match self.intermediates.split_first() { + Some((head, tail)) => { + self.intermediates = tail; + Some(head.as_ref().unwrap()) + } + None => None, + } + } +} + +impl<'a> DoubleEndedIterator for IntermediateIterator<'a> { + fn next_back(&mut self) -> Option { + match self.intermediates.split_last() { + Some((head, tail)) => { + self.intermediates = tail; + Some(head.as_ref().unwrap()) + } + None => None, + } + } +} + +#[allow(clippy::large_enum_variant)] +enum Intermediates<'a> { + Owned { + certs: [Option>; MAX_SUB_CA_COUNT], + used: usize, + }, + Borrowed(&'a [Option>]), +} + +impl<'a> AsRef<[Option>]> for Intermediates<'a> { + fn as_ref(&self) -> &[Option>] { + match self { + Intermediates::Owned { certs, used } => &certs[..*used], + Intermediates::Borrowed(certs) => certs, + } + } +} + +fn check_signed_chain_name_constraints( + path: &PathNode<'_>, + trust_anchor: &TrustAnchor<'_>, + budget: &mut Budget, +) -> Result<(), ControlFlow> { + let mut name_constraints = trust_anchor + .name_constraints + .as_ref() + .map(|der| untrusted::Input::from(der.as_ref())); + + for path in path.iter() { + untrusted::read_all_optional(name_constraints, Error::BadDer, |value| { + subject_name::check_name_constraints(value, &path, budget) + })?; + + name_constraints = path.cert.name_constraints; + } + + Ok(()) +} + +pub(crate) struct Budget { + signatures: usize, + build_chain_calls: usize, + name_constraint_comparisons: usize, +} + +impl Budget { + #[inline] + pub(crate) fn consume_signature(&mut self) -> Result<(), Error> { + self.signatures = self + .signatures + .checked_sub(1) + .ok_or(Error::MaximumSignatureChecksExceeded)?; + Ok(()) + } + + #[inline] + fn consume_build_chain_call(&mut self) -> Result<(), Error> { + self.build_chain_calls = self + .build_chain_calls + .checked_sub(1) + .ok_or(Error::MaximumPathBuildCallsExceeded)?; + Ok(()) + } + + #[inline] + pub(crate) fn consume_name_constraint_comparison(&mut self) -> Result<(), Error> { + self.name_constraint_comparisons = self + .name_constraint_comparisons + .checked_sub(1) + .ok_or(Error::MaximumNameConstraintComparisonsExceeded)?; + Ok(()) + } +} + +impl Default for Budget { + fn default() -> Self { + Self { + // This limit is taken from the remediation for golang CVE-2018-16875. However, + // note that golang subsequently implemented AKID matching due to this limit + // being hit in real applications (see ). + // So this may actually be too aggressive. + signatures: 100, + + // This limit is taken from mozilla::pkix, see: + // + build_chain_calls: 200_000, + + // This limit is taken from golang crypto/x509's default, see: + // + name_constraint_comparisons: 250_000, + } + } +} + +fn check_issuer_independent_properties( + cert: &Cert<'_>, + time: UnixTime, + role: Role, + sub_ca_count: usize, + eku: ExtendedKeyUsage, +) -> Result<(), Error> { + // TODO: check_distrust(trust_anchor_subject, trust_anchor_spki)?; + // TODO: Check signature algorithm like mozilla::pkix. + // TODO: Check SPKI like mozilla::pkix. + // TODO: check for active distrust like mozilla::pkix. + + // For cert validation, we ignore the KeyUsage extension. For CA + // certificates, BasicConstraints.cA makes KeyUsage redundant. Firefox + // and other common browsers do not check KeyUsage for end-entities, + // though it would be kind of nice to ensure that a KeyUsage without + // the keyEncipherment bit could not be used for RSA key exchange. + + cert.validity + .read_all(Error::BadDer, |value| check_validity(value, time))?; + untrusted::read_all_optional(cert.basic_constraints, Error::BadDer, |value| { + check_basic_constraints(value, role, sub_ca_count) + })?; + untrusted::read_all_optional(cert.eku, Error::BadDer, |value| eku.check(value))?; + + Ok(()) +} + +// https://tools.ietf.org/html/rfc5280#section-4.1.2.5 +fn check_validity(input: &mut untrusted::Reader<'_>, time: UnixTime) -> Result<(), Error> { + let not_before = UnixTime::from_der(input)?; + let not_after = UnixTime::from_der(input)?; + + if not_before > not_after { + return Err(Error::InvalidCertValidity); + } + if time < not_before { + return Err(Error::CertNotValidYet); + } + if time > not_after { + return Err(Error::CertExpired); + } + + // TODO: mozilla::pkix allows the TrustDomain to check not_before and + // not_after, to enforce things like a maximum validity period. We should + // do something similar. + + Ok(()) +} + +// https://tools.ietf.org/html/rfc5280#section-4.2.1.9 +fn check_basic_constraints( + input: Option<&mut untrusted::Reader<'_>>, + role: Role, + sub_ca_count: usize, +) -> Result<(), Error> { + let (is_ca, path_len_constraint) = match input { + Some(input) => { + let is_ca = bool::from_der(input)?; + + // https://bugzilla.mozilla.org/show_bug.cgi?id=985025: RFC 5280 + // says that a certificate must not have pathLenConstraint unless + // it is a CA certificate, but some real-world end-entity + // certificates have pathLenConstraint. + let path_len_constraint = if !input.at_end() { + Some(usize::from(u8::from_der(input)?)) + } else { + None + }; + + (is_ca, path_len_constraint) + } + None => (false, None), + }; + + match (role, is_ca, path_len_constraint) { + (Role::EndEntity, true, _) => Err(Error::CaUsedAsEndEntity), + (Role::Issuer, false, _) => Err(Error::EndEntityUsedAsCa), + (Role::Issuer, true, Some(len)) if sub_ca_count > len => { + Err(Error::PathLenConstraintViolated) + } + _ => Ok(()), + } +} + +/// The expected key usage of a certificate. +/// +/// This type represents the expected key usage of an end entity certificate. Although for most +/// kinds of certificates the extended key usage extension is optional (and so certificates +/// not carrying a particular value in the EKU extension are acceptable). If the extension +/// is present, the certificate MUST only be used for one of the purposes indicated. +/// +/// +#[derive(Clone, Copy)] +pub struct KeyUsage { + inner: ExtendedKeyUsage, +} + +impl KeyUsage { + /// Construct a new [`KeyUsage`] as appropriate for server certificate authentication. + /// + /// As specified in , this does not require the certificate to specify the eKU extension. + pub const fn server_auth() -> Self { + Self::required_if_present(EKU_SERVER_AUTH) + } + + /// Construct a new [`KeyUsage`] as appropriate for client certificate authentication. + /// + /// As specified in <>, this does not require the certificate to specify the eKU extension. + pub const fn client_auth() -> Self { + Self::required_if_present(EKU_CLIENT_AUTH) + } + + /// Construct a new [`KeyUsage`] requiring a certificate to support the specified OID. + pub const fn required(oid: &'static [u8]) -> Self { + Self { + inner: ExtendedKeyUsage::Required(KeyPurposeId::new(oid)), + } + } + + /// Construct a new [`KeyUsage`] requiring a certificate to support the specified OID, if the certificate has EKUs. + pub const fn required_if_present(oid: &'static [u8]) -> Self { + Self { + inner: ExtendedKeyUsage::RequiredIfPresent(KeyPurposeId::new(oid)), + } + } +} + +/// Extended Key Usage (EKU) of a certificate. +#[derive(Clone, Copy)] +enum ExtendedKeyUsage { + /// The certificate must contain the specified [`KeyPurposeId`] as EKU. + Required(KeyPurposeId), + + /// If the certificate has EKUs, then the specified [`KeyPurposeId`] must be included. + RequiredIfPresent(KeyPurposeId), +} + +impl ExtendedKeyUsage { + // https://tools.ietf.org/html/rfc5280#section-4.2.1.12 + fn check(&self, input: Option<&mut untrusted::Reader<'_>>) -> Result<(), Error> { + let input = match (input, self) { + (Some(input), _) => input, + (None, Self::RequiredIfPresent(_)) => return Ok(()), + (None, Self::Required(_)) => return Err(Error::RequiredEkuNotFound), + }; + + loop { + let value = der::expect_tag(input, der::Tag::OID)?; + if self.key_purpose_id_equals(value) { + input.skip_to_end(); + break; + } + + if input.at_end() { + return Err(Error::RequiredEkuNotFound); + } + } + + Ok(()) + } + + fn key_purpose_id_equals(&self, value: untrusted::Input<'_>) -> bool { + public_values_eq( + match self { + Self::Required(eku) => *eku, + Self::RequiredIfPresent(eku) => *eku, + } + .oid_value, + value, + ) + } +} + +/// An OID value indicating an Extended Key Usage (EKU) key purpose. +#[derive(Clone, Copy)] +struct KeyPurposeId { + oid_value: untrusted::Input<'static>, +} + +impl KeyPurposeId { + /// Construct a new [`KeyPurposeId`]. + /// + /// `oid` is the OBJECT IDENTIFIER in bytes. + const fn new(oid: &'static [u8]) -> Self { + Self { + oid_value: untrusted::Input::from(oid), + } + } +} + +impl PartialEq for KeyPurposeId { + fn eq(&self, other: &Self) -> bool { + public_values_eq(self.oid_value, other.oid_value) + } +} + +impl Eq for KeyPurposeId {} + +// id-pkix OBJECT IDENTIFIER ::= { 1 3 6 1 5 5 7 } +// id-kp OBJECT IDENTIFIER ::= { id-pkix 3 } + +// id-kp-serverAuth OBJECT IDENTIFIER ::= { id-kp 1 } +const EKU_SERVER_AUTH: &[u8] = &oid!(1, 3, 6, 1, 5, 5, 7, 3, 1); + +// id-kp-clientAuth OBJECT IDENTIFIER ::= { id-kp 2 } +const EKU_CLIENT_AUTH: &[u8] = &oid!(1, 3, 6, 1, 5, 5, 7, 3, 2); + +fn loop_while_non_fatal_error<'a, V: IntoIterator + 'a>( + default_error: Error, + values: V, + mut f: impl FnMut(V::Item) -> Result<&'a TrustAnchor<'a>, ControlFlow>, +) -> Result<&'a TrustAnchor<'a>, ControlFlow> { + let mut error = default_error; + for v in values { + match f(v) { + Ok(anchor) => return Ok(anchor), + // Fatal errors should halt further looping. + res @ Err(ControlFlow::Break(_)) => return res, + // Non-fatal errors should be ranked by specificity and only returned + // once all other path-building options have been exhausted. + Err(ControlFlow::Continue(new_error)) => error = error.most_specific(new_error), + } + } + Err(error.into()) +} + +/// A path for consideration in path building. +/// +/// This represents a partial path because it does not yet contain the trust anchor. It stores +/// the end-entity certificates, and an array of intermediate certificates. +pub(crate) struct PartialPath<'a> { + end_entity: &'a EndEntityCert<'a>, + /// Intermediate certificates, in order from end-entity to trust anchor. + /// + /// Invariant: all values below `used` are `Some`. + intermediates: [Option>; MAX_SUB_CA_COUNT], + /// The number of `Some` values in `intermediates`. + /// + /// The next `Cert` passed to `push()` will be placed at `intermediates[used]`. + /// If this value is 0, the path contains only the end-entity certificate. + used: usize, +} + +impl<'a> PartialPath<'a> { + pub(crate) fn new(end_entity: &'a EndEntityCert<'a>) -> Self { + Self { + end_entity, + intermediates: Default::default(), + used: 0, + } + } + + pub(crate) fn push(&mut self, cert: Cert<'a>) -> Result<(), ControlFlow> { + if self.used >= MAX_SUB_CA_COUNT { + return Err(Error::MaximumPathDepthExceeded.into()); + } + + self.intermediates[self.used] = Some(cert); + self.used += 1; + Ok(()) + } + + fn pop(&mut self) { + debug_assert!(self.used > 0); + if self.used == 0 { + return; + } + + self.used -= 1; + self.intermediates[self.used] = None; + } + + pub(crate) fn node(&self) -> PathNode<'_> { + PathNode { + path: self, + index: self.used, + cert: self.head(), + } + } + + /// Current head of the path. + pub(crate) fn head(&self) -> &Cert<'a> { + self.get(self.used) + } + + /// Get the certificate at index `idx` in the path. + /// + // `idx` must be in the range `0..=self.used`; `idx` 0 thus yields the `end_entity`, + // while subsequent indexes yield the intermediate at `self.intermediates[idx - 1]`. + fn get(&self, idx: usize) -> &Cert<'a> { + match idx { + 0 => self.end_entity, + _ => self.intermediates[idx - 1].as_ref().unwrap(), + } + } +} + +const MAX_SUB_CA_COUNT: usize = 6; + +pub(crate) struct PathNode<'a> { + /// The path we're iterating. + path: &'a PartialPath<'a>, + /// The index of the current node in the path (input for `path.get()`). + index: usize, + /// The [`Cert`] at `index`. + pub(crate) cert: &'a Cert<'a>, +} + +impl<'a> PathNode<'a> { + pub(crate) fn iter(&self) -> PathIter<'a> { + PathIter { + path: self.path, + next: Some(self.index), + } + } + + pub(crate) fn role(&self) -> Role { + match self.index { + 0 => Role::EndEntity, + _ => Role::Issuer, + } + } +} + +pub(crate) struct PathIter<'a> { + path: &'a PartialPath<'a>, + next: Option, +} + +impl<'a> Iterator for PathIter<'a> { + type Item = PathNode<'a>; + + fn next(&mut self) -> Option { + let next = self.next?; + self.next = match next { + 0 => None, + _ => Some(next - 1), + }; + + Some(PathNode { + path: self.path, + index: next, + cert: self.path.get(next), + }) + } +} + +#[derive(Clone, Copy, PartialEq)] +pub(crate) enum Role { + Issuer, + EndEntity, +} + +#[cfg(all(test, feature = "alloc", any(feature = "ring", feature = "aws_lc_rs")))] +mod tests { + use super::*; + use crate::test_utils; + use crate::test_utils::{issuer_params, make_end_entity, make_issuer}; + use crate::trust_anchor::anchor_from_trusted_cert; + use rcgen::{CertifiedKey, KeyPair}; + use std::dbg; + use std::prelude::v1::*; + + #[test] + fn eku_key_purpose_id() { + assert!( + ExtendedKeyUsage::RequiredIfPresent(KeyPurposeId::new(EKU_SERVER_AUTH)) + .key_purpose_id_equals(KeyPurposeId::new(EKU_SERVER_AUTH).oid_value) + ) + } + + #[test] + fn test_too_many_signatures() { + assert!(matches!( + build_and_verify_degenerate_chain(5, ChainTrustAnchor::NotInChain), + ControlFlow::Break(Error::MaximumSignatureChecksExceeded) + )); + } + + #[test] + fn test_too_many_path_calls() { + assert!(matches!( + dbg!(build_and_verify_degenerate_chain( + 10, + ChainTrustAnchor::InChain + )), + ControlFlow::Break(Error::MaximumPathBuildCallsExceeded) + )); + } + + #[test] + fn longest_allowed_path() { + assert!(build_and_verify_linear_chain(1).is_ok()); + assert!(build_and_verify_linear_chain(2).is_ok()); + assert!(build_and_verify_linear_chain(3).is_ok()); + assert!(build_and_verify_linear_chain(4).is_ok()); + assert!(build_and_verify_linear_chain(5).is_ok()); + assert!(build_and_verify_linear_chain(6).is_ok()); + } + + #[test] + fn path_too_long() { + assert!(matches!( + build_and_verify_linear_chain(7), + Err(ControlFlow::Continue(Error::MaximumPathDepthExceeded)) + )); + } + + #[test] + fn name_constraint_budget() { + // Issue a trust anchor that imposes name constraints. The constraint should match + // the end entity certificate SAN. + let mut ca_cert_params = issuer_params("Constrained Root"); + ca_cert_params.name_constraints = Some(rcgen::NameConstraints { + permitted_subtrees: vec![rcgen::GeneralSubtree::DnsName(".com".into())], + excluded_subtrees: vec![], + }); + let ca_key_pair = KeyPair::generate_for(test_utils::RCGEN_SIGNATURE_ALG).unwrap(); + let ca_cert = ca_cert_params.self_signed(&ca_key_pair).unwrap(); + + // Create a series of intermediate issuers. We'll only use one in the actual built path, + // helping demonstrate that the name constraint budget is not expended checking certificates + // that are not part of the path we compute. + let mut intermediates = Vec::with_capacity(5); + for i in 0..5 { + let intermediate = issuer_params(format!("Intermediate {i}")); + let intermediate_key_pair = + KeyPair::generate_for(test_utils::RCGEN_SIGNATURE_ALG).unwrap(); + // Each intermediate should be issued by the trust anchor. + let intermediate = intermediate + .signed_by(&intermediate_key_pair, &ca_cert, &ca_key_pair) + .unwrap(); + intermediates.push((intermediate, intermediate_key_pair)); + } + + // Create an end-entity cert that is issued by the last of the intermediates. + let last_issuer = intermediates.last().unwrap(); + let ee_cert = make_end_entity(&last_issuer.0, &last_issuer.1); + let ee_cert = EndEntityCert::try_from(ee_cert.cert.der()).unwrap(); + + // We use a custom budget to make it easier to write a test, otherwise it is tricky to + // stuff enough names/constraints into the potential chains while staying within the path + // depth limit and the build chain call limit. + let passing_budget = Budget { + // One comparison against the intermediate's distinguished name. + // One comparison against the EE's distinguished name. + // One comparison against the EE's SAN. + // = 3 total comparisons. + name_constraint_comparisons: 3, + ..Budget::default() + }; + + let ca_cert_der = ca_cert.into(); + let anchors = &[anchor_from_trusted_cert(&ca_cert_der).unwrap()]; + let intermediates_der = intermediates + .iter() + .map(|(cert, _)| cert.der().clone()) + .collect::>(); + + // Validation should succeed with the name constraint comparison budget allocated above. + // This shows that we're not consuming budget on unused intermediates: we didn't budget + // enough comparisons for that to pass the overall chain building. + let path = verify_chain( + anchors, + &intermediates_der, + &ee_cert, + None, + Some(passing_budget), + ) + .unwrap(); + assert_eq!(path.anchor().subject, anchors.first().unwrap().subject); + + let failing_budget = Budget { + // See passing_budget: 2 comparisons is not sufficient. + name_constraint_comparisons: 2, + ..Budget::default() + }; + // Validation should fail when the budget is smaller than the number of comparisons performed + // on the validated path. This demonstrates we properly fail path building when too many + // name constraint comparisons occur. + let result = verify_chain( + anchors, + &intermediates_der, + &ee_cert, + None, + Some(failing_budget), + ); + + assert!(matches!( + result, + Err(ControlFlow::Break( + Error::MaximumNameConstraintComparisonsExceeded + )) + )); + } + + #[test] + fn test_reject_candidate_path() { + /* + This test builds a PKI like the following diagram depicts. We first verify + that we can build a path EE -> B -> A -> TA. Next we supply a custom path verification + function that rejects the B->A path, and verify that we build a path EE -> B -> C -> TA. + + ┌───────────â”� + │ │ + │ TA │ + │ │ + └───┬───┬───┘ + │ │ + │ │ + ┌────────â”�◄┘ └──►┌────────â”� + │ │ │ │ + │ A │ │ C │ + │ │ │ │ + └────┬───┘ └───┬────┘ + │ │ + │ │ + │ ┌─────────â”� │ + └──►│ │◄──┘ + │ B │ + │ │ + └────┬────┘ + │ + │ + │ + ┌────▼────â”� + │ │ + │ EE │ + │ │ + └─────────┘ + */ + + // Create a trust anchor, and use it to issue two distinct intermediate certificates, each + // with a unique subject and keypair. + let trust_anchor = make_issuer("Trust Anchor"); + let trust_anchor_cert = + Cert::from_der(untrusted::Input::from(trust_anchor.cert.der())).unwrap(); + let trust_anchors = &[anchor_from_trusted_cert(trust_anchor.cert.der()).unwrap()]; + + let intermediate_a = issuer_params("Intermediate A"); + let intermediate_a_kp = KeyPair::generate_for(test_utils::RCGEN_SIGNATURE_ALG).unwrap(); + let intermediate_a = intermediate_a + .signed_by( + &intermediate_a_kp, + &trust_anchor.cert, + &trust_anchor.key_pair, + ) + .unwrap(); + let intermediate_a_cert = + Cert::from_der(untrusted::Input::from(intermediate_a.der())).unwrap(); + + let intermediate_c = issuer_params("Intermediate C"); + let intermediate_c_kp = KeyPair::generate_for(test_utils::RCGEN_SIGNATURE_ALG).unwrap(); + let intermediate_c = intermediate_c + .signed_by( + &intermediate_c_kp, + &trust_anchor.cert, + &trust_anchor.key_pair, + ) + .unwrap(); + let intermediate_c_cert = + Cert::from_der(untrusted::Input::from(intermediate_c.der())).unwrap(); + + // Next, create an intermediate that is issued by both of the intermediates above. + // Both should share the same subject, and key pair, but will differ in the issuer. + let intermediate_b_key = KeyPair::generate_for(test_utils::RCGEN_SIGNATURE_ALG).unwrap(); + let intermediate_b_params = issuer_params("Intermediate"); + let intermediate_b_a = intermediate_b_params + .clone() + .signed_by(&intermediate_b_key, &intermediate_a, &intermediate_a_kp) + .unwrap(); + let intermediate_b_c = intermediate_b_params + .signed_by(&intermediate_b_key, &intermediate_c, &intermediate_c_kp) + .unwrap(); + + let intermediates = &[ + intermediate_a.der().clone(), + intermediate_c.der().clone(), + intermediate_b_a.der().clone(), + intermediate_b_c.der().clone(), + ]; + + // Create an end entity certificate signed by the keypair of the intermediates created above. + let ee = make_end_entity(&intermediate_b_a, &intermediate_b_key); + let ee_cert = &EndEntityCert::try_from(ee.cert.der()).unwrap(); + + // We should be able to create a valid path from EE to trust anchor. + let path = verify_chain(trust_anchors, intermediates, ee_cert, None, None).unwrap(); + let path_intermediates = path.intermediate_certificates().collect::>(); + + // We expect that without applying any additional constraints, that the path will be + // EE -> intermediate_b_a -> intermediate_a -> trust_anchor. + assert_eq!(path_intermediates.len(), 2); + assert_eq!( + path_intermediates[0].issuer(), + intermediate_a_cert.subject() + ); + assert_eq!(path_intermediates[1].issuer(), trust_anchor_cert.subject()); + + // Now, we'll create a function that will reject the intermediate_b_a path. + let expected_chain = |path: &VerifiedPath<'_>| { + for intermediate in path.intermediate_certificates() { + // Reject any intermediates issued by intermediate A. + if intermediate.issuer() == intermediate_a_cert.subject() { + return Err(Error::UnknownIssuer); + } + } + + Ok(()) + }; + + // We should still be able to build a valid path. + let path = verify_chain( + trust_anchors, + intermediates, + ee_cert, + Some(&expected_chain), + None, + ) + .unwrap(); + let path_intermediates = path.intermediate_certificates().collect::>(); + + // We expect that the path will now be + // EE -> intermediate_b_c -> intermediate_c -> trust_anchor. + assert_eq!(path_intermediates.len(), 2); + assert_eq!( + path_intermediates[0].issuer(), + intermediate_c_cert.subject() + ); + assert_eq!(path_intermediates[1].issuer(), trust_anchor_cert.subject()); + } + + fn build_and_verify_degenerate_chain( + intermediate_count: usize, + trust_anchor: ChainTrustAnchor, + ) -> ControlFlow { + let ca_cert = make_issuer("Bogus Subject"); + let mut intermediate_chain = build_linear_chain(&ca_cert, intermediate_count, true); + + let verify_trust_anchor = match trust_anchor { + ChainTrustAnchor::InChain => make_issuer("Bogus Trust Anchor"), + ChainTrustAnchor::NotInChain => ca_cert, + }; + + let ee_cert = make_end_entity( + &intermediate_chain.last_issuer.cert, + &intermediate_chain.last_issuer.key_pair, + ); + let ee_cert = EndEntityCert::try_from(ee_cert.cert.der()).unwrap(); + let trust_anchor_der: CertificateDer<'_> = verify_trust_anchor.cert.into(); + let webpki_ta = anchor_from_trusted_cert(&trust_anchor_der).unwrap(); + if matches!(trust_anchor, ChainTrustAnchor::InChain) { + // Note: we clone the trust anchor DER here because we can't move it into the chain + // as it's loaned to webpki_ta above. + intermediate_chain.chain.insert(0, trust_anchor_der.clone()) + } + + verify_chain( + &[webpki_ta], + &intermediate_chain.chain, + &ee_cert, + None, + None, + ) + .map(|_| ()) + .unwrap_err() + } + + #[cfg(feature = "alloc")] + enum ChainTrustAnchor { + NotInChain, + InChain, + } + + fn build_and_verify_linear_chain(chain_length: usize) -> Result<(), ControlFlow> { + let ca_cert = make_issuer(format!("Bogus Subject {chain_length}")); + let intermediate_chain = build_linear_chain(&ca_cert, chain_length, false); + + let ca_cert_der: CertificateDer<'_> = ca_cert.cert.into(); + let anchor = anchor_from_trusted_cert(&ca_cert_der).unwrap(); + let anchors = &[anchor.clone()]; + + let ee_cert = make_end_entity( + &intermediate_chain.last_issuer.cert, + &intermediate_chain.last_issuer.key_pair, + ); + let ee_cert = EndEntityCert::try_from(ee_cert.cert.der()).unwrap(); + + let expected_chain = |path: &VerifiedPath<'_>| { + assert_eq!(path.anchor().subject, anchor.subject); + assert!(public_values_eq(path.end_entity().subject, ee_cert.subject)); + assert_eq!(path.intermediate_certificates().count(), chain_length); + + let intermediate_certs = intermediate_chain + .chain + .iter() + .map(|der| Cert::from_der(untrusted::Input::from(der)).unwrap()) + .collect::>(); + + for (cert, expected) in path + .intermediate_certificates() + .rev() + .zip(intermediate_certs.iter()) + { + assert!(public_values_eq(cert.subject, expected.subject)); + assert_eq!(cert.der(), expected.der()); + } + + for (cert, expected) in path + .intermediate_certificates() + .zip(intermediate_certs.iter().rev()) + { + assert!(public_values_eq(cert.subject, expected.subject)); + assert_eq!(cert.der(), expected.der()); + } + + Ok(()) + }; + + verify_chain( + anchors, + &intermediate_chain.chain, + &ee_cert, + Some(&expected_chain), + None, + ) + .map(|_| ()) + } + + fn build_linear_chain( + ca_cert: &CertifiedKey, + chain_length: usize, + all_same_subject: bool, + ) -> IntermediateChain { + let mut chain = Vec::with_capacity(chain_length); + + let mut prev = None; + for i in 0..chain_length { + let issuer = match &prev { + Some(prev) => prev, + None => ca_cert, + }; + + let intermediate = issuer_params(match all_same_subject { + true => "Bogus Subject".to_string(), + false => format!("Bogus Subject {i}"), + }); + + let key_pair = KeyPair::generate_for(test_utils::RCGEN_SIGNATURE_ALG).unwrap(); + let cert = intermediate + .signed_by(&key_pair, &issuer.cert, &issuer.key_pair) + .unwrap(); + + chain.push(cert.der().clone()); + prev = Some(CertifiedKey { cert, key_pair }); + } + + IntermediateChain { + last_issuer: prev.unwrap(), + chain, + } + } + + struct IntermediateChain { + last_issuer: CertifiedKey, + chain: Vec>, + } + + fn verify_chain<'a>( + trust_anchors: &'a [TrustAnchor<'a>], + intermediate_certs: &'a [CertificateDer<'a>], + ee_cert: &'a EndEntityCert<'a>, + verify_path: Option<&dyn Fn(&VerifiedPath<'_>) -> Result<(), Error>>, + budget: Option, + ) -> Result, ControlFlow> { + use core::time::Duration; + + let time = UnixTime::since_unix_epoch(Duration::from_secs(0x1fed_f00d)); + let mut path = PartialPath::new(ee_cert); + let opts = ChainOptions { + eku: KeyUsage::server_auth(), + supported_sig_algs: crate::ALL_VERIFICATION_ALGS, + trust_anchors, + intermediate_certs, + revocation: None, + }; + + match opts.build_chain_inner( + &mut path, + time, + verify_path, + 0, + &mut budget.unwrap_or_default(), + ) { + Ok(anchor) => Ok(VerifiedPath::new(ee_cert, anchor, path)), + Err(err) => Err(err), + } + } +} + +// Upstream rustls-webpki 0.103.16, subject-public-key-info contents (not certificate fingerprints). +pub(crate) const DISTRUSTED_SPKIS: &[&[u8]] = &[ + include_bytes!("data/distrusted/EMDVTLSCAG3B.spki.der"), + include_bytes!("data/distrusted/EMDVTLSCAG3C.spki.der"), + include_bytes!("data/distrusted/EMEVTLSCAG3B.spki.der"), + include_bytes!("data/distrusted/EMEVTLSCAG3C.spki.der"), + include_bytes!("data/distrusted/EMOVTLSCAG3B.spki.der"), + include_bytes!("data/distrusted/EMOVTLSCAG3C.spki.der"), + include_bytes!("data/distrusted/EMOVCSCAG3B.spki.der"), + include_bytes!("data/distrusted/EMOVCSCAG3C.spki.der"), +]; diff --git a/vendor/rustls-webpki-legacy/src/x509.rs b/vendor/rustls-webpki-legacy/src/x509.rs new file mode 100644 index 00000000000..dce729071a0 --- /dev/null +++ b/vendor/rustls-webpki-legacy/src/x509.rs @@ -0,0 +1,111 @@ +// Copyright 2015 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +use crate::der::{self, DerIterator, FromDer, CONSTRUCTED, CONTEXT_SPECIFIC}; +use crate::error::{DerTypeId, Error}; +use crate::subject_name::GeneralName; + +pub(crate) struct Extension<'a> { + pub(crate) critical: bool, + pub(crate) id: untrusted::Input<'a>, + pub(crate) value: untrusted::Input<'a>, +} + +impl<'a> Extension<'a> { + pub(crate) fn unsupported(&self) -> Result<(), Error> { + match self.critical { + true => Err(Error::UnsupportedCriticalExtension), + false => Ok(()), + } + } +} + +impl<'a> FromDer<'a> for Extension<'a> { + fn from_der(reader: &mut untrusted::Reader<'a>) -> Result { + let id = der::expect_tag(reader, der::Tag::OID)?; + let critical = bool::from_der(reader)?; + let value = der::expect_tag(reader, der::Tag::OctetString)?; + Ok(Extension { + id, + critical, + value, + }) + } + + const TYPE_ID: DerTypeId = DerTypeId::Extension; +} + +pub(crate) fn set_extension_once( + destination: &mut Option, + parser: impl Fn() -> Result, +) -> Result<(), Error> { + match destination { + // The extension value has already been set, indicating that we encountered it + // more than once in our serialized data. That's invalid! + Some(..) => Err(Error::ExtensionValueInvalid), + None => { + *destination = Some(parser()?); + Ok(()) + } + } +} + +pub(crate) fn remember_extension( + extension: &Extension<'_>, + mut handler: impl FnMut(u8) -> Result<(), Error>, +) -> Result<(), Error> { + // ISO arc for standard certificate and CRL extensions. + // https://www.rfc-editor.org/rfc/rfc5280#appendix-A.2 + static ID_CE: [u8; 2] = oid![2, 5, 29]; + + if extension.id.len() != ID_CE.len() + 1 + || !extension.id.as_slice_less_safe().starts_with(&ID_CE) + { + return extension.unsupported(); + } + + // safety: we verify len is non-zero and has the correct prefix above. + let last_octet = *extension.id.as_slice_less_safe().last().unwrap(); + handler(last_octet) +} + +/// A certificate revocation list (CRL) distribution point name, describing a source of +/// CRL information for a given certificate as described in RFC 5280 section 4.2.3.13[^1]. +/// +/// [^1]: +pub(crate) enum DistributionPointName<'a> { + /// The distribution point name is a relative distinguished name, relative to the CRL issuer. + NameRelativeToCrlIssuer, + /// The distribution point name is a sequence of [GeneralName] items. + FullName(DerIterator<'a, GeneralName<'a>>), +} + +impl<'a> FromDer<'a> for DistributionPointName<'a> { + fn from_der(reader: &mut untrusted::Reader<'a>) -> Result { + // RFC 5280 section §4.2.1.13: + // When the distributionPoint field is present, it contains either a + // SEQUENCE of general names or a single value, nameRelativeToCRLIssuer + const FULL_NAME_TAG: u8 = CONTEXT_SPECIFIC | CONSTRUCTED; + const NAME_RELATIVE_TO_CRL_ISSUER_TAG: u8 = CONTEXT_SPECIFIC | CONSTRUCTED | 1; + + let (tag, value) = der::read_tag_and_get_value(reader)?; + match tag { + FULL_NAME_TAG => Ok(DistributionPointName::FullName(DerIterator::new(value))), + NAME_RELATIVE_TO_CRL_ISSUER_TAG => Ok(DistributionPointName::NameRelativeToCrlIssuer), + _ => Err(Error::BadDer), + } + } + + const TYPE_ID: DerTypeId = DerTypeId::DistributionPointName; +} diff --git a/vendor/rustls-webpki-legacy/tests/better_tls.rs b/vendor/rustls-webpki-legacy/tests/better_tls.rs new file mode 100644 index 00000000000..6dd4287e414 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/better_tls.rs @@ -0,0 +1,164 @@ +#![cfg(any(feature = "ring", feature = "aws_lc_rs"))] + +use core::time::Duration; +use std::collections::HashMap; +use std::fs::File; + +use base64::{engine::general_purpose, Engine as _}; +use bzip2::read::BzDecoder; +use pki_types::{ServerName, UnixTime}; +use serde::Deserialize; + +use webpki::types::{CertificateDer, SignatureVerificationAlgorithm, TrustAnchor}; +use webpki::{anchor_from_trusted_cert, KeyUsage}; + +// All of the BetterTLS testcases use P256 keys. +static ALGS: &[&dyn SignatureVerificationAlgorithm] = &[ + #[cfg(feature = "ring")] + webpki::ring::ECDSA_P256_SHA256, + #[cfg(feature = "aws_lc_rs")] + webpki::aws_lc_rs::ECDSA_P256_SHA256, +]; + +#[ignore] // Runs slower than other unit tests - opt-in with `cargo test -- --ignored` +#[test] +fn path_building() { + let better_tls = testdata(); + let root_der = &better_tls.root_der(); + let root_der = CertificateDer::from(root_der.as_slice()); + let roots = &[anchor_from_trusted_cert(&root_der).expect("invalid trust anchor")]; + + let suite = "pathbuilding"; + run_testsuite( + suite, + better_tls + .suites + .get(suite) + .unwrap_or_else(|| panic!("missing {suite} suite")), + roots, + ); +} + +#[ignore] // Runs slower than other unit tests - opt-in with `cargo test -- --ignored` +#[test] +fn name_constraints() { + let better_tls = testdata(); + let root_der = &better_tls.root_der(); + let root_der = CertificateDer::from(root_der.as_slice()); + let roots = &[anchor_from_trusted_cert(&root_der).expect("invalid trust anchor")]; + + let suite = "nameconstraints"; + run_testsuite( + suite, + better_tls + .suites + .get(suite) + .unwrap_or_else(|| panic!("missing {suite} suite")), + roots, + ); +} + +fn run_testsuite(suite_name: &str, suite: &BetterTlsSuite, roots: &[TrustAnchor]) { + for testcase in &suite.test_cases { + println!("Testing {suite_name} test case {}", testcase.id); + + let certs_der = testcase.certs_der(); + let ee_der = CertificateDer::from(certs_der[0].as_slice()); + let intermediates = &certs_der[1..] + .iter() + .map(|cert| CertificateDer::from(cert.as_slice())) + .collect::>(); + + let ee_cert = webpki::EndEntityCert::try_from(&ee_der).expect("invalid end entity cert"); + + // Set the time to the time of test case generation. This ensures that the test case + // certificates won't expire. + let now = UnixTime::since_unix_epoch(Duration::from_secs(1_691_788_832)); + + let result = ee_cert + .verify_for_usage( + ALGS, + roots, + intermediates, + now, + KeyUsage::server_auth(), + None, + None, + ) + .and_then(|_| { + ee_cert.verify_is_valid_for_subject_name( + &ServerName::try_from(testcase.hostname.as_str()) + .expect("invalid testcase hostname"), + ) + }); + + match testcase.expected { + ExpectedResult::Accept => assert!(result.is_ok(), "expected success, got {:?}", result), + ExpectedResult::Reject => { + assert!(result.is_err(), "expected failure, got {:?}", result) + } + } + } +} + +fn testdata() -> BetterTls { + let mut data_file = File::open("third-party/bettertls/bettertls.tests.json.bz2") + .expect("failed to open data file"); + let decompressor = BzDecoder::new(&mut data_file); + + let better_tls: BetterTls = serde_json::from_reader(decompressor).expect("invalid test JSON"); + println!("Testing BetterTLS revision {:?}", better_tls.revision); + + better_tls +} + +#[derive(Deserialize, Debug)] +struct BetterTls { + #[serde(rename(deserialize = "betterTlsRevision"))] + revision: String, + #[serde(rename(deserialize = "trustRoot"))] + root: String, + suites: HashMap, +} + +impl BetterTls { + fn root_der(&self) -> Vec { + general_purpose::STANDARD + .decode(&self.root) + .expect("invalid trust anchor base64") + } +} + +#[derive(Deserialize, Debug)] +struct BetterTlsSuite { + #[serde(rename(deserialize = "testCases"))] + test_cases: Vec, +} + +#[derive(Deserialize, Debug)] +struct BetterTlsTest { + id: u32, + certificates: Vec, + hostname: String, + expected: ExpectedResult, +} + +impl BetterTlsTest { + fn certs_der(&self) -> Vec> { + self.certificates + .iter() + .map(|cert| { + general_purpose::STANDARD + .decode(cert) + .expect("invalid cert base64") + }) + .collect() + } +} + +#[derive(Deserialize, Debug)] +#[serde(rename_all = "UPPERCASE")] +enum ExpectedResult { + Accept, + Reject, +} diff --git a/vendor/rustls-webpki-legacy/tests/cert_v1.der b/vendor/rustls-webpki-legacy/tests/cert_v1.der new file mode 100644 index 00000000000..a603733a5cb Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/cert_v1.der differ diff --git a/vendor/rustls-webpki-legacy/tests/cert_v1_unsupported.rs b/vendor/rustls-webpki-legacy/tests/cert_v1_unsupported.rs new file mode 100644 index 00000000000..5e83292a6a2 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/cert_v1_unsupported.rs @@ -0,0 +1,27 @@ +// Copyright 2021 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +use pki_types::CertificateDer; + +#[test] +fn test_cert_v1_unsupported() { + // Check with `openssl x509 -text -noout -in cert_v1.der -inform DER` + // to verify this is a correct version 1 certificate. + let ca = CertificateDer::from(&include_bytes!("cert_v1.der")[..]); + + assert_eq!( + Some(webpki::Error::UnsupportedCertVersion), + webpki::EndEntityCert::try_from(&ca).err() + ); +} diff --git a/vendor/rustls-webpki-legacy/tests/cert_without_extensions.der b/vendor/rustls-webpki-legacy/tests/cert_without_extensions.der new file mode 100644 index 00000000000..458b2bc38a9 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/cert_without_extensions.der differ diff --git a/vendor/rustls-webpki-legacy/tests/cert_without_extensions.rs b/vendor/rustls-webpki-legacy/tests/cert_without_extensions.rs new file mode 100644 index 00000000000..27175ae3683 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/cert_without_extensions.rs @@ -0,0 +1,23 @@ +// Copyright 2021 Brian Smith. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +use pki_types::CertificateDer; + +#[test] +fn cert_without_extensions_test() { + // Check the certificate is valid with + // `openssl x509 -in cert_without_extensions.der -inform DER -text -noout` + let ca = CertificateDer::from(&include_bytes!("cert_without_extensions.der")[..]); + assert!(webpki::EndEntityCert::try_from(&ca).is_ok()); +} diff --git a/vendor/rustls-webpki-legacy/tests/client_auth.rs b/vendor/rustls-webpki-legacy/tests/client_auth.rs new file mode 100644 index 00000000000..a92c777630c --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/client_auth.rs @@ -0,0 +1,68 @@ +// Copyright 2023 Joseph Birr-Pixton. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +#![cfg(all(feature = "alloc", any(feature = "ring", feature = "aws_lc_rs")))] + +use core::time::Duration; +use pki_types::{CertificateDer, UnixTime}; +use webpki::{anchor_from_trusted_cert, KeyUsage}; + +fn check_cert(ee: &[u8], ca: &[u8]) -> Result<(), webpki::Error> { + let ca = CertificateDer::from(ca); + let anchors = &[anchor_from_trusted_cert(&ca).unwrap()]; + + let time = UnixTime::since_unix_epoch(Duration::from_secs(0x1fed_f00d)); + let ee = CertificateDer::from(ee); + let cert = webpki::EndEntityCert::try_from(&ee).unwrap(); + cert.verify_for_usage( + webpki::ALL_VERIFICATION_ALGS, + anchors, + &[], + time, + KeyUsage::client_auth(), + None, + None, + ) + .map(|_| ()) +} + +// DO NOT EDIT BELOW: generated by tests/generate.py + +#[test] +fn cert_with_no_eku_accepted_for_client_auth() { + let ee = include_bytes!("client_auth/cert_with_no_eku_accepted_for_client_auth.ee.der"); + let ca = include_bytes!("client_auth/cert_with_no_eku_accepted_for_client_auth.ca.der"); + assert_eq!(check_cert(ee, ca), Ok(())); +} + +#[test] +fn cert_with_clientauth_eku_accepted_for_client_auth() { + let ee = include_bytes!("client_auth/cert_with_clientauth_eku_accepted_for_client_auth.ee.der"); + let ca = include_bytes!("client_auth/cert_with_clientauth_eku_accepted_for_client_auth.ca.der"); + assert_eq!(check_cert(ee, ca), Ok(())); +} + +#[test] +fn cert_with_both_ekus_accepted_for_client_auth() { + let ee = include_bytes!("client_auth/cert_with_both_ekus_accepted_for_client_auth.ee.der"); + let ca = include_bytes!("client_auth/cert_with_both_ekus_accepted_for_client_auth.ca.der"); + assert_eq!(check_cert(ee, ca), Ok(())); +} + +#[test] +fn cert_with_serverauth_eku_rejected_for_client_auth() { + let ee = include_bytes!("client_auth/cert_with_serverauth_eku_rejected_for_client_auth.ee.der"); + let ca = include_bytes!("client_auth/cert_with_serverauth_eku_rejected_for_client_auth.ca.der"); + assert_eq!(check_cert(ee, ca), Err(webpki::Error::RequiredEkuNotFound)); +} diff --git a/vendor/rustls-webpki-legacy/tests/client_auth/cert_with_both_ekus_accepted_for_client_auth.ca.der b/vendor/rustls-webpki-legacy/tests/client_auth/cert_with_both_ekus_accepted_for_client_auth.ca.der new file mode 100644 index 00000000000..6cf9fe6e013 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth/cert_with_both_ekus_accepted_for_client_auth.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth/cert_with_both_ekus_accepted_for_client_auth.ee.der b/vendor/rustls-webpki-legacy/tests/client_auth/cert_with_both_ekus_accepted_for_client_auth.ee.der new file mode 100644 index 00000000000..38584d7e6f9 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth/cert_with_both_ekus_accepted_for_client_auth.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth/cert_with_clientauth_eku_accepted_for_client_auth.ca.der b/vendor/rustls-webpki-legacy/tests/client_auth/cert_with_clientauth_eku_accepted_for_client_auth.ca.der new file mode 100644 index 00000000000..2b7cce84bf1 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth/cert_with_clientauth_eku_accepted_for_client_auth.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth/cert_with_clientauth_eku_accepted_for_client_auth.ee.der b/vendor/rustls-webpki-legacy/tests/client_auth/cert_with_clientauth_eku_accepted_for_client_auth.ee.der new file mode 100644 index 00000000000..93d8adcc14f Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth/cert_with_clientauth_eku_accepted_for_client_auth.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth/cert_with_no_eku_accepted_for_client_auth.ca.der b/vendor/rustls-webpki-legacy/tests/client_auth/cert_with_no_eku_accepted_for_client_auth.ca.der new file mode 100644 index 00000000000..25b2905f65d Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth/cert_with_no_eku_accepted_for_client_auth.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth/cert_with_no_eku_accepted_for_client_auth.ee.der b/vendor/rustls-webpki-legacy/tests/client_auth/cert_with_no_eku_accepted_for_client_auth.ee.der new file mode 100644 index 00000000000..897b8be77c2 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth/cert_with_no_eku_accepted_for_client_auth.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth/cert_with_serverauth_eku_rejected_for_client_auth.ca.der b/vendor/rustls-webpki-legacy/tests/client_auth/cert_with_serverauth_eku_rejected_for_client_auth.ca.der new file mode 100644 index 00000000000..b2ec929ab20 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth/cert_with_serverauth_eku_rejected_for_client_auth.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth/cert_with_serverauth_eku_rejected_for_client_auth.ee.der b/vendor/rustls-webpki-legacy/tests/client_auth/cert_with_serverauth_eku_rejected_for_client_auth.ee.der new file mode 100644 index 00000000000..8db1569ff7e Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth/cert_with_serverauth_eku_rejected_for_client_auth.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation.rs b/vendor/rustls-webpki-legacy/tests/client_auth_revocation.rs new file mode 100644 index 00000000000..a5ab7db8754 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/client_auth_revocation.rs @@ -0,0 +1,1696 @@ +// Copyright 2023 Daniel McCarney. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +#![cfg(any(feature = "ring", feature = "aws_lc_rs"))] + +use core::time::Duration; + +use pki_types::{CertificateDer, SignatureVerificationAlgorithm, UnixTime}; +use webpki::{ + anchor_from_trusted_cert, KeyUsage, RevocationCheckDepth, RevocationOptions, + RevocationOptionsBuilder, UnknownStatusPolicy, +}; + +static ALGS: &[&dyn SignatureVerificationAlgorithm] = &[ + #[cfg(feature = "ring")] + webpki::ring::ECDSA_P256_SHA256, + #[cfg(feature = "aws_lc_rs")] + webpki::aws_lc_rs::ECDSA_P256_SHA256, +]; + +fn check_cert( + ee: &[u8], + intermediates: &[&[u8]], + ca: &[u8], + revocation: Option, +) -> Result<(), webpki::Error> { + let ca = CertificateDer::from(ca); + let anchors = &[anchor_from_trusted_cert(&ca).unwrap()]; + let ee = CertificateDer::from(ee); + let cert = webpki::EndEntityCert::try_from(&ee).unwrap(); + let time = UnixTime::since_unix_epoch(Duration::from_secs(0x1fed_f00d)); + let intermediates = intermediates + .iter() + .map(|cert| CertificateDer::from(*cert)) + .collect::>(); + + cert.verify_for_usage( + ALGS, + anchors, + &intermediates, + time, + KeyUsage::client_auth(), + revocation, + None, + ) + .map(|_| ()) +} + +// DO NOT EDIT BELOW: generated by tests/generate.py + +#[test] +fn no_crls_test() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + let revocation = None; + assert_eq!(check_cert(ee, intermediates, ca, revocation), Ok(())); +} + +#[cfg(feature = "alloc")] +#[test] +fn no_crls_test_owned() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + let revocation = None; + assert_eq!(check_cert(ee, intermediates, ca, revocation), Ok(())); +} + +#[test] +fn no_relevant_crl_ee_depth_allow_unknown() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/no_relevant_crl_ee_depth_allow_unknown.crl.der") + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!(check_cert(ee, intermediates, ca, revocation), Ok(())); +} + +#[cfg(feature = "alloc")] +#[test] +fn no_relevant_crl_ee_depth_allow_unknown_owned() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/no_relevant_crl_ee_depth_allow_unknown.crl.der") + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!(check_cert(ee, intermediates, ca, revocation), Ok(())); +} + +#[test] +fn no_relevant_crl_ee_depth_forbid_unknown() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!( + "client_auth_revocation/no_relevant_crl_ee_depth_forbid_unknown.crl.der" + ) + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::UnknownRevocationStatus) + ); +} + +#[cfg(feature = "alloc")] +#[test] +fn no_relevant_crl_ee_depth_forbid_unknown_owned() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!( + "client_auth_revocation/no_relevant_crl_ee_depth_forbid_unknown.crl.der" + ) + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::UnknownRevocationStatus) + ); +} + +#[test] +fn ee_not_revoked_ee_depth() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_not_revoked_ee_depth.crl.der").as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!(check_cert(ee, intermediates, ca, revocation), Ok(())); +} + +#[cfg(feature = "alloc")] +#[test] +fn ee_not_revoked_ee_depth_owned() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_not_revoked_ee_depth.crl.der").as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!(check_cert(ee, intermediates, ca, revocation), Ok(())); +} + +#[test] +fn ee_not_revoked_chain_depth() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_not_revoked_chain_depth.crl.der").as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!(check_cert(ee, intermediates, ca, revocation), Ok(())); +} + +#[cfg(feature = "alloc")] +#[test] +fn ee_not_revoked_chain_depth_owned() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_not_revoked_chain_depth.crl.der").as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!(check_cert(ee, intermediates, ca, revocation), Ok(())); +} + +#[test] +fn ee_revoked_badsig_ee_depth() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_revoked_badsig_ee_depth.crl.der").as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::InvalidCrlSignatureForPublicKey) + ); +} + +#[cfg(feature = "alloc")] +#[test] +fn ee_revoked_badsig_ee_depth_owned() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_revoked_badsig_ee_depth.crl.der").as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::InvalidCrlSignatureForPublicKey) + ); +} + +#[test] +fn ee_revoked_wrong_ku_ee_depth() { + let ee = include_bytes!("client_auth_revocation/no_crl_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_crl_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_crl_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_crl_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_revoked_wrong_ku_ee_depth.crl.der") + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::IssuerNotCrlSigner) + ); +} + +#[cfg(feature = "alloc")] +#[test] +fn ee_revoked_wrong_ku_ee_depth_owned() { + let ee = include_bytes!("client_auth_revocation/no_crl_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_crl_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_crl_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_crl_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_revoked_wrong_ku_ee_depth.crl.der") + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::IssuerNotCrlSigner) + ); +} + +#[test] +fn ee_not_revoked_wrong_ku_ee_depth() { + let ee = include_bytes!("client_auth_revocation/no_crl_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_crl_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_crl_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_crl_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_not_revoked_wrong_ku_ee_depth.crl.der") + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::IssuerNotCrlSigner) + ); +} + +#[cfg(feature = "alloc")] +#[test] +fn ee_not_revoked_wrong_ku_ee_depth_owned() { + let ee = include_bytes!("client_auth_revocation/no_crl_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_crl_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_crl_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_crl_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_not_revoked_wrong_ku_ee_depth.crl.der") + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::IssuerNotCrlSigner) + ); +} + +#[test] +fn ee_revoked_no_ku_ee_depth() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_revoked_no_ku_ee_depth.crl.der").as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::CertRevoked) + ); +} + +#[cfg(feature = "alloc")] +#[test] +fn ee_revoked_no_ku_ee_depth_owned() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_revoked_no_ku_ee_depth.crl.der").as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::CertRevoked) + ); +} + +#[test] +fn ee_revoked_crl_ku_ee_depth() { + let ee = include_bytes!("client_auth_revocation/ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_revoked_crl_ku_ee_depth.crl.der").as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::CertRevoked) + ); +} + +#[cfg(feature = "alloc")] +#[test] +fn ee_revoked_crl_ku_ee_depth_owned() { + let ee = include_bytes!("client_auth_revocation/ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_revoked_crl_ku_ee_depth.crl.der").as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::CertRevoked) + ); +} + +#[test] +fn no_crls_test_chain_depth() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + let revocation = None; + assert_eq!(check_cert(ee, intermediates, ca, revocation), Ok(())); +} + +#[cfg(feature = "alloc")] +#[test] +fn no_crls_test_chain_depth_owned() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + let revocation = None; + assert_eq!(check_cert(ee, intermediates, ca, revocation), Ok(())); +} + +#[test] +fn no_relevant_crl_chain_depth_allow_unknown() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!( + "client_auth_revocation/no_relevant_crl_chain_depth_allow_unknown.crl.der" + ) + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!(check_cert(ee, intermediates, ca, revocation), Ok(())); +} + +#[cfg(feature = "alloc")] +#[test] +fn no_relevant_crl_chain_depth_allow_unknown_owned() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!( + "client_auth_revocation/no_relevant_crl_chain_depth_allow_unknown.crl.der" + ) + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!(check_cert(ee, intermediates, ca, revocation), Ok(())); +} + +#[test] +fn no_relevant_crl_chain_depth_forbid_unknown() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!( + "client_auth_revocation/no_relevant_crl_chain_depth_forbid_unknown.crl.der" + ) + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::UnknownRevocationStatus) + ); +} + +#[cfg(feature = "alloc")] +#[test] +fn no_relevant_crl_chain_depth_forbid_unknown_owned() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!( + "client_auth_revocation/no_relevant_crl_chain_depth_forbid_unknown.crl.der" + ) + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::UnknownRevocationStatus) + ); +} + +#[test] +fn int_not_revoked_chain_depth() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/int_not_revoked_chain_depth.crl.der").as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!(check_cert(ee, intermediates, ca, revocation), Ok(())); +} + +#[cfg(feature = "alloc")] +#[test] +fn int_not_revoked_chain_depth_owned() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/int_not_revoked_chain_depth.crl.der").as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!(check_cert(ee, intermediates, ca, revocation), Ok(())); +} + +#[test] +fn int_not_revoked_chain_depth_forbid_unknown() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[ + &webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!( + "client_auth_revocation/int_not_revoked_chain_depth_forbid_unknown_ee.crl.der" + ) + .as_slice(), + ) + .unwrap(), + ), + &webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!( + "client_auth_revocation/int_not_revoked_chain_depth_forbid_unknown.crl.der" + ) + .as_slice(), + ) + .unwrap(), + ), + &webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!( + "client_auth_revocation/int_not_revoked_chain_depth_forbid_unknown_b.crl.der" + ) + .as_slice(), + ) + .unwrap(), + ), + ]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + let revocation = Some(builder.build()); + assert_eq!(check_cert(ee, intermediates, ca, revocation), Ok(())); +} + +#[cfg(feature = "alloc")] +#[test] +fn int_not_revoked_chain_depth_forbid_unknown_owned() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[ + &webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!( + "client_auth_revocation/int_not_revoked_chain_depth_forbid_unknown_ee.crl.der" + ) + .as_slice(), + ) + .unwrap(), + ), + &webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!( + "client_auth_revocation/int_not_revoked_chain_depth_forbid_unknown.crl.der" + ) + .as_slice(), + ) + .unwrap(), + ), + &webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!( + "client_auth_revocation/int_not_revoked_chain_depth_forbid_unknown_b.crl.der" + ) + .as_slice(), + ) + .unwrap(), + ), + ]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + let revocation = Some(builder.build()); + assert_eq!(check_cert(ee, intermediates, ca, revocation), Ok(())); +} + +#[test] +fn int_revoked_badsig_chain_depth() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/int_revoked_badsig_chain_depth.crl.der") + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::InvalidCrlSignatureForPublicKey) + ); +} + +#[cfg(feature = "alloc")] +#[test] +fn int_revoked_badsig_chain_depth_owned() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/int_revoked_badsig_chain_depth.crl.der") + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::InvalidCrlSignatureForPublicKey) + ); +} + +#[test] +fn int_revoked_wrong_ku_chain_depth() { + let ee = include_bytes!("client_auth_revocation/no_crl_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_crl_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_crl_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_crl_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/int_revoked_wrong_ku_chain_depth.crl.der") + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::IssuerNotCrlSigner) + ); +} + +#[cfg(feature = "alloc")] +#[test] +fn int_revoked_wrong_ku_chain_depth_owned() { + let ee = include_bytes!("client_auth_revocation/no_crl_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_crl_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_crl_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_crl_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/int_revoked_wrong_ku_chain_depth.crl.der") + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::IssuerNotCrlSigner) + ); +} + +#[test] +fn ee_revoked_chain_depth() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_revoked_chain_depth.crl.der").as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::CertRevoked) + ); +} + +#[cfg(feature = "alloc")] +#[test] +fn ee_revoked_chain_depth_owned() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_revoked_chain_depth.crl.der").as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::CertRevoked) + ); +} + +#[test] +fn int_revoked_no_ku_chain_depth() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/int_revoked_no_ku_chain_depth.crl.der") + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::CertRevoked) + ); +} + +#[cfg(feature = "alloc")] +#[test] +fn int_revoked_no_ku_chain_depth_owned() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/int_revoked_no_ku_chain_depth.crl.der") + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::CertRevoked) + ); +} + +#[test] +fn int_revoked_crl_ku_chain_depth() { + let ee = include_bytes!("client_auth_revocation/ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/int_revoked_crl_ku_chain_depth.crl.der") + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::CertRevoked) + ); +} + +#[cfg(feature = "alloc")] +#[test] +fn int_revoked_crl_ku_chain_depth_owned() { + let ee = include_bytes!("client_auth_revocation/ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/int_revoked_crl_ku_chain_depth.crl.der") + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::CertRevoked) + ); +} + +#[test] +fn ee_with_top_bit_set_serial_revoked() { + let ee = include_bytes!("client_auth_revocation/ku_chain.topbit.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_with_top_bit_set_serial_revoked.crl.der") + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::CertRevoked) + ); +} + +#[cfg(feature = "alloc")] +#[test] +fn ee_with_top_bit_set_serial_revoked_owned() { + let ee = include_bytes!("client_auth_revocation/ku_chain.topbit.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_with_top_bit_set_serial_revoked.crl.der") + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::CertRevoked) + ); +} + +#[test] +fn ee_no_dp_crl_idp() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_no_dp_crl_idp.crl.der").as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + let revocation = Some(builder.build()); + assert_eq!(check_cert(ee, intermediates, ca, revocation), Ok(())); +} + +#[cfg(feature = "alloc")] +#[test] +fn ee_no_dp_crl_idp_owned() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_no_dp_crl_idp.crl.der").as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + let revocation = Some(builder.build()); + assert_eq!(check_cert(ee, intermediates, ca, revocation), Ok(())); +} + +#[test] +fn ee_not_revoked_crl_no_idp() { + let ee = include_bytes!("client_auth_revocation/dp_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/dp_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/dp_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/dp_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_not_revoked_crl_no_idp.crl.der").as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + let revocation = Some(builder.build()); + assert_eq!(check_cert(ee, intermediates, ca, revocation), Ok(())); +} + +#[cfg(feature = "alloc")] +#[test] +fn ee_not_revoked_crl_no_idp_owned() { + let ee = include_bytes!("client_auth_revocation/dp_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/dp_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/dp_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/dp_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_not_revoked_crl_no_idp.crl.der").as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + let revocation = Some(builder.build()); + assert_eq!(check_cert(ee, intermediates, ca, revocation), Ok(())); +} + +#[test] +fn ee_revoked_crl_no_idp() { + let ee = include_bytes!("client_auth_revocation/dp_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/dp_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/dp_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/dp_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_revoked_crl_no_idp.crl.der").as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::CertRevoked) + ); +} + +#[cfg(feature = "alloc")] +#[test] +fn ee_revoked_crl_no_idp_owned() { + let ee = include_bytes!("client_auth_revocation/dp_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/dp_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/dp_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/dp_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_revoked_crl_no_idp.crl.der").as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::CertRevoked) + ); +} + +#[test] +fn ee_crl_mismatched_idp_unknown_status() { + let ee = include_bytes!("client_auth_revocation/dp_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/dp_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/dp_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/dp_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_crl_mismatched_idp_unknown_status.crl.der") + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::UnknownRevocationStatus) + ); +} + +#[cfg(feature = "alloc")] +#[test] +fn ee_crl_mismatched_idp_unknown_status_owned() { + let ee = include_bytes!("client_auth_revocation/dp_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/dp_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/dp_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/dp_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_crl_mismatched_idp_unknown_status.crl.der") + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::UnknownRevocationStatus) + ); +} + +#[test] +fn ee_indirect_dp_unknown_status() { + let ee = include_bytes!("client_auth_revocation/indirect_dp_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/indirect_dp_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/indirect_dp_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/indirect_dp_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_indirect_dp_unknown_status.crl.der") + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::UnknownRevocationStatus) + ); +} + +#[cfg(feature = "alloc")] +#[test] +fn ee_indirect_dp_unknown_status_owned() { + let ee = include_bytes!("client_auth_revocation/indirect_dp_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/indirect_dp_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/indirect_dp_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/indirect_dp_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_indirect_dp_unknown_status.crl.der") + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::UnknownRevocationStatus) + ); +} + +#[test] +fn ee_reasons_dp_unknown_status() { + let ee = include_bytes!("client_auth_revocation/reasons_dp_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/reasons_dp_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/reasons_dp_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/reasons_dp_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_reasons_dp_unknown_status.crl.der") + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::UnknownRevocationStatus) + ); +} + +#[cfg(feature = "alloc")] +#[test] +fn ee_reasons_dp_unknown_status_owned() { + let ee = include_bytes!("client_auth_revocation/reasons_dp_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/reasons_dp_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/reasons_dp_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/reasons_dp_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_reasons_dp_unknown_status.crl.der") + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::UnknownRevocationStatus) + ); +} + +#[test] +fn ee_nofullname_dp_unknown_status() { + let ee = include_bytes!("client_auth_revocation/nofullname_dp_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/nofullname_dp_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/nofullname_dp_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/nofullname_dp_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_nofullname_dp_unknown_status.crl.der") + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::UnknownRevocationStatus) + ); +} + +#[cfg(feature = "alloc")] +#[test] +fn ee_nofullname_dp_unknown_status_owned() { + let ee = include_bytes!("client_auth_revocation/nofullname_dp_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/nofullname_dp_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/nofullname_dp_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/nofullname_dp_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_nofullname_dp_unknown_status.crl.der") + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::UnknownRevocationStatus) + ); +} + +#[test] +fn ee_dp_idp_match() { + let ee = include_bytes!("client_auth_revocation/dp_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/dp_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/dp_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/dp_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_dp_idp_match.crl.der").as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + let revocation = Some(builder.build()); + assert_eq!(check_cert(ee, intermediates, ca, revocation), Ok(())); +} + +#[cfg(feature = "alloc")] +#[test] +fn ee_dp_idp_match_owned() { + let ee = include_bytes!("client_auth_revocation/dp_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/dp_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/dp_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/dp_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_dp_idp_match.crl.der").as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + let revocation = Some(builder.build()); + assert_eq!(check_cert(ee, intermediates, ca, revocation), Ok(())); +} + +#[test] +fn ee_dp_invalid() { + let ee = include_bytes!("client_auth_revocation/invalid_dp_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/invalid_dp_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/invalid_dp_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/invalid_dp_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_dp_invalid.crl.der").as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::UnknownRevocationStatus) + ); +} + +#[cfg(feature = "alloc")] +#[test] +fn ee_dp_invalid_owned() { + let ee = include_bytes!("client_auth_revocation/invalid_dp_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/invalid_dp_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/invalid_dp_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/invalid_dp_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/ee_dp_invalid.crl.der").as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::UnknownRevocationStatus) + ); +} + +#[test] +fn expired_crl_ignore_expiration() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/expired_crl_ignore_expiration.crl.der") + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!(check_cert(ee, intermediates, ca, revocation), Ok(())); +} + +#[cfg(feature = "alloc")] +#[test] +fn expired_crl_ignore_expiration_owned() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/expired_crl_ignore_expiration.crl.der") + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + let revocation = Some(builder.build()); + assert_eq!(check_cert(ee, intermediates, ca, revocation), Ok(())); +} + +#[test] +fn expired_crl_enforce_expiration() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/expired_crl_enforce_expiration.crl.der") + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + + let builder = builder.with_expiration_policy(webpki::ExpirationPolicy::Enforce); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::CrlExpired) + ); +} + +#[cfg(feature = "alloc")] +#[test] +fn expired_crl_enforce_expiration_owned() { + let ee = include_bytes!("client_auth_revocation/no_ku_chain.ee.der"); + let intermediates = &[ + include_bytes!("client_auth_revocation/no_ku_chain.int.a.ca.der").as_slice(), + include_bytes!("client_auth_revocation/no_ku_chain.int.b.ca.der").as_slice(), + ]; + let ca = include_bytes!("client_auth_revocation/no_ku_chain.root.ca.der"); + + let crls = &[&webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der( + include_bytes!("client_auth_revocation/expired_crl_enforce_expiration.crl.der") + .as_slice(), + ) + .unwrap(), + )]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + + let builder = builder.with_expiration_policy(webpki::ExpirationPolicy::Enforce); + let revocation = Some(builder.build()); + assert_eq!( + check_cert(ee, intermediates, ca, revocation), + Err(webpki::Error::CrlExpired) + ); +} diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/dp_chain.ee.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/dp_chain.ee.der new file mode 100644 index 00000000000..a097c1f0918 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/dp_chain.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/dp_chain.int.a.ca.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/dp_chain.int.a.ca.der new file mode 100644 index 00000000000..cf95f0341e9 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/dp_chain.int.a.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/dp_chain.int.b.ca.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/dp_chain.int.b.ca.der new file mode 100644 index 00000000000..7c0f445c7de Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/dp_chain.int.b.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/dp_chain.root.ca.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/dp_chain.root.ca.der new file mode 100644 index 00000000000..2e2ab497d96 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/dp_chain.root.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/dp_chain.topbit.ee.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/dp_chain.topbit.ee.der new file mode 100644 index 00000000000..8b783430a55 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/dp_chain.topbit.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_crl_mismatched_idp_unknown_status.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_crl_mismatched_idp_unknown_status.crl.der new file mode 100644 index 00000000000..1f83fb693e8 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_crl_mismatched_idp_unknown_status.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_dp_idp_match.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_dp_idp_match.crl.der new file mode 100644 index 00000000000..3f8a99013b1 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_dp_idp_match.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_dp_invalid.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_dp_invalid.crl.der new file mode 100644 index 00000000000..021ac91c301 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_dp_invalid.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_indirect_dp_unknown_status.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_indirect_dp_unknown_status.crl.der new file mode 100644 index 00000000000..afa724b43ee Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_indirect_dp_unknown_status.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_no_dp_crl_idp.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_no_dp_crl_idp.crl.der new file mode 100644 index 00000000000..fe9a54bb01d Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_no_dp_crl_idp.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_nofullname_dp_unknown_status.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_nofullname_dp_unknown_status.crl.der new file mode 100644 index 00000000000..204b991ea9e Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_nofullname_dp_unknown_status.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_not_revoked_chain_depth.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_not_revoked_chain_depth.crl.der new file mode 100644 index 00000000000..e0623867414 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_not_revoked_chain_depth.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_not_revoked_crl_no_idp.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_not_revoked_crl_no_idp.crl.der new file mode 100644 index 00000000000..37a123d70fb Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_not_revoked_crl_no_idp.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_not_revoked_ee_depth.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_not_revoked_ee_depth.crl.der new file mode 100644 index 00000000000..5c2b19eb039 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_not_revoked_ee_depth.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_not_revoked_wrong_ku_ee_depth.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_not_revoked_wrong_ku_ee_depth.crl.der new file mode 100644 index 00000000000..c2fbc4da73f Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_not_revoked_wrong_ku_ee_depth.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_reasons_dp_unknown_status.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_reasons_dp_unknown_status.crl.der new file mode 100644 index 00000000000..0d518dfecbc Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_reasons_dp_unknown_status.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_revoked_badsig_ee_depth.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_revoked_badsig_ee_depth.crl.der new file mode 100644 index 00000000000..fd454e5a3b5 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_revoked_badsig_ee_depth.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_revoked_chain_depth.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_revoked_chain_depth.crl.der new file mode 100644 index 00000000000..52871c9d980 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_revoked_chain_depth.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_revoked_crl_ku_ee_depth.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_revoked_crl_ku_ee_depth.crl.der new file mode 100644 index 00000000000..217637bb468 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_revoked_crl_ku_ee_depth.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_revoked_crl_no_idp.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_revoked_crl_no_idp.crl.der new file mode 100644 index 00000000000..09cf57f57f8 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_revoked_crl_no_idp.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_revoked_no_ku_ee_depth.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_revoked_no_ku_ee_depth.crl.der new file mode 100644 index 00000000000..6647b68f028 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_revoked_no_ku_ee_depth.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_revoked_wrong_ku_ee_depth.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_revoked_wrong_ku_ee_depth.crl.der new file mode 100644 index 00000000000..d9c4e0c06bc Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_revoked_wrong_ku_ee_depth.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_with_top_bit_set_serial_revoked.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_with_top_bit_set_serial_revoked.crl.der new file mode 100644 index 00000000000..3f7c4d27c2d Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ee_with_top_bit_set_serial_revoked.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/expired_crl_enforce_expiration.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/expired_crl_enforce_expiration.crl.der new file mode 100644 index 00000000000..8804317c3fd Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/expired_crl_enforce_expiration.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/expired_crl_ignore_expiration.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/expired_crl_ignore_expiration.crl.der new file mode 100644 index 00000000000..ff32e51dd6e Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/expired_crl_ignore_expiration.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/indirect_dp_chain.ee.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/indirect_dp_chain.ee.der new file mode 100644 index 00000000000..2756db272c8 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/indirect_dp_chain.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/indirect_dp_chain.int.a.ca.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/indirect_dp_chain.int.a.ca.der new file mode 100644 index 00000000000..17766d91bdd Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/indirect_dp_chain.int.a.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/indirect_dp_chain.int.b.ca.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/indirect_dp_chain.int.b.ca.der new file mode 100644 index 00000000000..29eb6f77fd0 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/indirect_dp_chain.int.b.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/indirect_dp_chain.root.ca.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/indirect_dp_chain.root.ca.der new file mode 100644 index 00000000000..61d5bfc3be9 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/indirect_dp_chain.root.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/indirect_dp_chain.topbit.ee.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/indirect_dp_chain.topbit.ee.der new file mode 100644 index 00000000000..c038ed0efe1 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/indirect_dp_chain.topbit.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/int_not_revoked_chain_depth.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/int_not_revoked_chain_depth.crl.der new file mode 100644 index 00000000000..ef60277379f Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/int_not_revoked_chain_depth.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/int_not_revoked_chain_depth_forbid_unknown.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/int_not_revoked_chain_depth_forbid_unknown.crl.der new file mode 100644 index 00000000000..a0b65c2ebbf Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/int_not_revoked_chain_depth_forbid_unknown.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/int_not_revoked_chain_depth_forbid_unknown_b.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/int_not_revoked_chain_depth_forbid_unknown_b.crl.der new file mode 100644 index 00000000000..bbe189da62e Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/int_not_revoked_chain_depth_forbid_unknown_b.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/int_not_revoked_chain_depth_forbid_unknown_ee.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/int_not_revoked_chain_depth_forbid_unknown_ee.crl.der new file mode 100644 index 00000000000..856bd29bdc3 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/int_not_revoked_chain_depth_forbid_unknown_ee.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/int_revoked_badsig_chain_depth.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/int_revoked_badsig_chain_depth.crl.der new file mode 100644 index 00000000000..f750fdc3436 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/int_revoked_badsig_chain_depth.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/int_revoked_crl_ku_chain_depth.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/int_revoked_crl_ku_chain_depth.crl.der new file mode 100644 index 00000000000..29f5dcaa569 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/int_revoked_crl_ku_chain_depth.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/int_revoked_no_ku_chain_depth.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/int_revoked_no_ku_chain_depth.crl.der new file mode 100644 index 00000000000..27ae8939442 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/int_revoked_no_ku_chain_depth.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/int_revoked_wrong_ku_chain_depth.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/int_revoked_wrong_ku_chain_depth.crl.der new file mode 100644 index 00000000000..c8c493f83f5 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/int_revoked_wrong_ku_chain_depth.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/invalid_dp_chain.ee.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/invalid_dp_chain.ee.der new file mode 100644 index 00000000000..0615fee1fb3 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/invalid_dp_chain.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/invalid_dp_chain.int.a.ca.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/invalid_dp_chain.int.a.ca.der new file mode 100644 index 00000000000..f86b0c84749 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/invalid_dp_chain.int.a.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/invalid_dp_chain.int.b.ca.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/invalid_dp_chain.int.b.ca.der new file mode 100644 index 00000000000..f8e18c69724 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/invalid_dp_chain.int.b.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/invalid_dp_chain.root.ca.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/invalid_dp_chain.root.ca.der new file mode 100644 index 00000000000..1b88814f4cf Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/invalid_dp_chain.root.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/invalid_dp_chain.topbit.ee.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/invalid_dp_chain.topbit.ee.der new file mode 100644 index 00000000000..713f797bbd4 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/invalid_dp_chain.topbit.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ku_chain.ee.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ku_chain.ee.der new file mode 100644 index 00000000000..c29e37afddb Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ku_chain.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ku_chain.int.a.ca.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ku_chain.int.a.ca.der new file mode 100644 index 00000000000..39a83cd90cd Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ku_chain.int.a.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ku_chain.int.b.ca.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ku_chain.int.b.ca.der new file mode 100644 index 00000000000..6cb4134849c Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ku_chain.int.b.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ku_chain.root.ca.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ku_chain.root.ca.der new file mode 100644 index 00000000000..d7b6e486a7c Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ku_chain.root.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ku_chain.topbit.ee.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ku_chain.topbit.ee.der new file mode 100644 index 00000000000..191a02fb0b2 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/ku_chain.topbit.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_crl_ku_chain.ee.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_crl_ku_chain.ee.der new file mode 100644 index 00000000000..bbd09d65a92 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_crl_ku_chain.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_crl_ku_chain.int.a.ca.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_crl_ku_chain.int.a.ca.der new file mode 100644 index 00000000000..26bbcd46809 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_crl_ku_chain.int.a.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_crl_ku_chain.int.b.ca.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_crl_ku_chain.int.b.ca.der new file mode 100644 index 00000000000..10da72f47bd Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_crl_ku_chain.int.b.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_crl_ku_chain.root.ca.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_crl_ku_chain.root.ca.der new file mode 100644 index 00000000000..41652061f93 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_crl_ku_chain.root.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_crl_ku_chain.topbit.ee.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_crl_ku_chain.topbit.ee.der new file mode 100644 index 00000000000..915ee02120e Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_crl_ku_chain.topbit.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_ku_chain.ee.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_ku_chain.ee.der new file mode 100644 index 00000000000..f870da18dab Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_ku_chain.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_ku_chain.int.a.ca.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_ku_chain.int.a.ca.der new file mode 100644 index 00000000000..4a0e95b8a7d Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_ku_chain.int.a.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_ku_chain.int.b.ca.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_ku_chain.int.b.ca.der new file mode 100644 index 00000000000..f23bf4796e8 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_ku_chain.int.b.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_ku_chain.root.ca.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_ku_chain.root.ca.der new file mode 100644 index 00000000000..a410b4cf57d Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_ku_chain.root.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_ku_chain.topbit.ee.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_ku_chain.topbit.ee.der new file mode 100644 index 00000000000..d67041f210a Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_ku_chain.topbit.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_relevant_crl_chain_depth_allow_unknown.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_relevant_crl_chain_depth_allow_unknown.crl.der new file mode 100644 index 00000000000..b50bcd3a893 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_relevant_crl_chain_depth_allow_unknown.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_relevant_crl_chain_depth_forbid_unknown.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_relevant_crl_chain_depth_forbid_unknown.crl.der new file mode 100644 index 00000000000..2236ebb2d70 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_relevant_crl_chain_depth_forbid_unknown.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_relevant_crl_ee_depth_allow_unknown.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_relevant_crl_ee_depth_allow_unknown.crl.der new file mode 100644 index 00000000000..8ea985924d9 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_relevant_crl_ee_depth_allow_unknown.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_relevant_crl_ee_depth_forbid_unknown.crl.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_relevant_crl_ee_depth_forbid_unknown.crl.der new file mode 100644 index 00000000000..e7cad639870 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/no_relevant_crl_ee_depth_forbid_unknown.crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/nofullname_dp_chain.ee.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/nofullname_dp_chain.ee.der new file mode 100644 index 00000000000..e8952e77265 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/nofullname_dp_chain.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/nofullname_dp_chain.int.a.ca.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/nofullname_dp_chain.int.a.ca.der new file mode 100644 index 00000000000..dedbf0c249a Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/nofullname_dp_chain.int.a.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/nofullname_dp_chain.int.b.ca.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/nofullname_dp_chain.int.b.ca.der new file mode 100644 index 00000000000..c203c333b4e Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/nofullname_dp_chain.int.b.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/nofullname_dp_chain.root.ca.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/nofullname_dp_chain.root.ca.der new file mode 100644 index 00000000000..741570b9ed4 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/nofullname_dp_chain.root.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/nofullname_dp_chain.topbit.ee.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/nofullname_dp_chain.topbit.ee.der new file mode 100644 index 00000000000..4e07f57684c Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/nofullname_dp_chain.topbit.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/reasons_dp_chain.ee.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/reasons_dp_chain.ee.der new file mode 100644 index 00000000000..109f2d0ecf3 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/reasons_dp_chain.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/reasons_dp_chain.int.a.ca.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/reasons_dp_chain.int.a.ca.der new file mode 100644 index 00000000000..69e716d5893 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/reasons_dp_chain.int.a.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/reasons_dp_chain.int.b.ca.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/reasons_dp_chain.int.b.ca.der new file mode 100644 index 00000000000..973c32bb650 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/reasons_dp_chain.int.b.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/reasons_dp_chain.root.ca.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/reasons_dp_chain.root.ca.der new file mode 100644 index 00000000000..828d11abe4c Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/reasons_dp_chain.root.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/client_auth_revocation/reasons_dp_chain.topbit.ee.der b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/reasons_dp_chain.topbit.ee.der new file mode 100644 index 00000000000..d2e4cb93079 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/client_auth_revocation/reasons_dp_chain.topbit.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/cloudflare_dns/ca.der b/vendor/rustls-webpki-legacy/tests/cloudflare_dns/ca.der new file mode 100644 index 00000000000..2f1e5523af4 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/cloudflare_dns/ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/cloudflare_dns/ee.der b/vendor/rustls-webpki-legacy/tests/cloudflare_dns/ee.der new file mode 100644 index 00000000000..afa7087f644 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/cloudflare_dns/ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/cloudflare_dns/inter.der b/vendor/rustls-webpki-legacy/tests/cloudflare_dns/inter.der new file mode 100644 index 00000000000..7d8413a3474 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/cloudflare_dns/inter.der differ diff --git a/vendor/rustls-webpki-legacy/tests/critical_extensions/ca-cert.der b/vendor/rustls-webpki-legacy/tests/critical_extensions/ca-cert.der new file mode 100644 index 00000000000..ce3221d4921 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/critical_extensions/ca-cert.der differ diff --git a/vendor/rustls-webpki-legacy/tests/critical_extensions/ee-cert-crit-unknown-ext.der b/vendor/rustls-webpki-legacy/tests/critical_extensions/ee-cert-crit-unknown-ext.der new file mode 100644 index 00000000000..de27bbf2b59 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/critical_extensions/ee-cert-crit-unknown-ext.der differ diff --git a/vendor/rustls-webpki-legacy/tests/critical_extensions/ee-cert-noncrit-unknown-ext.der b/vendor/rustls-webpki-legacy/tests/critical_extensions/ee-cert-noncrit-unknown-ext.der new file mode 100644 index 00000000000..7fd8fde2427 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/critical_extensions/ee-cert-noncrit-unknown-ext.der differ diff --git a/vendor/rustls-webpki-legacy/tests/critical_extensions/root-cert.der b/vendor/rustls-webpki-legacy/tests/critical_extensions/root-cert.der new file mode 100644 index 00000000000..f7466eb9ff5 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/critical_extensions/root-cert.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crl_distrib_point/dp_name_relative_to_issuer.der b/vendor/rustls-webpki-legacy/tests/crl_distrib_point/dp_name_relative_to_issuer.der new file mode 100644 index 00000000000..3cb96d56761 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crl_distrib_point/dp_name_relative_to_issuer.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crl_distrib_point/make_testcerts.py b/vendor/rustls-webpki-legacy/tests/crl_distrib_point/make_testcerts.py new file mode 100644 index 00000000000..3f0a4da38a3 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/crl_distrib_point/make_testcerts.py @@ -0,0 +1,213 @@ +import argparse +from pathlib import Path +from typing import List + +from cryptography import x509 +from cryptography.hazmat.primitives import hashes +from cryptography.hazmat.primitives.asymmetric import ec +from cryptography.hazmat.primitives.serialization import Encoding +from cryptography.hazmat.backends import default_backend +from cryptography.x509.oid import NameOID +import datetime + +NOT_BEFORE: datetime.datetime = datetime.datetime.utcfromtimestamp(0x1FEDF00D - 30) +NOT_AFTER: datetime.datetime = datetime.datetime.utcfromtimestamp(0x1FEDF00D + 30) + +PRIVATE_KEY: ec.EllipticCurvePrivateKey = ec.generate_private_key( + ec.SECP256R1(), default_backend() +) +PUBLIC_KEY: ec.EllipticCurvePublicKey = PRIVATE_KEY.public_key() + + +def write_der(path: str, content: bytes, force: bool) -> None: + # Avoid churn from regenerating existing on-disk resources unless force is enabled. + out_path = Path(path) + if out_path.exists() and not force: + return None + + with out_path.open("wb") as f: + f.write(content) + + +def subject_name(test_name: str) -> x509.Name: + return x509.Name( + [ + x509.NameAttribute( + NameOID.COMMON_NAME, "crl-distrib-point-test.example.com" + ), + x509.NameAttribute(NameOID.ORGANIZATION_NAME, test_name), + ] + ) + + +def generate_cert( + name: str, + distribution_points: List[x509.DistributionPoint], +) -> x509.Certificate: + cert_builder: x509.CertificateBuilder = x509.CertificateBuilder() + cert_builder = cert_builder.subject_name(subject_name(name)) + cert_builder = cert_builder.issuer_name(subject_name(name)) + cert_builder = cert_builder.not_valid_before(NOT_BEFORE) + cert_builder = cert_builder.not_valid_after(NOT_AFTER) + cert_builder = cert_builder.serial_number(x509.random_serial_number()) + cert_builder = cert_builder.public_key(PUBLIC_KEY) + cert_builder = cert_builder.add_extension( + x509.CRLDistributionPoints(distribution_points), critical=False + ) + + return cert_builder.sign( + private_key=PRIVATE_KEY, + algorithm=hashes.SHA256(), + backend=default_backend(), + ) + + +def with_reasons() -> None: + name = "with_reasons" + write_der( + f"{name}.der", + generate_cert( + name, + [ + x509.DistributionPoint( + full_name=[ + x509.UniformResourceIdentifier("http://example.com/crl.der") + ], + reasons=frozenset( + [ + x509.ReasonFlags.key_compromise, + x509.ReasonFlags.affiliation_changed, + ] + ), + relative_name=None, + crl_issuer=None, + ), + ], + ).public_bytes(Encoding.DER), + args.force, + ) + + +def with_crl_issuer() -> None: + name = "with_crl_issuer" + write_der( + f"{name}.der", + generate_cert( + name, + [ + x509.DistributionPoint( + full_name=None, + reasons=None, + relative_name=None, + crl_issuer=[ + x509.DirectoryName( + x509.Name( + [ + x509.NameAttribute( + NameOID.COMMON_NAME, + "crl-distrib-point-test.example.com", + ), + ] + ) + ) + ], + ), + ], + ).public_bytes(Encoding.DER), + args.force, + ) + + +def with_relative_name() -> None: + name = "dp_name_relative_to_issuer" + write_der( + f"{name}.der", + generate_cert( + name, + [ + x509.DistributionPoint( + full_name=None, + reasons=None, + relative_name=x509.RelativeDistinguishedName( + [x509.NameAttribute(NameOID.COMMON_NAME, "example.com")] + ), + crl_issuer=None, + ), + ], + ).public_bytes(Encoding.DER), + args.force, + ) + + +def with_multiple() -> None: + name = "multiple_distribution_points" + write_der( + f"{name}.der", + generate_cert( + name, + [ + x509.DistributionPoint( + full_name=[ + x509.UniformResourceIdentifier("http://example.com/crl.1.der") + ], + reasons=None, + relative_name=None, + crl_issuer=None, + ), + x509.DistributionPoint( + full_name=[ + x509.UniformResourceIdentifier("http://example.com/crl.2.der"), + x509.UniformResourceIdentifier("http://example.com/crl.3.der"), + ], + reasons=None, + relative_name=None, + crl_issuer=None, + ), + ], + ).public_bytes(Encoding.DER), + args.force, + ) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument( + "--with-reasons", + action=argparse.BooleanOptionalAction, + default=True, + help="Generate a certificate with CRL distribution point with reason codes.", + ) + parser.add_argument( + "--with-crl-issuer", + action=argparse.BooleanOptionalAction, + default=True, + help="Generate a certificate with CRL distribution point with cRLIssuer.", + ) + parser.add_argument( + "--with-name-relative-to-issuer", + action=argparse.BooleanOptionalAction, + default=True, + help="Generate a certificate with CRL distribution point name relative to issuer.", + ) + parser.add_argument( + "--multiple-distribution-points", + action=argparse.BooleanOptionalAction, + default=True, + help="Generate a certificate with multiple CRL distribution points.", + ) + parser.add_argument( + "--force", + action=argparse.BooleanOptionalAction, + default=False, + help="Overwrite existing certs", + ) + args = parser.parse_args() + + if args.with_reasons: + with_reasons() + if args.with_crl_issuer: + with_crl_issuer() + if args.with_name_relative_to_issuer: + with_relative_name() + if args.multiple_distribution_points: + with_multiple() diff --git a/vendor/rustls-webpki-legacy/tests/crl_distrib_point/multiple_distribution_points.der b/vendor/rustls-webpki-legacy/tests/crl_distrib_point/multiple_distribution_points.der new file mode 100644 index 00000000000..9d6274c8e40 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crl_distrib_point/multiple_distribution_points.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crl_distrib_point/only_reasons.der b/vendor/rustls-webpki-legacy/tests/crl_distrib_point/only_reasons.der new file mode 100644 index 00000000000..1f0493672a1 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crl_distrib_point/only_reasons.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crl_distrib_point/only_reasons.der.txt b/vendor/rustls-webpki-legacy/tests/crl_distrib_point/only_reasons.der.txt new file mode 100644 index 00000000000..f10a87b62d0 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/crl_distrib_point/only_reasons.der.txt @@ -0,0 +1,84 @@ +SEQUENCE { + SEQUENCE { + [0] { + INTEGER { 2 } + } + INTEGER { `792eb0fdb77dc8e8f484882ae3fd6f859f150310` } + SEQUENCE { + # ecdsa-with-SHA256 + OBJECT_IDENTIFIER { 1.2.840.10045.4.3.2 } + } + SEQUENCE { + SET { + SEQUENCE { + # commonName + OBJECT_IDENTIFIER { 2.5.4.3 } + UTF8String { "crl-distrib-point-test.example.com" } + } + } + SET { + SEQUENCE { + # organizationName + OBJECT_IDENTIFIER { 2.5.4.10 } + UTF8String { "with_reasons" } + } + } + } + SEQUENCE { + UTCTime { "861223015911Z" } + UTCTime { "861223020011Z" } + } + SEQUENCE { + SET { + SEQUENCE { + # commonName + OBJECT_IDENTIFIER { 2.5.4.3 } + UTF8String { "crl-distrib-point-test.example.com" } + } + } + SET { + SEQUENCE { + # organizationName + OBJECT_IDENTIFIER { 2.5.4.10 } + UTF8String { "with_reasons" } + } + } + } + SEQUENCE { + SEQUENCE { + # ecPublicKey + OBJECT_IDENTIFIER { 1.2.840.10045.2.1 } + # secp256r1 + OBJECT_IDENTIFIER { 1.2.840.10045.3.1.7 } + } + BIT_STRING { `00` `04e1b92eea68ad8c894483e1bcfda458c4eb16b64ccf45fb61abb547bbdf7b92266cf4586f6b5d2cc24b8a61c5279fc2f3c59db8bec313cf52a85bb438c3f84cf7` } + } + [3] { + SEQUENCE { + SEQUENCE { + # cRLDistributionPoints + OBJECT_IDENTIFIER { 2.5.29.31 } + OCTET_STRING { + SEQUENCE { + SEQUENCE { + # Misencoded: only reason codes, no cRLIssuer or distribution points. + [1 PRIMITIVE] { `0450` } + } + } + } + } + } + } + } + SEQUENCE { + # ecdsa-with-SHA256 + OBJECT_IDENTIFIER { 1.2.840.10045.4.3.2 } + } + BIT_STRING { + `00` + SEQUENCE { + INTEGER { `0296eba32e155ebe20d1b1c092c0e666971954e713eeab3e723f15ad331492b9` } + INTEGER { `7017abb3fcdc1abdbe1c3897e76d49013e53415fd213f48df84018c9e0ee985e` } + } + } +} diff --git a/vendor/rustls-webpki-legacy/tests/crl_distrib_point/unknown_dp_name_tag.der b/vendor/rustls-webpki-legacy/tests/crl_distrib_point/unknown_dp_name_tag.der new file mode 100644 index 00000000000..c2e52c3fc20 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crl_distrib_point/unknown_dp_name_tag.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crl_distrib_point/unknown_dp_name_tag.der.txt b/vendor/rustls-webpki-legacy/tests/crl_distrib_point/unknown_dp_name_tag.der.txt new file mode 100644 index 00000000000..89a08cf1d79 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/crl_distrib_point/unknown_dp_name_tag.der.txt @@ -0,0 +1,92 @@ +SEQUENCE { + SEQUENCE { + [0] { + INTEGER { 2 } + } + INTEGER { `4a318383d85fcb0156f06e2c6b9f75dbcca89370` } + SEQUENCE { + # ecdsa-with-SHA256 + OBJECT_IDENTIFIER { 1.2.840.10045.4.3.2 } + } + SEQUENCE { + SET { + SEQUENCE { + # commonName + OBJECT_IDENTIFIER { 2.5.4.3 } + UTF8String { "crl-distrib-point-test.example.com" } + } + } + SET { + SEQUENCE { + # organizationName + OBJECT_IDENTIFIER { 2.5.4.10 } + UTF8String { "with_reasons" } + } + } + } + SEQUENCE { + UTCTime { "861223015911Z" } + UTCTime { "861223020011Z" } + } + SEQUENCE { + SET { + SEQUENCE { + # commonName + OBJECT_IDENTIFIER { 2.5.4.3 } + UTF8String { "crl-distrib-point-test.example.com" } + } + } + SET { + SEQUENCE { + # organizationName + OBJECT_IDENTIFIER { 2.5.4.10 } + UTF8String { "with_reasons" } + } + } + } + SEQUENCE { + SEQUENCE { + # ecPublicKey + OBJECT_IDENTIFIER { 1.2.840.10045.2.1 } + # secp256r1 + OBJECT_IDENTIFIER { 1.2.840.10045.3.1.7 } + } + BIT_STRING { `00` `0498333a0b61bbb126bcb13f9f382ea115a07e87ce0da5b79e58dea9817fb81e54931c9f1f13b9fa15ae2c5e2f1b63a59260ca90fed283c159a6c23bce274a1e26` } + } + [3] { + SEQUENCE { + SEQUENCE { + # cRLDistributionPoints + OBJECT_IDENTIFIER { 2.5.29.31 } + OCTET_STRING { + SEQUENCE { + SEQUENCE { + [0] { + # Misencoded - invalid DistributionPointName tag + [4] { + SEQUENCE { + # commonName + OBJECT_IDENTIFIER { 2.5.4.3 } + UTF8String { "cryptography.io" } + } + } + } + } + } + } + } + } + } + } + SEQUENCE { + # ecdsa-with-SHA256 + OBJECT_IDENTIFIER { 1.2.840.10045.4.3.2 } + } + BIT_STRING { + `00` + SEQUENCE { + INTEGER { `16f9b57ffe9a4474ee61a2dc481e3048c70cdbce22b1e112a4b641657b0e2a7f` } + INTEGER { `00c8c92955dc85fc741a9e80ce314365b33485e5add15258fa78ad8a9b0dc03122` } + } + } +} diff --git a/vendor/rustls-webpki-legacy/tests/crl_distrib_point/unknown_tag.der b/vendor/rustls-webpki-legacy/tests/crl_distrib_point/unknown_tag.der new file mode 100644 index 00000000000..8ca5f9b02d3 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crl_distrib_point/unknown_tag.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crl_distrib_point/unknown_tag.der.txt b/vendor/rustls-webpki-legacy/tests/crl_distrib_point/unknown_tag.der.txt new file mode 100644 index 00000000000..41105e64ca5 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/crl_distrib_point/unknown_tag.der.txt @@ -0,0 +1,89 @@ +SEQUENCE { + SEQUENCE { + [0] { + INTEGER { 2 } + } + INTEGER { `792eb0fdb77dc8e8f484882ae3fd6f859f150310` } + SEQUENCE { + # ecdsa-with-SHA256 + OBJECT_IDENTIFIER { 1.2.840.10045.4.3.2 } + } + SEQUENCE { + SET { + SEQUENCE { + # commonName + OBJECT_IDENTIFIER { 2.5.4.3 } + UTF8String { "crl-distrib-point-test.example.com" } + } + } + SET { + SEQUENCE { + # organizationName + OBJECT_IDENTIFIER { 2.5.4.10 } + UTF8String { "with_reasons" } + } + } + } + SEQUENCE { + UTCTime { "861223015911Z" } + UTCTime { "861223020011Z" } + } + SEQUENCE { + SET { + SEQUENCE { + # commonName + OBJECT_IDENTIFIER { 2.5.4.3 } + UTF8String { "crl-distrib-point-test.example.com" } + } + } + SET { + SEQUENCE { + # organizationName + OBJECT_IDENTIFIER { 2.5.4.10 } + UTF8String { "with_reasons" } + } + } + } + SEQUENCE { + SEQUENCE { + # ecPublicKey + OBJECT_IDENTIFIER { 1.2.840.10045.2.1 } + # secp256r1 + OBJECT_IDENTIFIER { 1.2.840.10045.3.1.7 } + } + BIT_STRING { `00` `04e1b92eea68ad8c894483e1bcfda458c4eb16b64ccf45fb61abb547bbdf7b92266cf4586f6b5d2cc24b8a61c5279fc2f3c59db8bec313cf52a85bb438c3f84cf7` } + } + [3] { + SEQUENCE { + SEQUENCE { + # cRLDistributionPoints + OBJECT_IDENTIFIER { 2.5.29.31 } + OCTET_STRING { + SEQUENCE { + SEQUENCE { + [0] { + [0] { + [6 PRIMITIVE] { "http://example.com/crl.der" } + } + } + # Misencoded: 4 tag will be unknown + [4 PRIMITIVE] { `0450` } + } + } + } + } + } + } + } + SEQUENCE { + # ecdsa-with-SHA256 + OBJECT_IDENTIFIER { 1.2.840.10045.4.3.2 } + } + BIT_STRING { + `00` + SEQUENCE { + INTEGER { `0296eba32e155ebe20d1b1c092c0e666971954e713eeab3e723f15ad331492b9` } + INTEGER { `7017abb3fcdc1abdbe1c3897e76d49013e53415fd213f48df84018c9e0ee985e` } + } + } +} diff --git a/vendor/rustls-webpki-legacy/tests/crl_distrib_point/with_crl_issuer.der b/vendor/rustls-webpki-legacy/tests/crl_distrib_point/with_crl_issuer.der new file mode 100644 index 00000000000..d438c601d41 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crl_distrib_point/with_crl_issuer.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crl_distrib_point/with_reasons.der b/vendor/rustls-webpki-legacy/tests/crl_distrib_point/with_reasons.der new file mode 100644 index 00000000000..87fd9e52f9c Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crl_distrib_point/with_reasons.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crl_tests.rs b/vendor/rustls-webpki-legacy/tests/crl_tests.rs new file mode 100644 index 00000000000..1442ffe2177 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/crl_tests.rs @@ -0,0 +1,286 @@ +use webpki::{BorrowedCertRevocationList, CertRevocationList, DerTypeId, Error}; + +const REVOKED_SERIAL: &[u8] = &[0x03, 0xAE, 0x51, 0xDB, 0x51, 0x15, 0x5A, 0x3C]; + +const REVOKED_SERIAL_NEGATIVE: &[u8] = &[0xfd, 0x78, 0xa8, 0x4e]; + +// because cert::Cert::serial is the raw DER integer encoding, this includes a leading +// zero if one is required to make the twos complement representation positive. in this case +// one is required. +const REVOKED_SERIAL_WITH_TOP_BIT_SET: &[u8] = &[0x00, 0x80, 0xfe, 0xed, 0xf0, 0x0d]; +#[test] +fn parse_valid_crl() { + // We should be able to parse a valid CRL without error, and find the revoked serial. + let crl = include_bytes!("crls/crl.valid.der"); + let borrowed_crl = + BorrowedCertRevocationList::from_der(&crl[..]).expect("failed to parse valid crl"); + + #[cfg(feature = "alloc")] + { + let crl: CertRevocationList = borrowed_crl.to_owned().unwrap().into(); + assert!(crl.find_serial(REVOKED_SERIAL).unwrap().is_some()); + } + + let crl: CertRevocationList = borrowed_crl.into(); + assert!(crl.find_serial(REVOKED_SERIAL).unwrap().is_some()); +} + +#[test] +fn parse_empty_crl() { + // We should be able to parse an empty CRL without error, and find no revoked certs. + let crl = include_bytes!("crls/crl.empty.der"); + let borrowed_crl = + BorrowedCertRevocationList::from_der(&crl[..]).expect("failed to parse empty crl"); + + #[cfg(feature = "alloc")] + { + // We should also be able to create an owned empty CRL without error. + let res = borrowed_crl.to_owned(); + assert!(res.is_ok()); + } + + assert!(borrowed_crl.into_iter().next().is_none()); +} + +#[test] +fn parse_mismatched_sigalg_crl() { + // Parsing a CRL with a mismatched outer/inner signature algorithm should fail. + let crl = include_bytes!("crls/crl.mismatched.sigalg.der"); + let res = BorrowedCertRevocationList::from_der(&crl[..]); + assert!(matches!(res, Err(Error::SignatureAlgorithmMismatch))); +} + +#[test] +fn parse_bad_this_update_crl() { + // Parsing a CRL with an invalid this update time should error. + let crl = include_bytes!("crls/crl.invalid.this.update.time.der"); + let res = BorrowedCertRevocationList::from_der(&crl[..]); + assert!(matches!(res, Err(Error::BadDerTime))); +} + +#[test] +fn parse_missing_next_update_crl() { + // Parsing a CRL with a missing next update time should error. + let crl = include_bytes!("crls/crl.missing.next.update.der"); + let res = BorrowedCertRevocationList::from_der(&crl[..]); + assert!(matches!(res, Err(Error::TrailingData(DerTypeId::Time)))); +} + +#[test] +fn parse_wrong_version_crl() { + // Parsing a CRL with an unsupported version should error. + let crl = include_bytes!("crls/crl.wrong.version.der"); + let res = BorrowedCertRevocationList::from_der(&crl[..]); + assert!(matches!(res, Err(Error::UnsupportedCrlVersion))); +} + +#[test] +fn parse_missing_exts_crl() { + // Parsing a CRL with no list extensions should error. + let crl = include_bytes!("crls/crl.missing.exts.der"); + let res = BorrowedCertRevocationList::from_der(&crl[..]); + assert!(matches!(res, Err(Error::MalformedExtensions))); +} + +#[test] +fn parse_delta_crl() { + // Parsing a CRL with an extension indicating its a delta CRL should error. + let crl = include_bytes!("crls/crl.delta.der"); + let res = BorrowedCertRevocationList::from_der(&crl[..]); + assert!(matches!(res, Err(Error::UnsupportedDeltaCrl))); +} + +#[test] +fn parse_unknown_crit_ext_crl() { + // Parsing a CRL with an unknown critical list extension should error. + let crl = include_bytes!("crls/crl.unknown.crit.ext.der"); + let res = BorrowedCertRevocationList::from_der(&crl[..]); + assert!(matches!(res, Err(Error::UnsupportedCriticalExtension))); +} + +#[test] +fn parse_negative_crl_number_crl() { + // Parsing a CRL with a negative CRL number should error. + let crl = include_bytes!("crls/crl.negative.crl.number.der"); + let res = BorrowedCertRevocationList::from_der(&crl[..]); + assert!(matches!(res, Err(Error::InvalidCrlNumber))); +} + +#[test] +fn parse_too_long_crl_number_crl() { + // Parsing a CRL with a CRL number > 20 octets should error. + let crl = include_bytes!("crls/crl.too.long.crl.number.der"); + let res = BorrowedCertRevocationList::from_der(&crl[..]); + assert!(matches!(res, Err(Error::InvalidCrlNumber))); +} + +#[test] +fn parse_entry_negative_serial_crl() { + let crl = include_bytes!("crls/crl.negative.serial.der"); + let borrowed_crl = BorrowedCertRevocationList::from_der(&crl[..]).unwrap(); + + #[cfg(feature = "alloc")] + { + let crl: CertRevocationList = borrowed_crl.to_owned().unwrap().into(); + assert!(crl + .find_serial(REVOKED_SERIAL) + .expect("looking for REVOKED_SERIAL failed") + .is_none()); + assert!(crl + .find_serial(REVOKED_SERIAL_NEGATIVE) + .expect("looking for REVOKED_SERIAL_NEGATIVE failed") + .is_some()); + } + + let crl: CertRevocationList = borrowed_crl.into(); + assert!(crl + .find_serial(REVOKED_SERIAL) + .expect("looking for REVOKED_SERIAL failed") + .is_none()); + assert!(crl + .find_serial(REVOKED_SERIAL_NEGATIVE) + .expect("looking for REVOKED_SERIAL_NEGATIVE failed") + .is_some()); +} + +#[test] +fn parse_entry_topbit_serial_crl() { + let crl = include_bytes!("crls/crl.topbit.serial.der"); + let borrowed_crl = BorrowedCertRevocationList::from_der(&crl[..]).unwrap(); + + #[cfg(feature = "alloc")] + { + let crl: CertRevocationList = borrowed_crl.to_owned().unwrap().into(); + assert!(crl + .find_serial(REVOKED_SERIAL_WITH_TOP_BIT_SET) + .expect("failed to look for REVOKED_SERIAL_WITH_TOP_BIT_SET") + .is_some()); + } + + let crl: CertRevocationList = borrowed_crl.into(); + assert!(crl + .find_serial(REVOKED_SERIAL_WITH_TOP_BIT_SET) + .expect("failed to look for REVOKED_SERIAL_WITH_TOP_BIT_SET") + .is_some()); +} + +#[test] +fn parse_entry_without_exts_crl() { + // Parsing a CRL that includes a revoked entry that has no extensions shouldn't error, and we + // should find the expected revoked certificate. + let crl = include_bytes!("crls/crl.no.entry.exts.der"); + let borrowed_crl = + BorrowedCertRevocationList::from_der(&crl[..]).expect("unexpected error parsing crl"); + + #[cfg(feature = "alloc")] + { + let crl: CertRevocationList = borrowed_crl.to_owned().unwrap().into(); + assert!(crl.find_serial(REVOKED_SERIAL).unwrap().is_some()); + } + + let crl: CertRevocationList = borrowed_crl.into(); + assert!(crl.find_serial(REVOKED_SERIAL).unwrap().is_some()); +} + +#[test] +fn parse_entry_with_empty_exts_seq() { + // Parsing a CRL that has a revoked cert entry with an empty extensions sequence shouldn't error. + let crl = include_bytes!("crls/crl.entry.empty.ext.seq.der"); + let res = BorrowedCertRevocationList::from_der(&crl[..]); + assert!(res.is_ok()); + + #[cfg(feature = "alloc")] + { + let res = res.unwrap().to_owned(); + assert!(res.is_ok()); + } +} + +#[test] +fn parse_entry_unknown_crit_ext_crl() { + // Parsing a CRL that includes a revoked entry that has an unknown critical extension shouldn't + // error up-front because the problem is with a revoked cert entry. + let crl = include_bytes!("crls/crl.entry.unknown.crit.ext.der"); + let borrowed_crl = BorrowedCertRevocationList::from_der(&crl[..]).unwrap(); + + #[cfg(feature = "alloc")] + { + // Parsing the CRL as an owned CRL should error since it will process the revoked certs. + let res = borrowed_crl.to_owned(); + assert!(matches!(res, Err(Error::UnsupportedCriticalExtension))); + } + + // but should error when we try to find a revoked serial due to the entry with the unsupported + // critical ext. + let crl: CertRevocationList = borrowed_crl.into(); + let res = crl.find_serial(REVOKED_SERIAL); + assert!(matches!(res, Err(Error::UnsupportedCriticalExtension))); +} + +#[test] +fn parse_entry_invalid_reason_crl() { + // Parsing a CRL that includes a revoked entry that has an unknown revocation reason shouldn't + // error up-front since the problem is with a revoked entry. + let crl = include_bytes!("crls/crl.entry.invalid.reason.der"); + let borrowed_crl = BorrowedCertRevocationList::from_der(&crl[..]).unwrap(); + + #[cfg(feature = "alloc")] + { + // Parsing the CRL as an owned CRL should error since it will process the revoked certs. + let res = borrowed_crl.to_owned(); + assert!(matches!(res, Err(Error::UnsupportedRevocationReason))); + } + + // But searching for a serial should error due to the revoked cert with the unknown reason. + let crl: CertRevocationList = borrowed_crl.into(); + let res = crl.find_serial(REVOKED_SERIAL); + assert!(matches!(res, Err(Error::UnsupportedRevocationReason))); +} + +#[test] +fn parse_entry_invalidity_date_crl() { + // Parsing a CRL that includes a revoked entry that has an invalidity date ext shouldn't error + // and we should find the expected revoked cert with an invalidity date. + let crl = include_bytes!("crls/crl.entry.invalidity.date.der"); + let borrowed_crl = + BorrowedCertRevocationList::from_der(&crl[..]).expect("unexpected err parsing CRL"); + + #[cfg(feature = "alloc")] + { + let crl: CertRevocationList = borrowed_crl.to_owned().unwrap().into(); + assert!(crl + .find_serial(REVOKED_SERIAL) + .unwrap() + .unwrap() + .invalidity_date + .is_some()); + } + + let crl: CertRevocationList = borrowed_crl.into(); + assert!(crl + .find_serial(REVOKED_SERIAL) + .unwrap() + .unwrap() + .invalidity_date + .is_some()); +} + +#[test] +fn parse_entry_indirect_issuer_crl() { + // Parsing a CRL that includes a revoked entry that has a issuer certificate extension + // shouldn't error up-front - we expect the error to be surfaced when we iterate the revoked + // certs. + let crl = include_bytes!("crls/crl.entry.issuer.ext.der"); + let borrowed_crl = BorrowedCertRevocationList::from_der(&crl[..]).unwrap(); + + #[cfg(feature = "alloc")] + { + // Building an owned CRL should error up front since it will process the revoked certs. + let res = borrowed_crl.to_owned(); + assert!(matches!(res, Err(Error::UnsupportedIndirectCrl))); + } + + let crl: CertRevocationList = borrowed_crl.into(); + let res = crl.find_serial(REVOKED_SERIAL); + assert!(matches!(res, Err(Error::UnsupportedIndirectCrl))); +} diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.delta.der b/vendor/rustls-webpki-legacy/tests/crls/crl.delta.der new file mode 100644 index 00000000000..99baf9a7008 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crls/crl.delta.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.empty.der b/vendor/rustls-webpki-legacy/tests/crls/crl.empty.der new file mode 100644 index 00000000000..35f29164202 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crls/crl.empty.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.entry.empty.ext.seq.der b/vendor/rustls-webpki-legacy/tests/crls/crl.entry.empty.ext.seq.der new file mode 100644 index 00000000000..21a2a8bff34 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crls/crl.entry.empty.ext.seq.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.entry.invalid.reason.der b/vendor/rustls-webpki-legacy/tests/crls/crl.entry.invalid.reason.der new file mode 100644 index 00000000000..7271cc4ea19 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crls/crl.entry.invalid.reason.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.entry.invalidity.date.der b/vendor/rustls-webpki-legacy/tests/crls/crl.entry.invalidity.date.der new file mode 100644 index 00000000000..8c1a81fb6d2 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crls/crl.entry.invalidity.date.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.entry.issuer.ext.der b/vendor/rustls-webpki-legacy/tests/crls/crl.entry.issuer.ext.der new file mode 100644 index 00000000000..6f841489aea Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crls/crl.entry.issuer.ext.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.entry.unknown.crit.ext.der b/vendor/rustls-webpki-legacy/tests/crls/crl.entry.unknown.crit.ext.der new file mode 100644 index 00000000000..a5fb0c7c8c1 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crls/crl.entry.unknown.crit.ext.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.idp.explicit.false.bool.der b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.explicit.false.bool.der new file mode 100644 index 00000000000..b39be2b245a Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.explicit.false.bool.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.idp.explicit.false.bool.der.txt b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.explicit.false.bool.der.txt new file mode 100644 index 00000000000..876d6d55e9e --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.explicit.false.bool.der.txt @@ -0,0 +1,65 @@ +SEQUENCE { + SEQUENCE { + INTEGER { 1 } + SEQUENCE { + # ecdsa-with-SHA256 + OBJECT_IDENTIFIER { 1.2.840.10045.4.3.2 } + } + SEQUENCE { + SET { + SEQUENCE { + # commonName + OBJECT_IDENTIFIER { 2.5.4.3 } + UTF8String { "crl-distrib-point-test.example.com" } + } + } + SET { + SEQUENCE { + # organizationName + OBJECT_IDENTIFIER { 2.5.4.10 } + UTF8String { "only_user_certs" } + } + } + } + UTCTime { "861223015911Z" } + UTCTime { "861223020011Z" } + [0] { + SEQUENCE { + SEQUENCE { + # cRLNumber + OBJECT_IDENTIFIER { 2.5.29.20 } + OCTET_STRING { + INTEGER { `611f7403187a4d50ad64b1b102e42a2506b29e7a` } + } + } + SEQUENCE { + # issuingDistributionPoint + OBJECT_IDENTIFIER { 2.5.29.28 } + BOOLEAN { TRUE } + OCTET_STRING { + SEQUENCE { + [0] { + [0] { + [6 PRIMITIVE] { "http://example.com/crl.1.der" } + } + } + # Non-standard explicit false bool value + [1 PRIMITIVE] { `00` } + } + } + } + } + } + } + SEQUENCE { + # ecdsa-with-SHA256 + OBJECT_IDENTIFIER { 1.2.840.10045.4.3.2 } + } + BIT_STRING { + `00` + SEQUENCE { + INTEGER { `00a0e67b667ed4673f3e902ac3fabd8b27e977dbb2eaf71362d1f6879a3145d7c8` } + INTEGER { `10cdea16c558ab3346923184c4a6af9698dec9e952d723bcdb02bdb91b69ce11` } + } + } +} diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.idp.indirect_crl.der b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.indirect_crl.der new file mode 100644 index 00000000000..0fc7d5b3286 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.indirect_crl.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.idp.invalid.bool.der b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.invalid.bool.der new file mode 100644 index 00000000000..08e1a1ab650 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.invalid.bool.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.idp.invalid.bool.der.txt b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.invalid.bool.der.txt new file mode 100644 index 00000000000..91410f4f937 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.invalid.bool.der.txt @@ -0,0 +1,65 @@ +SEQUENCE { + SEQUENCE { + INTEGER { 1 } + SEQUENCE { + # ecdsa-with-SHA256 + OBJECT_IDENTIFIER { 1.2.840.10045.4.3.2 } + } + SEQUENCE { + SET { + SEQUENCE { + # commonName + OBJECT_IDENTIFIER { 2.5.4.3 } + UTF8String { "crl-distrib-point-test.example.com" } + } + } + SET { + SEQUENCE { + # organizationName + OBJECT_IDENTIFIER { 2.5.4.10 } + UTF8String { "only_ca_certs" } + } + } + } + UTCTime { "861223015911Z" } + UTCTime { "861223020011Z" } + [0] { + SEQUENCE { + SEQUENCE { + # cRLNumber + OBJECT_IDENTIFIER { 2.5.29.20 } + OCTET_STRING { + INTEGER { `1a7d5c57c1aa399208f8e24197de6ef9361aaf07` } + } + } + SEQUENCE { + # issuingDistributionPoint + OBJECT_IDENTIFIER { 2.5.29.28 } + BOOLEAN { TRUE } + OCTET_STRING { + SEQUENCE { + [0] { + [0] { + [6 PRIMITIVE] { "http://example.com/crl.1.der" } + } + } + # Mis-encoded bool value. + [2 PRIMITIVE] { `AB` } + } + } + } + } + } + } + SEQUENCE { + # ecdsa-with-SHA256 + OBJECT_IDENTIFIER { 1.2.840.10045.4.3.2 } + } + BIT_STRING { + `00` + SEQUENCE { + INTEGER { `6aa680a8805f3902540464b93e4be1f4daa81820ef92ca860061443a6cb37e91` } + INTEGER { `329f8fcf98fee441707abf7aa3f68699ff5cd48ab7c130ab8d3cdd2e5af0e6a3` } + } + } +} diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.idp.invalid.name.der b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.invalid.name.der new file mode 100644 index 00000000000..39a6e452b2b Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.invalid.name.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.idp.invalid.name.der.txt b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.invalid.name.der.txt new file mode 100644 index 00000000000..6293d41d78e --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.invalid.name.der.txt @@ -0,0 +1,65 @@ +SEQUENCE { + SEQUENCE { + INTEGER { 1 } + SEQUENCE { + # ecdsa-with-SHA256 + OBJECT_IDENTIFIER { 1.2.840.10045.4.3.2 } + } + SEQUENCE { + SET { + SEQUENCE { + # commonName + OBJECT_IDENTIFIER { 2.5.4.3 } + UTF8String { "crl-distrib-point-test.example.com" } + } + } + SET { + SEQUENCE { + # organizationName + OBJECT_IDENTIFIER { 2.5.4.10 } + UTF8String { "only_user_certs" } + } + } + } + UTCTime { "861223015911Z" } + UTCTime { "861223020011Z" } + [0] { + SEQUENCE { + SEQUENCE { + # cRLNumber + OBJECT_IDENTIFIER { 2.5.29.20 } + OCTET_STRING { + INTEGER { `611f7403187a4d50ad64b1b102e42a2506b29e7a` } + } + } + SEQUENCE { + # issuingDistributionPoint + OBJECT_IDENTIFIER { 2.5.29.28 } + BOOLEAN { TRUE } + OCTET_STRING { + SEQUENCE { + [0] { + # Misencoded unknown name tag. + [8] { + [6 PRIMITIVE] { "http://example.com/crl.1.der" } + } + } + [1 PRIMITIVE] { `ff` } + } + } + } + } + } + } + SEQUENCE { + # ecdsa-with-SHA256 + OBJECT_IDENTIFIER { 1.2.840.10045.4.3.2 } + } + BIT_STRING { + `00` + SEQUENCE { + INTEGER { `00a0e67b667ed4673f3e902ac3fabd8b27e977dbb2eaf71362d1f6879a3145d7c8` } + INTEGER { `10cdea16c558ab3346923184c4a6af9698dec9e952d723bcdb02bdb91b69ce11` } + } + } +} diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.idp.name_relative_to_issuer.der b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.name_relative_to_issuer.der new file mode 100644 index 00000000000..b061bfe224e Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.name_relative_to_issuer.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.idp.no_distribution_point_name.der b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.no_distribution_point_name.der new file mode 100644 index 00000000000..42da08bfd96 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.no_distribution_point_name.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.idp.only_attribute_certs.der b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.only_attribute_certs.der new file mode 100644 index 00000000000..3587b7fb2b0 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.only_attribute_certs.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.idp.only_ca_certs.der b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.only_ca_certs.der new file mode 100644 index 00000000000..a981245ce56 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.only_ca_certs.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.idp.only_some_reasons.der b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.only_some_reasons.der new file mode 100644 index 00000000000..bd189107b7c Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.only_some_reasons.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.idp.only_user_certs.der b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.only_user_certs.der new file mode 100644 index 00000000000..6072449309f Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.only_user_certs.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.idp.unknown.tag.der b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.unknown.tag.der new file mode 100644 index 00000000000..18b3a3914ff Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.unknown.tag.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.idp.unknown.tag.der.txt b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.unknown.tag.der.txt new file mode 100644 index 00000000000..613f7546b16 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.unknown.tag.der.txt @@ -0,0 +1,65 @@ +SEQUENCE { + SEQUENCE { + INTEGER { 1 } + SEQUENCE { + # ecdsa-with-SHA256 + OBJECT_IDENTIFIER { 1.2.840.10045.4.3.2 } + } + SEQUENCE { + SET { + SEQUENCE { + # commonName + OBJECT_IDENTIFIER { 2.5.4.3 } + UTF8String { "crl-distrib-point-test.example.com" } + } + } + SET { + SEQUENCE { + # organizationName + OBJECT_IDENTIFIER { 2.5.4.10 } + UTF8String { "only_user_certs" } + } + } + } + UTCTime { "861223015911Z" } + UTCTime { "861223020011Z" } + [0] { + SEQUENCE { + SEQUENCE { + # cRLNumber + OBJECT_IDENTIFIER { 2.5.29.20 } + OCTET_STRING { + INTEGER { `611f7403187a4d50ad64b1b102e42a2506b29e7a` } + } + } + SEQUENCE { + # issuingDistributionPoint + OBJECT_IDENTIFIER { 2.5.29.28 } + BOOLEAN { TRUE } + OCTET_STRING { + SEQUENCE { + [0] { + [0] { + [6 PRIMITIVE] { "http://example.com/crl.1.der" } + } + } + # Misencoded unknown contextual tag value. + [9 PRIMITIVE] { `ff` } + } + } + } + } + } + } + SEQUENCE { + # ecdsa-with-SHA256 + OBJECT_IDENTIFIER { 1.2.840.10045.4.3.2 } + } + BIT_STRING { + `00` + SEQUENCE { + INTEGER { `00a0e67b667ed4673f3e902ac3fabd8b27e977dbb2eaf71362d1f6879a3145d7c8` } + INTEGER { `10cdea16c558ab3346923184c4a6af9698dec9e952d723bcdb02bdb91b69ce11` } + } + } +} diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.idp.valid.der b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.valid.der new file mode 100644 index 00000000000..ba56c9a3de5 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crls/crl.idp.valid.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.invalid.this.update.time.der b/vendor/rustls-webpki-legacy/tests/crls/crl.invalid.this.update.time.der new file mode 100644 index 00000000000..ebf095bdbb3 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crls/crl.invalid.this.update.time.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.mismatched.sigalg.der b/vendor/rustls-webpki-legacy/tests/crls/crl.mismatched.sigalg.der new file mode 100644 index 00000000000..972489835bc Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crls/crl.mismatched.sigalg.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.missing.exts.der b/vendor/rustls-webpki-legacy/tests/crls/crl.missing.exts.der new file mode 100644 index 00000000000..5797b1f67b4 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crls/crl.missing.exts.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.missing.next.update.der b/vendor/rustls-webpki-legacy/tests/crls/crl.missing.next.update.der new file mode 100644 index 00000000000..bd53ae6c5a7 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crls/crl.missing.next.update.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.negative.crl.number.der b/vendor/rustls-webpki-legacy/tests/crls/crl.negative.crl.number.der new file mode 100644 index 00000000000..d1c310be72f Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crls/crl.negative.crl.number.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.negative.serial.der b/vendor/rustls-webpki-legacy/tests/crls/crl.negative.serial.der new file mode 100644 index 00000000000..f4f2d0b6222 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crls/crl.negative.serial.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.no.entry.exts.der b/vendor/rustls-webpki-legacy/tests/crls/crl.no.entry.exts.der new file mode 100644 index 00000000000..edd6d35eec7 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crls/crl.no.entry.exts.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.too.long.crl.number.der b/vendor/rustls-webpki-legacy/tests/crls/crl.too.long.crl.number.der new file mode 100644 index 00000000000..d85cb59c628 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crls/crl.too.long.crl.number.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.topbit.serial.der b/vendor/rustls-webpki-legacy/tests/crls/crl.topbit.serial.der new file mode 100644 index 00000000000..cf328c3b56d Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crls/crl.topbit.serial.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.topbit.serial.txt b/vendor/rustls-webpki-legacy/tests/crls/crl.topbit.serial.txt new file mode 100644 index 00000000000..458d6958ac7 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/crls/crl.topbit.serial.txt @@ -0,0 +1,95 @@ +SEQUENCE { + SEQUENCE { + INTEGER { 1 } + SEQUENCE { + # ecdsa-with-SHA384 + OBJECT_IDENTIFIER { 1.2.840.10045.4.3.3 } + } + SEQUENCE { + SET { + SEQUENCE { + # countryName + OBJECT_IDENTIFIER { 2.5.4.6 } + PrintableString { "XX" } + } + } + SET { + SEQUENCE { + # organizationName + OBJECT_IDENTIFIER { 2.5.4.10 } + PrintableString { "Boulder Test" } + } + } + SET { + SEQUENCE { + # commonName + OBJECT_IDENTIFIER { 2.5.4.3 } + PrintableString { "(TEST) Elegant Elephant E1" } + } + } + } + UTCTime { "221010201207Z" } + UTCTime { "221019201206Z" } + SEQUENCE { + SEQUENCE { + INTEGER { `0080feedf00d` } + UTCTime { "221010191207Z" } + SEQUENCE { + SEQUENCE { + # reasonCode + OBJECT_IDENTIFIER { 2.5.29.21 } + OCTET_STRING { + ENUMERATED { `01` } + } + } + } + } + } + [0] { + SEQUENCE { + SEQUENCE { + # authorityKeyIdentifier + OBJECT_IDENTIFIER { 2.5.29.35 } + OCTET_STRING { + SEQUENCE { + [0 PRIMITIVE] { `01dabb7acb25208e5e79d6f996422f02412907be` } + } + } + } + SEQUENCE { + # cRLNumber + OBJECT_IDENTIFIER { 2.5.29.20 } + OCTET_STRING { + INTEGER { `171cce3de482ba61` } + } + } + SEQUENCE { + # issuingDistributionPoint + OBJECT_IDENTIFIER { 2.5.29.28 } + BOOLEAN { TRUE } + OCTET_STRING { + SEQUENCE { + [0] { + [0] { + [6 PRIMITIVE] { "http://c.boulder.test/66283756913588288/0.crl" } + } + } + [1 PRIMITIVE] { `ff` } + } + } + } + } + } + } + SEQUENCE { + # ecdsa-with-SHA384 + OBJECT_IDENTIFIER { 1.2.840.10045.4.3.3 } + } + BIT_STRING { + `00` + SEQUENCE { + INTEGER { `2f0e42149d361abc9ea1f3ad3a303c85876bb0fdc17e3959cce2c13c9d4746cb45d88348467db478318fa44714506b22` } + INTEGER { `57903e972922bd33817a4fea5517534adc2d2bdab6e69e41256bdb89c68d9ecfcb4bdcf78c349fb89d67cc237b9fbf33` } + } + } +} diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.unknown.crit.ext.der b/vendor/rustls-webpki-legacy/tests/crls/crl.unknown.crit.ext.der new file mode 100644 index 00000000000..e0b70ca6268 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crls/crl.unknown.crit.ext.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.valid.der b/vendor/rustls-webpki-legacy/tests/crls/crl.valid.der new file mode 100644 index 00000000000..483270a5af7 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crls/crl.valid.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crls/crl.wrong.version.der b/vendor/rustls-webpki-legacy/tests/crls/crl.wrong.version.der new file mode 100644 index 00000000000..e5339d14ab2 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/crls/crl.wrong.version.der differ diff --git a/vendor/rustls-webpki-legacy/tests/crls/make_testcrls.py b/vendor/rustls-webpki-legacy/tests/crls/make_testcrls.py new file mode 100644 index 00000000000..2d914016061 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/crls/make_testcrls.py @@ -0,0 +1,278 @@ +import argparse +from pathlib import Path + +from cryptography import x509 +from cryptography.hazmat.primitives import hashes +from cryptography.hazmat.primitives.asymmetric import ec +from cryptography.hazmat.primitives.serialization import Encoding +from cryptography.hazmat.backends import default_backend +from cryptography.x509.oid import NameOID +import datetime + +NOT_BEFORE: datetime.datetime = datetime.datetime.utcfromtimestamp(0x1FEDF00D - 30) +NOT_AFTER: datetime.datetime = datetime.datetime.utcfromtimestamp(0x1FEDF00D + 30) + +PRIVATE_KEY: ec.EllipticCurvePrivateKey = ec.generate_private_key( + ec.SECP256R1(), default_backend() +) + +EG_URI: x509.UniformResourceIdentifier = x509.UniformResourceIdentifier( + "http://example.com/crl.1.der" +) + + +def write_der(path: str, content: bytes, force: bool) -> None: + # Avoid churn from regenerating existing on-disk resources unless force is enabled. + out_path = Path(path) + if out_path.exists() and not force: + return None + + with out_path.open("wb") as f: + f.write(content) + + +def subject_name(test_name: str) -> x509.Name: + return x509.Name( + [ + x509.NameAttribute( + NameOID.COMMON_NAME, "crl-distrib-point-test.example.com" + ), + x509.NameAttribute(NameOID.ORGANIZATION_NAME, test_name), + ] + ) + + +def generate_crl( + name: str, + issuing_distribution_point: x509.IssuingDistributionPoint, +) -> x509.CertificateRevocationList: + crl_builder: x509.CertificateRevocationListBuilder = ( + x509.CertificateRevocationListBuilder() + ) + crl_builder = crl_builder.issuer_name(subject_name(name)) + crl_builder = crl_builder.last_update(NOT_BEFORE) + crl_builder = crl_builder.next_update(NOT_AFTER) + crl_builder = crl_builder.add_extension( + x509.CRLNumber(x509.random_serial_number()), critical=False + ) + crl_builder = crl_builder.add_extension(issuing_distribution_point, critical=True) + + return crl_builder.sign( + private_key=PRIVATE_KEY, + algorithm=hashes.SHA256(), + ) + + +def only_user_certs() -> None: + name = "only_user_certs" + write_der( + f"crl.idp.{name}.der", + generate_crl( + name, + x509.IssuingDistributionPoint( + only_contains_user_certs=True, + only_contains_ca_certs=False, + indirect_crl=False, + only_contains_attribute_certs=False, + only_some_reasons=None, + full_name=[EG_URI], + relative_name=None, + ), + ).public_bytes(Encoding.DER), + args.force, + ) + + +def only_ca_certs() -> None: + name = "only_ca_certs" + write_der( + f"crl.idp.{name}.der", + generate_crl( + name, + x509.IssuingDistributionPoint( + only_contains_user_certs=False, + only_contains_ca_certs=True, + indirect_crl=False, + only_contains_attribute_certs=False, + only_some_reasons=None, + full_name=[EG_URI], + relative_name=None, + ), + ).public_bytes(Encoding.DER), + args.force, + ) + + +def indirect_crl() -> None: + name = "indirect_crl" + write_der( + f"crl.idp.{name}.der", + generate_crl( + name, + x509.IssuingDistributionPoint( + only_contains_user_certs=False, + only_contains_ca_certs=False, + indirect_crl=True, + only_contains_attribute_certs=False, + only_some_reasons=None, + full_name=[EG_URI], + relative_name=None, + ), + ).public_bytes(Encoding.DER), + args.force, + ) + + +def only_attribute_certs() -> None: + name = "only_attribute_certs" + write_der( + f"crl.idp.{name}.der", + generate_crl( + name, + x509.IssuingDistributionPoint( + only_contains_user_certs=False, + only_contains_ca_certs=False, + indirect_crl=False, + only_contains_attribute_certs=True, + only_some_reasons=None, + full_name=[EG_URI], + relative_name=None, + ), + ).public_bytes(Encoding.DER), + args.force, + ) + + +def only_some_reasons() -> None: + name = "only_some_reasons" + write_der( + f"crl.idp.{name}.der", + generate_crl( + name, + x509.IssuingDistributionPoint( + only_contains_user_certs=False, + only_contains_ca_certs=False, + indirect_crl=False, + only_contains_attribute_certs=False, + only_some_reasons=frozenset( + [ + x509.ReasonFlags.key_compromise, + x509.ReasonFlags.affiliation_changed, + ] + ), + full_name=[EG_URI], + relative_name=None, + ), + ).public_bytes(Encoding.DER), + args.force, + ) + + +def name_relative_to_issuer() -> None: + name = "name_relative_to_issuer" + write_der( + f"crl.idp.{name}.der", + generate_crl( + name, + x509.IssuingDistributionPoint( + only_contains_user_certs=False, + only_contains_ca_certs=False, + indirect_crl=False, + only_contains_attribute_certs=False, + only_some_reasons=None, + full_name=None, + relative_name=x509.RelativeDistinguishedName( + [x509.NameAttribute(NameOID.COMMON_NAME, "example.com")] + ), + ), + ).public_bytes(Encoding.DER), + args.force, + ) + + +def no_distribution_point_name() -> None: + name = "no_distribution_point_name" + write_der( + f"crl.idp.{name}.der", + generate_crl( + name, + x509.IssuingDistributionPoint( + only_contains_user_certs=True, + only_contains_ca_certs=False, + indirect_crl=False, + only_contains_attribute_certs=False, + only_some_reasons=None, + full_name=None, + relative_name=None, + ), + ).public_bytes(Encoding.DER), + args.force, + ) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument( + "--with-only-user-certs", + action=argparse.BooleanOptionalAction, + default=True, + help="Generate CRL with only user certificates.", + ) + parser.add_argument( + "--with-only-ca-certs", + action=argparse.BooleanOptionalAction, + default=True, + help="Generate CRL with only CA certificates.", + ) + parser.add_argument( + "--with-indirect-crl", + action=argparse.BooleanOptionalAction, + default=True, + help="Generate CRL marked as an indirect CRL", + ) + parser.add_argument( + "--with-only-attribute-certs", + action=argparse.BooleanOptionalAction, + default=True, + help="Generate CRL with only attribute certificates.", + ) + parser.add_argument( + "--with-only-some-reasons", + action=argparse.BooleanOptionalAction, + default=True, + help="Generate CRL with only some revocation reasons in-scope.", + ) + parser.add_argument( + "--with-name-relative-to-issuer", + action=argparse.BooleanOptionalAction, + default=True, + help="Generate CRL with IDP extension with distribution point name relative to issuer", + ) + parser.add_argument( + "--with-no-distribution-point-name", + action=argparse.BooleanOptionalAction, + default=True, + help="Generate CRL with IDP extension withno distribution point name", + ) + parser.add_argument( + "--force", + action=argparse.BooleanOptionalAction, + default=False, + help="Overwrite existing certs", + ) + args = parser.parse_args() + + if args.with_only_user_certs: + only_user_certs() + if args.with_only_ca_certs: + only_ca_certs() + if args.with_indirect_crl: + indirect_crl() + if args.with_only_attribute_certs: + only_attribute_certs() + if args.with_only_some_reasons: + only_some_reasons() + if args.with_name_relative_to_issuer: + name_relative_to_issuer() + if args.with_no_distribution_point_name: + no_distribution_point_name() diff --git a/vendor/rustls-webpki-legacy/tests/custom_ekus.rs b/vendor/rustls-webpki-legacy/tests/custom_ekus.rs new file mode 100644 index 00000000000..9d4465cac22 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/custom_ekus.rs @@ -0,0 +1,78 @@ +#![cfg(all(feature = "alloc", any(feature = "ring", feature = "aws_lc_rs")))] + +use core::time::Duration; + +use pki_types::{CertificateDer, UnixTime}; +use webpki::{anchor_from_trusted_cert, KeyUsage}; + +fn check_cert( + ee: &[u8], + ca: &[u8], + eku: KeyUsage, + time: UnixTime, + result: Result<(), webpki::Error>, +) { + let ca = CertificateDer::from(ca); + let anchors = [anchor_from_trusted_cert(&ca).unwrap()]; + + let ee = CertificateDer::from(ee); + let cert = webpki::EndEntityCert::try_from(&ee).unwrap(); + + assert_eq!( + cert.verify_for_usage( + webpki::ALL_VERIFICATION_ALGS, + &anchors, + &[], + time, + eku, + None, + None, + ) + .map(|_| ()), + result + ); +} + +#[test] +pub fn verify_custom_eku_mdoc() { + let err = Err(webpki::Error::RequiredEkuNotFound); + let time = UnixTime::since_unix_epoch(Duration::from_secs(1_609_459_200)); // Jan 1 01:00:00 CET 2021 + + let ee = include_bytes!("misc/mdoc_eku.ee.der"); + let ca = include_bytes!("misc/mdoc_eku.ca.der"); + + let eku_mdoc = KeyUsage::required(&[40, 129, 140, 93, 5, 1, 2]); + check_cert(ee, ca, eku_mdoc, time, Ok(())); + check_cert(ee, ca, KeyUsage::server_auth(), time, err); + check_cert(ee, ca, eku_mdoc, time, Ok(())); + check_cert(ee, ca, KeyUsage::server_auth(), time, err); +} + +#[test] +pub fn verify_custom_eku_client() { + let time = UnixTime::since_unix_epoch(Duration::from_secs(0x1fed_f00d)); + + let ee = include_bytes!("client_auth/cert_with_no_eku_accepted_for_client_auth.ee.der"); + let ca = include_bytes!("client_auth/cert_with_no_eku_accepted_for_client_auth.ca.der"); + check_cert(ee, ca, KeyUsage::client_auth(), time, Ok(())); + + let ee = include_bytes!("client_auth/cert_with_both_ekus_accepted_for_client_auth.ee.der"); + let ca = include_bytes!("client_auth/cert_with_both_ekus_accepted_for_client_auth.ca.der"); + check_cert(ee, ca, KeyUsage::client_auth(), time, Ok(())); + check_cert(ee, ca, KeyUsage::server_auth(), time, Ok(())); +} + +#[test] +pub fn verify_custom_eku_required_if_present() { + let time = UnixTime::since_unix_epoch(Duration::from_secs(0x1fed_f00d)); + + let eku = KeyUsage::required_if_present(&[43, 6, 1, 5, 5, 7, 3, 2]); + + let ee = include_bytes!("client_auth/cert_with_no_eku_accepted_for_client_auth.ee.der"); + let ca = include_bytes!("client_auth/cert_with_no_eku_accepted_for_client_auth.ca.der"); + check_cert(ee, ca, eku, time, Ok(())); + + let ee = include_bytes!("client_auth/cert_with_both_ekus_accepted_for_client_auth.ee.der"); + let ca = include_bytes!("client_auth/cert_with_both_ekus_accepted_for_client_auth.ca.der"); + check_cert(ee, ca, eku, time, Ok(())); +} diff --git a/vendor/rustls-webpki-legacy/tests/ed25519/ca.der b/vendor/rustls-webpki-legacy/tests/ed25519/ca.der new file mode 100644 index 00000000000..9994daf1913 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/ed25519/ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/ed25519/ee-pubkey.der b/vendor/rustls-webpki-legacy/tests/ed25519/ee-pubkey.der new file mode 100644 index 00000000000..a1b040a8996 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/ed25519/ee-pubkey.der differ diff --git a/vendor/rustls-webpki-legacy/tests/ed25519/ee.der b/vendor/rustls-webpki-legacy/tests/ed25519/ee.der new file mode 100644 index 00000000000..5181f7bc2cf Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/ed25519/ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/generate.py b/vendor/rustls-webpki-legacy/tests/generate.py new file mode 100755 index 00000000000..954b82816f8 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/generate.py @@ -0,0 +1,2342 @@ +#!/usr/bin/env python3 + +""" +Generates test cases that aim to validate name constraints and other +name-related parts of webpki. + +Run this script from tests/. It edits the bottom part of some .rs files and +drops testcase data into subdirectories as required. +""" + +import argparse +import enum +import os +from typing import TextIO, Optional, Union, Any, Callable, Iterable, List +from pathlib import Path + +from cryptography import x509 +from cryptography.hazmat.primitives import hashes +from cryptography.hazmat.primitives.asymmetric import rsa, ec, ed25519, padding +from cryptography.hazmat.primitives.serialization import Encoding, PublicFormat +from cryptography.hazmat.backends import default_backend +from cryptography.x509.oid import NameOID, ExtendedKeyUsageOID +import ipaddress +import datetime +import subprocess + +ROOT_PRIVATE_KEY: rsa.RSAPrivateKey = rsa.generate_private_key( + public_exponent=65537, key_size=2048, backend=default_backend() +) +ROOT_PUBLIC_KEY: rsa.RSAPublicKey = ROOT_PRIVATE_KEY.public_key() + +NOT_BEFORE: datetime.datetime = datetime.datetime.utcfromtimestamp(0x1FEDF00D - 30) +NOT_AFTER: datetime.datetime = datetime.datetime.utcfromtimestamp(0x1FEDF00D + 30) + +ANY_PRIV_KEY = Union[ + ed25519.Ed25519PrivateKey | ec.EllipticCurvePrivateKey | rsa.RSAPrivateKey +] +ANY_PUB_KEY = Union[ + ed25519.Ed25519PublicKey | ec.EllipticCurvePublicKey | rsa.RSAPublicKey +] +SIGNER = Callable[ + [Any, bytes], Any +] # Note: a bit loosey-goosey here but good enough for tests. + + +def trim_top(file_name: str) -> TextIO: + """ + Reads `file_name`, then writes lines up to a particular comment (the "top" + of the file) back to it and returns the file object for further writing. + """ + + with open(file_name, "r") as f: + top = f.readlines() + top = top[: top.index("// DO NOT EDIT BELOW: generated by tests/generate.py\n") + 1] + output = open(file_name, "w") + for line in top: + output.write(line) + return output + + +def key_or_generate(key: Optional[ANY_PRIV_KEY] = None) -> ANY_PRIV_KEY: + return ( + key + if key is not None + else rsa.generate_private_key( + public_exponent=65537, + key_size=2048, + backend=default_backend(), + ) + ) + + +def write_der(path: str, content: bytes, force: bool) -> None: + # Avoid churn from regenerating existing on-disk resources unless force is enabled. + out_path = Path(path) + if out_path.exists() and not force: + return None + + with out_path.open("wb") as f: + f.write(content) + + +def end_entity_cert( + *, + subject_name: x509.Name, + issuer_name: x509.Name, + issuer_key: Optional[ANY_PRIV_KEY] = None, + subject_key: Optional[ANY_PRIV_KEY] = None, + sans: Optional[Iterable[x509.GeneralName]] = None, + ekus: Optional[Iterable[x509.ObjectIdentifier]] = None, + serial: Optional[int] = None, + cert_dps: Optional[x509.DistributionPoint] = None, +) -> x509.Certificate: + subject_priv_key = key_or_generate(subject_key) + subject_key_pub: ANY_PUB_KEY = subject_priv_key.public_key() + + ee_builder: x509.CertificateBuilder = x509.CertificateBuilder() + ee_builder = ee_builder.subject_name(subject_name) + ee_builder = ee_builder.issuer_name(issuer_name) + ee_builder = ee_builder.not_valid_before(NOT_BEFORE) + ee_builder = ee_builder.not_valid_after(NOT_AFTER) + ee_builder = ee_builder.serial_number( + x509.random_serial_number() if serial is None else serial + ) + ee_builder = ee_builder.public_key(subject_key_pub) + if sans: + ee_builder = ee_builder.add_extension( + x509.SubjectAlternativeName(sans), critical=False + ) + if ekus: + ee_builder = ee_builder.add_extension( + x509.ExtendedKeyUsage(ekus), critical=False + ) + if cert_dps: + ee_builder = ee_builder.add_extension( + x509.CRLDistributionPoints([cert_dps]), critical=False + ) + ee_builder = ee_builder.add_extension( + x509.BasicConstraints(ca=False, path_length=None), + critical=True, + ) + return ee_builder.sign( + private_key=issuer_key if issuer_key is not None else ROOT_PRIVATE_KEY, + algorithm=hashes.SHA256(), + backend=default_backend(), + ) + + +def subject_name_for_test(subject_cn: str, test_name: str) -> x509.Name: + return x509.Name( + [ + x509.NameAttribute(NameOID.COMMON_NAME, subject_cn), + x509.NameAttribute(NameOID.ORGANIZATION_NAME, test_name), + ] + ) + + +def issuer_name_for_test(test_name: str) -> x509.Name: + return x509.Name( + [ + x509.NameAttribute(NameOID.COMMON_NAME, "issuer.example.com"), + x509.NameAttribute(NameOID.ORGANIZATION_NAME, test_name), + ] + ) + + +def ca_cert( + *, + subject_name: x509.Name, + subject_key: Optional[ANY_PRIV_KEY] = None, + issuer_name: Optional[x509.Name] = None, + issuer_key: Optional[ANY_PRIV_KEY] = None, + permitted_subtrees: Optional[Iterable[x509.GeneralName]] = None, + excluded_subtrees: Optional[Iterable[x509.GeneralName]] = None, + key_usage: Optional[x509.KeyUsage] = None, + cert_dps: Optional[x509.DistributionPoint] = None, +) -> x509.Certificate: + subject_priv_key = key_or_generate(subject_key) + subject_key_pub: ANY_PUB_KEY = subject_priv_key.public_key() + + ca_builder: x509.CertificateBuilder = x509.CertificateBuilder() + ca_builder = ca_builder.subject_name(subject_name) + ca_builder = ca_builder.issuer_name(issuer_name if issuer_name else subject_name) + ca_builder = ca_builder.not_valid_before(NOT_BEFORE) + ca_builder = ca_builder.not_valid_after(NOT_AFTER) + ca_builder = ca_builder.serial_number(x509.random_serial_number()) + ca_builder = ca_builder.public_key(subject_key_pub) + ca_builder = ca_builder.add_extension( + x509.BasicConstraints(ca=True, path_length=None), + critical=True, + ) + if permitted_subtrees is not None or excluded_subtrees is not None: + ca_builder = ca_builder.add_extension( + x509.NameConstraints(permitted_subtrees, excluded_subtrees), critical=True + ) + if key_usage is not None: + ca_builder = ca_builder.add_extension( + key_usage, + critical=True, + ) + if cert_dps: + ca_builder = ca_builder.add_extension( + x509.CRLDistributionPoints([cert_dps]), critical=False + ) + + return ca_builder.sign( + private_key=issuer_key if issuer_key else subject_priv_key, + algorithm=hashes.SHA256(), + backend=default_backend(), + ) + + +def generate_tls_server_cert_test( + output: TextIO, + test_name: str, + expected_error: Optional[str] = None, + subject_common_name: Optional[str] = None, + extra_subject_names: Optional[List[x509.NameAttribute]] = None, + valid_names: Optional[List[str]] = None, + invalid_names: Optional[List[str]] = None, + sans: Optional[Iterable[x509.GeneralName]] = None, + permitted_subtrees: Optional[Iterable[x509.GeneralName]] = None, + excluded_subtrees: Optional[Iterable[x509.GeneralName]] = None, + force: bool = False, +) -> None: + """ + Generate a test case, writing a rust '#[test]' function into + tls_server_certs.rs, and writing supporting files into the current + directory. + + - `test_name`: name of the test, must be a rust identifier. + - `expected_error`: item in `webpki::Error` enum, expected error from + webpki `verify_for_usage()` function. Leave absent to + expect success. + - `subject_common_name`: optional string to put in end-entity certificate + subject common name. + - `extra_subject_names`: optional sequence of `x509.NameAttributes` to add + to end-entity certificate subject. + - `valid_names`: optional sequence of valid names that the end-entity + certificate is expected to pass `verify_is_valid_for_subject_name` for. + - `invalid_names`: optional sequence of invalid names that the end-entity + certificate is expected to fail `verify_is_valid_for_subject_name` with + `CertNotValidForName`. + - `sans`: optional sequence of `x509.GeneralName`s that are the contents of + the subjectAltNames extension. If empty or not provided the end-entity + certificate does not have a subjectAltName extension. + - `permitted_subtrees`: optional sequence of `x509.GeneralName`s that are + the `permittedSubtrees` contents of the `nameConstraints` extension. + If this and `excluded_subtrees` are empty/absent then the end-entity + certificate does not have a `nameConstraints` extension. + - `excluded_subtrees`: optional sequence of `x509.GeneralName`s that are + the `excludedSubtrees` contents of the `nameConstraints` extension. + If this and `permitted_subtrees` are both empty/absent then the + end-entity certificate does not have a `nameConstraints` extension. + """ + + if invalid_names is None: + invalid_names = [] + if valid_names is None: + valid_names = [] + if extra_subject_names is None: + extra_subject_names = [] + + issuer_name: x509.Name = issuer_name_for_test(test_name) + + # end-entity + ee_subject = x509.Name( + ( + [x509.NameAttribute(NameOID.COMMON_NAME, subject_common_name)] + if subject_common_name + else [] + ) + + [x509.NameAttribute(NameOID.ORGANIZATION_NAME, test_name)] + + extra_subject_names + ) + ee_certificate: x509.Certificate = end_entity_cert( + subject_name=ee_subject, + issuer_name=issuer_name, + sans=sans, + ) + + output_dir: str = "tls_server_certs" + ee_cert_path: str = os.path.join(output_dir, f"{test_name}.ee.der") + ca_cert_path: str = os.path.join(output_dir, f"{test_name}.ca.der") + + if not os.path.isdir(output_dir): + os.mkdir(output_dir) + + write_der(ee_cert_path, ee_certificate.public_bytes(Encoding.DER), force) + + # issuer + ca: x509.Certificate = ca_cert( + subject_name=issuer_name, + subject_key=ROOT_PRIVATE_KEY, + permitted_subtrees=permitted_subtrees, + excluded_subtrees=excluded_subtrees, + ) + + write_der(ca_cert_path, ca.public_bytes(Encoding.DER), force) + + expected: str = "" + if expected_error is None: + expected = "Ok(())" + else: + expected = "Err(webpki::Error::" + expected_error + ")" + + valid_names_str: str = ", ".join('"' + name + '"' for name in valid_names) + invalid_names_str: str = ", ".join('"' + name + '"' for name in invalid_names) + + print( + """ +#[test] +fn %(test_name)s() { + let ee = include_bytes!("%(ee_cert_path)s"); + let ca = include_bytes!("%(ca_cert_path)s"); + assert_eq!( + check_cert(ee, ca, &[%(valid_names_str)s], &[%(invalid_names_str)s]), + %(expected)s + ); +}""" + % locals(), + file=output, + ) + + +def tls_server_certs(force: bool) -> None: + with trim_top("tls_server_certs.rs") as output: + generate_tls_server_cert_test( + output, + "no_name_constraints", + subject_common_name="subject.example.com", + valid_names=["dns.example.com"], + invalid_names=["subject.example.com"], + sans=[x509.DNSName("dns.example.com")], + ) + + generate_tls_server_cert_test( + output, + "additional_dns_labels", + subject_common_name="subject.example.com", + valid_names=["host1.example.com", "host2.example.com"], + invalid_names=["subject.example.com"], + sans=[x509.DNSName("host1.example.com"), x509.DNSName("host2.example.com")], + permitted_subtrees=[x509.DNSName(".example.com")], + ) + + generate_tls_server_cert_test( + output, + "disallow_dns_san", + expected_error="NameConstraintViolation", + sans=[x509.DNSName("disallowed.example.com")], + excluded_subtrees=[x509.DNSName("disallowed.example.com")], + ) + + generate_tls_server_cert_test( + output, + "allow_subject_common_name", + subject_common_name="allowed.example.com", + invalid_names=["allowed.example.com"], + permitted_subtrees=[x509.DNSName("allowed.example.com")], + ) + generate_tls_server_cert_test( + output, + "allow_dns_san", + valid_names=["allowed.example.com"], + sans=[x509.DNSName("allowed.example.com")], + permitted_subtrees=[x509.DNSName("allowed.example.com")], + ) + generate_tls_server_cert_test( + output, + "allow_dns_san_and_subject_common_name", + valid_names=["allowed-san.example.com"], + invalid_names=["allowed-cn.example.com"], + sans=[x509.DNSName("allowed-san.example.com")], + subject_common_name="allowed-cn.example.com", + permitted_subtrees=[ + x509.DNSName("allowed-san.example.com"), + x509.DNSName("allowed-cn.example.com"), + ], + ) + generate_tls_server_cert_test( + output, + "disallow_dns_san_and_allow_subject_common_name", + expected_error="NameConstraintViolation", + sans=[ + x509.DNSName("allowed-san.example.com"), + x509.DNSName("disallowed-san.example.com"), + ], + subject_common_name="allowed-cn.example.com", + permitted_subtrees=[ + x509.DNSName("allowed-san.example.com"), + x509.DNSName("allowed-cn.example.com"), + ], + excluded_subtrees=[x509.DNSName("disallowed-san.example.com")], + ) + + # XXX: ideally this test case would be a negative one, because the name constraints + # should apply to the subject name. + # however, because we don't look at email addresses in subjects, it is accepted. + generate_tls_server_cert_test( + output, + "we_incorrectly_ignore_name_constraints_on_name_in_subject", + extra_subject_names=[ + x509.NameAttribute(NameOID.EMAIL_ADDRESS, "joe@notexample.com") + ], + permitted_subtrees=[x509.RFC822Name("example.com")], + ) + + # this does work, however, because we process all SANs + generate_tls_server_cert_test( + output, + "reject_constraints_on_unimplemented_names", + expected_error="NameConstraintViolation", + sans=[x509.RFC822Name("joe@example.com")], + permitted_subtrees=[x509.RFC822Name("example.com")], + ) + + # RFC5280 4.2.1.10: + # "If no name of the type is in the certificate, + # the certificate is acceptable." + generate_tls_server_cert_test( + output, + "we_ignore_constraints_on_names_that_do_not_appear_in_cert", + sans=[x509.DNSName("notexample.com")], + valid_names=["notexample.com"], + invalid_names=["example.com"], + permitted_subtrees=[x509.RFC822Name("example.com")], + ) + + generate_tls_server_cert_test( + output, + "wildcard_san_accepted_if_in_subtree", + sans=[x509.DNSName("*.example.com")], + valid_names=["bob.example.com", "jane.example.com"], + invalid_names=["example.com", "uh.oh.example.com"], + permitted_subtrees=[x509.DNSName("example.com")], + ) + + generate_tls_server_cert_test( + output, + "wildcard_san_rejected_if_in_excluded_subtree", + expected_error="NameConstraintViolation", + sans=[x509.DNSName("*.example.com")], + excluded_subtrees=[x509.DNSName("example.com")], + ) + + generate_tls_server_cert_test( + output, + "ip4_address_san_rejected_if_in_excluded_subtree", + expected_error="NameConstraintViolation", + sans=[x509.IPAddress(ipaddress.ip_address("12.34.56.78"))], + excluded_subtrees=[x509.IPAddress(ipaddress.ip_network("12.34.56.0/24"))], + ) + + generate_tls_server_cert_test( + output, + "ip4_address_san_allowed_if_outside_excluded_subtree", + valid_names=["12.34.56.78"], + sans=[x509.IPAddress(ipaddress.ip_address("12.34.56.78"))], + excluded_subtrees=[x509.IPAddress(ipaddress.ip_network("12.34.56.252/30"))], + ) + + sparse_net_addr = ipaddress.ip_network("12.34.56.78/24", strict=False) + sparse_net_addr.netmask = ipaddress.ip_address("255.255.255.1") + generate_tls_server_cert_test( + output, + "ip4_address_san_rejected_if_excluded_is_sparse_cidr_mask", + expected_error="InvalidNetworkMaskConstraint", + sans=[ + # inside excluded network, if netmask is allowed to be sparse + x509.IPAddress(ipaddress.ip_address("12.34.56.79")), + ], + excluded_subtrees=[x509.IPAddress(sparse_net_addr)], + ) + + generate_tls_server_cert_test( + output, + "ip4_address_san_allowed", + valid_names=["12.34.56.78"], + invalid_names=[ + "12.34.56.77", + "12.34.56.79", + "0000:0000:0000:0000:0000:ffff:0c22:384e", + ], + sans=[x509.IPAddress(ipaddress.ip_address("12.34.56.78"))], + permitted_subtrees=[x509.IPAddress(ipaddress.ip_network("12.34.56.0/24"))], + ) + + generate_tls_server_cert_test( + output, + "ip6_address_san_rejected_if_in_excluded_subtree", + expected_error="NameConstraintViolation", + sans=[x509.IPAddress(ipaddress.ip_address("2001:db8::1"))], + excluded_subtrees=[x509.IPAddress(ipaddress.ip_network("2001:db8::/48"))], + ) + + generate_tls_server_cert_test( + output, + "ip6_address_san_allowed_if_outside_excluded_subtree", + valid_names=["2001:0db9:0000:0000:0000:0000:0000:0001"], + sans=[x509.IPAddress(ipaddress.ip_address("2001:db9::1"))], + excluded_subtrees=[x509.IPAddress(ipaddress.ip_network("2001:db8::/48"))], + ) + + generate_tls_server_cert_test( + output, + "ip6_address_san_allowed", + valid_names=["2001:0db9:0000:0000:0000:0000:0000:0001"], + invalid_names=["12.34.56.78"], + sans=[x509.IPAddress(ipaddress.ip_address("2001:db9::1"))], + permitted_subtrees=[x509.IPAddress(ipaddress.ip_network("2001:db9::/48"))], + ) + + generate_tls_server_cert_test( + output, + "ip46_mixed_address_san_allowed", + valid_names=["12.34.56.78", "2001:0db9:0000:0000:0000:0000:0000:0001"], + invalid_names=[ + "12.34.56.77", + "12.34.56.79", + "0000:0000:0000:0000:0000:ffff:0c22:384e", + ], + sans=[ + x509.IPAddress(ipaddress.ip_address("12.34.56.78")), + x509.IPAddress(ipaddress.ip_address("2001:db9::1")), + ], + permitted_subtrees=[ + x509.IPAddress(ipaddress.ip_network("12.34.56.0/24")), + x509.IPAddress(ipaddress.ip_network("2001:db9::/48")), + ], + ) + + generate_tls_server_cert_test( + output, + "permit_directory_name_not_implemented", + expected_error="NameConstraintViolation", + permitted_subtrees=[ + x509.DirectoryName( + x509.Name([x509.NameAttribute(NameOID.COUNTRY_NAME, "CN")]) + ) + ], + ) + + generate_tls_server_cert_test( + output, + "exclude_directory_name_not_implemented", + expected_error="NameConstraintViolation", + excluded_subtrees=[ + x509.DirectoryName( + x509.Name([x509.NameAttribute(NameOID.COUNTRY_NAME, "CN")]) + ) + ], + ) + + generate_tls_server_cert_test( + output, + "invalid_dns_name_matching", + valid_names=["dns.example.com"], + subject_common_name="subject.example.com", + sans=[ + x509.DNSName("{invalid}.example.com"), + x509.DNSName("dns.example.com"), + ], + ) + + +def signatures(force: bool) -> None: + rsa_pub_exponent: int = 0x10001 + backend: Any = default_backend() + all_key_types: dict[str, ANY_PRIV_KEY] = { + "ed25519": ed25519.Ed25519PrivateKey.generate(), + "ecdsa_p256": ec.generate_private_key(ec.SECP256R1(), backend), + "ecdsa_p384": ec.generate_private_key(ec.SECP384R1(), backend), + "ecdsa_p521": ec.generate_private_key(ec.SECP521R1(), backend), + "rsa_1024_not_supported": rsa.generate_private_key( + rsa_pub_exponent, 1024, backend + ), + "rsa_2048": rsa.generate_private_key(rsa_pub_exponent, 2048, backend), + "rsa_3072": rsa.generate_private_key(rsa_pub_exponent, 3072, backend), + "rsa_4096": rsa.generate_private_key(rsa_pub_exponent, 4096, backend), + } + + feature_gates = { + "ECDSA_P521_SHA256": 'all(not(feature = "ring"), feature = "aws_lc_rs")', + "ECDSA_P521_SHA384": 'all(not(feature = "ring"), feature = "aws_lc_rs")', + "ECDSA_P521_SHA512": 'all(not(feature = "ring"), feature = "aws_lc_rs")', + } + + rsa_types: list[str] = [ + "RSA_PKCS1_2048_8192_SHA256", + "RSA_PKCS1_2048_8192_SHA384", + "RSA_PKCS1_2048_8192_SHA512", + "RSA_PSS_2048_8192_SHA256_LEGACY_KEY", + "RSA_PSS_2048_8192_SHA384_LEGACY_KEY", + "RSA_PSS_2048_8192_SHA512_LEGACY_KEY", + ] + + webpki_algs: dict[str, Iterable[str]] = { + "ed25519": ["ED25519"], + "ecdsa_p256": ["ECDSA_P256_SHA384", "ECDSA_P256_SHA256"], + "ecdsa_p384": ["ECDSA_P384_SHA384", "ECDSA_P384_SHA256"], + "ecdsa_p521": ["ECDSA_P521_SHA512", "ECDSA_P521_SHA256", "ECDSA_P521_SHA384"], + "rsa_2048": rsa_types, + "rsa_3072": rsa_types + ["RSA_PKCS1_3072_8192_SHA384"], + "rsa_4096": rsa_types + ["RSA_PKCS1_3072_8192_SHA384"], + } + + pss_sha256: padding.PSS = padding.PSS( + mgf=padding.MGF1(hashes.SHA256()), salt_length=32 + ) + pss_sha384: padding.PSS = padding.PSS( + mgf=padding.MGF1(hashes.SHA384()), salt_length=48 + ) + pss_sha512: padding.PSS = padding.PSS( + mgf=padding.MGF1(hashes.SHA512()), salt_length=64 + ) + + how_to_sign: dict[str, SIGNER] = { + "ED25519": lambda key, message: key.sign(message), + "ECDSA_P256_SHA256": lambda key, message: key.sign( + message, ec.ECDSA(hashes.SHA256()) + ), + "ECDSA_P256_SHA384": lambda key, message: key.sign( + message, ec.ECDSA(hashes.SHA384()) + ), + "ECDSA_P384_SHA256": lambda key, message: key.sign( + message, ec.ECDSA(hashes.SHA256()) + ), + "ECDSA_P384_SHA384": lambda key, message: key.sign( + message, ec.ECDSA(hashes.SHA384()) + ), + "ECDSA_P521_SHA256": lambda key, message: key.sign( + message, ec.ECDSA(hashes.SHA256()) + ), + "ECDSA_P521_SHA384": lambda key, message: key.sign( + message, ec.ECDSA(hashes.SHA384()) + ), + "ECDSA_P521_SHA512": lambda key, message: key.sign( + message, ec.ECDSA(hashes.SHA512()) + ), + "RSA_PKCS1_2048_8192_SHA256": lambda key, message: key.sign( + message, padding.PKCS1v15(), hashes.SHA256() + ), + "RSA_PKCS1_2048_8192_SHA384": lambda key, message: key.sign( + message, padding.PKCS1v15(), hashes.SHA384() + ), + "RSA_PKCS1_2048_8192_SHA512": lambda key, message: key.sign( + message, padding.PKCS1v15(), hashes.SHA512() + ), + "RSA_PKCS1_3072_8192_SHA384": lambda key, message: key.sign( + message, padding.PKCS1v15(), hashes.SHA384() + ), + "RSA_PSS_2048_8192_SHA256_LEGACY_KEY": lambda key, message: key.sign( + message, pss_sha256, hashes.SHA256() + ), + "RSA_PSS_2048_8192_SHA384_LEGACY_KEY": lambda key, message: key.sign( + message, pss_sha384, hashes.SHA384() + ), + "RSA_PSS_2048_8192_SHA512_LEGACY_KEY": lambda key, message: key.sign( + message, pss_sha512, hashes.SHA512() + ), + } + + output_dir: str = "signatures" + if not os.path.isdir(output_dir): + os.mkdir(output_dir) + + message = b"hello world!" + message_path: str = os.path.join(output_dir, "message.bin") + write_der(message_path, message, force) + + def _cert_path(cert_type: str) -> str: + return os.path.join(output_dir, f"{cert_type}.ee.der") + + def _rpk_path(rpk_type: str) -> str: + return os.path.join(output_dir, f"{rpk_type}.spki.der") + + for name, private_key in all_key_types.items(): + ee_subject = x509.Name( + [x509.NameAttribute(NameOID.ORGANIZATION_NAME, name + " test")] + ) + issuer_subject = x509.Name( + [x509.NameAttribute(NameOID.ORGANIZATION_NAME, name + " issuer")] + ) + certificate: x509.Certificate = end_entity_cert( + subject_name=ee_subject, + subject_key=private_key, + issuer_name=issuer_subject, + ) + + rpk_pub_key = private_key.public_key().public_bytes( + Encoding.DER, PublicFormat.SubjectPublicKeyInfo + ) + write_der(_rpk_path(name), rpk_pub_key, force) + write_der(_cert_path(name), certificate.public_bytes(Encoding.DER), force) + + def _test( + test_name: str, cert_type: str, algorithm: str, signature: bytes, expected: str + ) -> None: + nonlocal message_path + cert_path: str = _cert_path(cert_type) + rpk_path: str = _rpk_path(cert_type) + lower_test_name: str = test_name.lower() + + sig_path: str = os.path.join(output_dir, f"{lower_test_name}.sig.bin") + write_der(sig_path, signature, force) + feature_gate = feature_gates.get(algorithm, 'feature = "alloc"') + + print( + """ +#[test] +#[cfg(%(feature_gate)s)] +fn %(lower_test_name)s() { + let ee = include_bytes!("%(cert_path)s"); + let message = include_bytes!("%(message_path)s"); + let signature = include_bytes!("%(sig_path)s"); + assert_eq!( + check_sig(ee, %(algorithm)s, message, signature), + %(expected)s + ); +}""" + % locals(), + file=output, + ) + + print( + """ +#[test] +#[cfg(%(feature_gate)s)] +fn %(lower_test_name)s_rpk() { + let rpk = include_bytes!("%(rpk_path)s"); + let message = include_bytes!("%(message_path)s"); + let signature = include_bytes!("%(sig_path)s"); + assert_eq!( + check_sig_rpk(rpk, %(algorithm)s, message, signature), + %(expected)s + ); +}""" + % locals(), + file=output, + ) + + def good_signature( + test_name: str, cert_type: str, algorithm: str, signer: SIGNER + ) -> None: + signature: bytes = signer(all_key_types[cert_type], message) + _test(test_name, cert_type, algorithm, signature, expected="Ok(())") + + def good_signature_but_rejected( + test_name: str, cert_type: str, algorithm: str, signer: SIGNER + ) -> None: + signature: bytes = signer(all_key_types[cert_type], message) + _test( + test_name, + cert_type, + algorithm, + signature, + expected="Err(webpki::Error::InvalidSignatureForPublicKey)", + ) + + def bad_signature( + test_name: str, cert_type: str, algorithm: str, signer: SIGNER + ) -> None: + signature: bytes = signer(all_key_types[cert_type], message + b"?") + _test( + test_name, + cert_type, + algorithm, + signature, + expected="Err(webpki::Error::InvalidSignatureForPublicKey)", + ) + + def bad_algorithms_for_key( + test_name: str, cert_type: str, unusable_algs: set[str] + ) -> None: + cert_path: str = _cert_path(cert_type) + test_name_lower: str = test_name.lower() + unusable_algs_str: str = ", ".join(alg for alg in sorted(unusable_algs)) + print( + """ +#[test] +#[cfg(feature = "alloc")] +fn %(test_name_lower)s() { + let ee = include_bytes!("%(cert_path)s"); + for algorithm in &[ %(unusable_algs_str)s ] { + assert_eq!( + check_sig(ee, *algorithm, b"", b""), + Err(webpki::Error::UnsupportedSignatureAlgorithmForPublicKey) + ); + } +}""" + % locals(), + file=output, + ) + + with trim_top("signatures.rs") as output: + # compute all webpki algorithms covered by these tests + all_webpki_algs: set[str] = set( + [item for algs in webpki_algs.values() for item in algs] + ) + + for type, algs in webpki_algs.items(): + for alg in algs: + signer: SIGNER = how_to_sign[alg] + good_signature( + type + "_key_and_" + alg + "_good_signature", + cert_type=type, + algorithm=alg, + signer=signer, + ) + bad_signature( + type + "_key_and_" + alg + "_detects_bad_signature", + cert_type=type, + algorithm=alg, + signer=signer, + ) + + unusable_algs = set(all_webpki_algs) + for alg in algs: + unusable_algs.remove(alg) + + # special case: tested separately below + if type == "rsa_2048": + unusable_algs.remove("RSA_PKCS1_3072_8192_SHA384") + + unusable_algs = { + ( + "#[cfg(%s)] %s" % (feature_gates[alg], alg) + if alg in feature_gates + else alg + ) + for alg in unusable_algs + } + + bad_algorithms_for_key( + type + "_key_rejected_by_other_algorithms", + cert_type=type, + unusable_algs=unusable_algs, + ) + + good_signature_but_rejected( + "rsa_2048_key_rejected_by_RSA_PKCS1_3072_8192_SHA384", + cert_type="rsa_2048", + algorithm="RSA_PKCS1_3072_8192_SHA384", + signer=signer, + ) + + +def generate_client_auth_test( + output: TextIO, + test_name: str, + ekus: Optional[Iterable[x509.ObjectIdentifier]], + expected_error: Optional[str] = None, + force: bool = False, +) -> None: + issuer_name: x509.Name = issuer_name_for_test(test_name) + + # end-entity + ee_subject: x509.Name = x509.Name( + [x509.NameAttribute(NameOID.ORGANIZATION_NAME, test_name)] + ) + ee_certificate: x509.Certificate = end_entity_cert( + subject_name=ee_subject, + ekus=ekus, + issuer_name=issuer_name, + ) + + output_dir: str = "client_auth" + if not os.path.isdir(output_dir): + os.mkdir(output_dir) + + ee_cert_path: str = os.path.join(output_dir, f"{test_name}.ee.der") + write_der(ee_cert_path, ee_certificate.public_bytes(Encoding.DER), force) + + # issuer + ca: x509.Certificate = ca_cert( + subject_name=issuer_name, subject_key=ROOT_PRIVATE_KEY + ) + + ca_cert_path: str = os.path.join(output_dir, f"{test_name}.ca.der") + write_der(ca_cert_path, ca.public_bytes(Encoding.DER), force) + + expected: str = "" + if expected_error is None: + expected = "Ok(())" + else: + expected = "Err(webpki::Error::" + expected_error + ")" + + print( + """ +#[test] +fn %(test_name)s() { + let ee = include_bytes!("%(ee_cert_path)s"); + let ca = include_bytes!("%(ca_cert_path)s"); + assert_eq!( + check_cert(ee, ca), + %(expected)s + ); +}""" + % locals(), + file=output, + ) + + +def client_auth(force: bool) -> None: + with trim_top("client_auth.rs") as output: + generate_client_auth_test( + output, "cert_with_no_eku_accepted_for_client_auth", ekus=None + ) + generate_client_auth_test( + output, + "cert_with_clientauth_eku_accepted_for_client_auth", + ekus=[ExtendedKeyUsageOID.CLIENT_AUTH], + ) + generate_client_auth_test( + output, + "cert_with_both_ekus_accepted_for_client_auth", + ekus=[ExtendedKeyUsageOID.CLIENT_AUTH, ExtendedKeyUsageOID.SERVER_AUTH], + ) + generate_client_auth_test( + output, + "cert_with_serverauth_eku_rejected_for_client_auth", + ekus=[ExtendedKeyUsageOID.SERVER_AUTH], + expected_error="RequiredEkuNotFound", + ) + + +def client_auth_revocation(force: bool) -> None: + output_dir: str = "client_auth_revocation" + if not os.path.isdir(output_dir): + os.mkdir(output_dir) + + # KeyUsage for a CA that sets crl_sign. + crl_sign_ku = x509.KeyUsage( + digital_signature=True, + key_cert_sign=True, + crl_sign=True, # NB: crl_sign set. + content_commitment=False, + key_encipherment=False, + data_encipherment=False, + key_agreement=False, + encipher_only=False, + decipher_only=False, + ) + + # KeyUsage for a CA that omits crl_sign. + no_crl_sign_ku = x509.KeyUsage( + digital_signature=True, + key_cert_sign=True, + crl_sign=False, # NB: no crl_sign. + content_commitment=False, + key_encipherment=False, + data_encipherment=False, + key_agreement=False, + encipher_only=False, + decipher_only=False, + ) + + # Cert CRL distribution point. Contains at least one URI full name matching the valid_crl_idp. + valid_cert_crl_dp = x509.DistributionPoint( + full_name=[ + x509.DNSName("example.com"), + x509.UniformResourceIdentifier("http://example.com/another.crl"), + x509.UniformResourceIdentifier("http://example.com/valid.crl"), + ], + crl_issuer=None, + relative_name=None, + reasons=None, + ) + # CRL issuing distribution point, contains at least one URI full name matching the valid_cert_crl_dp. + valid_crl_idp = x509.IssuingDistributionPoint( + full_name=[ + x509.UniformResourceIdentifier("http://example.com/yet.another.crl"), + x509.UniformResourceIdentifier("http://example.com/valid.crl"), + ], + indirect_crl=False, + only_contains_user_certs=False, + only_contains_ca_certs=False, + only_contains_attribute_certs=False, + only_some_reasons=None, + relative_name=None, + ) + + class ChainDepth(enum.Enum): + END_ENTITY = enum.auto() + CHAIN = enum.auto() + + class StatusRequirement(enum.Enum): + ALLOW_UNKNOWN = enum.auto() + FORBID_UNKNOWN = enum.auto() + + class ExpirationPolicy(enum.Enum): + ENFORCE = enum.auto() + IGNORE = enum.auto() + + def _chain( + *, + chain_name: str, + key_usage: Optional[x509.KeyUsage], + cert_dps: Optional[x509.DistributionPoint], + ) -> list[tuple[x509.Certificate, str, ANY_PRIV_KEY]]: + """ + Generate a short test certificate chain: + ee -> intermediate -> root. + + :param chain_name: the name of the certificate chain. Used to generate subject/issuer names and to + choose the filename to write DER contents to disk. + + :param key_usage: the KeyUsage to include in the issuer certificates (both the intermediate and the root). + + :param cert_dps: an optional CRL distribution point to include in each certificate. + + :return: Return a list comprising the chain starting from the end entity and ending at the root trust anchor. + Each entry in the list is a tuple of three values: the x509.Certificate object, the path the DER encoding + was written to, and lastly the corresponding private key. + """ + + ee_subj: x509.Name = subject_name_for_test("test.example.com", chain_name) + int_a_subj: x509.Name = issuer_name_for_test(f"int.a.{chain_name}") + int_b_subj: x509.Name = issuer_name_for_test(f"int.b.{chain_name}") + ca_subj: x509.Name = issuer_name_for_test(f"ca.{chain_name}") + ee_key: ec.EllipticCurvePrivateKey = ec.generate_private_key( + ec.SECP256R1(), default_backend() + ) + int_a_key: ec.EllipticCurvePrivateKey = ec.generate_private_key( + ec.SECP256R1(), default_backend() + ) + int_b_key: ec.EllipticCurvePrivateKey = ec.generate_private_key( + ec.SECP256R1(), default_backend() + ) + root_key: ec.EllipticCurvePrivateKey = ec.generate_private_key( + ec.SECP256R1(), default_backend() + ) + + # EE cert issued by intermediate. + ee_cert: x509.Certificate = end_entity_cert( + subject_name=ee_subj, + issuer_name=int_a_subj, + issuer_key=int_a_key, + cert_dps=cert_dps, + ) + ee_cert_path: str = os.path.join(output_dir, f"{chain_name}.ee.der") + write_der(ee_cert_path, ee_cert.public_bytes(Encoding.DER), force) + + # Second EE cert issued by intermediate, with top-bit set in serial. + ee_cert_topbit: x509.Certificate = end_entity_cert( + subject_name=ee_subj, + issuer_name=int_a_subj, + issuer_key=int_a_key, + serial=0x80DEADBEEFF00D, + cert_dps=cert_dps, + ) + ee_cert_topbit_path: str = os.path.join( + output_dir, f"{chain_name}.topbit.ee.der" + ) + write_der(ee_cert_topbit_path, ee_cert_topbit.public_bytes(Encoding.DER), force) + + # intermediate a cert issued by intermediate b. + int_a_cert: x509.Certificate = ca_cert( + subject_name=int_a_subj, + subject_key=int_a_key, + issuer_name=int_b_subj, + issuer_key=int_b_key, + key_usage=key_usage, + cert_dps=cert_dps, + ) + int_a_cert_path: str = os.path.join(output_dir, f"{chain_name}.int.a.ca.der") + write_der(int_a_cert_path, int_a_cert.public_bytes(Encoding.DER), force) + + # intermediate b cert issued by root cert. + int_b_cert: x509.Certificate = ca_cert( + subject_name=int_b_subj, + subject_key=int_b_key, + issuer_name=ca_subj, + issuer_key=root_key, + key_usage=key_usage, + cert_dps=cert_dps, + ) + int_b_cert_path: str = os.path.join(output_dir, f"{chain_name}.int.b.ca.der") + write_der(int_b_cert_path, int_b_cert.public_bytes(Encoding.DER), force) + + # root cert issued by itself. + root_cert: x509.Certificate = ca_cert( + subject_name=ca_subj, + subject_key=root_key, + key_usage=key_usage, + cert_dps=cert_dps, + ) + root_cert_path: str = os.path.join(output_dir, f"{chain_name}.root.ca.der") + write_der(root_cert_path, root_cert.public_bytes(Encoding.DER), force) + + return [ + (ee_cert, ee_cert_path, ee_key), + (int_a_cert, int_a_cert_path, int_a_key), + (int_b_cert, int_b_cert_path, int_b_key), + (root_cert, root_cert_path, root_key), + (ee_cert_topbit, ee_cert_topbit_path, ee_key), + ] + + def _crl( + *, + serials: Iterable[int], + issuer_name: x509.Name, + issuer_key: Optional[ANY_PRIV_KEY], + issuing_dp: Optional[x509.IssuingDistributionPoint] = None, + not_after: Optional[datetime.datetime] = None, + ) -> x509.CertificateRevocationList: + """ + Generate a certificate revocation list. + :param serials: list of serial numbers to include in the CRL as revoked certificates. + :param issuer_name: the name of the CRL issuer. + :param issuer_key: the key used to sign the CRL. + :param issuing_dp: an optional CRL issuing distribution point extension to include. + :return: a generated x509.CertificateRevocationList. + """ + issuer_priv_key: ANY_PRIV_KEY = key_or_generate(issuer_key) + crl_builder: x509.CertificateRevocationListBuilder = ( + x509.CertificateRevocationListBuilder() + ) + crl_builder = crl_builder.issuer_name(issuer_name) + crl_builder = crl_builder.last_update(NOT_BEFORE) + if not_after is None: + not_after = NOT_AFTER + crl_builder = crl_builder.next_update(not_after) + for serial in serials: + revoked_cert_builder: x509.RevokedCertificateBuilder = ( + x509.RevokedCertificateBuilder() + ) + revoked_cert_builder = revoked_cert_builder.serial_number(serial) + revoked_cert_builder = revoked_cert_builder.revocation_date(NOT_BEFORE) + revoked_cert_builder = revoked_cert_builder.add_extension( + x509.CRLReason(x509.ReasonFlags.key_compromise), critical=False + ) + crl_builder = crl_builder.add_revoked_certificate( + revoked_cert_builder.build() + ) + if issuing_dp is not None: + crl_builder = crl_builder.add_extension(issuing_dp, critical=True) + crl_builder = crl_builder.add_extension( + x509.CRLNumber(x509.random_serial_number()), critical=False + ) + + return crl_builder.sign( + private_key=issuer_priv_key, + algorithm=hashes.SHA256(), + ) + + def _revocation_test( + *, + test_name: str, + chain: list[tuple[x509.Certificate, str, ANY_PRIV_KEY]], + crl_paths: list[str], + depth: ChainDepth, + policy: StatusRequirement, + expiration: ExpirationPolicy, + expected_error: Optional[str], + ee_topbit_serial: bool = False, + ) -> None: + """ + Generate a Rust unit test for a revocation checking scenario and write it to the output file. + + :param test_name: the name of the unit test. + :param chain: the certificate chain to use for validation. + :param crl_paths: paths to zero or more CRLs. + :param depth: revocation checking depth. + :param policy: unknown revocation status policy. + :param expected_error: an optional error to expect to be returned from validation. + :param ee_topbit_serial: whether to use an ee cert with or without a serial with the top bit set. + """ + if len(chain) != 5: + raise RuntimeError("invalid chain length") + + ee_cert, ee_cert_path, _ = chain[4] if ee_topbit_serial else chain[0] + int_a_cert, int_a_cert_path, _ = chain[1] + int_b_cert, int_b_cert_path, _ = chain[2] + root_cert, root_cert_path, _ = chain[3] + + int_a_str = f'include_bytes!("{int_a_cert_path}").as_slice()' + int_b_str = f'include_bytes!("{int_b_cert_path}").as_slice()' + intermediates_str: str = f"&[{int_a_str}, {int_b_str}]" + + def _write_revocation_test(*, owned: bool) -> None: + nonlocal crl_paths, expected_error, intermediates_str, test_name, ee_cert_path, root_cert_path + + test_name = test_name if not owned else test_name + "_owned" + + crl_includes: str = "" + if not owned: + crl_includes = "\n".join( + [ + f""" + &webpki::CertRevocationList::Borrowed( + webpki::BorrowedCertRevocationList::from_der(include_bytes!("{path}").as_slice()) + .unwrap() + ), + """ + for path in crl_paths + ] + ) + else: + crl_includes = "\n".join( + [ + f""" + &webpki::CertRevocationList::Owned( + webpki::OwnedCertRevocationList::from_der(include_bytes!("{path}").as_slice()) + .unwrap() + ), + """ + for path in crl_paths + ] + ) + + if len(crl_paths) == 0: + revocation_setup = "let revocation = None;" + else: + revocation_setup = f""" + let crls = &[{crl_includes}]; + let builder = RevocationOptionsBuilder::new(crls).unwrap(); + """ + if depth == ChainDepth.END_ENTITY: + revocation_setup += """ + let builder = builder.with_depth(RevocationCheckDepth::EndEntity); + """ + if policy == StatusRequirement.ALLOW_UNKNOWN: + revocation_setup += """ + let builder = builder.with_status_policy(UnknownStatusPolicy::Allow); + """ + if expiration == ExpirationPolicy.ENFORCE: + revocation_setup += """ + let builder = builder.with_expiration_policy(webpki::ExpirationPolicy::Enforce); + """ + revocation_setup += "let revocation = Some(builder.build());" + + expected: str = ( + f"Err(webpki::Error::{expected_error})" if expected_error else "Ok(())" + ) + feature_gate = '#[cfg(feature = "alloc")]' if owned else "" + + print( + """ + %(feature_gate)s + #[test] + fn %(test_name)s() { + let ee = include_bytes!("%(ee_cert_path)s"); + let intermediates = %(intermediates_str)s; + let ca = include_bytes!("%(root_cert_path)s"); + %(revocation_setup)s + assert_eq!(check_cert(ee, intermediates, ca, revocation), %(expected)s); + } + """ + % locals(), + file=output, + ) + + # Create test cases for both the owned and borrowed representations. + _write_revocation_test(owned=False) + _write_revocation_test(owned=True) + + # Build a simple certificate chain where the issuers don't have a key usage specified. + no_ku_chain = _chain(chain_name="no_ku_chain", key_usage=None, cert_dps=None) + + # Build a simple certificate chain where the issuers have key usage specified, but don't include the + # cRLSign bit. + no_crl_ku_chain = _chain( + chain_name="no_crl_ku_chain", key_usage=no_crl_sign_ku, cert_dps=None + ) + + # Build a simple certificate chain where the issuers have key usage specified, and include the cRLSign bit. + crl_ku_chain = _chain(chain_name="ku_chain", key_usage=crl_sign_ku, cert_dps=None) + + # Build a certificate chain where each certificate has a CRL distribution point ext. + dp_chain = _chain(chain_name="dp_chain", key_usage=None, cert_dps=valid_cert_crl_dp) + + def _ee_no_crls_test() -> None: + # Providing no CRLs means the EE cert should verify without err. + _revocation_test( + test_name="no_crls_test", + chain=no_ku_chain, + crl_paths=[], + depth=ChainDepth.END_ENTITY, # unused + policy=StatusRequirement.ALLOW_UNKNOWN, # unused + expiration=ExpirationPolicy.IGNORE, + expected_error=None, + ) + + def _no_relevant_crl_ee_depth_allow_unknown() -> None: + test_name = "no_relevant_crl_ee_depth_allow_unknown" + # Generate a CRL that includes the EE cert's serial, but that is issued by an unknown issuer. + ee_cert = no_ku_chain[0][0] + no_match_crl = _crl( + serials=[ee_cert.serial_number], + issuer_name=subject_name_for_test("whatev", test_name), + issuer_key=None, + ) + no_match_crl_path = os.path.join(output_dir, f"{test_name}.crl.der") + write_der(no_match_crl_path, no_match_crl.public_bytes(Encoding.DER), force) + + # Providing no relevant CRL and allowing unknown status + # means the EE cert should verify without err. + _revocation_test( + test_name=test_name, + chain=no_ku_chain, + crl_paths=[no_match_crl_path], + depth=ChainDepth.END_ENTITY, + policy=StatusRequirement.ALLOW_UNKNOWN, + expiration=ExpirationPolicy.IGNORE, + expected_error=None, + ) + + def _no_relevant_crl_ee_depth_forbid_unknown() -> None: + test_name = "no_relevant_crl_ee_depth_forbid_unknown" + # Generate a CRL that includes the EE cert's serial, but that is issued by an unknown issuer. + ee_cert = no_ku_chain[0][0] + no_match_crl = _crl( + serials=[ee_cert.serial_number], + issuer_name=subject_name_for_test("whatev", test_name), + issuer_key=None, + ) + no_match_crl_path = os.path.join(output_dir, f"{test_name}.crl.der") + write_der(no_match_crl_path, no_match_crl.public_bytes(Encoding.DER), force) + + # Providing no relevant CRL and forbidding unknown status + # means the EE cert should not verify. + _revocation_test( + test_name=test_name, + chain=no_ku_chain, + crl_paths=[no_match_crl_path], + depth=ChainDepth.END_ENTITY, + policy=StatusRequirement.FORBID_UNKNOWN, + expiration=ExpirationPolicy.IGNORE, + expected_error="UnknownRevocationStatus", + ) + + def _ee_not_revoked_ee_depth() -> None: + test_name = "ee_not_revoked_ee_depth" + ee_cert = no_ku_chain[0][0] + int_a_key = no_ku_chain[1][2] + # Generate a CRL that doesn't include the EE cert's serial, but that is issued by the same issuer. + ee_not_revoked_crl = _crl( + serials=[12345], # Some serial that isn't the ee_cert.serial. + issuer_name=ee_cert.issuer, + issuer_key=int_a_key, + ) + ee_not_revoked_crl_path = os.path.join(output_dir, f"{test_name}.crl.der") + write_der( + ee_not_revoked_crl_path, + ee_not_revoked_crl.public_bytes(Encoding.DER), + force, + ) + + # Providing a CRL that's relevant and verifies, but that doesn't include the EE cert serial should verify + # without err. + _revocation_test( + test_name=test_name, + chain=no_ku_chain, + crl_paths=[ee_not_revoked_crl_path], + depth=ChainDepth.END_ENTITY, + policy=StatusRequirement.ALLOW_UNKNOWN, + expiration=ExpirationPolicy.IGNORE, + expected_error=None, + ) + + def _ee_not_revoked_chain_depth() -> None: + test_name = "ee_not_revoked_chain_depth" + ee_cert = no_ku_chain[0][0] + int_a_key = no_ku_chain[1][2] + # Generate a CRL that doesn't include the EE cert's serial, but that is issued by the same issuer. + ee_not_revoked_crl = _crl( + serials=[12345], # Some serial that isn't the ee_cert.serial. + issuer_name=ee_cert.issuer, + issuer_key=int_a_key, + ) + ee_not_revoked_crl_path = os.path.join(output_dir, f"{test_name}.crl.der") + write_der( + ee_not_revoked_crl_path, + ee_not_revoked_crl.public_bytes(Encoding.DER), + force, + ) + + # Providing a CRL that's relevant and verifies, but that doesn't include the EE cert serial should verify + # without err when using chain depth. The intermediates will be considered unknown revocation status, but + # we allow that so there is no overall error. + _revocation_test( + test_name=test_name, + chain=no_ku_chain, + crl_paths=[ee_not_revoked_crl_path], + depth=ChainDepth.CHAIN, + policy=StatusRequirement.ALLOW_UNKNOWN, + expiration=ExpirationPolicy.IGNORE, + expected_error=None, + ) + + def _ee_revoked_badsig_ee_depth() -> None: + test_name = "ee_revoked_badsig_ee_depth" + ee_cert = no_ku_chain[0][0] + # Generate a CRL that includes the EE cert's serial, and that is issued the same issuer, but that + # has an invalid signature. + rand_key: ec.EllipticCurvePrivateKey = ec.generate_private_key( + ec.SECP256R1(), default_backend() + ) + ee_revoked_badsig = _crl( + serials=[ee_cert.serial_number], + issuer_name=ee_cert.issuer, + issuer_key=rand_key, # NB: Using a random key to sign, not int_a_key. + ) + ee_revoked_badsig_path = os.path.join(output_dir, f"{test_name}.crl.der") + write_der( + ee_revoked_badsig_path, ee_revoked_badsig.public_bytes(Encoding.DER), force + ) + + # Providing a relevant CRL that includes the EE cert serial but does not verify should error. + _revocation_test( + test_name=test_name, + chain=no_ku_chain, + crl_paths=[ee_revoked_badsig_path], + depth=ChainDepth.END_ENTITY, + policy=StatusRequirement.ALLOW_UNKNOWN, + expiration=ExpirationPolicy.IGNORE, + expected_error="InvalidCrlSignatureForPublicKey", + ) + + def _ee_revoked_wrong_ku_ee_depth() -> None: + test_name = "ee_revoked_wrong_ku_ee_depth" + ee_cert = no_crl_ku_chain[0][0] + int_a_key = no_crl_ku_chain[1][2] + # Generate a CRL that includes the EE cert's serial, and that is issued by the same issuer (with a KU specified + # but no cRLSign bit) + ee_revoked_crl = _crl( + serials=[ee_cert.serial_number], + issuer_name=ee_cert.issuer, + issuer_key=int_a_key, + ) + ee_revoked_crl_path = os.path.join(output_dir, f"{test_name}.crl.der") + write_der(ee_revoked_crl_path, ee_revoked_crl.public_bytes(Encoding.DER), force) + + # Providing a relevant CRL that includes the EE cert serial but was issued by a CA that has a KU specified + # that doesn't include cRLSign should error indicating the CRL issuer can't sign CRLs. + _revocation_test( + test_name=test_name, + chain=no_crl_ku_chain, + crl_paths=[ee_revoked_crl_path], + depth=ChainDepth.END_ENTITY, + policy=StatusRequirement.ALLOW_UNKNOWN, + expiration=ExpirationPolicy.IGNORE, + expected_error="IssuerNotCrlSigner", + ) + + def _ee_not_revoked_wrong_ku_ee_depth() -> None: + test_name = "ee_not_revoked_wrong_ku_ee_depth" + ee_cert = no_crl_ku_chain[0][0] + int_a_key = no_crl_ku_chain[1][2] + # Generate a CRL that doesn't include the EE cert's serial, but that is issued by the same issuer. + ee_not_revoked_crl = _crl( + serials=[12345], # Some serial that isn't the ee_cert.serial. + issuer_name=ee_cert.issuer, + issuer_key=int_a_key, + ) + ee_not_revoked_crl_path = os.path.join(output_dir, f"{test_name}.crl.der") + write_der( + ee_not_revoked_crl_path, + ee_not_revoked_crl.public_bytes(Encoding.DER), + force, + ) + + # Providing a relevant CRL that includes the EE cert serial but was issued by a CA that has a KU specified + # that doesn't include cRLSign should error indicating the CRL issuer can't sign CRLs. + _revocation_test( + test_name=test_name, + chain=no_crl_ku_chain, + crl_paths=[ee_not_revoked_crl_path], + depth=ChainDepth.END_ENTITY, + policy=StatusRequirement.ALLOW_UNKNOWN, + expiration=ExpirationPolicy.IGNORE, + expected_error="IssuerNotCrlSigner", + ) + + def _ee_revoked_no_ku_ee_depth() -> None: + test_name = "ee_revoked_no_ku_ee_depth" + ee_cert = no_ku_chain[0][0] + int_a_key = no_ku_chain[1][2] + # Generate a CRL that includes the EE cert's serial, and that is issued by the same issuer (without any KU + # specified). + ee_revoked_crl = _crl( + serials=[ee_cert.serial_number], + issuer_name=ee_cert.issuer, + issuer_key=int_a_key, + ) + ee_revoked_crl_path = os.path.join(output_dir, f"{test_name}.crl.der") + write_der(ee_revoked_crl_path, ee_revoked_crl.public_bytes(Encoding.DER), force) + + # Providing a relevant CRL that includes the EE cert serial and verifies should error indicating the cert + # was revoked. + _revocation_test( + test_name=test_name, + chain=no_ku_chain, + crl_paths=[ee_revoked_crl_path], + depth=ChainDepth.END_ENTITY, + policy=StatusRequirement.ALLOW_UNKNOWN, + expiration=ExpirationPolicy.IGNORE, + expected_error="CertRevoked", + ) + + def _ee_revoked_crl_ku_ee_depth() -> None: + test_name = "ee_revoked_crl_ku_ee_depth" + ee_cert = crl_ku_chain[0][0] + int_a_key = crl_ku_chain[1][2] + # Generate a CRL that includes the EE cert's serial, and that is issued by the same issuer (with a KU + # specified that includes cRLSign). + ee_revoked_crl = _crl( + serials=[ee_cert.serial_number], + issuer_name=ee_cert.issuer, + issuer_key=int_a_key, + ) + ee_revoked_crl_path = os.path.join(output_dir, f"{test_name}.crl.der") + write_der(ee_revoked_crl_path, ee_revoked_crl.public_bytes(Encoding.DER), force) + + # Providing a relevant CRL that includes the EE cert serial and verifies should error indicating the cert + # was revoked. + _revocation_test( + test_name=test_name, + chain=crl_ku_chain, + crl_paths=[ee_revoked_crl_path], + depth=ChainDepth.END_ENTITY, + policy=StatusRequirement.ALLOW_UNKNOWN, + expiration=ExpirationPolicy.IGNORE, + expected_error="CertRevoked", + ) + + def _no_crls_test_chain_depth() -> None: + # Providing no CRLs means the chain should verify without err. + _revocation_test( + test_name="no_crls_test_chain_depth", + chain=no_ku_chain, + crl_paths=[], + depth=ChainDepth.CHAIN, # unused + policy=StatusRequirement.ALLOW_UNKNOWN, # unused + expiration=ExpirationPolicy.IGNORE, + expected_error=None, + ) + + def _no_relevant_crl_chain_depth_allow_unknown() -> None: + test_name = "no_relevant_crl_chain_depth_allow_unknown" + # Generate a CRL that includes the first intermediate cert's serial, but that is issued by an unknown issuer. + int_a_cert = no_ku_chain[1][0] + no_match_crl = _crl( + serials=[int_a_cert.serial_number], + issuer_name=subject_name_for_test("whatev", test_name), + issuer_key=None, + ) + no_match_crl_path = os.path.join(output_dir, f"{test_name}.crl.der") + write_der(no_match_crl_path, no_match_crl.public_bytes(Encoding.DER), force) + + # Providing no relevant CRL, and allowing unknown status, means the chain should verify without err. + _revocation_test( + test_name=test_name, + chain=no_ku_chain, + crl_paths=[no_match_crl_path], + depth=ChainDepth.CHAIN, + policy=StatusRequirement.ALLOW_UNKNOWN, + expiration=ExpirationPolicy.IGNORE, + expected_error=None, + ) + + def _no_relevant_crl_chain_depth_forbid_unknown() -> None: + test_name = "no_relevant_crl_chain_depth_forbid_unknown" + # Generate a CRL that includes the first intermediate cert's serial, but that is issued by an unknown issuer. + int_a_cert = no_ku_chain[1][0] + no_match_crl = _crl( + serials=[int_a_cert.serial_number], + issuer_name=subject_name_for_test("whatev", test_name), + issuer_key=None, + ) + no_match_crl_path = os.path.join(output_dir, f"{test_name}.crl.der") + write_der(no_match_crl_path, no_match_crl.public_bytes(Encoding.DER), force) + + # Providing no relevant CRL, and forbidding unknown status, means the chain should not verify. + _revocation_test( + test_name=test_name, + chain=no_ku_chain, + crl_paths=[no_match_crl_path], + depth=ChainDepth.CHAIN, + policy=StatusRequirement.FORBID_UNKNOWN, + expiration=ExpirationPolicy.IGNORE, + expected_error="UnknownRevocationStatus", + ) + + def _int_not_revoked_chain_depth_allow_unknown() -> None: + test_name = "int_not_revoked_chain_depth" + int_a_cert = no_ku_chain[1][0] + int_b_key = no_ku_chain[2][2] + # Generate a CRL that doesn't include the intermediate A cert's serial, but that is issued by the same issuer. + int_not_revoked_crl = _crl( + serials=[12345], # Some serial that isn't the int_a_cert.serial. + issuer_name=int_a_cert.issuer, + issuer_key=int_b_key, + ) + int_not_revoked_crl_path = os.path.join(output_dir, f"{test_name}.crl.der") + write_der( + int_not_revoked_crl_path, + int_not_revoked_crl.public_bytes(Encoding.DER), + force, + ) + + # Providing a CRL that's relevant and verifies, but that doesn't include the intermediate cert serial should + # verify the chain without err. + _revocation_test( + test_name=test_name, + chain=no_ku_chain, + crl_paths=[int_not_revoked_crl_path], + depth=ChainDepth.CHAIN, + policy=StatusRequirement.ALLOW_UNKNOWN, + expiration=ExpirationPolicy.IGNORE, + expected_error=None, + ) + + def _int_not_revoked_chain_depth_forbid_unknown() -> None: + test_name = "int_not_revoked_chain_depth_forbid_unknown" + ee_cert = no_ku_chain[0][0] + int_a_cert = no_ku_chain[1][0] + int_a_key = no_ku_chain[1][2] + int_b_key = no_ku_chain[2][2] + int_b_cert = no_ku_chain[2][0] + root_key = no_ku_chain[3][2] + + # Generate a CRL that doesn't include the EE cert's serial, but that is issued by the same issuer. + ee_not_revoked_crl = _crl( + serials=[9999], + issuer_name=ee_cert.issuer, + issuer_key=int_a_key, + ) + ee_not_revoked_crl_path = os.path.join(output_dir, f"{test_name}_ee.crl.der") + write_der( + ee_not_revoked_crl_path, + ee_not_revoked_crl.public_bytes(Encoding.DER), + force, + ) + # Generate a CRL that doesn't include the intermediate A cert's serial, but that is issued by the same issuer. + int_not_revoked_crl = _crl( + serials=[12345], # Some serial that isn't the int_a_cert.serial. + issuer_name=int_a_cert.issuer, + issuer_key=int_b_key, + ) + int_not_revoked_crl_path = os.path.join(output_dir, f"{test_name}.crl.der") + write_der( + int_not_revoked_crl_path, + int_not_revoked_crl.public_bytes(Encoding.DER), + force, + ) + # Generate a CRL that doesn't include the intermediate B cert's serial, but that is issued by the same issuer. + int_not_revoked_crl_b = _crl( + serials=[12345], # Some serial that isn't the int_b_cert.serial. + issuer_name=int_b_cert.issuer, + issuer_key=root_key, + ) + int_not_revoked_crl_b_path = os.path.join(output_dir, f"{test_name}_b.crl.der") + write_der( + int_not_revoked_crl_b_path, + int_not_revoked_crl_b.public_bytes(Encoding.DER), + force, + ) + + # Providing a CRL that's relevant and verifies, but that doesn't include the intermediate cert serial should + # verify the chain without err. + _revocation_test( + test_name=test_name, + chain=no_ku_chain, + crl_paths=[ + ee_not_revoked_crl_path, + int_not_revoked_crl_path, + int_not_revoked_crl_b_path, + ], + depth=ChainDepth.CHAIN, + policy=StatusRequirement.FORBID_UNKNOWN, + expiration=ExpirationPolicy.IGNORE, + expected_error=None, + ) + + def _int_revoked_badsig_chain_depth() -> None: + test_name = "int_revoked_badsig_chain_depth" + int_a_cert = no_ku_chain[1][0] + # Generate a CRL that includes the intermediate cert's serial, and that is issued the same issuer, but that + # has an invalid signature. + rand_key: ec.EllipticCurvePrivateKey = ec.generate_private_key( + ec.SECP256R1(), default_backend() + ) + int_revoked_badsig = _crl( + serials=[int_a_cert.serial_number], + issuer_name=int_a_cert.issuer, + issuer_key=rand_key, # NB: Using a random key to sign, not CA cert's key. + ) + int_revoked_badsig_path = os.path.join(output_dir, f"{test_name}.crl.der") + write_der( + int_revoked_badsig_path, + int_revoked_badsig.public_bytes(Encoding.DER), + force, + ) + + # Providing a relevant CRL that includes the intermediate cert's serial but does not verify should error. + _revocation_test( + test_name=test_name, + chain=no_ku_chain, + crl_paths=[int_revoked_badsig_path], + depth=ChainDepth.CHAIN, + policy=StatusRequirement.ALLOW_UNKNOWN, + expiration=ExpirationPolicy.IGNORE, + expected_error="InvalidCrlSignatureForPublicKey", + ) + + def _int_revoked_wrong_ku_chain_depth() -> None: + test_name = "int_revoked_wrong_ku_chain_depth" + int_a_cert = no_crl_ku_chain[1][0] + int_b_key = no_crl_ku_chain[2][2] + # Generate a CRL that includes the intermediate A cert's serial, and that is issued by the same issuer (with a + # KU specified but no cRLSign bit) + int_revoked_crl = _crl( + serials=[int_a_cert.serial_number], + issuer_name=int_a_cert.issuer, + issuer_key=int_b_key, + ) + int_revoked_crl_path = os.path.join(output_dir, f"{test_name}.crl.der") + write_der( + int_revoked_crl_path, int_revoked_crl.public_bytes(Encoding.DER), force + ) + + # Providing a relevant CRL that includes the intermediate cert serial but was issued by a CA that has a KU + # specified that doesn't include cRLSign should error indicating the CRL issuer can't sign CRLs. + _revocation_test( + test_name=test_name, + chain=no_crl_ku_chain, + crl_paths=[int_revoked_crl_path], + depth=ChainDepth.CHAIN, + policy=StatusRequirement.ALLOW_UNKNOWN, + expiration=ExpirationPolicy.IGNORE, + expected_error="IssuerNotCrlSigner", + ) + + def _ee_revoked_chain_depth() -> None: + test_name = "ee_revoked_chain_depth" + ee_cert = no_ku_chain[0][0] + int_a_key = no_ku_chain[1][2] + # Generate a CRL that includes the EE cert's serial, and that is issued by the same issuer (without any KU + # specified). + ee_revoked_crl = _crl( + serials=[ee_cert.serial_number], + issuer_name=ee_cert.issuer, + issuer_key=int_a_key, + ) + ee_revoked_crl_path = os.path.join(output_dir, f"{test_name}.crl.der") + write_der(ee_revoked_crl_path, ee_revoked_crl.public_bytes(Encoding.DER), force) + + # Providing a relevant CRL that includes the EE cert serial and verifies should error indicating the cert + # was revoked when using the Chain revocation check depth (since it implies EndEntity). + _revocation_test( + test_name=test_name, + chain=no_ku_chain, + crl_paths=[ee_revoked_crl_path], + depth=ChainDepth.CHAIN, + policy=StatusRequirement.ALLOW_UNKNOWN, + expiration=ExpirationPolicy.IGNORE, + expected_error="CertRevoked", + ) + + def _int_revoked_no_ku_chain_depth() -> None: + test_name = "int_revoked_no_ku_chain_depth" + int_a_cert = no_ku_chain[1][0] + int_b_key = no_ku_chain[2][2] + # Generate a CRL that includes the intermediate cert's serial, and that is issued by the same issuer + # (without any KU specified). + int_revoked_crl = _crl( + serials=[int_a_cert.serial_number], + issuer_name=int_a_cert.issuer, + issuer_key=int_b_key, + ) + int_revoked_crl_path = os.path.join(output_dir, f"{test_name}.crl.der") + write_der( + int_revoked_crl_path, int_revoked_crl.public_bytes(Encoding.DER), force + ) + + # Providing a relevant CRL that includes the intermediate cert serial and verifies, and using the + # Chain depth should error since an intermediate cert is revoked. + _revocation_test( + test_name=test_name, + chain=no_ku_chain, + crl_paths=[int_revoked_crl_path], + depth=ChainDepth.CHAIN, + policy=StatusRequirement.ALLOW_UNKNOWN, + expiration=ExpirationPolicy.IGNORE, + expected_error="CertRevoked", + ) + + def _int_revoked_crl_ku_chain_depth() -> None: + test_name = "int_revoked_crl_ku_chain_depth" + int_a_cert = crl_ku_chain[1][0] + int_b_key = crl_ku_chain[2][2] + # Generate a CRL that includes the intermediate cert's serial, and that is issued by the same issuer (with a KU + # specified that includes cRLSign). + int_revoked_crl = _crl( + serials=[int_a_cert.serial_number], + issuer_name=int_a_cert.issuer, + issuer_key=int_b_key, + ) + int_revoked_crl_path = os.path.join(output_dir, f"{test_name}.crl.der") + write_der( + int_revoked_crl_path, int_revoked_crl.public_bytes(Encoding.DER), force + ) + + # Providing a relevant CRL that includes the EE cert serial and verifies should error indicating the cert + # was revoked. + _revocation_test( + test_name=test_name, + chain=crl_ku_chain, + crl_paths=[int_revoked_crl_path], + depth=ChainDepth.CHAIN, + policy=StatusRequirement.ALLOW_UNKNOWN, + expiration=ExpirationPolicy.IGNORE, + expected_error="CertRevoked", + ) + + def _ee_with_top_bit_set_serial_revoked() -> None: + test_name = "ee_with_top_bit_set_serial_revoked" + ee_cert_topbit = crl_ku_chain[4][0] + int_a_key = crl_ku_chain[1][2] + + ee_revoked_crl = _crl( + serials=[ee_cert_topbit.serial_number], + issuer_name=ee_cert_topbit.issuer, + issuer_key=int_a_key, + ) + + ee_revoked_crl_path = os.path.join(output_dir, f"{test_name}.crl.der") + write_der(ee_revoked_crl_path, ee_revoked_crl.public_bytes(Encoding.DER), force) + + _revocation_test( + test_name=test_name, + chain=crl_ku_chain, + crl_paths=[ee_revoked_crl_path], + depth=ChainDepth.CHAIN, + policy=StatusRequirement.ALLOW_UNKNOWN, + expiration=ExpirationPolicy.IGNORE, + ee_topbit_serial=True, + expected_error="CertRevoked", + ) + + def _ee_no_dp_crl_idp() -> None: + test_name = "ee_no_dp_crl_idp" + # Use a chain that has no CRL distribution point in each cert. + ee_cert = no_ku_chain[0][0] + int_a_key = no_ku_chain[1][2] + # Generate a CRL that has a matching issuer, and an issuing distribution point. + ee_idp_crl = _crl( + serials=[0xFFFF], + issuer_name=ee_cert.issuer, + issuer_key=int_a_key, + issuing_dp=valid_crl_idp, + ) + ee_idp_crl_path = os.path.join(output_dir, f"{test_name}.crl.der") + write_der(ee_idp_crl_path, ee_idp_crl.public_bytes(Encoding.DER), force) + + # Checking revocation and not allowing unknown status shouldn't error - the CRL + # is relevant because the certs have no DP. + _revocation_test( + test_name=test_name, + chain=no_ku_chain, + crl_paths=[ee_idp_crl_path], + depth=ChainDepth.END_ENTITY, + policy=StatusRequirement.FORBID_UNKNOWN, + expiration=ExpirationPolicy.IGNORE, + expected_error=None, + ) + + def _ee_not_revoked_crl_no_idp() -> None: + test_name = "ee_not_revoked_crl_no_idp" + # Use the chain that has a CRL distribution point in each cert. + ee_cert = dp_chain[0][0] + int_a_key = dp_chain[1][2] + # Generate a CRL that has a matching issuer, but no issuing distribution point, + # that does not include the ee cert's serial. + ee_no_idp_crl = _crl( + serials=[0xFFFF], + issuer_name=ee_cert.issuer, + issuer_key=int_a_key, + ) + ee_no_idp_crl_path = os.path.join(output_dir, f"{test_name}.crl.der") + write_der(ee_no_idp_crl_path, ee_no_idp_crl.public_bytes(Encoding.DER), force) + + # Checking revocation and not allowing unknown status should be OK - the CRL + # is considered to have a scope of "everything" since it does not + # explicitly set a scope with a CRL IDP extension. + # See https://github.com/rustls/webpki/issues/228 + _revocation_test( + test_name=test_name, + chain=dp_chain, + crl_paths=[ee_no_idp_crl_path], + depth=ChainDepth.END_ENTITY, + policy=StatusRequirement.FORBID_UNKNOWN, + expiration=ExpirationPolicy.IGNORE, + expected_error=None, + ) + + def _ee_revoked_crl_no_idp() -> None: + test_name = "ee_revoked_crl_no_idp" + # Use the chain that has a CRL distribution point in each cert. + ee_cert = dp_chain[0][0] + int_a_key = dp_chain[1][2] + # Generate a CRL that has a matching issuer, but no issuing distribution point, + # and that _does_ include the ee cert's serial. + ee_no_idp_crl = _crl( + serials=[ee_cert.serial_number], + issuer_name=ee_cert.issuer, + issuer_key=int_a_key, + ) + ee_no_idp_crl_path = os.path.join(output_dir, f"{test_name}.crl.der") + write_der(ee_no_idp_crl_path, ee_no_idp_crl.public_bytes(Encoding.DER), force) + + # Checking revocation and not allowing unknown status should return a revoked + # status - the CRL is considered to have a scope of "everything" since + # it does not explicitly set a scope with a CRL IDP extension. + # See https://github.com/rustls/webpki/issues/228 + _revocation_test( + test_name=test_name, + chain=dp_chain, + crl_paths=[ee_no_idp_crl_path], + depth=ChainDepth.END_ENTITY, + policy=StatusRequirement.FORBID_UNKNOWN, + expiration=ExpirationPolicy.IGNORE, + expected_error="CertRevoked", + ) + + def _ee_crl_mismatched_idp_unknown_status() -> None: + test_name = "ee_crl_mismatched_idp_unknown_status" + # Use the chain that has a CRL distribution point in each cert. + ee_cert = dp_chain[0][0] + int_a_key = dp_chain[1][2] + # Generate a CRL that has a matching issuer, but no matching issuing distribution point. + ee_wrong_idp_crl = _crl( + serials=[0xFFFF], + issuer_name=ee_cert.issuer, + issuer_key=int_a_key, + issuing_dp=x509.IssuingDistributionPoint( + full_name=[ + x509.UniformResourceIdentifier("http://does.not.match.example.com") + ], + indirect_crl=False, + relative_name=None, + only_contains_attribute_certs=False, + only_contains_ca_certs=False, + only_contains_user_certs=False, + only_some_reasons=None, + ), + ) + ee_wrong_idp_crl_path = os.path.join(output_dir, f"{test_name}.crl.der") + write_der( + ee_wrong_idp_crl_path, ee_wrong_idp_crl.public_bytes(Encoding.DER), force + ) + + # Checking revocation and not allowing unknown status should error - the CRL + # isn't relevant because its CRL IDP doesn't match the cert DP. + _revocation_test( + test_name=test_name, + chain=dp_chain, + crl_paths=[ee_wrong_idp_crl_path], + depth=ChainDepth.END_ENTITY, + policy=StatusRequirement.FORBID_UNKNOWN, + expiration=ExpirationPolicy.IGNORE, + expected_error="UnknownRevocationStatus", + ) + + def _ee_indirect_dp_unknown_status() -> None: + test_name = "ee_indirect_dp_unknown_status" + indirect_dp_chain = _chain( + chain_name="indirect_dp_chain", + key_usage=None, + cert_dps=x509.DistributionPoint( + full_name=valid_cert_crl_dp.full_name, + relative_name=None, + reasons=None, + crl_issuer=[x509.DNSName("indirect.example.com")], + ), + ) + # Use the chain that has an indirect CRL distribution point in each cert. + ee_cert = indirect_dp_chain[0][0] + int_a_key = indirect_dp_chain[1][2] + # Generate a CRL that has a matching issuer, and an issuing distribution point + # that would match if the DP wasn't for an indirect CRL. + ee_indirect_dp_unknown_status_crl = _crl( + serials=[0xFFFF], + issuer_name=ee_cert.issuer, + issuer_key=int_a_key, + issuing_dp=x509.IssuingDistributionPoint( + full_name=valid_cert_crl_dp.full_name, + indirect_crl=False, + relative_name=None, + only_contains_attribute_certs=False, + only_contains_ca_certs=False, + only_contains_user_certs=False, + only_some_reasons=None, + ), + ) + ee_indirect_dp_unknown_status_crl_path = os.path.join( + output_dir, f"{test_name}.crl.der" + ) + write_der( + ee_indirect_dp_unknown_status_crl_path, + ee_indirect_dp_unknown_status_crl.public_bytes(Encoding.DER), + force, + ) + + # Checking revocation and not allowing unknown status should error - the CRL + # isn't relevant because the cert DP requires an indirect CRL. + _revocation_test( + test_name=test_name, + chain=indirect_dp_chain, + crl_paths=[ee_indirect_dp_unknown_status_crl_path], + depth=ChainDepth.END_ENTITY, + policy=StatusRequirement.FORBID_UNKNOWN, + expiration=ExpirationPolicy.IGNORE, + expected_error="UnknownRevocationStatus", + ) + + def _ee_reasons_dp_unknown_status() -> None: + test_name = "ee_reasons_dp_unknown_status" + reasons_dp_chain = _chain( + chain_name="reasons_dp_chain", + key_usage=None, + cert_dps=x509.DistributionPoint( + full_name=valid_cert_crl_dp.full_name, + relative_name=None, + reasons=frozenset([x509.ReasonFlags.key_compromise]), + crl_issuer=None, + ), + ) + # Use the chain that has a CRL distribution point in each cert that indicates + # sharding by revocation reason. + ee_cert = reasons_dp_chain[0][0] + int_a_key = reasons_dp_chain[1][2] + # Generate a CRL that has a matching issuer, and an issuing distribution point + # that would match if the DP wasn't for a reason-sharded CRL. + ee_reasons_dp_unknown_status_crl = _crl( + serials=[0xFFFF], + issuer_name=ee_cert.issuer, + issuer_key=int_a_key, + issuing_dp=x509.IssuingDistributionPoint( + full_name=valid_cert_crl_dp.full_name, + indirect_crl=False, + relative_name=None, + only_contains_attribute_certs=False, + only_contains_ca_certs=False, + only_contains_user_certs=False, + only_some_reasons=None, + ), + ) + ee_reasons_dp_unknown_status_crl_path = os.path.join( + output_dir, f"{test_name}.crl.der" + ) + write_der( + ee_reasons_dp_unknown_status_crl_path, + ee_reasons_dp_unknown_status_crl.public_bytes(Encoding.DER), + force, + ) + + # Checking revocation and not allowing unknown status should error - the CRL + # isn't relevant because the cert DP requires a CRL sharded by revocation reason. + _revocation_test( + test_name=test_name, + chain=reasons_dp_chain, + crl_paths=[ee_reasons_dp_unknown_status_crl_path], + depth=ChainDepth.END_ENTITY, + policy=StatusRequirement.FORBID_UNKNOWN, + expiration=ExpirationPolicy.IGNORE, + expected_error="UnknownRevocationStatus", + ) + + def _ee_nofullname_dp_unknown_status() -> None: + test_name = "ee_nofullname_dp_unknown_status" + nofullname_dp_chain = _chain( + chain_name="nofullname_dp_chain", + key_usage=None, + cert_dps=x509.DistributionPoint( + full_name=None, + relative_name=x509.RelativeDistinguishedName( + [x509.NameAttribute(NameOID.COMMON_NAME, "example.com")] + ), + reasons=None, + crl_issuer=None, + ), + ) + # Use the chain that has a CRL distribution point in each cert that has no full name. + ee_cert = nofullname_dp_chain[0][0] + int_a_key = nofullname_dp_chain[1][2] + # Generate a CRL that has a matching issuer, and an issuing distribution point + # that would match if the DP wasn't for a relative-name CRL issuer. + ee_nofullname_dp_unknown_status_crl = _crl( + serials=[0xFFFF], + issuer_name=ee_cert.issuer, + issuer_key=int_a_key, + issuing_dp=x509.IssuingDistributionPoint( + full_name=valid_cert_crl_dp.full_name, + indirect_crl=False, + relative_name=None, + only_contains_attribute_certs=False, + only_contains_ca_certs=False, + only_contains_user_certs=False, + only_some_reasons=None, + ), + ) + ee_nofullname_dp_unknown_status_crl_path = os.path.join( + output_dir, f"{test_name}.crl.der" + ) + write_der( + ee_nofullname_dp_unknown_status_crl_path, + ee_nofullname_dp_unknown_status_crl.public_bytes(Encoding.DER), + force, + ) + + # Checking revocation and not allowing unknown status should error - the CRL + # isn't relevant because the cert DP requires a CRL with a name relative to an issuer. + _revocation_test( + test_name=test_name, + chain=nofullname_dp_chain, + crl_paths=[ee_nofullname_dp_unknown_status_crl_path], + depth=ChainDepth.END_ENTITY, + policy=StatusRequirement.FORBID_UNKNOWN, + expiration=ExpirationPolicy.IGNORE, + expected_error="UnknownRevocationStatus", + ) + + def _ee_dp_idp_match() -> None: + test_name = "ee_dp_idp_match" + # Use the chain that has a CRL distribution point in each cert. + ee_cert = dp_chain[0][0] + int_a_key = dp_chain[1][2] + # Generate a CRL that has a matching issuer, and an issuing distribution point + # that matches too. + ee_dp_idp_match_crl = _crl( + serials=[0xFFFF], + issuer_name=ee_cert.issuer, + issuer_key=int_a_key, + issuing_dp=x509.IssuingDistributionPoint( + full_name=valid_cert_crl_dp.full_name, + indirect_crl=False, + relative_name=None, + only_contains_attribute_certs=False, + only_contains_ca_certs=False, + only_contains_user_certs=False, + only_some_reasons=None, + ), + ) + ee_dp_idp_match_crl_path = os.path.join(output_dir, f"{test_name}.crl.der") + write_der( + ee_dp_idp_match_crl_path, + ee_dp_idp_match_crl.public_bytes(Encoding.DER), + force, + ) + + # Checking revocation and not allowing unknown status shouldn't error - the CRL + # covers the cert, and it isn't revoked. + _revocation_test( + test_name=test_name, + chain=dp_chain, + crl_paths=[ee_dp_idp_match_crl_path], + depth=ChainDepth.END_ENTITY, + policy=StatusRequirement.FORBID_UNKNOWN, + expiration=ExpirationPolicy.IGNORE, + expected_error=None, + ) + + def _ee_dp_invalid() -> None: + test_name = "ee_dp_invalid" + bad_dp = x509.DistributionPoint( + full_name=valid_cert_crl_dp.full_name, + relative_name=None, + reasons=frozenset([x509.ReasonFlags.key_compromise]), + crl_issuer=None, + ) + # The __init__ constructor forbids omitting the full_name, relative_name and full_issuer, so + # patch it after construction to be in an invalid state. + bad_dp._full_name = None + invalid_dp_chain = _chain( + chain_name="invalid_dp_chain", + key_usage=None, + cert_dps=bad_dp, + ) + ee_cert = invalid_dp_chain[0][0] + int_a_key = invalid_dp_chain[1][2] + # Generate a CRL with an IDP extension. + invalid_dp_chain_crl = _crl( + serials=[0xFFFF], + issuer_name=ee_cert.issuer, + issuer_key=int_a_key, + issuing_dp=valid_crl_idp, + ) + invalid_dp_chain_crl_path = os.path.join(output_dir, f"{test_name}.crl.der") + write_der( + invalid_dp_chain_crl_path, + invalid_dp_chain_crl.public_bytes(Encoding.DER), + force, + ) + + # Checking revocation should result in an unknown revocation status - the certificate DP is invalid + # so we can't match it to any CRL IDP. + _revocation_test( + test_name=test_name, + chain=invalid_dp_chain, + crl_paths=[invalid_dp_chain_crl_path], + depth=ChainDepth.END_ENTITY, + policy=StatusRequirement.FORBID_UNKNOWN, + expiration=ExpirationPolicy.IGNORE, + expected_error="UnknownRevocationStatus", + ) + + def _expired_crl_ignore_expiration() -> None: + test_name = "expired_crl_ignore_expiration" + ee_cert = no_ku_chain[0][0] + int_a_key = no_ku_chain[1][2] + # Generate an expired CRL that doesn't include the EE cert's serial, but that is issued by the same issuer. + ee_not_revoked_crl = _crl( + serials=[12345], # Some serial that isn't the ee_cert.serial. + issuer_name=ee_cert.issuer, + issuer_key=int_a_key, + not_after=datetime.datetime.utcfromtimestamp(0x1FEDF00D - 10), + ) + ee_not_revoked_crl_path = os.path.join(output_dir, f"{test_name}.crl.der") + write_der( + ee_not_revoked_crl_path, + ee_not_revoked_crl.public_bytes(Encoding.DER), + force, + ) + + # Providing a CRL that's expired should succeed if the expiration policy is set to ignore. + _revocation_test( + test_name=test_name, + chain=no_ku_chain, + crl_paths=[ee_not_revoked_crl_path], + depth=ChainDepth.CHAIN, + policy=StatusRequirement.ALLOW_UNKNOWN, + expiration=ExpirationPolicy.IGNORE, + expected_error=None, + ) + + def _expired_crl_enforce_expiration() -> None: + test_name = "expired_crl_enforce_expiration" + ee_cert = no_ku_chain[0][0] + int_a_key = no_ku_chain[1][2] + # Generate an expired CRL that doesn't include the EE cert's serial, but that is issued by the same issuer. + ee_not_revoked_crl = _crl( + serials=[12345], # Some serial that isn't the ee_cert.serial. + issuer_name=ee_cert.issuer, + issuer_key=int_a_key, + not_after=datetime.datetime.utcfromtimestamp(0x1FEDF00D - 10), + ) + ee_not_revoked_crl_path = os.path.join(output_dir, f"{test_name}.crl.der") + write_der( + ee_not_revoked_crl_path, + ee_not_revoked_crl.public_bytes(Encoding.DER), + force, + ) + + # Providing a CRL that's expired should error if the expiration policy is set to enforce. + _revocation_test( + test_name=test_name, + chain=no_ku_chain, + crl_paths=[ee_not_revoked_crl_path], + depth=ChainDepth.CHAIN, + policy=StatusRequirement.ALLOW_UNKNOWN, + expiration=ExpirationPolicy.ENFORCE, + expected_error="CrlExpired", + ) + + with trim_top("client_auth_revocation.rs") as output: + _ee_no_crls_test() + _no_relevant_crl_ee_depth_allow_unknown() + _no_relevant_crl_ee_depth_forbid_unknown() + _ee_not_revoked_ee_depth() + _ee_not_revoked_chain_depth() + _ee_revoked_badsig_ee_depth() + _ee_revoked_wrong_ku_ee_depth() + _ee_not_revoked_wrong_ku_ee_depth() + _ee_revoked_no_ku_ee_depth() + _ee_revoked_crl_ku_ee_depth() + _no_crls_test_chain_depth() + _no_relevant_crl_chain_depth_allow_unknown() + _no_relevant_crl_chain_depth_forbid_unknown() + _int_not_revoked_chain_depth_allow_unknown() + _int_not_revoked_chain_depth_forbid_unknown() + _int_revoked_badsig_chain_depth() + _int_revoked_wrong_ku_chain_depth() + _ee_revoked_chain_depth() + _int_revoked_no_ku_chain_depth() + _int_revoked_crl_ku_chain_depth() + _ee_with_top_bit_set_serial_revoked() + _ee_no_dp_crl_idp() + _ee_not_revoked_crl_no_idp() + _ee_revoked_crl_no_idp() + _ee_crl_mismatched_idp_unknown_status() + _ee_indirect_dp_unknown_status() + _ee_reasons_dp_unknown_status() + _ee_nofullname_dp_unknown_status() + _ee_dp_idp_match() + _ee_dp_invalid() + _expired_crl_ignore_expiration() + _expired_crl_enforce_expiration() + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument( + "--tls-server-certs", + action=argparse.BooleanOptionalAction, + default=True, + help="Generate TLS server certificate testcases", + ) + parser.add_argument( + "--signatures", + action=argparse.BooleanOptionalAction, + default=True, + help="Generate signature testcases", + ) + parser.add_argument( + "--client-auth", + action=argparse.BooleanOptionalAction, + default=True, + help="Generate client auth testcases", + ) + parser.add_argument( + "--client-auth-revocation", + action=argparse.BooleanOptionalAction, + default=True, + help="Generate client auth revocation testcases", + ) + parser.add_argument( + "--format", + action=argparse.BooleanOptionalAction, + default=True, + help="Run cargo fmt post-generation", + ) + parser.add_argument( + "--test", + action=argparse.BooleanOptionalAction, + default=True, + help="Run cargo test post-generation", + ) + parser.add_argument( + "--force", + action=argparse.BooleanOptionalAction, + default=False, + help="Overwrite existing test keys/certs", + ) + args = parser.parse_args() + + if args.tls_server_certs: + tls_server_certs(args.force) + if args.signatures: + signatures(args.force) + if args.client_auth: + client_auth(args.force) + if args.client_auth_revocation: + client_auth_revocation(args.force) + + if args.format: + subprocess.run("cargo fmt", shell=True, check=True) + if args.test: + subprocess.run("cargo test", shell=True, check=True) diff --git a/vendor/rustls-webpki-legacy/tests/integration.rs b/vendor/rustls-webpki-legacy/tests/integration.rs new file mode 100644 index 00000000000..759051f4235 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/integration.rs @@ -0,0 +1,322 @@ +// Copyright 2016 Joseph Birr-Pixton. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +#![cfg(any(feature = "ring", feature = "aws_lc_rs"))] + +use core::time::Duration; + +use pki_types::{CertificateDer, UnixTime}; +use webpki::{anchor_from_trusted_cert, KeyUsage}; + +/* Checks we can verify netflix's cert chain. This is notable + * because they're rooted at a Verisign v1 root. */ +#[cfg(feature = "alloc")] +#[test] +fn netflix() { + let ee: &[u8] = include_bytes!("netflix/ee.der"); + let inter = CertificateDer::from(&include_bytes!("netflix/inter.der")[..]); + let ca = CertificateDer::from(&include_bytes!("netflix/ca.der")[..]); + + let anchors = [anchor_from_trusted_cert(&ca).unwrap()]; + + let time = UnixTime::since_unix_epoch(Duration::from_secs(1_492_441_716)); // 2017-04-17T15:08:36Z + + let ee = CertificateDer::from(ee); + let cert = webpki::EndEntityCert::try_from(&ee).unwrap(); + assert!(cert + .verify_for_usage( + webpki::ALL_VERIFICATION_ALGS, + &anchors, + &[inter], + time, + KeyUsage::server_auth(), + None, + None, + ) + .is_ok()); +} + +/* This is notable because it is a popular use of IP address subjectAltNames. */ +#[cfg(feature = "alloc")] +#[test] +fn cloudflare_dns() { + use pki_types::ServerName; + + let ee: &[u8] = include_bytes!("cloudflare_dns/ee.der"); + let inter = CertificateDer::from(&include_bytes!("cloudflare_dns/inter.der")[..]); + let ca = CertificateDer::from(&include_bytes!("cloudflare_dns/ca.der")[..]); + + let ca_cert = CertificateDer::from(&ca[..]); + let anchors = [anchor_from_trusted_cert(&ca_cert).unwrap()]; + + let time = UnixTime::since_unix_epoch(Duration::from_secs(1_663_495_771)); + + let ee = CertificateDer::from(ee); + let cert = webpki::EndEntityCert::try_from(&ee).unwrap(); + assert!(cert + .verify_for_usage( + webpki::ALL_VERIFICATION_ALGS, + &anchors, + &[inter], + time, + KeyUsage::server_auth(), + None, + None, + ) + .is_ok()); + + let check_name = |name: &str| { + let subject_name_ref = ServerName::try_from(name).unwrap(); + assert_eq!( + Ok(()), + cert.verify_is_valid_for_subject_name(&subject_name_ref) + ); + println!("{:?} ok as name", name); + }; + + let check_addr = |addr: &str| { + let subject_name_ref = ServerName::try_from(addr.as_bytes()).unwrap(); + assert_eq!( + Ok(()), + cert.verify_is_valid_for_subject_name(&subject_name_ref) + ); + println!("{:?} ok as address", addr); + }; + + check_name("cloudflare-dns.com"); + check_name("wildcard.cloudflare-dns.com"); + check_name("one.one.one.one"); + check_addr("1.1.1.1"); + check_addr("1.0.0.1"); + check_addr("162.159.36.1"); + check_addr("162.159.46.1"); + check_addr("2606:4700:4700:0000:0000:0000:0000:1111"); + check_addr("2606:4700:4700:0000:0000:0000:0000:1001"); + check_addr("2606:4700:4700:0000:0000:0000:0000:0064"); + check_addr("2606:4700:4700:0000:0000:0000:0000:6400"); +} + +#[cfg(feature = "alloc")] +#[test] +fn wpt() { + let ee = CertificateDer::from(&include_bytes!("wpt/ee.der")[..]); + let ca = CertificateDer::from(&include_bytes!("wpt/ca.der")[..]); + + let anchors = [anchor_from_trusted_cert(&ca).unwrap()]; + + let time = UnixTime::since_unix_epoch(Duration::from_secs(1_619_256_684)); // 2021-04-24T09:31:24Z + let cert = webpki::EndEntityCert::try_from(&ee).unwrap(); + assert!(cert + .verify_for_usage( + webpki::ALL_VERIFICATION_ALGS, + &anchors, + &[], + time, + KeyUsage::server_auth(), + None, + None, + ) + .is_ok()); +} + +#[test] +fn ed25519() { + let ee = CertificateDer::from(&include_bytes!("ed25519/ee.der")[..]); + let ca = CertificateDer::from(&include_bytes!("ed25519/ca.der")[..]); + + let anchors = [anchor_from_trusted_cert(&ca).unwrap()]; + + let time = UnixTime::since_unix_epoch(Duration::from_secs(1_547_363_522)); // 2019-01-13T07:12:02Z + + let cert = webpki::EndEntityCert::try_from(&ee).unwrap(); + assert!(cert + .verify_for_usage( + webpki::ALL_VERIFICATION_ALGS, + &anchors, + &[], + time, + KeyUsage::server_auth(), + None, + None, + ) + .is_ok()); +} + +#[test] +#[cfg(feature = "alloc")] +fn critical_extensions() { + let root = CertificateDer::from(&include_bytes!("critical_extensions/root-cert.der")[..]); + let ca = CertificateDer::from(&include_bytes!("critical_extensions/ca-cert.der")[..]); + + let time = UnixTime::since_unix_epoch(Duration::from_secs(1_670_779_098)); + let anchors = [anchor_from_trusted_cert(&root).unwrap()]; + let intermediates = [ca]; + + let ee = CertificateDer::from( + &include_bytes!("critical_extensions/ee-cert-noncrit-unknown-ext.der")[..], + ); + let ee_cert = webpki::EndEntityCert::try_from(&ee).unwrap(); + assert!( + ee_cert + .verify_for_usage( + webpki::ALL_VERIFICATION_ALGS, + &anchors, + &intermediates, + time, + KeyUsage::server_auth(), + None, + None, + ) + .is_ok(), + "accept non-critical unknown extension" + ); + + let ee = CertificateDer::from( + &include_bytes!("critical_extensions/ee-cert-crit-unknown-ext.der")[..], + ); + assert!( + matches!( + webpki::EndEntityCert::try_from(&ee), + Err(webpki::Error::UnsupportedCriticalExtension) + ), + "reject critical unknown extension" + ); +} + +#[test] +fn read_root_with_zero_serial() { + let ca = CertificateDer::from(&include_bytes!("misc/serial_zero.der")[..]); + anchor_from_trusted_cert(&ca).expect("godaddy cert should parse as anchor"); +} + +#[test] +fn read_root_with_neg_serial() { + let ca = CertificateDer::from(&include_bytes!("misc/serial_neg.der")[..]); + anchor_from_trusted_cert(&ca).expect("idcat cert should parse as anchor"); +} + +#[test] +#[cfg(feature = "alloc")] +fn read_ee_with_neg_serial() { + let ca = CertificateDer::from(&include_bytes!("misc/serial_neg_ca.der")[..]); + let ee = CertificateDer::from(&include_bytes!("misc/serial_neg_ee.der")[..]); + + let anchors = [anchor_from_trusted_cert(&ca).unwrap()]; + + let time = UnixTime::since_unix_epoch(Duration::from_secs(1_667_401_500)); // 2022-11-02T15:05:00Z + + let cert = webpki::EndEntityCert::try_from(&ee).unwrap(); + assert!(cert + .verify_for_usage( + webpki::ALL_VERIFICATION_ALGS, + &anchors, + &[], + time, + KeyUsage::server_auth(), + None, + None, + ) + .is_ok()); +} + +#[test] +#[cfg(feature = "alloc")] +fn read_ee_with_large_pos_serial() { + let ee = CertificateDer::from(&include_bytes!("misc/serial_large_positive.der")[..]); + + webpki::EndEntityCert::try_from(&ee).expect("should parse 20-octet positive serial number"); +} + +#[test] +fn list_netflix_names() { + expect_cert_dns_names( + include_bytes!("netflix/ee.der"), + [ + "account.netflix.com", + "ca.netflix.com", + "netflix.ca", + "netflix.com", + "signup.netflix.com", + "www.netflix.ca", + "www1.netflix.com", + "www2.netflix.com", + "www3.netflix.com", + "develop-stage.netflix.com", + "release-stage.netflix.com", + "www.netflix.com", + ], + ); +} + +#[test] +fn invalid_subject_alt_names() { + expect_cert_dns_names( + // same as netflix ee certificate, but with the last name in the list + // changed to 'www.netflix:com' + include_bytes!("misc/invalid_subject_alternative_name.der"), + [ + "account.netflix.com", + "ca.netflix.com", + "netflix.ca", + "netflix.com", + "signup.netflix.com", + "www.netflix.ca", + "www1.netflix.com", + "www2.netflix.com", + "www3.netflix.com", + "develop-stage.netflix.com", + "release-stage.netflix.com", + // NOT 'www.netflix:com' + ], + ); +} + +#[test] +fn wildcard_subject_alternative_names() { + expect_cert_dns_names( + // same as netflix ee certificate, but with the last name in the list + // changed to 'ww*.netflix:com' + include_bytes!("misc/dns_names_and_wildcards.der"), + [ + "account.netflix.com", + "*.netflix.com", + "netflix.ca", + "netflix.com", + "signup.netflix.com", + "www.netflix.ca", + "www1.netflix.com", + "www2.netflix.com", + "www3.netflix.com", + "develop-stage.netflix.com", + "release-stage.netflix.com", + "www.netflix.com", + ], + ); +} + +#[test] +fn no_subject_alt_names() { + expect_cert_dns_names(include_bytes!("misc/no_subject_alternative_name.der"), []) +} + +fn expect_cert_dns_names<'name>( + cert_der: &[u8], + expected_names: impl IntoIterator, +) { + let der = CertificateDer::from(cert_der); + let cert = webpki::EndEntityCert::try_from(&der) + .expect("should parse end entity certificate correctly"); + + assert!(cert.valid_dns_names().eq(expected_names)) +} diff --git a/vendor/rustls-webpki-legacy/tests/misc/dns_names_and_wildcards.der b/vendor/rustls-webpki-legacy/tests/misc/dns_names_and_wildcards.der new file mode 100644 index 00000000000..c41e2d615ad Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/misc/dns_names_and_wildcards.der differ diff --git a/vendor/rustls-webpki-legacy/tests/misc/empty_sequence_common_name.der b/vendor/rustls-webpki-legacy/tests/misc/empty_sequence_common_name.der new file mode 100644 index 00000000000..30e4f77b50b Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/misc/empty_sequence_common_name.der differ diff --git a/vendor/rustls-webpki-legacy/tests/misc/empty_sequence_common_name.der.txt b/vendor/rustls-webpki-legacy/tests/misc/empty_sequence_common_name.der.txt new file mode 100644 index 00000000000..dbe59d442e6 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/misc/empty_sequence_common_name.der.txt @@ -0,0 +1,104 @@ +SEQUENCE { + SEQUENCE { + [0] { + INTEGER { 2 } + } + INTEGER { `7214c2cb574538a4d63af28bb25140821cd3c528` } + SEQUENCE { + # ecdsa-with-SHA256 + OBJECT_IDENTIFIER { 1.2.840.10045.4.3.2 } + } + SEQUENCE { + SET { + SEQUENCE { + # organizationUnitName + OBJECT_IDENTIFIER { 2.5.4.11 } + PrintableString { "None" } + } + } + } + SEQUENCE { + UTCTime { "230906172100Z" } + UTCTime { "330903172100Z" } + } + SEQUENCE {} + SEQUENCE { + SEQUENCE { + # ecPublicKey + OBJECT_IDENTIFIER { 1.2.840.10045.2.1 } + # secp256r1 + OBJECT_IDENTIFIER { 1.2.840.10045.3.1.7 } + } + BIT_STRING { `00` `04681e0d5d4e66ff6f0cc3a9f0e1ba6114d647e9dfc2ee23418d56ad58edfb78cfe4ec8dadf856fde5a890799753bcd2a9380896701b7c13e49ec2e097f8ee3421` } + } + [3] { + SEQUENCE { + SEQUENCE { + # keyUsage + OBJECT_IDENTIFIER { 2.5.29.15 } + BOOLEAN { TRUE } + OCTET_STRING { + BIT_STRING { b`101` } + } + } + SEQUENCE { + # extKeyUsage + OBJECT_IDENTIFIER { 2.5.29.37 } + OCTET_STRING { + SEQUENCE { + # serverAuth + OBJECT_IDENTIFIER { 1.3.6.1.5.5.7.3.1 } + # clientAuth + OBJECT_IDENTIFIER { 1.3.6.1.5.5.7.3.2 } + } + } + } + SEQUENCE { + # basicConstraints + OBJECT_IDENTIFIER { 2.5.29.19 } + BOOLEAN { TRUE } + OCTET_STRING { + SEQUENCE {} + } + } + SEQUENCE { + # subjectKeyIdentifier + OBJECT_IDENTIFIER { 2.5.29.14 } + OCTET_STRING { + OCTET_STRING { `8f8c61be7ce4c34689e2618034581e34ef88b24c` } + } + } + SEQUENCE { + # authorityKeyIdentifier + OBJECT_IDENTIFIER { 2.5.29.35 } + OCTET_STRING { + SEQUENCE { + [0 PRIMITIVE] { `c9a3daf11d035f6eab28e2ea195c677568b0adea` } + } + } + } + SEQUENCE { + # subjectAltName + OBJECT_IDENTIFIER { 2.5.29.17 } + BOOLEAN { TRUE } + OCTET_STRING { + SEQUENCE { + [2 PRIMITIVE] { "example.com" } + } + } + } + } + } + } + SEQUENCE { + # ecdsa-with-SHA256 + OBJECT_IDENTIFIER { 1.2.840.10045.4.3.2 } + } + BIT_STRING { + `00` + SEQUENCE { + INTEGER { `00f1891fc58e16c37752bf64d58999f703c8d458b1d22d8291292ce2ad87042990` } + INTEGER { `00a6f16e39c83ba001f7f6aae73aaad0aea46d596800746887fe4567a4ffe88f9b` } + } + } +} diff --git a/vendor/rustls-webpki-legacy/tests/misc/invalid_subject_alternative_name.der b/vendor/rustls-webpki-legacy/tests/misc/invalid_subject_alternative_name.der new file mode 100644 index 00000000000..f81ad7b7923 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/misc/invalid_subject_alternative_name.der differ diff --git a/vendor/rustls-webpki-legacy/tests/misc/mdoc_eku.ca.der b/vendor/rustls-webpki-legacy/tests/misc/mdoc_eku.ca.der new file mode 100644 index 00000000000..7a5c2136190 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/misc/mdoc_eku.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/misc/mdoc_eku.ee.der b/vendor/rustls-webpki-legacy/tests/misc/mdoc_eku.ee.der new file mode 100644 index 00000000000..c1d9ab4491d Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/misc/mdoc_eku.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/misc/no_subject_alternative_name.der b/vendor/rustls-webpki-legacy/tests/misc/no_subject_alternative_name.der new file mode 100644 index 00000000000..8292e35860f Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/misc/no_subject_alternative_name.der differ diff --git a/vendor/rustls-webpki-legacy/tests/misc/serial_large_positive.der b/vendor/rustls-webpki-legacy/tests/misc/serial_large_positive.der new file mode 100644 index 00000000000..f75028af4c2 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/misc/serial_large_positive.der differ diff --git a/vendor/rustls-webpki-legacy/tests/misc/serial_neg.der b/vendor/rustls-webpki-legacy/tests/misc/serial_neg.der new file mode 100644 index 00000000000..f1317bf3b2b Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/misc/serial_neg.der differ diff --git a/vendor/rustls-webpki-legacy/tests/misc/serial_neg_ca.der b/vendor/rustls-webpki-legacy/tests/misc/serial_neg_ca.der new file mode 100644 index 00000000000..7903b08fd6a Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/misc/serial_neg_ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/misc/serial_neg_ee.der b/vendor/rustls-webpki-legacy/tests/misc/serial_neg_ee.der new file mode 100644 index 00000000000..bc55a9b7da9 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/misc/serial_neg_ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/misc/serial_zero.der b/vendor/rustls-webpki-legacy/tests/misc/serial_zero.der new file mode 100644 index 00000000000..3cd289bdff9 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/misc/serial_zero.der differ diff --git a/vendor/rustls-webpki-legacy/tests/netflix/ca.der b/vendor/rustls-webpki-legacy/tests/netflix/ca.der new file mode 100644 index 00000000000..6a15da32d61 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/netflix/ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/netflix/ee.der b/vendor/rustls-webpki-legacy/tests/netflix/ee.der new file mode 100644 index 00000000000..c06fbe51e79 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/netflix/ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/netflix/inter.der b/vendor/rustls-webpki-legacy/tests/netflix/inter.der new file mode 100644 index 00000000000..ff25d78fc51 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/netflix/inter.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/AAA-Certificate-Services.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/AAA-Certificate-Services.der new file mode 100644 index 00000000000..5c715faed85 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/AAA-Certificate-Services.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/dv-g3b-aaa-emudhra.we-have-a-problem.com/0.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/dv-g3b-aaa-emudhra.we-have-a-problem.com/0.der new file mode 100644 index 00000000000..b82c1e482a9 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/dv-g3b-aaa-emudhra.we-have-a-problem.com/0.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/dv-g3b-aaa-emudhra.we-have-a-problem.com/1.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/dv-g3b-aaa-emudhra.we-have-a-problem.com/1.der new file mode 100644 index 00000000000..48a42fa4dfa Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/dv-g3b-aaa-emudhra.we-have-a-problem.com/1.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/dv-g3b-emudhra.we-have-a-problem.com/0.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/dv-g3b-emudhra.we-have-a-problem.com/0.der new file mode 100644 index 00000000000..4f77f798dc0 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/dv-g3b-emudhra.we-have-a-problem.com/0.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/dv-g3b-emudhra.we-have-a-problem.com/1.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/dv-g3b-emudhra.we-have-a-problem.com/1.der new file mode 100644 index 00000000000..d200e0d704c Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/dv-g3b-emudhra.we-have-a-problem.com/1.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/dv-g3b-emudhra.we-have-a-problem.com/2.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/dv-g3b-emudhra.we-have-a-problem.com/2.der new file mode 100644 index 00000000000..76baf7160f5 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/dv-g3b-emudhra.we-have-a-problem.com/2.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/dv-g3c-aaa-emudhra.we-have-a-problem.com/0.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/dv-g3c-aaa-emudhra.we-have-a-problem.com/0.der new file mode 100644 index 00000000000..7f067a29de2 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/dv-g3c-aaa-emudhra.we-have-a-problem.com/0.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/dv-g3c-aaa-emudhra.we-have-a-problem.com/1.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/dv-g3c-aaa-emudhra.we-have-a-problem.com/1.der new file mode 100644 index 00000000000..a14835558fe Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/dv-g3c-aaa-emudhra.we-have-a-problem.com/1.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/dv-g3c-emudhra.we-have-a-problem.com/0.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/dv-g3c-emudhra.we-have-a-problem.com/0.der new file mode 100644 index 00000000000..86e6a209a46 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/dv-g3c-emudhra.we-have-a-problem.com/0.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/dv-g3c-emudhra.we-have-a-problem.com/1.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/dv-g3c-emudhra.we-have-a-problem.com/1.der new file mode 100644 index 00000000000..8fe252037d1 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/dv-g3c-emudhra.we-have-a-problem.com/1.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/dv-g3c-emudhra.we-have-a-problem.com/2.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/dv-g3c-emudhra.we-have-a-problem.com/2.der new file mode 100644 index 00000000000..76baf7160f5 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/dv-g3c-emudhra.we-have-a-problem.com/2.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/emSign-ECC-Root-CA-G3.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/emSign-ECC-Root-CA-G3.der new file mode 100644 index 00000000000..235e1868581 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/emSign-ECC-Root-CA-G3.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/ev-g3b-aaa-emudhra.we-have-a-problem.com/0.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/ev-g3b-aaa-emudhra.we-have-a-problem.com/0.der new file mode 100644 index 00000000000..f32a8762f1e Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/ev-g3b-aaa-emudhra.we-have-a-problem.com/0.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/ev-g3b-aaa-emudhra.we-have-a-problem.com/1.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/ev-g3b-aaa-emudhra.we-have-a-problem.com/1.der new file mode 100644 index 00000000000..72065df2213 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/ev-g3b-aaa-emudhra.we-have-a-problem.com/1.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/ev-g3b-emudhra.we-have-a-problem.com/0.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/ev-g3b-emudhra.we-have-a-problem.com/0.der new file mode 100644 index 00000000000..28c4fef550c Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/ev-g3b-emudhra.we-have-a-problem.com/0.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/ev-g3b-emudhra.we-have-a-problem.com/1.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/ev-g3b-emudhra.we-have-a-problem.com/1.der new file mode 100644 index 00000000000..77d8e3e9f68 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/ev-g3b-emudhra.we-have-a-problem.com/1.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/ev-g3b-emudhra.we-have-a-problem.com/2.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/ev-g3b-emudhra.we-have-a-problem.com/2.der new file mode 100644 index 00000000000..76baf7160f5 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/ev-g3b-emudhra.we-have-a-problem.com/2.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/ev-g3c-aaa-emudhra.we-have-a-problem.com/0.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/ev-g3c-aaa-emudhra.we-have-a-problem.com/0.der new file mode 100644 index 00000000000..06be190a810 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/ev-g3c-aaa-emudhra.we-have-a-problem.com/0.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/ev-g3c-aaa-emudhra.we-have-a-problem.com/1.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/ev-g3c-aaa-emudhra.we-have-a-problem.com/1.der new file mode 100644 index 00000000000..533cbaf5276 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/ev-g3c-aaa-emudhra.we-have-a-problem.com/1.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/ev-g3c-emudhra.we-have-a-problem.com/0.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/ev-g3c-emudhra.we-have-a-problem.com/0.der new file mode 100644 index 00000000000..053ff83c2db Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/ev-g3c-emudhra.we-have-a-problem.com/0.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/ev-g3c-emudhra.we-have-a-problem.com/1.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/ev-g3c-emudhra.we-have-a-problem.com/1.der new file mode 100644 index 00000000000..09cff566981 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/ev-g3c-emudhra.we-have-a-problem.com/1.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/ev-g3c-emudhra.we-have-a-problem.com/2.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/ev-g3c-emudhra.we-have-a-problem.com/2.der new file mode 100644 index 00000000000..76baf7160f5 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/ev-g3c-emudhra.we-have-a-problem.com/2.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/example.com/0.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/example.com/0.der new file mode 100644 index 00000000000..4b5f92042e9 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/example.com/0.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/example.com/1.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/example.com/1.der new file mode 100644 index 00000000000..aacadcb0001 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/example.com/1.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/example.com/2.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/example.com/2.der new file mode 100644 index 00000000000..ed24cb865e4 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/example.com/2.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/example.com/3.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/example.com/3.der new file mode 100644 index 00000000000..1c971bb3a0d Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/example.com/3.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/ov-g3b-aaa-emudhra.we-have-a-problem.com/0.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/ov-g3b-aaa-emudhra.we-have-a-problem.com/0.der new file mode 100644 index 00000000000..dcd713c2c4c Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/ov-g3b-aaa-emudhra.we-have-a-problem.com/0.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/ov-g3b-aaa-emudhra.we-have-a-problem.com/1.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/ov-g3b-aaa-emudhra.we-have-a-problem.com/1.der new file mode 100644 index 00000000000..b3da3b9bd2d Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/ov-g3b-aaa-emudhra.we-have-a-problem.com/1.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/ov-g3b-emudhra.we-have-a-problem.com/0.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/ov-g3b-emudhra.we-have-a-problem.com/0.der new file mode 100644 index 00000000000..54bff9ecd9b Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/ov-g3b-emudhra.we-have-a-problem.com/0.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/ov-g3b-emudhra.we-have-a-problem.com/1.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/ov-g3b-emudhra.we-have-a-problem.com/1.der new file mode 100644 index 00000000000..ded8f517c20 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/ov-g3b-emudhra.we-have-a-problem.com/1.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/ov-g3b-emudhra.we-have-a-problem.com/2.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/ov-g3b-emudhra.we-have-a-problem.com/2.der new file mode 100644 index 00000000000..76baf7160f5 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/ov-g3b-emudhra.we-have-a-problem.com/2.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/ov-g3c-aaa-emudhra.we-have-a-problem.com/0.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/ov-g3c-aaa-emudhra.we-have-a-problem.com/0.der new file mode 100644 index 00000000000..1e706a3c0c2 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/ov-g3c-aaa-emudhra.we-have-a-problem.com/0.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/ov-g3c-aaa-emudhra.we-have-a-problem.com/1.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/ov-g3c-aaa-emudhra.we-have-a-problem.com/1.der new file mode 100644 index 00000000000..8aecb89764d Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/ov-g3c-aaa-emudhra.we-have-a-problem.com/1.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/ov-g3c-emudhra.we-have-a-problem.com/0.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/ov-g3c-emudhra.we-have-a-problem.com/0.der new file mode 100644 index 00000000000..850e59416bd Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/ov-g3c-emudhra.we-have-a-problem.com/0.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/ov-g3c-emudhra.we-have-a-problem.com/1.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/ov-g3c-emudhra.we-have-a-problem.com/1.der new file mode 100644 index 00000000000..3e4312b3ef8 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/ov-g3c-emudhra.we-have-a-problem.com/1.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/ov-g3c-emudhra.we-have-a-problem.com/2.der b/vendor/rustls-webpki-legacy/tests/security-fixtures/ov-g3c-emudhra.we-have-a-problem.com/2.der new file mode 100644 index 00000000000..76baf7160f5 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/security-fixtures/ov-g3c-emudhra.we-have-a-problem.com/2.der differ diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/root-provenance.json b/vendor/rustls-webpki-legacy/tests/security-fixtures/root-provenance.json new file mode 100644 index 00000000000..4b4103e3ac6 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/security-fixtures/root-provenance.json @@ -0,0 +1,12 @@ +{ + "source_cache": "/home/ntc/.local/state/certifi-remediation/20261022/conda/quarantined-packages/certifi-2024.2.2-py312h06a4308_0/lib/python3.12/site-packages/certifi/cacert.pem", + "original_package": "certifi2024.2.2 officialAnaconda cachedpackage", + "sha256": "d7a7a0fb5d7e2731d771e9484ebcdef71d5f0c3e0a2948782bc83ee0ea699ef4", + "purpose": "Legacytesttrust fixture only; no validation disabled and no systemstorechanged.", + "verified_primary_source": "https://raw.githubusercontent.com/certifi/python-certifi/2024.02.02/certifi/cacert.pem", + "G3_root": { + "source": "https://raw.githubusercontent.com/certifi/python-certifi/2024.02.02/certifi/cacert.pem", + "sha256": "86a1ecba089c4a8d3bbe2734c612ba341d813e043cf9e8a862cd5c57a36bbe6b", + "purpose": "Explicit controllednegative-test trust only; productiondefault trust is unchanged." + } +} \ No newline at end of file diff --git a/vendor/rustls-webpki-legacy/tests/security-fixtures/verification-time.txt b/vendor/rustls-webpki-legacy/tests/security-fixtures/verification-time.txt new file mode 100644 index 00000000000..15b3abd49b9 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/security-fixtures/verification-time.txt @@ -0,0 +1 @@ +1792739012 diff --git a/vendor/rustls-webpki-legacy/tests/security_distrust.rs b/vendor/rustls-webpki-legacy/tests/security_distrust.rs new file mode 100644 index 00000000000..e4326fcd93a --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/security_distrust.rs @@ -0,0 +1,91 @@ +//! Deterministic incident-chain regression: no network and no disabled verification. +//! Deliberately legacy roots include AAA to exercise alternate cross-signs. +use pki_types::{CertificateDer, ServerName, UnixTime}; +use std::{fs, path::PathBuf, time::Duration}; +enum AnchorRole { + LegacyRoot, + Intermediate, +} + +fn verify(host: &str, anchor_role: AnchorRole) -> Result<(), webpki::Error> { + let folder = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("tests/security-fixtures"); + let mut paths = fs::read_dir(folder.join(host)) + .unwrap() + .map(|p| p.unwrap().path()) + .collect::>(); + paths.sort(); + let certs = paths + .iter() + .map(|p| CertificateDer::from(fs::read(p).unwrap())) + .collect::>(); + let ee = webpki::EndEntityCert::try_from(&certs[0])?; + let legacy = ["AAA-Certificate-Services.der", "emSign-ECC-Root-CA-G3.der"] + .iter() + .map(|name| CertificateDer::from(fs::read(folder.join(name)).unwrap())) + .collect::>(); + let (anchors, intermediates) = match anchor_role { + AnchorRole::LegacyRoot => { + let mut anchors = webpki_roots::TLS_SERVER_ROOTS.to_vec(); + for root in &legacy { + anchors.push(webpki::anchor_from_trusted_cert(root)?); + } + (anchors, &certs[1..]) + } + // No intermediate path node is supplied: rejection must come from + // checking the issuer key in its explicit trust-anchor role. + AnchorRole::Intermediate => (vec![webpki::anchor_from_trusted_cert(&certs[1])?], &[][..]), + }; + let seconds = fs::read_to_string(folder.join("verification-time.txt")) + .unwrap() + .trim() + .parse() + .unwrap(); + ee.verify_for_usage( + webpki::ALL_VERIFICATION_ALGS, + &anchors, + intermediates, + UnixTime::since_unix_epoch(Duration::from_secs(seconds)), + webpki::KeyUsage::server_auth(), + None, + None, + )?; + ee.verify_is_valid_for_subject_name(&ServerName::try_from(host).unwrap()) +} +#[test] +fn legitimate_certificate_remains_valid() { + assert_eq!(verify("example.com", AnchorRole::LegacyRoot), Ok(())); +} +#[test] +fn legitimate_intermediate_trust_anchor_remains_valid() { + assert_eq!(verify("example.com", AnchorRole::Intermediate), Ok(())); +} +#[test] +fn compromised_keys_rejected_in_direct_and_alternate_chains() { + for cross in ["", "-aaa"] { + for purpose in ["dv", "ov", "ev"] { + for series in ["g3b", "g3c"] { + let host = format!("{purpose}-{series}{cross}-emudhra.we-have-a-problem.com"); + assert_eq!( + verify(&host, AnchorRole::LegacyRoot), + Err(webpki::Error::UnknownIssuer), + "{host}" + ); + } + } + } +} +#[test] +fn compromised_intermediate_trust_anchor_is_rejected() { + for cross in ["", "-aaa"] { + for purpose in ["dv", "ov", "ev"] { + for series in ["g3b", "g3c"] { + let host = format!("{purpose}-{series}{cross}-emudhra.we-have-a-problem.com"); + assert_eq!( + verify(&host, AnchorRole::Intermediate), + Err(webpki::Error::UnknownIssuer), + "{host}" + ); + } + } + } +} diff --git a/vendor/rustls-webpki-legacy/tests/signatures.rs b/vendor/rustls-webpki-legacy/tests/signatures.rs new file mode 100644 index 00000000000..93558f8dc29 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/signatures.rs @@ -0,0 +1,1760 @@ +// Copyright 2023 Joseph Birr-Pixton. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +#![cfg(any(feature = "ring", feature = "aws_lc_rs"))] + +use pki_types::{CertificateDer, SignatureVerificationAlgorithm}; +#[cfg(feature = "ring")] +use webpki::ring::{ + ECDSA_P256_SHA256, ECDSA_P256_SHA384, ECDSA_P384_SHA256, ECDSA_P384_SHA384, ED25519, +}; +#[cfg(all(feature = "ring", feature = "alloc"))] +use webpki::ring::{ + RSA_PKCS1_2048_8192_SHA256, RSA_PKCS1_2048_8192_SHA384, RSA_PKCS1_2048_8192_SHA512, + RSA_PKCS1_3072_8192_SHA384, RSA_PSS_2048_8192_SHA256_LEGACY_KEY, + RSA_PSS_2048_8192_SHA384_LEGACY_KEY, RSA_PSS_2048_8192_SHA512_LEGACY_KEY, +}; + +#[cfg(all(not(feature = "ring"), feature = "aws_lc_rs"))] +use webpki::aws_lc_rs::{ + ECDSA_P256_SHA256, ECDSA_P256_SHA384, ECDSA_P384_SHA256, ECDSA_P384_SHA384, ECDSA_P521_SHA256, + ECDSA_P521_SHA384, ECDSA_P521_SHA512, ED25519, RSA_PKCS1_2048_8192_SHA256, + RSA_PKCS1_2048_8192_SHA384, RSA_PKCS1_2048_8192_SHA512, RSA_PKCS1_3072_8192_SHA384, + RSA_PSS_2048_8192_SHA256_LEGACY_KEY, RSA_PSS_2048_8192_SHA384_LEGACY_KEY, + RSA_PSS_2048_8192_SHA512_LEGACY_KEY, +}; + +#[cfg(feature = "alloc")] +fn check_sig( + ee: &[u8], + alg: &dyn SignatureVerificationAlgorithm, + message: &[u8], + signature: &[u8], +) -> Result<(), webpki::Error> { + let ee = CertificateDer::from(ee); + let cert = webpki::EndEntityCert::try_from(&ee).unwrap(); + cert.verify_signature(alg, message, signature) +} + +#[cfg(feature = "alloc")] +fn check_sig_rpk( + spki: &[u8], + alg: &dyn SignatureVerificationAlgorithm, + message: &[u8], + signature: &[u8], +) -> Result<(), webpki::Error> { + use pki_types::SubjectPublicKeyInfoDer; + + let spki = SubjectPublicKeyInfoDer::from(spki); + let rpk = webpki::RawPublicKeyEntity::try_from(&spki).unwrap(); + rpk.verify_signature(alg, message, signature) +} + +// DO NOT EDIT BELOW: generated by tests/generate.py + +#[test] +#[cfg(feature = "alloc")] +fn ed25519_key_and_ed25519_good_signature() { + let ee = include_bytes!("signatures/ed25519.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!("signatures/ed25519_key_and_ed25519_good_signature.sig.bin"); + assert_eq!(check_sig(ee, ED25519, message, signature), Ok(())); +} + +#[test] +#[cfg(feature = "alloc")] +fn ed25519_key_and_ed25519_good_signature_rpk() { + let rpk = include_bytes!("signatures/ed25519.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!("signatures/ed25519_key_and_ed25519_good_signature.sig.bin"); + assert_eq!(check_sig_rpk(rpk, ED25519, message, signature), Ok(())); +} + +#[test] +#[cfg(feature = "alloc")] +fn ed25519_key_and_ed25519_detects_bad_signature() { + let ee = include_bytes!("signatures/ed25519.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = + include_bytes!("signatures/ed25519_key_and_ed25519_detects_bad_signature.sig.bin"); + assert_eq!( + check_sig(ee, ED25519, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn ed25519_key_and_ed25519_detects_bad_signature_rpk() { + let rpk = include_bytes!("signatures/ed25519.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = + include_bytes!("signatures/ed25519_key_and_ed25519_detects_bad_signature.sig.bin"); + assert_eq!( + check_sig_rpk(rpk, ED25519, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn ed25519_key_rejected_by_other_algorithms() { + let ee = include_bytes!("signatures/ed25519.ee.der"); + for algorithm in &[ + #[cfg(all(not(feature = "ring"), feature = "aws_lc_rs"))] + ECDSA_P521_SHA256, + #[cfg(all(not(feature = "ring"), feature = "aws_lc_rs"))] + ECDSA_P521_SHA384, + #[cfg(all(not(feature = "ring"), feature = "aws_lc_rs"))] + ECDSA_P521_SHA512, + ECDSA_P256_SHA256, + ECDSA_P256_SHA384, + ECDSA_P384_SHA256, + ECDSA_P384_SHA384, + RSA_PKCS1_2048_8192_SHA256, + RSA_PKCS1_2048_8192_SHA384, + RSA_PKCS1_2048_8192_SHA512, + RSA_PKCS1_3072_8192_SHA384, + RSA_PSS_2048_8192_SHA256_LEGACY_KEY, + RSA_PSS_2048_8192_SHA384_LEGACY_KEY, + RSA_PSS_2048_8192_SHA512_LEGACY_KEY, + ] { + assert_eq!( + check_sig(ee, *algorithm, b"", b""), + Err(webpki::Error::UnsupportedSignatureAlgorithmForPublicKey) + ); + } +} + +#[test] +#[cfg(feature = "alloc")] +fn ecdsa_p256_key_and_ecdsa_p256_sha384_good_signature() { + let ee = include_bytes!("signatures/ecdsa_p256.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = + include_bytes!("signatures/ecdsa_p256_key_and_ecdsa_p256_sha384_good_signature.sig.bin"); + assert_eq!(check_sig(ee, ECDSA_P256_SHA384, message, signature), Ok(())); +} + +#[test] +#[cfg(feature = "alloc")] +fn ecdsa_p256_key_and_ecdsa_p256_sha384_good_signature_rpk() { + let rpk = include_bytes!("signatures/ecdsa_p256.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = + include_bytes!("signatures/ecdsa_p256_key_and_ecdsa_p256_sha384_good_signature.sig.bin"); + assert_eq!( + check_sig_rpk(rpk, ECDSA_P256_SHA384, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn ecdsa_p256_key_and_ecdsa_p256_sha384_detects_bad_signature() { + let ee = include_bytes!("signatures/ecdsa_p256.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/ecdsa_p256_key_and_ecdsa_p256_sha384_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, ECDSA_P256_SHA384, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn ecdsa_p256_key_and_ecdsa_p256_sha384_detects_bad_signature_rpk() { + let rpk = include_bytes!("signatures/ecdsa_p256.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/ecdsa_p256_key_and_ecdsa_p256_sha384_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, ECDSA_P256_SHA384, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn ecdsa_p256_key_and_ecdsa_p256_sha256_good_signature() { + let ee = include_bytes!("signatures/ecdsa_p256.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = + include_bytes!("signatures/ecdsa_p256_key_and_ecdsa_p256_sha256_good_signature.sig.bin"); + assert_eq!(check_sig(ee, ECDSA_P256_SHA256, message, signature), Ok(())); +} + +#[test] +#[cfg(feature = "alloc")] +fn ecdsa_p256_key_and_ecdsa_p256_sha256_good_signature_rpk() { + let rpk = include_bytes!("signatures/ecdsa_p256.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = + include_bytes!("signatures/ecdsa_p256_key_and_ecdsa_p256_sha256_good_signature.sig.bin"); + assert_eq!( + check_sig_rpk(rpk, ECDSA_P256_SHA256, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn ecdsa_p256_key_and_ecdsa_p256_sha256_detects_bad_signature() { + let ee = include_bytes!("signatures/ecdsa_p256.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/ecdsa_p256_key_and_ecdsa_p256_sha256_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, ECDSA_P256_SHA256, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn ecdsa_p256_key_and_ecdsa_p256_sha256_detects_bad_signature_rpk() { + let rpk = include_bytes!("signatures/ecdsa_p256.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/ecdsa_p256_key_and_ecdsa_p256_sha256_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, ECDSA_P256_SHA256, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn ecdsa_p256_key_rejected_by_other_algorithms() { + let ee = include_bytes!("signatures/ecdsa_p256.ee.der"); + for algorithm in &[ + #[cfg(all(not(feature = "ring"), feature = "aws_lc_rs"))] + ECDSA_P521_SHA256, + #[cfg(all(not(feature = "ring"), feature = "aws_lc_rs"))] + ECDSA_P521_SHA384, + #[cfg(all(not(feature = "ring"), feature = "aws_lc_rs"))] + ECDSA_P521_SHA512, + ECDSA_P384_SHA256, + ECDSA_P384_SHA384, + ED25519, + RSA_PKCS1_2048_8192_SHA256, + RSA_PKCS1_2048_8192_SHA384, + RSA_PKCS1_2048_8192_SHA512, + RSA_PKCS1_3072_8192_SHA384, + RSA_PSS_2048_8192_SHA256_LEGACY_KEY, + RSA_PSS_2048_8192_SHA384_LEGACY_KEY, + RSA_PSS_2048_8192_SHA512_LEGACY_KEY, + ] { + assert_eq!( + check_sig(ee, *algorithm, b"", b""), + Err(webpki::Error::UnsupportedSignatureAlgorithmForPublicKey) + ); + } +} + +#[test] +#[cfg(feature = "alloc")] +fn ecdsa_p384_key_and_ecdsa_p384_sha384_good_signature() { + let ee = include_bytes!("signatures/ecdsa_p384.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = + include_bytes!("signatures/ecdsa_p384_key_and_ecdsa_p384_sha384_good_signature.sig.bin"); + assert_eq!(check_sig(ee, ECDSA_P384_SHA384, message, signature), Ok(())); +} + +#[test] +#[cfg(feature = "alloc")] +fn ecdsa_p384_key_and_ecdsa_p384_sha384_good_signature_rpk() { + let rpk = include_bytes!("signatures/ecdsa_p384.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = + include_bytes!("signatures/ecdsa_p384_key_and_ecdsa_p384_sha384_good_signature.sig.bin"); + assert_eq!( + check_sig_rpk(rpk, ECDSA_P384_SHA384, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn ecdsa_p384_key_and_ecdsa_p384_sha384_detects_bad_signature() { + let ee = include_bytes!("signatures/ecdsa_p384.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/ecdsa_p384_key_and_ecdsa_p384_sha384_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, ECDSA_P384_SHA384, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn ecdsa_p384_key_and_ecdsa_p384_sha384_detects_bad_signature_rpk() { + let rpk = include_bytes!("signatures/ecdsa_p384.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/ecdsa_p384_key_and_ecdsa_p384_sha384_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, ECDSA_P384_SHA384, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn ecdsa_p384_key_and_ecdsa_p384_sha256_good_signature() { + let ee = include_bytes!("signatures/ecdsa_p384.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = + include_bytes!("signatures/ecdsa_p384_key_and_ecdsa_p384_sha256_good_signature.sig.bin"); + assert_eq!(check_sig(ee, ECDSA_P384_SHA256, message, signature), Ok(())); +} + +#[test] +#[cfg(feature = "alloc")] +fn ecdsa_p384_key_and_ecdsa_p384_sha256_good_signature_rpk() { + let rpk = include_bytes!("signatures/ecdsa_p384.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = + include_bytes!("signatures/ecdsa_p384_key_and_ecdsa_p384_sha256_good_signature.sig.bin"); + assert_eq!( + check_sig_rpk(rpk, ECDSA_P384_SHA256, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn ecdsa_p384_key_and_ecdsa_p384_sha256_detects_bad_signature() { + let ee = include_bytes!("signatures/ecdsa_p384.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/ecdsa_p384_key_and_ecdsa_p384_sha256_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, ECDSA_P384_SHA256, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn ecdsa_p384_key_and_ecdsa_p384_sha256_detects_bad_signature_rpk() { + let rpk = include_bytes!("signatures/ecdsa_p384.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/ecdsa_p384_key_and_ecdsa_p384_sha256_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, ECDSA_P384_SHA256, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn ecdsa_p384_key_rejected_by_other_algorithms() { + let ee = include_bytes!("signatures/ecdsa_p384.ee.der"); + for algorithm in &[ + #[cfg(all(not(feature = "ring"), feature = "aws_lc_rs"))] + ECDSA_P521_SHA256, + #[cfg(all(not(feature = "ring"), feature = "aws_lc_rs"))] + ECDSA_P521_SHA384, + #[cfg(all(not(feature = "ring"), feature = "aws_lc_rs"))] + ECDSA_P521_SHA512, + ECDSA_P256_SHA256, + ECDSA_P256_SHA384, + ED25519, + RSA_PKCS1_2048_8192_SHA256, + RSA_PKCS1_2048_8192_SHA384, + RSA_PKCS1_2048_8192_SHA512, + RSA_PKCS1_3072_8192_SHA384, + RSA_PSS_2048_8192_SHA256_LEGACY_KEY, + RSA_PSS_2048_8192_SHA384_LEGACY_KEY, + RSA_PSS_2048_8192_SHA512_LEGACY_KEY, + ] { + assert_eq!( + check_sig(ee, *algorithm, b"", b""), + Err(webpki::Error::UnsupportedSignatureAlgorithmForPublicKey) + ); + } +} + +#[test] +#[cfg(all(not(feature = "ring"), feature = "aws_lc_rs"))] +fn ecdsa_p521_key_and_ecdsa_p521_sha512_good_signature() { + let ee = include_bytes!("signatures/ecdsa_p521.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = + include_bytes!("signatures/ecdsa_p521_key_and_ecdsa_p521_sha512_good_signature.sig.bin"); + assert_eq!(check_sig(ee, ECDSA_P521_SHA512, message, signature), Ok(())); +} + +#[test] +#[cfg(all(not(feature = "ring"), feature = "aws_lc_rs"))] +fn ecdsa_p521_key_and_ecdsa_p521_sha512_good_signature_rpk() { + let rpk = include_bytes!("signatures/ecdsa_p521.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = + include_bytes!("signatures/ecdsa_p521_key_and_ecdsa_p521_sha512_good_signature.sig.bin"); + assert_eq!( + check_sig_rpk(rpk, ECDSA_P521_SHA512, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(all(not(feature = "ring"), feature = "aws_lc_rs"))] +fn ecdsa_p521_key_and_ecdsa_p521_sha512_detects_bad_signature() { + let ee = include_bytes!("signatures/ecdsa_p521.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/ecdsa_p521_key_and_ecdsa_p521_sha512_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, ECDSA_P521_SHA512, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(all(not(feature = "ring"), feature = "aws_lc_rs"))] +fn ecdsa_p521_key_and_ecdsa_p521_sha512_detects_bad_signature_rpk() { + let rpk = include_bytes!("signatures/ecdsa_p521.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/ecdsa_p521_key_and_ecdsa_p521_sha512_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, ECDSA_P521_SHA512, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(all(not(feature = "ring"), feature = "aws_lc_rs"))] +fn ecdsa_p521_key_and_ecdsa_p521_sha256_good_signature() { + let ee = include_bytes!("signatures/ecdsa_p521.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = + include_bytes!("signatures/ecdsa_p521_key_and_ecdsa_p521_sha256_good_signature.sig.bin"); + assert_eq!(check_sig(ee, ECDSA_P521_SHA256, message, signature), Ok(())); +} + +#[test] +#[cfg(all(not(feature = "ring"), feature = "aws_lc_rs"))] +fn ecdsa_p521_key_and_ecdsa_p521_sha256_good_signature_rpk() { + let rpk = include_bytes!("signatures/ecdsa_p521.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = + include_bytes!("signatures/ecdsa_p521_key_and_ecdsa_p521_sha256_good_signature.sig.bin"); + assert_eq!( + check_sig_rpk(rpk, ECDSA_P521_SHA256, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(all(not(feature = "ring"), feature = "aws_lc_rs"))] +fn ecdsa_p521_key_and_ecdsa_p521_sha256_detects_bad_signature() { + let ee = include_bytes!("signatures/ecdsa_p521.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/ecdsa_p521_key_and_ecdsa_p521_sha256_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, ECDSA_P521_SHA256, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(all(not(feature = "ring"), feature = "aws_lc_rs"))] +fn ecdsa_p521_key_and_ecdsa_p521_sha256_detects_bad_signature_rpk() { + let rpk = include_bytes!("signatures/ecdsa_p521.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/ecdsa_p521_key_and_ecdsa_p521_sha256_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, ECDSA_P521_SHA256, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(all(not(feature = "ring"), feature = "aws_lc_rs"))] +fn ecdsa_p521_key_and_ecdsa_p521_sha384_good_signature() { + let ee = include_bytes!("signatures/ecdsa_p521.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = + include_bytes!("signatures/ecdsa_p521_key_and_ecdsa_p521_sha384_good_signature.sig.bin"); + assert_eq!(check_sig(ee, ECDSA_P521_SHA384, message, signature), Ok(())); +} + +#[test] +#[cfg(all(not(feature = "ring"), feature = "aws_lc_rs"))] +fn ecdsa_p521_key_and_ecdsa_p521_sha384_good_signature_rpk() { + let rpk = include_bytes!("signatures/ecdsa_p521.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = + include_bytes!("signatures/ecdsa_p521_key_and_ecdsa_p521_sha384_good_signature.sig.bin"); + assert_eq!( + check_sig_rpk(rpk, ECDSA_P521_SHA384, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(all(not(feature = "ring"), feature = "aws_lc_rs"))] +fn ecdsa_p521_key_and_ecdsa_p521_sha384_detects_bad_signature() { + let ee = include_bytes!("signatures/ecdsa_p521.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/ecdsa_p521_key_and_ecdsa_p521_sha384_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, ECDSA_P521_SHA384, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(all(not(feature = "ring"), feature = "aws_lc_rs"))] +fn ecdsa_p521_key_and_ecdsa_p521_sha384_detects_bad_signature_rpk() { + let rpk = include_bytes!("signatures/ecdsa_p521.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/ecdsa_p521_key_and_ecdsa_p521_sha384_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, ECDSA_P521_SHA384, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn ecdsa_p521_key_rejected_by_other_algorithms() { + let ee = include_bytes!("signatures/ecdsa_p521.ee.der"); + for algorithm in &[ + ECDSA_P256_SHA256, + ECDSA_P256_SHA384, + ECDSA_P384_SHA256, + ECDSA_P384_SHA384, + ED25519, + RSA_PKCS1_2048_8192_SHA256, + RSA_PKCS1_2048_8192_SHA384, + RSA_PKCS1_2048_8192_SHA512, + RSA_PKCS1_3072_8192_SHA384, + RSA_PSS_2048_8192_SHA256_LEGACY_KEY, + RSA_PSS_2048_8192_SHA384_LEGACY_KEY, + RSA_PSS_2048_8192_SHA512_LEGACY_KEY, + ] { + assert_eq!( + check_sig(ee, *algorithm, b"", b""), + Err(webpki::Error::UnsupportedSignatureAlgorithmForPublicKey) + ); + } +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_2048_key_and_rsa_pkcs1_2048_8192_sha256_good_signature() { + let ee = include_bytes!("signatures/rsa_2048.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_2048_key_and_rsa_pkcs1_2048_8192_sha256_good_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, RSA_PKCS1_2048_8192_SHA256, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_2048_key_and_rsa_pkcs1_2048_8192_sha256_good_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_2048.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_2048_key_and_rsa_pkcs1_2048_8192_sha256_good_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, RSA_PKCS1_2048_8192_SHA256, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_2048_key_and_rsa_pkcs1_2048_8192_sha256_detects_bad_signature() { + let ee = include_bytes!("signatures/rsa_2048.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_2048_key_and_rsa_pkcs1_2048_8192_sha256_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, RSA_PKCS1_2048_8192_SHA256, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_2048_key_and_rsa_pkcs1_2048_8192_sha256_detects_bad_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_2048.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_2048_key_and_rsa_pkcs1_2048_8192_sha256_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, RSA_PKCS1_2048_8192_SHA256, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_2048_key_and_rsa_pkcs1_2048_8192_sha384_good_signature() { + let ee = include_bytes!("signatures/rsa_2048.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_2048_key_and_rsa_pkcs1_2048_8192_sha384_good_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, RSA_PKCS1_2048_8192_SHA384, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_2048_key_and_rsa_pkcs1_2048_8192_sha384_good_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_2048.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_2048_key_and_rsa_pkcs1_2048_8192_sha384_good_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, RSA_PKCS1_2048_8192_SHA384, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_2048_key_and_rsa_pkcs1_2048_8192_sha384_detects_bad_signature() { + let ee = include_bytes!("signatures/rsa_2048.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_2048_key_and_rsa_pkcs1_2048_8192_sha384_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, RSA_PKCS1_2048_8192_SHA384, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_2048_key_and_rsa_pkcs1_2048_8192_sha384_detects_bad_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_2048.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_2048_key_and_rsa_pkcs1_2048_8192_sha384_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, RSA_PKCS1_2048_8192_SHA384, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_2048_key_and_rsa_pkcs1_2048_8192_sha512_good_signature() { + let ee = include_bytes!("signatures/rsa_2048.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_2048_key_and_rsa_pkcs1_2048_8192_sha512_good_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, RSA_PKCS1_2048_8192_SHA512, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_2048_key_and_rsa_pkcs1_2048_8192_sha512_good_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_2048.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_2048_key_and_rsa_pkcs1_2048_8192_sha512_good_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, RSA_PKCS1_2048_8192_SHA512, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_2048_key_and_rsa_pkcs1_2048_8192_sha512_detects_bad_signature() { + let ee = include_bytes!("signatures/rsa_2048.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_2048_key_and_rsa_pkcs1_2048_8192_sha512_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, RSA_PKCS1_2048_8192_SHA512, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_2048_key_and_rsa_pkcs1_2048_8192_sha512_detects_bad_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_2048.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_2048_key_and_rsa_pkcs1_2048_8192_sha512_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, RSA_PKCS1_2048_8192_SHA512, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_2048_key_and_rsa_pss_2048_8192_sha256_legacy_key_good_signature() { + let ee = include_bytes!("signatures/rsa_2048.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_2048_key_and_rsa_pss_2048_8192_sha256_legacy_key_good_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, RSA_PSS_2048_8192_SHA256_LEGACY_KEY, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_2048_key_and_rsa_pss_2048_8192_sha256_legacy_key_good_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_2048.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_2048_key_and_rsa_pss_2048_8192_sha256_legacy_key_good_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, RSA_PSS_2048_8192_SHA256_LEGACY_KEY, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_2048_key_and_rsa_pss_2048_8192_sha256_legacy_key_detects_bad_signature() { + let ee = include_bytes!("signatures/rsa_2048.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!("signatures/rsa_2048_key_and_rsa_pss_2048_8192_sha256_legacy_key_detects_bad_signature.sig.bin"); + assert_eq!( + check_sig(ee, RSA_PSS_2048_8192_SHA256_LEGACY_KEY, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_2048_key_and_rsa_pss_2048_8192_sha256_legacy_key_detects_bad_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_2048.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!("signatures/rsa_2048_key_and_rsa_pss_2048_8192_sha256_legacy_key_detects_bad_signature.sig.bin"); + assert_eq!( + check_sig_rpk(rpk, RSA_PSS_2048_8192_SHA256_LEGACY_KEY, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_2048_key_and_rsa_pss_2048_8192_sha384_legacy_key_good_signature() { + let ee = include_bytes!("signatures/rsa_2048.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_2048_key_and_rsa_pss_2048_8192_sha384_legacy_key_good_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, RSA_PSS_2048_8192_SHA384_LEGACY_KEY, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_2048_key_and_rsa_pss_2048_8192_sha384_legacy_key_good_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_2048.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_2048_key_and_rsa_pss_2048_8192_sha384_legacy_key_good_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, RSA_PSS_2048_8192_SHA384_LEGACY_KEY, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_2048_key_and_rsa_pss_2048_8192_sha384_legacy_key_detects_bad_signature() { + let ee = include_bytes!("signatures/rsa_2048.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!("signatures/rsa_2048_key_and_rsa_pss_2048_8192_sha384_legacy_key_detects_bad_signature.sig.bin"); + assert_eq!( + check_sig(ee, RSA_PSS_2048_8192_SHA384_LEGACY_KEY, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_2048_key_and_rsa_pss_2048_8192_sha384_legacy_key_detects_bad_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_2048.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!("signatures/rsa_2048_key_and_rsa_pss_2048_8192_sha384_legacy_key_detects_bad_signature.sig.bin"); + assert_eq!( + check_sig_rpk(rpk, RSA_PSS_2048_8192_SHA384_LEGACY_KEY, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_2048_key_and_rsa_pss_2048_8192_sha512_legacy_key_good_signature() { + let ee = include_bytes!("signatures/rsa_2048.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_2048_key_and_rsa_pss_2048_8192_sha512_legacy_key_good_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, RSA_PSS_2048_8192_SHA512_LEGACY_KEY, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_2048_key_and_rsa_pss_2048_8192_sha512_legacy_key_good_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_2048.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_2048_key_and_rsa_pss_2048_8192_sha512_legacy_key_good_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, RSA_PSS_2048_8192_SHA512_LEGACY_KEY, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_2048_key_and_rsa_pss_2048_8192_sha512_legacy_key_detects_bad_signature() { + let ee = include_bytes!("signatures/rsa_2048.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!("signatures/rsa_2048_key_and_rsa_pss_2048_8192_sha512_legacy_key_detects_bad_signature.sig.bin"); + assert_eq!( + check_sig(ee, RSA_PSS_2048_8192_SHA512_LEGACY_KEY, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_2048_key_and_rsa_pss_2048_8192_sha512_legacy_key_detects_bad_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_2048.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!("signatures/rsa_2048_key_and_rsa_pss_2048_8192_sha512_legacy_key_detects_bad_signature.sig.bin"); + assert_eq!( + check_sig_rpk(rpk, RSA_PSS_2048_8192_SHA512_LEGACY_KEY, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_2048_key_rejected_by_other_algorithms() { + let ee = include_bytes!("signatures/rsa_2048.ee.der"); + for algorithm in &[ + #[cfg(all(not(feature = "ring"), feature = "aws_lc_rs"))] + ECDSA_P521_SHA256, + #[cfg(all(not(feature = "ring"), feature = "aws_lc_rs"))] + ECDSA_P521_SHA384, + #[cfg(all(not(feature = "ring"), feature = "aws_lc_rs"))] + ECDSA_P521_SHA512, + ECDSA_P256_SHA256, + ECDSA_P256_SHA384, + ECDSA_P384_SHA256, + ECDSA_P384_SHA384, + ED25519, + ] { + assert_eq!( + check_sig(ee, *algorithm, b"", b""), + Err(webpki::Error::UnsupportedSignatureAlgorithmForPublicKey) + ); + } +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_3072_key_and_rsa_pkcs1_2048_8192_sha256_good_signature() { + let ee = include_bytes!("signatures/rsa_3072.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_3072_key_and_rsa_pkcs1_2048_8192_sha256_good_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, RSA_PKCS1_2048_8192_SHA256, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_3072_key_and_rsa_pkcs1_2048_8192_sha256_good_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_3072.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_3072_key_and_rsa_pkcs1_2048_8192_sha256_good_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, RSA_PKCS1_2048_8192_SHA256, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_3072_key_and_rsa_pkcs1_2048_8192_sha256_detects_bad_signature() { + let ee = include_bytes!("signatures/rsa_3072.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_3072_key_and_rsa_pkcs1_2048_8192_sha256_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, RSA_PKCS1_2048_8192_SHA256, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_3072_key_and_rsa_pkcs1_2048_8192_sha256_detects_bad_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_3072.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_3072_key_and_rsa_pkcs1_2048_8192_sha256_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, RSA_PKCS1_2048_8192_SHA256, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_3072_key_and_rsa_pkcs1_2048_8192_sha384_good_signature() { + let ee = include_bytes!("signatures/rsa_3072.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_3072_key_and_rsa_pkcs1_2048_8192_sha384_good_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, RSA_PKCS1_2048_8192_SHA384, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_3072_key_and_rsa_pkcs1_2048_8192_sha384_good_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_3072.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_3072_key_and_rsa_pkcs1_2048_8192_sha384_good_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, RSA_PKCS1_2048_8192_SHA384, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_3072_key_and_rsa_pkcs1_2048_8192_sha384_detects_bad_signature() { + let ee = include_bytes!("signatures/rsa_3072.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_3072_key_and_rsa_pkcs1_2048_8192_sha384_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, RSA_PKCS1_2048_8192_SHA384, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_3072_key_and_rsa_pkcs1_2048_8192_sha384_detects_bad_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_3072.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_3072_key_and_rsa_pkcs1_2048_8192_sha384_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, RSA_PKCS1_2048_8192_SHA384, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_3072_key_and_rsa_pkcs1_2048_8192_sha512_good_signature() { + let ee = include_bytes!("signatures/rsa_3072.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_3072_key_and_rsa_pkcs1_2048_8192_sha512_good_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, RSA_PKCS1_2048_8192_SHA512, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_3072_key_and_rsa_pkcs1_2048_8192_sha512_good_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_3072.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_3072_key_and_rsa_pkcs1_2048_8192_sha512_good_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, RSA_PKCS1_2048_8192_SHA512, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_3072_key_and_rsa_pkcs1_2048_8192_sha512_detects_bad_signature() { + let ee = include_bytes!("signatures/rsa_3072.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_3072_key_and_rsa_pkcs1_2048_8192_sha512_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, RSA_PKCS1_2048_8192_SHA512, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_3072_key_and_rsa_pkcs1_2048_8192_sha512_detects_bad_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_3072.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_3072_key_and_rsa_pkcs1_2048_8192_sha512_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, RSA_PKCS1_2048_8192_SHA512, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_3072_key_and_rsa_pss_2048_8192_sha256_legacy_key_good_signature() { + let ee = include_bytes!("signatures/rsa_3072.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_3072_key_and_rsa_pss_2048_8192_sha256_legacy_key_good_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, RSA_PSS_2048_8192_SHA256_LEGACY_KEY, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_3072_key_and_rsa_pss_2048_8192_sha256_legacy_key_good_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_3072.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_3072_key_and_rsa_pss_2048_8192_sha256_legacy_key_good_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, RSA_PSS_2048_8192_SHA256_LEGACY_KEY, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_3072_key_and_rsa_pss_2048_8192_sha256_legacy_key_detects_bad_signature() { + let ee = include_bytes!("signatures/rsa_3072.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!("signatures/rsa_3072_key_and_rsa_pss_2048_8192_sha256_legacy_key_detects_bad_signature.sig.bin"); + assert_eq!( + check_sig(ee, RSA_PSS_2048_8192_SHA256_LEGACY_KEY, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_3072_key_and_rsa_pss_2048_8192_sha256_legacy_key_detects_bad_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_3072.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!("signatures/rsa_3072_key_and_rsa_pss_2048_8192_sha256_legacy_key_detects_bad_signature.sig.bin"); + assert_eq!( + check_sig_rpk(rpk, RSA_PSS_2048_8192_SHA256_LEGACY_KEY, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_3072_key_and_rsa_pss_2048_8192_sha384_legacy_key_good_signature() { + let ee = include_bytes!("signatures/rsa_3072.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_3072_key_and_rsa_pss_2048_8192_sha384_legacy_key_good_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, RSA_PSS_2048_8192_SHA384_LEGACY_KEY, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_3072_key_and_rsa_pss_2048_8192_sha384_legacy_key_good_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_3072.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_3072_key_and_rsa_pss_2048_8192_sha384_legacy_key_good_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, RSA_PSS_2048_8192_SHA384_LEGACY_KEY, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_3072_key_and_rsa_pss_2048_8192_sha384_legacy_key_detects_bad_signature() { + let ee = include_bytes!("signatures/rsa_3072.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!("signatures/rsa_3072_key_and_rsa_pss_2048_8192_sha384_legacy_key_detects_bad_signature.sig.bin"); + assert_eq!( + check_sig(ee, RSA_PSS_2048_8192_SHA384_LEGACY_KEY, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_3072_key_and_rsa_pss_2048_8192_sha384_legacy_key_detects_bad_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_3072.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!("signatures/rsa_3072_key_and_rsa_pss_2048_8192_sha384_legacy_key_detects_bad_signature.sig.bin"); + assert_eq!( + check_sig_rpk(rpk, RSA_PSS_2048_8192_SHA384_LEGACY_KEY, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_3072_key_and_rsa_pss_2048_8192_sha512_legacy_key_good_signature() { + let ee = include_bytes!("signatures/rsa_3072.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_3072_key_and_rsa_pss_2048_8192_sha512_legacy_key_good_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, RSA_PSS_2048_8192_SHA512_LEGACY_KEY, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_3072_key_and_rsa_pss_2048_8192_sha512_legacy_key_good_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_3072.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_3072_key_and_rsa_pss_2048_8192_sha512_legacy_key_good_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, RSA_PSS_2048_8192_SHA512_LEGACY_KEY, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_3072_key_and_rsa_pss_2048_8192_sha512_legacy_key_detects_bad_signature() { + let ee = include_bytes!("signatures/rsa_3072.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!("signatures/rsa_3072_key_and_rsa_pss_2048_8192_sha512_legacy_key_detects_bad_signature.sig.bin"); + assert_eq!( + check_sig(ee, RSA_PSS_2048_8192_SHA512_LEGACY_KEY, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_3072_key_and_rsa_pss_2048_8192_sha512_legacy_key_detects_bad_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_3072.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!("signatures/rsa_3072_key_and_rsa_pss_2048_8192_sha512_legacy_key_detects_bad_signature.sig.bin"); + assert_eq!( + check_sig_rpk(rpk, RSA_PSS_2048_8192_SHA512_LEGACY_KEY, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_3072_key_and_rsa_pkcs1_3072_8192_sha384_good_signature() { + let ee = include_bytes!("signatures/rsa_3072.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_3072_key_and_rsa_pkcs1_3072_8192_sha384_good_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, RSA_PKCS1_3072_8192_SHA384, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_3072_key_and_rsa_pkcs1_3072_8192_sha384_good_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_3072.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_3072_key_and_rsa_pkcs1_3072_8192_sha384_good_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, RSA_PKCS1_3072_8192_SHA384, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_3072_key_and_rsa_pkcs1_3072_8192_sha384_detects_bad_signature() { + let ee = include_bytes!("signatures/rsa_3072.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_3072_key_and_rsa_pkcs1_3072_8192_sha384_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, RSA_PKCS1_3072_8192_SHA384, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_3072_key_and_rsa_pkcs1_3072_8192_sha384_detects_bad_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_3072.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_3072_key_and_rsa_pkcs1_3072_8192_sha384_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, RSA_PKCS1_3072_8192_SHA384, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_3072_key_rejected_by_other_algorithms() { + let ee = include_bytes!("signatures/rsa_3072.ee.der"); + for algorithm in &[ + #[cfg(all(not(feature = "ring"), feature = "aws_lc_rs"))] + ECDSA_P521_SHA256, + #[cfg(all(not(feature = "ring"), feature = "aws_lc_rs"))] + ECDSA_P521_SHA384, + #[cfg(all(not(feature = "ring"), feature = "aws_lc_rs"))] + ECDSA_P521_SHA512, + ECDSA_P256_SHA256, + ECDSA_P256_SHA384, + ECDSA_P384_SHA256, + ECDSA_P384_SHA384, + ED25519, + ] { + assert_eq!( + check_sig(ee, *algorithm, b"", b""), + Err(webpki::Error::UnsupportedSignatureAlgorithmForPublicKey) + ); + } +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_4096_key_and_rsa_pkcs1_2048_8192_sha256_good_signature() { + let ee = include_bytes!("signatures/rsa_4096.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_4096_key_and_rsa_pkcs1_2048_8192_sha256_good_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, RSA_PKCS1_2048_8192_SHA256, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_4096_key_and_rsa_pkcs1_2048_8192_sha256_good_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_4096.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_4096_key_and_rsa_pkcs1_2048_8192_sha256_good_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, RSA_PKCS1_2048_8192_SHA256, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_4096_key_and_rsa_pkcs1_2048_8192_sha256_detects_bad_signature() { + let ee = include_bytes!("signatures/rsa_4096.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_4096_key_and_rsa_pkcs1_2048_8192_sha256_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, RSA_PKCS1_2048_8192_SHA256, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_4096_key_and_rsa_pkcs1_2048_8192_sha256_detects_bad_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_4096.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_4096_key_and_rsa_pkcs1_2048_8192_sha256_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, RSA_PKCS1_2048_8192_SHA256, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_4096_key_and_rsa_pkcs1_2048_8192_sha384_good_signature() { + let ee = include_bytes!("signatures/rsa_4096.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_4096_key_and_rsa_pkcs1_2048_8192_sha384_good_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, RSA_PKCS1_2048_8192_SHA384, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_4096_key_and_rsa_pkcs1_2048_8192_sha384_good_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_4096.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_4096_key_and_rsa_pkcs1_2048_8192_sha384_good_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, RSA_PKCS1_2048_8192_SHA384, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_4096_key_and_rsa_pkcs1_2048_8192_sha384_detects_bad_signature() { + let ee = include_bytes!("signatures/rsa_4096.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_4096_key_and_rsa_pkcs1_2048_8192_sha384_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, RSA_PKCS1_2048_8192_SHA384, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_4096_key_and_rsa_pkcs1_2048_8192_sha384_detects_bad_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_4096.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_4096_key_and_rsa_pkcs1_2048_8192_sha384_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, RSA_PKCS1_2048_8192_SHA384, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_4096_key_and_rsa_pkcs1_2048_8192_sha512_good_signature() { + let ee = include_bytes!("signatures/rsa_4096.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_4096_key_and_rsa_pkcs1_2048_8192_sha512_good_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, RSA_PKCS1_2048_8192_SHA512, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_4096_key_and_rsa_pkcs1_2048_8192_sha512_good_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_4096.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_4096_key_and_rsa_pkcs1_2048_8192_sha512_good_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, RSA_PKCS1_2048_8192_SHA512, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_4096_key_and_rsa_pkcs1_2048_8192_sha512_detects_bad_signature() { + let ee = include_bytes!("signatures/rsa_4096.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_4096_key_and_rsa_pkcs1_2048_8192_sha512_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, RSA_PKCS1_2048_8192_SHA512, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_4096_key_and_rsa_pkcs1_2048_8192_sha512_detects_bad_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_4096.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_4096_key_and_rsa_pkcs1_2048_8192_sha512_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, RSA_PKCS1_2048_8192_SHA512, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_4096_key_and_rsa_pss_2048_8192_sha256_legacy_key_good_signature() { + let ee = include_bytes!("signatures/rsa_4096.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_4096_key_and_rsa_pss_2048_8192_sha256_legacy_key_good_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, RSA_PSS_2048_8192_SHA256_LEGACY_KEY, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_4096_key_and_rsa_pss_2048_8192_sha256_legacy_key_good_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_4096.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_4096_key_and_rsa_pss_2048_8192_sha256_legacy_key_good_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, RSA_PSS_2048_8192_SHA256_LEGACY_KEY, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_4096_key_and_rsa_pss_2048_8192_sha256_legacy_key_detects_bad_signature() { + let ee = include_bytes!("signatures/rsa_4096.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!("signatures/rsa_4096_key_and_rsa_pss_2048_8192_sha256_legacy_key_detects_bad_signature.sig.bin"); + assert_eq!( + check_sig(ee, RSA_PSS_2048_8192_SHA256_LEGACY_KEY, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_4096_key_and_rsa_pss_2048_8192_sha256_legacy_key_detects_bad_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_4096.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!("signatures/rsa_4096_key_and_rsa_pss_2048_8192_sha256_legacy_key_detects_bad_signature.sig.bin"); + assert_eq!( + check_sig_rpk(rpk, RSA_PSS_2048_8192_SHA256_LEGACY_KEY, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_4096_key_and_rsa_pss_2048_8192_sha384_legacy_key_good_signature() { + let ee = include_bytes!("signatures/rsa_4096.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_4096_key_and_rsa_pss_2048_8192_sha384_legacy_key_good_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, RSA_PSS_2048_8192_SHA384_LEGACY_KEY, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_4096_key_and_rsa_pss_2048_8192_sha384_legacy_key_good_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_4096.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_4096_key_and_rsa_pss_2048_8192_sha384_legacy_key_good_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, RSA_PSS_2048_8192_SHA384_LEGACY_KEY, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_4096_key_and_rsa_pss_2048_8192_sha384_legacy_key_detects_bad_signature() { + let ee = include_bytes!("signatures/rsa_4096.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!("signatures/rsa_4096_key_and_rsa_pss_2048_8192_sha384_legacy_key_detects_bad_signature.sig.bin"); + assert_eq!( + check_sig(ee, RSA_PSS_2048_8192_SHA384_LEGACY_KEY, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_4096_key_and_rsa_pss_2048_8192_sha384_legacy_key_detects_bad_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_4096.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!("signatures/rsa_4096_key_and_rsa_pss_2048_8192_sha384_legacy_key_detects_bad_signature.sig.bin"); + assert_eq!( + check_sig_rpk(rpk, RSA_PSS_2048_8192_SHA384_LEGACY_KEY, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_4096_key_and_rsa_pss_2048_8192_sha512_legacy_key_good_signature() { + let ee = include_bytes!("signatures/rsa_4096.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_4096_key_and_rsa_pss_2048_8192_sha512_legacy_key_good_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, RSA_PSS_2048_8192_SHA512_LEGACY_KEY, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_4096_key_and_rsa_pss_2048_8192_sha512_legacy_key_good_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_4096.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_4096_key_and_rsa_pss_2048_8192_sha512_legacy_key_good_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, RSA_PSS_2048_8192_SHA512_LEGACY_KEY, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_4096_key_and_rsa_pss_2048_8192_sha512_legacy_key_detects_bad_signature() { + let ee = include_bytes!("signatures/rsa_4096.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!("signatures/rsa_4096_key_and_rsa_pss_2048_8192_sha512_legacy_key_detects_bad_signature.sig.bin"); + assert_eq!( + check_sig(ee, RSA_PSS_2048_8192_SHA512_LEGACY_KEY, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_4096_key_and_rsa_pss_2048_8192_sha512_legacy_key_detects_bad_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_4096.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!("signatures/rsa_4096_key_and_rsa_pss_2048_8192_sha512_legacy_key_detects_bad_signature.sig.bin"); + assert_eq!( + check_sig_rpk(rpk, RSA_PSS_2048_8192_SHA512_LEGACY_KEY, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_4096_key_and_rsa_pkcs1_3072_8192_sha384_good_signature() { + let ee = include_bytes!("signatures/rsa_4096.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_4096_key_and_rsa_pkcs1_3072_8192_sha384_good_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, RSA_PKCS1_3072_8192_SHA384, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_4096_key_and_rsa_pkcs1_3072_8192_sha384_good_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_4096.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_4096_key_and_rsa_pkcs1_3072_8192_sha384_good_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, RSA_PKCS1_3072_8192_SHA384, message, signature), + Ok(()) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_4096_key_and_rsa_pkcs1_3072_8192_sha384_detects_bad_signature() { + let ee = include_bytes!("signatures/rsa_4096.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_4096_key_and_rsa_pkcs1_3072_8192_sha384_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig(ee, RSA_PKCS1_3072_8192_SHA384, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_4096_key_and_rsa_pkcs1_3072_8192_sha384_detects_bad_signature_rpk() { + let rpk = include_bytes!("signatures/rsa_4096.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = include_bytes!( + "signatures/rsa_4096_key_and_rsa_pkcs1_3072_8192_sha384_detects_bad_signature.sig.bin" + ); + assert_eq!( + check_sig_rpk(rpk, RSA_PKCS1_3072_8192_SHA384, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_4096_key_rejected_by_other_algorithms() { + let ee = include_bytes!("signatures/rsa_4096.ee.der"); + for algorithm in &[ + #[cfg(all(not(feature = "ring"), feature = "aws_lc_rs"))] + ECDSA_P521_SHA256, + #[cfg(all(not(feature = "ring"), feature = "aws_lc_rs"))] + ECDSA_P521_SHA384, + #[cfg(all(not(feature = "ring"), feature = "aws_lc_rs"))] + ECDSA_P521_SHA512, + ECDSA_P256_SHA256, + ECDSA_P256_SHA384, + ECDSA_P384_SHA256, + ECDSA_P384_SHA384, + ED25519, + ] { + assert_eq!( + check_sig(ee, *algorithm, b"", b""), + Err(webpki::Error::UnsupportedSignatureAlgorithmForPublicKey) + ); + } +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_2048_key_rejected_by_rsa_pkcs1_3072_8192_sha384() { + let ee = include_bytes!("signatures/rsa_2048.ee.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = + include_bytes!("signatures/rsa_2048_key_rejected_by_rsa_pkcs1_3072_8192_sha384.sig.bin"); + assert_eq!( + check_sig(ee, RSA_PKCS1_3072_8192_SHA384, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} + +#[test] +#[cfg(feature = "alloc")] +fn rsa_2048_key_rejected_by_rsa_pkcs1_3072_8192_sha384_rpk() { + let rpk = include_bytes!("signatures/rsa_2048.spki.der"); + let message = include_bytes!("signatures/message.bin"); + let signature = + include_bytes!("signatures/rsa_2048_key_rejected_by_rsa_pkcs1_3072_8192_sha384.sig.bin"); + assert_eq!( + check_sig_rpk(rpk, RSA_PKCS1_3072_8192_SHA384, message, signature), + Err(webpki::Error::InvalidSignatureForPublicKey) + ); +} diff --git a/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p256.ee.der b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p256.ee.der new file mode 100644 index 00000000000..2b6418d3871 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p256.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p256.spki.der b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p256.spki.der new file mode 100644 index 00000000000..d289df5a9ce Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p256.spki.der differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p256_key_and_ecdsa_p256_sha256_detects_bad_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p256_key_and_ecdsa_p256_sha256_detects_bad_signature.sig.bin new file mode 100644 index 00000000000..bcbeefe7192 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p256_key_and_ecdsa_p256_sha256_detects_bad_signature.sig.bin @@ -0,0 +1 @@ +0D O˜ Áé�W×[3jpÈ ¡®D~´¢h½€>q(þº> aÑÀŽ}k·u8V¿J�4€ŠÙù%m‚WÁ^ãd \ No newline at end of file diff --git a/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p256_key_and_ecdsa_p256_sha256_good_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p256_key_and_ecdsa_p256_sha256_good_signature.sig.bin new file mode 100644 index 00000000000..cd7d598cb01 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p256_key_and_ecdsa_p256_sha256_good_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p256_key_and_ecdsa_p256_sha384_detects_bad_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p256_key_and_ecdsa_p256_sha384_detects_bad_signature.sig.bin new file mode 100644 index 00000000000..433e57d4287 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p256_key_and_ecdsa_p256_sha384_detects_bad_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p256_key_and_ecdsa_p256_sha384_good_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p256_key_and_ecdsa_p256_sha384_good_signature.sig.bin new file mode 100644 index 00000000000..d8b8f5860d7 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p256_key_and_ecdsa_p256_sha384_good_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p384.ee.der b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p384.ee.der new file mode 100644 index 00000000000..da66a2af62d Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p384.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p384.spki.der b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p384.spki.der new file mode 100644 index 00000000000..6bacfef4689 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p384.spki.der differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p384_key_and_ecdsa_p384_sha256_detects_bad_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p384_key_and_ecdsa_p384_sha256_detects_bad_signature.sig.bin new file mode 100644 index 00000000000..19a257315d6 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p384_key_and_ecdsa_p384_sha256_detects_bad_signature.sig.bin @@ -0,0 +1,3 @@ +0d0 +üÝ©<ˆã)½F|Ì ‹Sï¯K‘‘±Ó–ôù«îÀIìØ0û´EÆÊ +3¯‚É,ê0ÚVD¯,—µjwð —ÐA|»ÚÏ›‘X“¥�+È«¾\Ô›Á´|Š_TÇŽ \ No newline at end of file diff --git a/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p384_key_and_ecdsa_p384_sha256_good_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p384_key_and_ecdsa_p384_sha256_good_signature.sig.bin new file mode 100644 index 00000000000..d6e7e760afe Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p384_key_and_ecdsa_p384_sha256_good_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p384_key_and_ecdsa_p384_sha384_detects_bad_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p384_key_and_ecdsa_p384_sha384_detects_bad_signature.sig.bin new file mode 100644 index 00000000000..60774d4a2a5 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p384_key_and_ecdsa_p384_sha384_detects_bad_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p384_key_and_ecdsa_p384_sha384_good_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p384_key_and_ecdsa_p384_sha384_good_signature.sig.bin new file mode 100644 index 00000000000..50244c5f094 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p384_key_and_ecdsa_p384_sha384_good_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p521.ee.der b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p521.ee.der new file mode 100644 index 00000000000..d082c779387 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p521.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p521.spki.der b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p521.spki.der new file mode 100644 index 00000000000..f65981a3e4b Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p521.spki.der differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p521_key_and_ecdsa_p521_sha256_detects_bad_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p521_key_and_ecdsa_p521_sha256_detects_bad_signature.sig.bin new file mode 100644 index 00000000000..10eb21e81e8 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p521_key_and_ecdsa_p521_sha256_detects_bad_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p521_key_and_ecdsa_p521_sha256_good_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p521_key_and_ecdsa_p521_sha256_good_signature.sig.bin new file mode 100644 index 00000000000..4c42322ce23 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p521_key_and_ecdsa_p521_sha256_good_signature.sig.bin @@ -0,0 +1 @@ +0�ˆB'Áåz;ÒB LZþàZRߢ™*b>yj“ÿ¯øy¢ÕbtĨ¸y#œ�â`ç'‡f&W ¢Ò“½×#ÁϪBë]ûÐÉ|'Ë1Òˆû„}ÃWG^]¢c? ¬-k€ïãLäÂO#œF‰4)¨]rù÷ÞÑÊ«n1–6‰Ovð&& \ No newline at end of file diff --git a/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p521_key_and_ecdsa_p521_sha384_detects_bad_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p521_key_and_ecdsa_p521_sha384_detects_bad_signature.sig.bin new file mode 100644 index 00000000000..93b9b6e9ff2 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p521_key_and_ecdsa_p521_sha384_detects_bad_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p521_key_and_ecdsa_p521_sha384_good_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p521_key_and_ecdsa_p521_sha384_good_signature.sig.bin new file mode 100644 index 00000000000..f25538367f1 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p521_key_and_ecdsa_p521_sha384_good_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p521_key_and_ecdsa_p521_sha512_detects_bad_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p521_key_and_ecdsa_p521_sha512_detects_bad_signature.sig.bin new file mode 100644 index 00000000000..73ff20afcbd Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p521_key_and_ecdsa_p521_sha512_detects_bad_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p521_key_and_ecdsa_p521_sha512_good_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p521_key_and_ecdsa_p521_sha512_good_signature.sig.bin new file mode 100644 index 00000000000..1716f614d9a --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/signatures/ecdsa_p521_key_and_ecdsa_p521_sha512_good_signature.sig.bin @@ -0,0 +1 @@ +0�ˆB±OmF›ÎÇTÇ|h �ë¼þš­ðáÐijÂÆ¯üƒM­`›?%œëó×ÃæÑC�µBÂyr�™ÀòŸ~ŸúBö~ØIÑ·†ü¯>‹>.=Žòr7UCÃtñx0ÊvG®};‰+I¤åö„X ïÑ”³–@"�tÑ3±0`©•�È7­[g \ No newline at end of file diff --git a/vendor/rustls-webpki-legacy/tests/signatures/ed25519.ee.der b/vendor/rustls-webpki-legacy/tests/signatures/ed25519.ee.der new file mode 100644 index 00000000000..463dfff7617 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/ed25519.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/ed25519.spki.der b/vendor/rustls-webpki-legacy/tests/signatures/ed25519.spki.der new file mode 100644 index 00000000000..07cd57611c3 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/ed25519.spki.der differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/ed25519_key_and_ed25519_detects_bad_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/ed25519_key_and_ed25519_detects_bad_signature.sig.bin new file mode 100644 index 00000000000..ec4e0530afc --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/signatures/ed25519_key_and_ed25519_detects_bad_signature.sig.bin @@ -0,0 +1 @@ +¥ºy˜rBZ¯$€ ÷ˆ‹·I£&»z©°gXÙ†‚ºG�†uõß�MaIGð"w‘Qy±•ŽùÌݯV®Uµ \ No newline at end of file diff --git a/vendor/rustls-webpki-legacy/tests/signatures/ed25519_key_and_ed25519_good_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/ed25519_key_and_ed25519_good_signature.sig.bin new file mode 100644 index 00000000000..1f328b84f28 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/signatures/ed25519_key_and_ed25519_good_signature.sig.bin @@ -0,0 +1 @@ +W�K\Íýqšñƒ¤&EvŒ0½Ù÷±p¢ºœn†N¦t–@È6¸ã�0@÷ÖC}¼‚Gڽ蚡Ù[âV¶ÿ \ No newline at end of file diff --git a/vendor/rustls-webpki-legacy/tests/signatures/message.bin b/vendor/rustls-webpki-legacy/tests/signatures/message.bin new file mode 100644 index 00000000000..bc7774a7b18 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/signatures/message.bin @@ -0,0 +1 @@ +hello world! \ No newline at end of file diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_1024_not_supported.ee.der b/vendor/rustls-webpki-legacy/tests/signatures/rsa_1024_not_supported.ee.der new file mode 100644 index 00000000000..43c1e12cdb8 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_1024_not_supported.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_1024_not_supported.spki.der b/vendor/rustls-webpki-legacy/tests/signatures/rsa_1024_not_supported.spki.der new file mode 100644 index 00000000000..a5e434950b3 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_1024_not_supported.spki.der differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048.ee.der b/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048.ee.der new file mode 100644 index 00000000000..e80164d8c91 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048.spki.der b/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048.spki.der new file mode 100644 index 00000000000..707a700c7c4 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048.spki.der differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048_key_and_rsa_pkcs1_2048_8192_sha256_detects_bad_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048_key_and_rsa_pkcs1_2048_8192_sha256_detects_bad_signature.sig.bin new file mode 100644 index 00000000000..0dba5ef5730 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048_key_and_rsa_pkcs1_2048_8192_sha256_detects_bad_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048_key_and_rsa_pkcs1_2048_8192_sha256_good_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048_key_and_rsa_pkcs1_2048_8192_sha256_good_signature.sig.bin new file mode 100644 index 00000000000..e19e700d369 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048_key_and_rsa_pkcs1_2048_8192_sha256_good_signature.sig.bin @@ -0,0 +1,3 @@ +‹×±–ì×h½Fg-È CVÉ!'Cø'°`pÿvWžs|ÿÛ‰„ê0ýíB/Š-ÒG¤Î’Fà[m#Ò�éöÒ€OŒžBhd‹8Ï×Ê +~#FÌàZëÓ]9÷ï\BBZÛ¹áâ¦dz xL«Mÿ3Çó +f’á�Ç>2qô+†œÒT…}Zl*îªl»]Áp&VJ÷–×hB_IvëA^צI‹°� sd›¾…Rñžg‰(œ:ûøèÔ|ÕÐß ,“ô3Üï—óq—ßÒYýºdP°M�PÓÿŸX϶+¨”Agùð“Ó¿¼ÌåhøÜûL›*NÑÛX8>³ \ No newline at end of file diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048_key_and_rsa_pkcs1_2048_8192_sha384_detects_bad_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048_key_and_rsa_pkcs1_2048_8192_sha384_detects_bad_signature.sig.bin new file mode 100644 index 00000000000..f4f1c71843f Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048_key_and_rsa_pkcs1_2048_8192_sha384_detects_bad_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048_key_and_rsa_pkcs1_2048_8192_sha384_good_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048_key_and_rsa_pkcs1_2048_8192_sha384_good_signature.sig.bin new file mode 100644 index 00000000000..d8570b3e022 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048_key_and_rsa_pkcs1_2048_8192_sha384_good_signature.sig.bin @@ -0,0 +1 @@ +3|ºùxÖÀ·‡G• ÁÕ¨„=‡Ð�Ð5DóŽùŸuŸüÂ8 MÐ .yÝM ìdºÎªvU]ŽKó ìJu”kH¯…b� Y +Ö*r¾ì¦Ý¤ÐrUˆeÐÄš’%¨uSñ’LrKøÖSBÐeJú< ñ½ÝrûH¡™W4Ã� C*6ëqfuo+H:¥-ŠúW-HŒ÷ñâšÍZƆ SÌ>á^;¢sÂDûœ­H»ÖI'¸û1n‚EdÌêµ5ä‰E¸­’êøú¥ùöåae”§Vç…ä¤3䔇Ç;3gƘ!ù8!ó \ No newline at end of file diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048_key_and_rsa_pkcs1_2048_8192_sha512_detects_bad_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048_key_and_rsa_pkcs1_2048_8192_sha512_detects_bad_signature.sig.bin new file mode 100644 index 00000000000..82e203a4ce1 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048_key_and_rsa_pkcs1_2048_8192_sha512_detects_bad_signature.sig.bin @@ -0,0 +1,3 @@ +�fsmEr(^ÿbtÙÞø +bç¡zÂà Çoí‘LHìQÇl«e*¸Î¹¥Þ¸8€ÒA‡ô¼$°»õ.[-·UE€"tTÓ:vâ@Çm0uåÂóQ`~~jG§ ±³Ìšûd@çV• +4™w§VRë�Ž‹'‚ì#màò!K“žû¶ùÇ×d¥@ÄEj¦ÞÒ«"Û5¿ÆO¼|Ò‹#º<YÌV‹#îGèt¨·¬Ü²ópAwÒ�¼4‡/ðáõv“S‹Û|ô)n¦óœÉ:ñ±‚ -fÕÕ®‚BF§¤Î)*‡‡SÔ�/TéðQ­Ô RÁòÏ4Jß”[:P{o?œ+EFw8Œùþ@lÈ!+ÀR16 #¤ú(] ªƒ¶E¤Ë²ºz§1寬Ê2xí�ûìó’ÀŸäkW¡ÿm L= Ø i‡«kE4T…òi9.’<}ÆœxÜÜ"$ïSÚ¸›í+i™³¹$Ýu­í¼ü›Ñ¥îvXÀ‹,ßÎbä›7™XàáY•zEépý…‰Ë~ë[%ƒöû{@IIîâêaFÏê¹Ðçi¡¾pJÔqÙ4¿!5ÅÚ¶c¿lõ�PÇëraáš¶æš–äåW0X¯´\L쎫êW05jgÁÌ.ŠNèÜCýôI™ôHYj{Oc­õL7Ùû \ No newline at end of file diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048_key_and_rsa_pss_2048_8192_sha256_legacy_key_good_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048_key_and_rsa_pss_2048_8192_sha256_legacy_key_good_signature.sig.bin new file mode 100644 index 00000000000..9b93ce33790 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048_key_and_rsa_pss_2048_8192_sha256_legacy_key_good_signature.sig.bin @@ -0,0 +1 @@ +‘IF+˜c´¬ÃÚ¶ÉÉ@ù¯DM”@W£Ý§›$‰e“»üç�“ÁŒ5h¿¥ûÖT iÅÌlÏ@J¨ÅŸÁ:˜Q¹˜f¶‹ÒþÁq™‚� lFÚŠ°aFý 8Fˆ}}jüMÞ¿·l©˜�¡ïÙOA'â7 \ No newline at end of file diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048_key_and_rsa_pss_2048_8192_sha512_legacy_key_detects_bad_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048_key_and_rsa_pss_2048_8192_sha512_legacy_key_detects_bad_signature.sig.bin new file mode 100644 index 00000000000..47338f20b0f Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048_key_and_rsa_pss_2048_8192_sha512_legacy_key_detects_bad_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048_key_and_rsa_pss_2048_8192_sha512_legacy_key_good_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048_key_and_rsa_pss_2048_8192_sha512_legacy_key_good_signature.sig.bin new file mode 100644 index 00000000000..98b64baf257 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048_key_and_rsa_pss_2048_8192_sha512_legacy_key_good_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048_key_rejected_by_rsa_pkcs1_3072_8192_sha384.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048_key_rejected_by_rsa_pkcs1_3072_8192_sha384.sig.bin new file mode 100644 index 00000000000..d8570b3e022 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/signatures/rsa_2048_key_rejected_by_rsa_pkcs1_3072_8192_sha384.sig.bin @@ -0,0 +1 @@ +3|ºùxÖÀ·‡G• ÁÕ¨„=‡Ð�Ð5DóŽùŸuŸüÂ8 MÐ .yÝM ìdºÎªvU]ŽKó ìJu”kH¯…b� Y +Ö*r¾ì¦Ý¤ÐrUˆeÐÄš’%¨uSñ’LrKøÖSBÐeJú< ñ½ÝrûH¡™W4Ã� C*6ëqfuo+H:¥-ŠúW-HŒ÷ñâšÍZƆ SÌ>á^;¢sÂDûœ­H»ÖI'¸û1n‚EdÌêµ5ä‰E¸­’êøú¥ùöåae”§Vç…ä¤3䔇Ç;3gƘ!ù8!ó \ No newline at end of file diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072.ee.der b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072.ee.der new file mode 100644 index 00000000000..7c649a8f384 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072.spki.der b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072.spki.der new file mode 100644 index 00000000000..ad8f77e57f7 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072.spki.der differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pkcs1_2048_8192_sha256_detects_bad_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pkcs1_2048_8192_sha256_detects_bad_signature.sig.bin new file mode 100644 index 00000000000..6c83f6921f0 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pkcs1_2048_8192_sha256_detects_bad_signature.sig.bin @@ -0,0 +1,2 @@ +b:“iÿ/¢g6^ÛkfÄo¬øÍ½„îˆÃL}²Tmp �ípßI·0ýV< iøÍ‘ÆC†¸¹-ÃsôJ„À¥¹DÞȈªî–ÿ·—IººÎÖ›ÿb¥ŽRù:[¥oí¾7—9+­iQQ³,o-ùã9CR,H³pÒ¡°ÀH!'�õ¶>Ü/5åÅÏp?a&ÿ_‚›¿(œúD‘¢í`ó‹nÌç1µ¡¸*¡ÐF+D¦Ø"ÖØëèz ÞŸpò_[©ÕëÄ!‘Ü͆v™ÿ2ã6ïË´\¾Û þSŸÈHÚzEßtKí»Ò?óH ÆÊ| À:9Œ®©5žDã3¨5lRácñÑ,”«ÂaÊí]èlÂâ¬þ  )zXÏ ué�©¸q±Ýwb c“¶q”cøÞ¿¹§Ê§ûZÚ**0´ºâoYì\£åfNþ:b`2Â+lþdÍ�R’ð}2ðtQ/…"¥è“Ú +ðCt¹LîÛLôcS \ No newline at end of file diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pkcs1_2048_8192_sha256_good_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pkcs1_2048_8192_sha256_good_signature.sig.bin new file mode 100644 index 00000000000..945c3eb526d --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pkcs1_2048_8192_sha256_good_signature.sig.bin @@ -0,0 +1 @@ +Nðݺ†«y5+šyaÿk/@âúÀ_ ýõ0ìÛ¿¼ÌPM ¹­Z��ï㺨¤�ŽìA?„Vo«ƒœ´�ÕAKh• Äß½{¬�žn/ub[,ñ5™¢?Qà ^¡ÀK° g’±ª:–š¸úª$*ø{ºXÊ@ú$¸²JÅÒ¾Ž(}º8~1ª) Ý�Ë\Ѧ¦W)FHëÙY¢ãµ¸ÕØ�Ø«ô–*»)¨Pã®å½�>tðáÒ5ÂÕ^ßù]Û ªÆoÁú(;†kn3‡zJÔÑ5ulØ÷\¦N•“û‘Ö³¿WVÁ¶¼„î–¨<—b/<¶• 5âR¸7¸3`|oȯ(ý$X~!©—ɹÛ®?J×ý¯%�Ác±´œ•vezOÈÁçódÛ7A…ÏÅäšžêáœÿy_e…@·èç�Øbžå–,ÛFd,í­¥ü(C„æyÿ�+|2ÈBî×RElcL}ø’è:?:àUïÁïA*3J¸ðs,ˆ \ No newline at end of file diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pkcs1_2048_8192_sha384_detects_bad_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pkcs1_2048_8192_sha384_detects_bad_signature.sig.bin new file mode 100644 index 00000000000..c850d508d8b Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pkcs1_2048_8192_sha384_detects_bad_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pkcs1_2048_8192_sha384_good_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pkcs1_2048_8192_sha384_good_signature.sig.bin new file mode 100644 index 00000000000..2fc5e92c146 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pkcs1_2048_8192_sha384_good_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pkcs1_2048_8192_sha512_detects_bad_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pkcs1_2048_8192_sha512_detects_bad_signature.sig.bin new file mode 100644 index 00000000000..4d14ac35450 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pkcs1_2048_8192_sha512_detects_bad_signature.sig.bin @@ -0,0 +1 @@ +>•mdS ¾4â–ŀ}§‡£®€»ïk£¸6&*2­¢üMFÍ&W·ÚËÉCRj2TEQ&þƒPöΟ飩XÕ>öuñ¿Ùê\“+vÁ�I€Ð‰®Oúª#’èè�b‹þü;{î”ųªî˜fáÌŽXÚT#Å|Bü”EÍÔ™ƒAnåXεhÅç‘}/“©)²ãÐ]À_Þº¨^»]ê;ŸÎÚè·^d¼c[¹‹oaYógjµDý�Ë9�¶ô´z™^]ËËžÍQ+V+‘ó ìʉƒH}`fF_¤úÀ®0iSú0+¿½©n+úŸ¦ÙoŽ�s4QEC&±�dç}žÞàä¡2³2ȤJÔ÷mfÔ7<¬l³o�:“¸…rt¸•ñªèÞ.Y¯^'¬’îùU0S¡cÁ‡$]…šw~ =-LjTŒ¤K£äM¹�ö7)pVjç³4$ŠÄ˜Èfåû~äJ¼„¹¡½À \ No newline at end of file diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pkcs1_2048_8192_sha512_good_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pkcs1_2048_8192_sha512_good_signature.sig.bin new file mode 100644 index 00000000000..3843bf9f3b2 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pkcs1_2048_8192_sha512_good_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pkcs1_3072_8192_sha384_detects_bad_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pkcs1_3072_8192_sha384_detects_bad_signature.sig.bin new file mode 100644 index 00000000000..c850d508d8b Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pkcs1_3072_8192_sha384_detects_bad_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pkcs1_3072_8192_sha384_good_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pkcs1_3072_8192_sha384_good_signature.sig.bin new file mode 100644 index 00000000000..2fc5e92c146 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pkcs1_3072_8192_sha384_good_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pss_2048_8192_sha256_legacy_key_detects_bad_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pss_2048_8192_sha256_legacy_key_detects_bad_signature.sig.bin new file mode 100644 index 00000000000..f8836021e17 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pss_2048_8192_sha256_legacy_key_detects_bad_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pss_2048_8192_sha256_legacy_key_good_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pss_2048_8192_sha256_legacy_key_good_signature.sig.bin new file mode 100644 index 00000000000..65c1915a920 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pss_2048_8192_sha256_legacy_key_good_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pss_2048_8192_sha384_legacy_key_detects_bad_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pss_2048_8192_sha384_legacy_key_detects_bad_signature.sig.bin new file mode 100644 index 00000000000..d6abda5b7fc Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pss_2048_8192_sha384_legacy_key_detects_bad_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pss_2048_8192_sha384_legacy_key_good_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pss_2048_8192_sha384_legacy_key_good_signature.sig.bin new file mode 100644 index 00000000000..d59965ee7d0 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pss_2048_8192_sha384_legacy_key_good_signature.sig.bin @@ -0,0 +1 @@ +)®RìS õ ¾GÀ'÷fþÂì"ˆ[”ùÈîå¢/ÔÕÁ{K¯— åÍPÕWÒúZXwSËÆT}•¤~MØþM˜Ùú T î¸IÀ4bñÔATä5„™–º‹�`ì7 ßç+‰@–0»Ónm(Ëž©Kcžhts÷Áì-ºÁãè+ti¶z«DŸk0A_‡áX´®w8Y²«äü‹€o6±ÊkqÂ]锉Q\QØú!žð3p¦ p�ä÷u%ŸëwúÛ–'§»y†!ÆùZèïP¨Ó�WÚi¥G ÞE——Òñn~û4»’¶€3’µŠ>J!MÙ5»žnbø¬¯‡"NLLÓÁ*I½Qp9ä5{ š¢^}¾x3øó,žâ,/Åðååq–÷×>ßʶC±† ùD(lÔ€9â{ÆÚ?[eLzá+cܟij;¢‚öV�°md›ÃbªüÀbJ¯bÛ�ÖÛâíòµ\·U×ZÉk8Ì× \ No newline at end of file diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pss_2048_8192_sha512_legacy_key_detects_bad_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pss_2048_8192_sha512_legacy_key_detects_bad_signature.sig.bin new file mode 100644 index 00000000000..57c77012883 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pss_2048_8192_sha512_legacy_key_detects_bad_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pss_2048_8192_sha512_legacy_key_good_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pss_2048_8192_sha512_legacy_key_good_signature.sig.bin new file mode 100644 index 00000000000..bff15ff7a13 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_3072_key_and_rsa_pss_2048_8192_sha512_legacy_key_good_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096.ee.der b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096.ee.der new file mode 100644 index 00000000000..7a4b507087a Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096.spki.der b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096.spki.der new file mode 100644 index 00000000000..4991cdb72b9 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096.spki.der differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pkcs1_2048_8192_sha256_detects_bad_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pkcs1_2048_8192_sha256_detects_bad_signature.sig.bin new file mode 100644 index 00000000000..0c9e40380fc Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pkcs1_2048_8192_sha256_detects_bad_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pkcs1_2048_8192_sha256_good_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pkcs1_2048_8192_sha256_good_signature.sig.bin new file mode 100644 index 00000000000..4a46b808b11 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pkcs1_2048_8192_sha256_good_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pkcs1_2048_8192_sha384_detects_bad_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pkcs1_2048_8192_sha384_detects_bad_signature.sig.bin new file mode 100644 index 00000000000..70e65d2d245 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pkcs1_2048_8192_sha384_detects_bad_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pkcs1_2048_8192_sha384_good_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pkcs1_2048_8192_sha384_good_signature.sig.bin new file mode 100644 index 00000000000..4b54a1191bb Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pkcs1_2048_8192_sha384_good_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pkcs1_2048_8192_sha512_detects_bad_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pkcs1_2048_8192_sha512_detects_bad_signature.sig.bin new file mode 100644 index 00000000000..72026c4c731 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pkcs1_2048_8192_sha512_detects_bad_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pkcs1_2048_8192_sha512_good_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pkcs1_2048_8192_sha512_good_signature.sig.bin new file mode 100644 index 00000000000..1e49bc6919b Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pkcs1_2048_8192_sha512_good_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pkcs1_3072_8192_sha384_detects_bad_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pkcs1_3072_8192_sha384_detects_bad_signature.sig.bin new file mode 100644 index 00000000000..70e65d2d245 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pkcs1_3072_8192_sha384_detects_bad_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pkcs1_3072_8192_sha384_good_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pkcs1_3072_8192_sha384_good_signature.sig.bin new file mode 100644 index 00000000000..4b54a1191bb Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pkcs1_3072_8192_sha384_good_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pss_2048_8192_sha256_legacy_key_detects_bad_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pss_2048_8192_sha256_legacy_key_detects_bad_signature.sig.bin new file mode 100644 index 00000000000..de6da807efd Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pss_2048_8192_sha256_legacy_key_detects_bad_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pss_2048_8192_sha256_legacy_key_good_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pss_2048_8192_sha256_legacy_key_good_signature.sig.bin new file mode 100644 index 00000000000..6ece714d468 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pss_2048_8192_sha256_legacy_key_good_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pss_2048_8192_sha384_legacy_key_detects_bad_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pss_2048_8192_sha384_legacy_key_detects_bad_signature.sig.bin new file mode 100644 index 00000000000..12885c63da2 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pss_2048_8192_sha384_legacy_key_detects_bad_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pss_2048_8192_sha384_legacy_key_good_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pss_2048_8192_sha384_legacy_key_good_signature.sig.bin new file mode 100644 index 00000000000..a17fd0ae680 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pss_2048_8192_sha384_legacy_key_good_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pss_2048_8192_sha512_legacy_key_detects_bad_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pss_2048_8192_sha512_legacy_key_detects_bad_signature.sig.bin new file mode 100644 index 00000000000..79a827327c8 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pss_2048_8192_sha512_legacy_key_detects_bad_signature.sig.bin differ diff --git a/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pss_2048_8192_sha512_legacy_key_good_signature.sig.bin b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pss_2048_8192_sha512_legacy_key_good_signature.sig.bin new file mode 100644 index 00000000000..4ca84f42c28 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/signatures/rsa_4096_key_and_rsa_pss_2048_8192_sha512_legacy_key_good_signature.sig.bin @@ -0,0 +1 @@ +·†¯ìª©ª°†�<ø]6" Ç* v#±YW8I”Áû¦JªÕÈÎÄ7ãBlŽ_¬F X)§0YW1"Èv.8ªÏ8Íè»ËØOpâ~Ç+§tÌM€®‘Áî§&Rì�§Ð¿ô†'xÎ5õú#Baõt<þHqªâþ¹|rvêù`<—è8tPF=¬¹|þ±L»›�˜‡qœ¼žOî�–ÏÞËÛ¨?±{­‰Šf l”é÷\#×ÏÐBÿ ØÌGÖ›uq^]Zæ…Ÿ@˜¹�¿a-7)ž±ýErÜWT_ˆQtù5õÇ›6”ÎGýš0�.I¸-¿ 7wÆÌÑSÖÙ&z8Çz2lä‹¥n{ \ No newline at end of file diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs.rs b/vendor/rustls-webpki-legacy/tests/tls_server_certs.rs new file mode 100644 index 00000000000..7ab25d68039 --- /dev/null +++ b/vendor/rustls-webpki-legacy/tests/tls_server_certs.rs @@ -0,0 +1,338 @@ +// Copyright 2022 Joseph Birr-Pixton. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +#![cfg(all(feature = "alloc", any(feature = "ring", feature = "aws_lc_rs")))] + +use core::time::Duration; + +use pki_types::{CertificateDer, ServerName, UnixTime}; +use webpki::{anchor_from_trusted_cert, KeyUsage}; + +fn check_cert( + ee: &[u8], + ca: &[u8], + valid_names: &[&str], + invalid_names: &[&str], +) -> Result<(), webpki::Error> { + let ca_cert_der = CertificateDer::from(ca); + let anchors = [anchor_from_trusted_cert(&ca_cert_der).unwrap()]; + + let ee_der = CertificateDer::from(ee); + let time = UnixTime::since_unix_epoch(Duration::from_secs(0x1fed_f00d)); + let cert = webpki::EndEntityCert::try_from(&ee_der).unwrap(); + cert.verify_for_usage( + webpki::ALL_VERIFICATION_ALGS, + &anchors, + &[], + time, + KeyUsage::server_auth(), + None, + None, + )?; + + for valid in valid_names { + let name = ServerName::try_from(*valid).unwrap(); + assert_eq!(cert.verify_is_valid_for_subject_name(&name), Ok(())); + } + + for invalid in invalid_names { + let name = ServerName::try_from(*invalid).unwrap(); + assert_eq!( + cert.verify_is_valid_for_subject_name(&name), + Err(webpki::Error::CertNotValidForName) + ); + } + + Ok(()) +} + +// DO NOT EDIT BELOW: generated by tests/generate.py + +#[test] +fn no_name_constraints() { + let ee = include_bytes!("tls_server_certs/no_name_constraints.ee.der"); + let ca = include_bytes!("tls_server_certs/no_name_constraints.ca.der"); + assert_eq!( + check_cert(ee, ca, &["dns.example.com"], &["subject.example.com"]), + Ok(()) + ); +} + +#[test] +fn additional_dns_labels() { + let ee = include_bytes!("tls_server_certs/additional_dns_labels.ee.der"); + let ca = include_bytes!("tls_server_certs/additional_dns_labels.ca.der"); + assert_eq!( + check_cert( + ee, + ca, + &["host1.example.com", "host2.example.com"], + &["subject.example.com"] + ), + Ok(()) + ); +} + +#[test] +fn disallow_dns_san() { + let ee = include_bytes!("tls_server_certs/disallow_dns_san.ee.der"); + let ca = include_bytes!("tls_server_certs/disallow_dns_san.ca.der"); + assert_eq!( + check_cert(ee, ca, &[], &[]), + Err(webpki::Error::NameConstraintViolation) + ); +} + +#[test] +fn allow_subject_common_name() { + let ee = include_bytes!("tls_server_certs/allow_subject_common_name.ee.der"); + let ca = include_bytes!("tls_server_certs/allow_subject_common_name.ca.der"); + assert_eq!(check_cert(ee, ca, &[], &["allowed.example.com"]), Ok(())); +} + +#[test] +fn allow_dns_san() { + let ee = include_bytes!("tls_server_certs/allow_dns_san.ee.der"); + let ca = include_bytes!("tls_server_certs/allow_dns_san.ca.der"); + assert_eq!(check_cert(ee, ca, &["allowed.example.com"], &[]), Ok(())); +} + +#[test] +fn allow_dns_san_and_subject_common_name() { + let ee = include_bytes!("tls_server_certs/allow_dns_san_and_subject_common_name.ee.der"); + let ca = include_bytes!("tls_server_certs/allow_dns_san_and_subject_common_name.ca.der"); + assert_eq!( + check_cert( + ee, + ca, + &["allowed-san.example.com"], + &["allowed-cn.example.com"] + ), + Ok(()) + ); +} + +#[test] +fn disallow_dns_san_and_allow_subject_common_name() { + let ee = + include_bytes!("tls_server_certs/disallow_dns_san_and_allow_subject_common_name.ee.der"); + let ca = + include_bytes!("tls_server_certs/disallow_dns_san_and_allow_subject_common_name.ca.der"); + assert_eq!( + check_cert(ee, ca, &[], &[]), + Err(webpki::Error::NameConstraintViolation) + ); +} + +#[test] +fn we_incorrectly_ignore_name_constraints_on_name_in_subject() { + let ee = include_bytes!( + "tls_server_certs/we_incorrectly_ignore_name_constraints_on_name_in_subject.ee.der" + ); + let ca = include_bytes!( + "tls_server_certs/we_incorrectly_ignore_name_constraints_on_name_in_subject.ca.der" + ); + assert_eq!(check_cert(ee, ca, &[], &[]), Ok(())); +} + +#[test] +fn reject_constraints_on_unimplemented_names() { + let ee = include_bytes!("tls_server_certs/reject_constraints_on_unimplemented_names.ee.der"); + let ca = include_bytes!("tls_server_certs/reject_constraints_on_unimplemented_names.ca.der"); + assert_eq!( + check_cert(ee, ca, &[], &[]), + Err(webpki::Error::NameConstraintViolation) + ); +} + +#[test] +fn we_ignore_constraints_on_names_that_do_not_appear_in_cert() { + let ee = include_bytes!( + "tls_server_certs/we_ignore_constraints_on_names_that_do_not_appear_in_cert.ee.der" + ); + let ca = include_bytes!( + "tls_server_certs/we_ignore_constraints_on_names_that_do_not_appear_in_cert.ca.der" + ); + assert_eq!( + check_cert(ee, ca, &["notexample.com"], &["example.com"]), + Ok(()) + ); +} + +#[test] +fn wildcard_san_accepted_if_in_subtree() { + let ee = include_bytes!("tls_server_certs/wildcard_san_accepted_if_in_subtree.ee.der"); + let ca = include_bytes!("tls_server_certs/wildcard_san_accepted_if_in_subtree.ca.der"); + assert_eq!( + check_cert( + ee, + ca, + &["bob.example.com", "jane.example.com"], + &["example.com", "uh.oh.example.com"] + ), + Ok(()) + ); +} + +#[test] +fn wildcard_san_rejected_if_in_excluded_subtree() { + let ee = include_bytes!("tls_server_certs/wildcard_san_rejected_if_in_excluded_subtree.ee.der"); + let ca = include_bytes!("tls_server_certs/wildcard_san_rejected_if_in_excluded_subtree.ca.der"); + assert_eq!( + check_cert(ee, ca, &[], &[]), + Err(webpki::Error::NameConstraintViolation) + ); +} + +#[test] +fn ip4_address_san_rejected_if_in_excluded_subtree() { + let ee = + include_bytes!("tls_server_certs/ip4_address_san_rejected_if_in_excluded_subtree.ee.der"); + let ca = + include_bytes!("tls_server_certs/ip4_address_san_rejected_if_in_excluded_subtree.ca.der"); + assert_eq!( + check_cert(ee, ca, &[], &[]), + Err(webpki::Error::NameConstraintViolation) + ); +} + +#[test] +fn ip4_address_san_allowed_if_outside_excluded_subtree() { + let ee = include_bytes!( + "tls_server_certs/ip4_address_san_allowed_if_outside_excluded_subtree.ee.der" + ); + let ca = include_bytes!( + "tls_server_certs/ip4_address_san_allowed_if_outside_excluded_subtree.ca.der" + ); + assert_eq!(check_cert(ee, ca, &["12.34.56.78"], &[]), Ok(())); +} + +#[test] +fn ip4_address_san_rejected_if_excluded_is_sparse_cidr_mask() { + let ee = include_bytes!( + "tls_server_certs/ip4_address_san_rejected_if_excluded_is_sparse_cidr_mask.ee.der" + ); + let ca = include_bytes!( + "tls_server_certs/ip4_address_san_rejected_if_excluded_is_sparse_cidr_mask.ca.der" + ); + assert_eq!( + check_cert(ee, ca, &[], &[]), + Err(webpki::Error::InvalidNetworkMaskConstraint) + ); +} + +#[test] +fn ip4_address_san_allowed() { + let ee = include_bytes!("tls_server_certs/ip4_address_san_allowed.ee.der"); + let ca = include_bytes!("tls_server_certs/ip4_address_san_allowed.ca.der"); + assert_eq!( + check_cert( + ee, + ca, + &["12.34.56.78"], + &[ + "12.34.56.77", + "12.34.56.79", + "0000:0000:0000:0000:0000:ffff:0c22:384e" + ] + ), + Ok(()) + ); +} + +#[test] +fn ip6_address_san_rejected_if_in_excluded_subtree() { + let ee = + include_bytes!("tls_server_certs/ip6_address_san_rejected_if_in_excluded_subtree.ee.der"); + let ca = + include_bytes!("tls_server_certs/ip6_address_san_rejected_if_in_excluded_subtree.ca.der"); + assert_eq!( + check_cert(ee, ca, &[], &[]), + Err(webpki::Error::NameConstraintViolation) + ); +} + +#[test] +fn ip6_address_san_allowed_if_outside_excluded_subtree() { + let ee = include_bytes!( + "tls_server_certs/ip6_address_san_allowed_if_outside_excluded_subtree.ee.der" + ); + let ca = include_bytes!( + "tls_server_certs/ip6_address_san_allowed_if_outside_excluded_subtree.ca.der" + ); + assert_eq!( + check_cert(ee, ca, &["2001:0db9:0000:0000:0000:0000:0000:0001"], &[]), + Ok(()) + ); +} + +#[test] +fn ip6_address_san_allowed() { + let ee = include_bytes!("tls_server_certs/ip6_address_san_allowed.ee.der"); + let ca = include_bytes!("tls_server_certs/ip6_address_san_allowed.ca.der"); + assert_eq!( + check_cert( + ee, + ca, + &["2001:0db9:0000:0000:0000:0000:0000:0001"], + &["12.34.56.78"] + ), + Ok(()) + ); +} + +#[test] +fn ip46_mixed_address_san_allowed() { + let ee = include_bytes!("tls_server_certs/ip46_mixed_address_san_allowed.ee.der"); + let ca = include_bytes!("tls_server_certs/ip46_mixed_address_san_allowed.ca.der"); + assert_eq!( + check_cert( + ee, + ca, + &["12.34.56.78", "2001:0db9:0000:0000:0000:0000:0000:0001"], + &[ + "12.34.56.77", + "12.34.56.79", + "0000:0000:0000:0000:0000:ffff:0c22:384e" + ] + ), + Ok(()) + ); +} + +#[test] +fn permit_directory_name_not_implemented() { + let ee = include_bytes!("tls_server_certs/permit_directory_name_not_implemented.ee.der"); + let ca = include_bytes!("tls_server_certs/permit_directory_name_not_implemented.ca.der"); + assert_eq!( + check_cert(ee, ca, &[], &[]), + Err(webpki::Error::NameConstraintViolation) + ); +} + +#[test] +fn exclude_directory_name_not_implemented() { + let ee = include_bytes!("tls_server_certs/exclude_directory_name_not_implemented.ee.der"); + let ca = include_bytes!("tls_server_certs/exclude_directory_name_not_implemented.ca.der"); + assert_eq!( + check_cert(ee, ca, &[], &[]), + Err(webpki::Error::NameConstraintViolation) + ); +} + +#[test] +fn invalid_dns_name_matching() { + let ee = include_bytes!("tls_server_certs/invalid_dns_name_matching.ee.der"); + let ca = include_bytes!("tls_server_certs/invalid_dns_name_matching.ca.der"); + assert_eq!(check_cert(ee, ca, &["dns.example.com"], &[]), Ok(())); +} diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/additional_dns_labels.ca.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/additional_dns_labels.ca.der new file mode 100644 index 00000000000..84f3ba09424 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/additional_dns_labels.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/additional_dns_labels.ee.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/additional_dns_labels.ee.der new file mode 100644 index 00000000000..5273c9c2cd9 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/additional_dns_labels.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/allow_dns_san.ca.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/allow_dns_san.ca.der new file mode 100644 index 00000000000..bcee51a6d3a Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/allow_dns_san.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/allow_dns_san.ee.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/allow_dns_san.ee.der new file mode 100644 index 00000000000..c6f608e8285 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/allow_dns_san.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/allow_dns_san_and_disallow_subject_common_name.ca.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/allow_dns_san_and_disallow_subject_common_name.ca.der new file mode 100644 index 00000000000..793f45b6963 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/allow_dns_san_and_disallow_subject_common_name.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/allow_dns_san_and_disallow_subject_common_name.ee.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/allow_dns_san_and_disallow_subject_common_name.ee.der new file mode 100644 index 00000000000..11c8ecb21b6 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/allow_dns_san_and_disallow_subject_common_name.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/allow_dns_san_and_subject_common_name.ca.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/allow_dns_san_and_subject_common_name.ca.der new file mode 100644 index 00000000000..d7ad71a42a1 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/allow_dns_san_and_subject_common_name.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/allow_dns_san_and_subject_common_name.ee.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/allow_dns_san_and_subject_common_name.ee.der new file mode 100644 index 00000000000..0774a7a8323 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/allow_dns_san_and_subject_common_name.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/allow_subject_common_name.ca.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/allow_subject_common_name.ca.der new file mode 100644 index 00000000000..af5bdcae133 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/allow_subject_common_name.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/allow_subject_common_name.ee.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/allow_subject_common_name.ee.der new file mode 100644 index 00000000000..c21af238723 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/allow_subject_common_name.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/disallow_dns_san.ca.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/disallow_dns_san.ca.der new file mode 100644 index 00000000000..fbe4875ced6 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/disallow_dns_san.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/disallow_dns_san.ee.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/disallow_dns_san.ee.der new file mode 100644 index 00000000000..b567d7778a5 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/disallow_dns_san.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/disallow_dns_san_and_allow_subject_common_name.ca.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/disallow_dns_san_and_allow_subject_common_name.ca.der new file mode 100644 index 00000000000..e42a5c4cf7f Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/disallow_dns_san_and_allow_subject_common_name.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/disallow_dns_san_and_allow_subject_common_name.ee.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/disallow_dns_san_and_allow_subject_common_name.ee.der new file mode 100644 index 00000000000..f848f57569d Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/disallow_dns_san_and_allow_subject_common_name.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/disallow_subject_common_name.ca.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/disallow_subject_common_name.ca.der new file mode 100644 index 00000000000..c15104455fd Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/disallow_subject_common_name.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/disallow_subject_common_name.ee.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/disallow_subject_common_name.ee.der new file mode 100644 index 00000000000..b52b2ae4e00 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/disallow_subject_common_name.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/exclude_directory_name_not_implemented.ca.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/exclude_directory_name_not_implemented.ca.der new file mode 100644 index 00000000000..2d4b2b0dbb2 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/exclude_directory_name_not_implemented.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/exclude_directory_name_not_implemented.ee.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/exclude_directory_name_not_implemented.ee.der new file mode 100644 index 00000000000..98f023fc750 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/exclude_directory_name_not_implemented.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/ignore_name_constraints_on_unimplemented_names.ca.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ignore_name_constraints_on_unimplemented_names.ca.der new file mode 100644 index 00000000000..f2dcbbf1569 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ignore_name_constraints_on_unimplemented_names.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/ignore_name_constraints_on_unimplemented_names.ee.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ignore_name_constraints_on_unimplemented_names.ee.der new file mode 100644 index 00000000000..12872da8fbe Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ignore_name_constraints_on_unimplemented_names.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/invalid_dns_name_matching.ca.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/invalid_dns_name_matching.ca.der new file mode 100644 index 00000000000..f4a202a80a5 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/invalid_dns_name_matching.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/invalid_dns_name_matching.ee.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/invalid_dns_name_matching.ee.der new file mode 100644 index 00000000000..1dc3d842ac0 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/invalid_dns_name_matching.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip46_mixed_address_san_allowed.ca.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip46_mixed_address_san_allowed.ca.der new file mode 100644 index 00000000000..4c9b8013d01 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip46_mixed_address_san_allowed.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip46_mixed_address_san_allowed.ee.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip46_mixed_address_san_allowed.ee.der new file mode 100644 index 00000000000..aa03734a88b Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip46_mixed_address_san_allowed.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip4_address_san_allowed.ca.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip4_address_san_allowed.ca.der new file mode 100644 index 00000000000..fd5a08a285b Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip4_address_san_allowed.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip4_address_san_allowed.ee.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip4_address_san_allowed.ee.der new file mode 100644 index 00000000000..7e37c799d1a Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip4_address_san_allowed.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip4_address_san_allowed_if_outside_excluded_subtree.ca.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip4_address_san_allowed_if_outside_excluded_subtree.ca.der new file mode 100644 index 00000000000..e9805f45934 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip4_address_san_allowed_if_outside_excluded_subtree.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip4_address_san_allowed_if_outside_excluded_subtree.ee.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip4_address_san_allowed_if_outside_excluded_subtree.ee.der new file mode 100644 index 00000000000..821f61ff939 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip4_address_san_allowed_if_outside_excluded_subtree.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip4_address_san_rejected_if_excluded_is_sparse_cidr_mask.ca.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip4_address_san_rejected_if_excluded_is_sparse_cidr_mask.ca.der new file mode 100644 index 00000000000..8e68f771c89 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip4_address_san_rejected_if_excluded_is_sparse_cidr_mask.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip4_address_san_rejected_if_excluded_is_sparse_cidr_mask.ee.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip4_address_san_rejected_if_excluded_is_sparse_cidr_mask.ee.der new file mode 100644 index 00000000000..1e1c7f448ca Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip4_address_san_rejected_if_excluded_is_sparse_cidr_mask.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip4_address_san_rejected_if_in_excluded_subtree.ca.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip4_address_san_rejected_if_in_excluded_subtree.ca.der new file mode 100644 index 00000000000..d8349fd2c4c Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip4_address_san_rejected_if_in_excluded_subtree.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip4_address_san_rejected_if_in_excluded_subtree.ee.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip4_address_san_rejected_if_in_excluded_subtree.ee.der new file mode 100644 index 00000000000..4347464de2a Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip4_address_san_rejected_if_in_excluded_subtree.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip6_address_san_allowed.ca.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip6_address_san_allowed.ca.der new file mode 100644 index 00000000000..6718d49d476 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip6_address_san_allowed.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip6_address_san_allowed.ee.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip6_address_san_allowed.ee.der new file mode 100644 index 00000000000..63c5f126d1b Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip6_address_san_allowed.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip6_address_san_allowed_if_outside_excluded_subtree.ca.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip6_address_san_allowed_if_outside_excluded_subtree.ca.der new file mode 100644 index 00000000000..75fa07b2654 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip6_address_san_allowed_if_outside_excluded_subtree.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip6_address_san_allowed_if_outside_excluded_subtree.ee.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip6_address_san_allowed_if_outside_excluded_subtree.ee.der new file mode 100644 index 00000000000..65f727a8e21 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip6_address_san_allowed_if_outside_excluded_subtree.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip6_address_san_rejected_if_in_excluded_subtree.ca.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip6_address_san_rejected_if_in_excluded_subtree.ca.der new file mode 100644 index 00000000000..9d61ffcf5bd Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip6_address_san_rejected_if_in_excluded_subtree.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip6_address_san_rejected_if_in_excluded_subtree.ee.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip6_address_san_rejected_if_in_excluded_subtree.ee.der new file mode 100644 index 00000000000..d6cc885c425 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/ip6_address_san_rejected_if_in_excluded_subtree.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/no_name_constraints.ca.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/no_name_constraints.ca.der new file mode 100644 index 00000000000..386a34b6241 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/no_name_constraints.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/no_name_constraints.ee.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/no_name_constraints.ee.der new file mode 100644 index 00000000000..abc012d84f7 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/no_name_constraints.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/permit_directory_name_not_implemented.ca.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/permit_directory_name_not_implemented.ca.der new file mode 100644 index 00000000000..269a2190982 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/permit_directory_name_not_implemented.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/permit_directory_name_not_implemented.ee.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/permit_directory_name_not_implemented.ee.der new file mode 100644 index 00000000000..6c022cd217a Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/permit_directory_name_not_implemented.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/reject_constraints_on_unimplemented_names.ca.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/reject_constraints_on_unimplemented_names.ca.der new file mode 100644 index 00000000000..0a7c82eba67 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/reject_constraints_on_unimplemented_names.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/reject_constraints_on_unimplemented_names.ee.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/reject_constraints_on_unimplemented_names.ee.der new file mode 100644 index 00000000000..8beb7a01f10 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/reject_constraints_on_unimplemented_names.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/reject_unimplemented_name_constraints.ca.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/reject_unimplemented_name_constraints.ca.der new file mode 100644 index 00000000000..851f0068675 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/reject_unimplemented_name_constraints.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/reject_unimplemented_name_constraints.ee.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/reject_unimplemented_name_constraints.ee.der new file mode 100644 index 00000000000..13b6a89a2f3 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/reject_unimplemented_name_constraints.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/we_ignore_constraints_on_names_that_do_not_appear_in_cert.ca.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/we_ignore_constraints_on_names_that_do_not_appear_in_cert.ca.der new file mode 100644 index 00000000000..11007c15198 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/we_ignore_constraints_on_names_that_do_not_appear_in_cert.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/we_ignore_constraints_on_names_that_do_not_appear_in_cert.ee.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/we_ignore_constraints_on_names_that_do_not_appear_in_cert.ee.der new file mode 100644 index 00000000000..db11778b2e9 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/we_ignore_constraints_on_names_that_do_not_appear_in_cert.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/we_incorrectly_ignore_name_constraints_on_name_in_subject.ca.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/we_incorrectly_ignore_name_constraints_on_name_in_subject.ca.der new file mode 100644 index 00000000000..b83a86fa67e Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/we_incorrectly_ignore_name_constraints_on_name_in_subject.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/we_incorrectly_ignore_name_constraints_on_name_in_subject.ee.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/we_incorrectly_ignore_name_constraints_on_name_in_subject.ee.der new file mode 100644 index 00000000000..74a6f9a96f7 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/we_incorrectly_ignore_name_constraints_on_name_in_subject.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/wildcard_san_accepted_if_in_subtree.ca.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/wildcard_san_accepted_if_in_subtree.ca.der new file mode 100644 index 00000000000..17526f9df40 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/wildcard_san_accepted_if_in_subtree.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/wildcard_san_accepted_if_in_subtree.ee.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/wildcard_san_accepted_if_in_subtree.ee.der new file mode 100644 index 00000000000..2c9518bd6ae Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/wildcard_san_accepted_if_in_subtree.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/wildcard_san_rejected_if_in_excluded_subtree.ca.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/wildcard_san_rejected_if_in_excluded_subtree.ca.der new file mode 100644 index 00000000000..d48c1f444d5 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/wildcard_san_rejected_if_in_excluded_subtree.ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/tls_server_certs/wildcard_san_rejected_if_in_excluded_subtree.ee.der b/vendor/rustls-webpki-legacy/tests/tls_server_certs/wildcard_san_rejected_if_in_excluded_subtree.ee.der new file mode 100644 index 00000000000..2972e5575fc Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/tls_server_certs/wildcard_san_rejected_if_in_excluded_subtree.ee.der differ diff --git a/vendor/rustls-webpki-legacy/tests/wpt/ca.der b/vendor/rustls-webpki-legacy/tests/wpt/ca.der new file mode 100644 index 00000000000..f7d00160116 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/wpt/ca.der differ diff --git a/vendor/rustls-webpki-legacy/tests/wpt/ee.der b/vendor/rustls-webpki-legacy/tests/wpt/ee.der new file mode 100644 index 00000000000..7160db5aa86 Binary files /dev/null and b/vendor/rustls-webpki-legacy/tests/wpt/ee.der differ diff --git a/vendor/rustls-webpki-legacy/third-party/bettertls/LICENSE b/vendor/rustls-webpki-legacy/third-party/bettertls/LICENSE new file mode 100644 index 00000000000..4947287f7b5 --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/bettertls/LICENSE @@ -0,0 +1,177 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/vendor/rustls-webpki-legacy/third-party/bettertls/README.md b/vendor/rustls-webpki-legacy/third-party/bettertls/README.md new file mode 100644 index 00000000000..8ace11535ee --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/bettertls/README.md @@ -0,0 +1,23 @@ +# BetterTLS Test Suite + +Generated using the Netflix [bettertls] project. + +[bettertls]: https://github.com/Netflix/bettertls + +## Test Data + +To regenerate vendored test data: + +1. Install Go +2. Generate the JSON testdata export: + +```bash +GOBIN=$PWD go install github.com/Netflix/bettertls/test-suites/cmd/bettertls@latest +./bettertls export-tests --out ./bettertls.tests.json +``` + +3. Bzip2 compress it: + +```bash +bzip2 ./bettertls.tests.json +``` diff --git a/vendor/rustls-webpki-legacy/third-party/bettertls/bettertls.tests.json.bz2 b/vendor/rustls-webpki-legacy/third-party/bettertls/bettertls.tests.json.bz2 new file mode 100644 index 00000000000..db066c86efd Binary files /dev/null and b/vendor/rustls-webpki-legacy/third-party/bettertls/bettertls.tests.json.bz2 differ diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/LICENSE b/vendor/rustls-webpki-legacy/third-party/chromium/LICENSE new file mode 100644 index 00000000000..a32e00ce6be --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/LICENSE @@ -0,0 +1,27 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/README b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/README new file mode 100644 index 00000000000..2acf6e62a02 --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/README @@ -0,0 +1,35 @@ +This directory contains test data for testing net::VerifySignedData(). + +When adding or changing test data, run the script + $ python annotate_test_data.py + +This script will apply a uniform formatting. For instance it will add a +comment showing what the parsed ASN.1 looks like, and reformat the base64 to +have consistent line breaks. + +The general format for the test files is as follows: + + + + + -----BEGIN PUBLIC KEY----- + + -----END PUBLIC KEY----- + + -----BEGIN ALGORITHM----- + + -----END ALGORITHM----- + + -----BEGIN DATA----- + + -----END DATA----- + + -----BEGIN SIGNATURE----- + + -----END SIGNATURE----- + + +Comments for a PEM block should be placed immediately below that block. +The script will also insert a comment after the block describing its parsed +ASN.1 structure (your extra comments need to be above the script-generated +comments or they will be stripped). diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-prime256v1-sha512-spki-params-null.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-prime256v1-sha512-spki-params-null.pem new file mode 100644 index 00000000000..fbb4c64a1fc --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-prime256v1-sha512-spki-params-null.pem @@ -0,0 +1,45 @@ +This is the same test as ecdsa-prime256v1-sha512.pem except the public key's +algorithm has been tampered with. The parameters for ecPublicKey should be a +namedCurve, but here they have been replaced by NULL. + + + +-----BEGIN PUBLIC KEY----- +MFEwCwYHKoZIzj0CAQUAA0IABJywz2kwPa/HYdTkaHtOzwOebTSrlkr4CBDY1VikqNb3LVEjOhe +IkgqG7gihlix576MX+3h54pfa0hRtuZX6HHg= +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=2 l= 81 cons: SEQUENCE + 2:d=1 hl=2 l= 11 cons: SEQUENCE + 4:d=2 hl=2 l= 7 prim: OBJECT :id-ecPublicKey + 13:d=2 hl=2 l= 0 prim: NULL + 15:d=1 hl=2 l= 66 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MAoGCCqGSM49BAME +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 10 cons: SEQUENCE + 2:d=1 hl=2 l= 8 prim: OBJECT :ecdsa-with-SHA512 + + + +-----BEGIN DATA----- +bikyFTMBpO72gOZCiSmtrpiMEI1mijH/VdBImUfXX/gaRr+J6E1kAfAjvm6HaI+814TXhcqEZzV +SSstS0ARSyEBApHnnzDMJNkQdk7vnIqlDKm4dsRK1yUA7ECcssTR/1hnUY/ep0iOtdv3gbYpog1 +APuEMjWr/5jiQb37VTjD4= +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A0cAMEQCIEufkeQoUocmGh0ckjz2Gc1SwXXP5/G+YKUljGEDSLo9AiAoxF+QHXHEGymGOOwNaoX +X/LDDO7/sWpyBCEa2OSiahA== +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=2 l= 71 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-prime256v1-sha512-unused-bits-signature.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-prime256v1-sha512-unused-bits-signature.pem new file mode 100644 index 00000000000..19956dd50d5 --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-prime256v1-sha512-unused-bits-signature.pem @@ -0,0 +1,53 @@ +This is the same test as ecdsa-prime256v1-sha512.pem, however the SIGNATURE has +been changed to a (valid) BIT STRING containing two unused bits. + +Note that the last two bits of the original signature were 0, so the +DER-encoded bytes portion of the mutated BIT STRING remains the same. All that +changes is the octet at the start which indicates the number of unused bits. + +In other words SIGNATURE changes from: + 03 47 00 30 ... 84 +To: + 03 47 02 30 ... 84 + + + +-----BEGIN PUBLIC KEY----- +MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEnLDPaTA9r8dh1ORoe07PA55tNKuWSvgIENjVWKS +o1vctUSM6F4iSCobuCKGWLHnvoxf7eHnil9rSFG25lfoceA== +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=2 l= 89 cons: SEQUENCE + 2:d=1 hl=2 l= 19 cons: SEQUENCE + 4:d=2 hl=2 l= 7 prim: OBJECT :id-ecPublicKey + 13:d=2 hl=2 l= 8 prim: OBJECT :prime256v1 + 23:d=1 hl=2 l= 66 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MAoGCCqGSM49BAME +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 10 cons: SEQUENCE + 2:d=1 hl=2 l= 8 prim: OBJECT :ecdsa-with-SHA512 + + + +-----BEGIN DATA----- +bikyFTMBpO72gOZCiSmtrpiMEI1mijH/VdBImUfXX/gaRr+J6E1kAfAjvm6HaI+814TXhcqEZzV +SSstS0ARSyEBApHnnzDMJNkQdk7vnIqlDKm4dsRK1yUA7ECcssTR/1hnUY/ep0iOtdv3gbYpog1 +APuEMjWr/5jiQb37VTjD4= +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A0cCMEQCIEufkeQoUocmGh0ckjz2Gc1SwXXP5/G+YKUljGEDSLo9AiAoxF+QHXHEGymGOOwNaoX +X/LDDO7/sWpyBCEa2OSiahA== +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=2 l= 71 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-prime256v1-sha512-using-ecdh-key.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-prime256v1-sha512-using-ecdh-key.pem new file mode 100644 index 00000000000..165a5b98b30 --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-prime256v1-sha512-using-ecdh-key.pem @@ -0,0 +1,48 @@ +This uses the same test data as ecdsa-prime256v1-sha512.pem, HOWEVER the +algorithm OID for the public key has been changed from id-ecPublicKey +(1.2.840.10045.2.1) to id-ecDH (1.3.132.1.12) + +This test should fail because the public key's algorithm does not match that of +the signature algorithm. + + + +-----BEGIN PUBLIC KEY----- +MFcwEQYFK4EEAQwGCCqGSM49AwEHA0IABJywz2kwPa/HYdTkaHtOzwOebTSrlkr4CBDY1VikqNb +3LVEjOheIkgqG7gihlix576MX+3h54pfa0hRtuZX6HHg= +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=2 l= 87 cons: SEQUENCE + 2:d=1 hl=2 l= 17 cons: SEQUENCE + 4:d=2 hl=2 l= 5 prim: OBJECT :1.3.132.1.12 + 11:d=2 hl=2 l= 8 prim: OBJECT :prime256v1 + 21:d=1 hl=2 l= 66 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MAoGCCqGSM49BAME +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 10 cons: SEQUENCE + 2:d=1 hl=2 l= 8 prim: OBJECT :ecdsa-with-SHA512 + + + +-----BEGIN DATA----- +bikyFTMBpO72gOZCiSmtrpiMEI1mijH/VdBImUfXX/gaRr+J6E1kAfAjvm6HaI+814TXhcqEZzV +SSstS0ARSyEBApHnnzDMJNkQdk7vnIqlDKm4dsRK1yUA7ECcssTR/1hnUY/ep0iOtdv3gbYpog1 +APuEMjWr/5jiQb37VTjD4= +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A0cAMEQCIEufkeQoUocmGh0ckjz2Gc1SwXXP5/G+YKUljGEDSLo9AiAoxF+QHXHEGymGOOwNaoX +X/LDDO7/sWpyBCEa2OSiahA== +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=2 l= 71 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-prime256v1-sha512-using-ecmqv-key.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-prime256v1-sha512-using-ecmqv-key.pem new file mode 100644 index 00000000000..039b5d1e6c0 --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-prime256v1-sha512-using-ecmqv-key.pem @@ -0,0 +1,48 @@ +This uses the same test data as ecdsa-prime256v1-sha512.pem, HOWEVER the +algorithm OID for the public key has been changed from id-ecPublicKey +(1.2.840.10045.2.1) to id-ecMQV (1.3.132.1.13) + +This test should fail because the public key's algorithm does not match that of +the signature algorithm. + + + +-----BEGIN PUBLIC KEY----- +MFcwEQYFK4EEAQ0GCCqGSM49AwEHA0IABJywz2kwPa/HYdTkaHtOzwOebTSrlkr4CBDY1VikqNb +3LVEjOheIkgqG7gihlix576MX+3h54pfa0hRtuZX6HHg= +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=2 l= 87 cons: SEQUENCE + 2:d=1 hl=2 l= 17 cons: SEQUENCE + 4:d=2 hl=2 l= 5 prim: OBJECT :1.3.132.1.13 + 11:d=2 hl=2 l= 8 prim: OBJECT :prime256v1 + 21:d=1 hl=2 l= 66 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MAoGCCqGSM49BAME +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 10 cons: SEQUENCE + 2:d=1 hl=2 l= 8 prim: OBJECT :ecdsa-with-SHA512 + + + +-----BEGIN DATA----- +bikyFTMBpO72gOZCiSmtrpiMEI1mijH/VdBImUfXX/gaRr+J6E1kAfAjvm6HaI+814TXhcqEZzV +SSstS0ARSyEBApHnnzDMJNkQdk7vnIqlDKm4dsRK1yUA7ECcssTR/1hnUY/ep0iOtdv3gbYpog1 +APuEMjWr/5jiQb37VTjD4= +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A0cAMEQCIEufkeQoUocmGh0ckjz2Gc1SwXXP5/G+YKUljGEDSLo9AiAoxF+QHXHEGymGOOwNaoX +X/LDDO7/sWpyBCEa2OSiahA== +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=2 l= 71 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-prime256v1-sha512-using-rsa-algorithm.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-prime256v1-sha512-using-rsa-algorithm.pem new file mode 100644 index 00000000000..a0a9cf9103b --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-prime256v1-sha512-using-rsa-algorithm.pem @@ -0,0 +1,48 @@ +This test specified a valid ECDSA signature and EC key (the same as ecdsa-prime256v1-sha512.pem) + +The problem however is the signature algorithm is indicated as being RSA PKCS#1 v1.5. + +Signature verification consequently should fail. + + + +-----BEGIN PUBLIC KEY----- +MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEnLDPaTA9r8dh1ORoe07PA55tNKuWSvgIENjVWKS +o1vctUSM6F4iSCobuCKGWLHnvoxf7eHnil9rSFG25lfoceA== +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=2 l= 89 cons: SEQUENCE + 2:d=1 hl=2 l= 19 cons: SEQUENCE + 4:d=2 hl=2 l= 7 prim: OBJECT :id-ecPublicKey + 13:d=2 hl=2 l= 8 prim: OBJECT :prime256v1 + 23:d=1 hl=2 l= 66 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MA0GCSqGSIb3DQEBDQUA +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 13 cons: SEQUENCE + 2:d=1 hl=2 l= 9 prim: OBJECT :sha512WithRSAEncryption + 13:d=1 hl=2 l= 0 prim: NULL + + + +-----BEGIN DATA----- +bikyFTMBpO72gOZCiSmtrpiMEI1mijH/VdBImUfXX/gaRr+J6E1kAfAjvm6HaI+814TXhcqEZzV +SSstS0ARSyEBApHnnzDMJNkQdk7vnIqlDKm4dsRK1yUA7ECcssTR/1hnUY/ep0iOtdv3gbYpog1 +APuEMjWr/5jiQb37VTjD4= +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A0cAMEQCIEufkeQoUocmGh0ckjz2Gc1SwXXP5/G+YKUljGEDSLo9AiAoxF+QHXHEGymGOOwNaoX +X/LDDO7/sWpyBCEa2OSiahA== +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=2 l= 71 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-prime256v1-sha512-wrong-signature-format.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-prime256v1-sha512-wrong-signature-format.pem new file mode 100644 index 00000000000..4421f0b8efb --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-prime256v1-sha512-wrong-signature-format.pem @@ -0,0 +1,47 @@ +This is the same as ecdsa-prime256v1-sha512.pem, except the signature is wrong. + +Rather than encoding the signature into a DER-encoded Ecdsa-Sig-Value, it is a +concatenation of the r and s values. This is the format that WebCrypto uses for +ECDSA signature, but not what is used for digital signatures. + + + +-----BEGIN PUBLIC KEY----- +MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEnLDPaTA9r8dh1ORoe07PA55tNKuWSvgIENjVWKS +o1vctUSM6F4iSCobuCKGWLHnvoxf7eHnil9rSFG25lfoceA== +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=2 l= 89 cons: SEQUENCE + 2:d=1 hl=2 l= 19 cons: SEQUENCE + 4:d=2 hl=2 l= 7 prim: OBJECT :id-ecPublicKey + 13:d=2 hl=2 l= 8 prim: OBJECT :prime256v1 + 23:d=1 hl=2 l= 66 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MAoGCCqGSM49BAME +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 10 cons: SEQUENCE + 2:d=1 hl=2 l= 8 prim: OBJECT :ecdsa-with-SHA512 + + + +-----BEGIN DATA----- +bikyFTMBpO72gOZCiSmtrpiMEI1mijH/VdBImUfXX/gaRr+J6E1kAfAjvm6HaI+814TXhcqEZzV +SSstS0ARSyEBApHnnzDMJNkQdk7vnIqlDKm4dsRK1yUA7ECcssTR/1hnUY/ep0iOtdv3gbYpog1 +APuEMjWr/5jiQb37VTjD4= +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A0EAS5+R5ChShyYaHRySPPYZzVLBdc/n8b5gpSWMYQNIuj0oxF+QHXHEGymGOOwNaoXX/LDDO7/ +sWpyBCEa2OSiahA== +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=2 l= 65 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-prime256v1-sha512.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-prime256v1-sha512.pem new file mode 100644 index 00000000000..5214b2b9016 --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-prime256v1-sha512.pem @@ -0,0 +1,49 @@ +The key, message, and signature come from: +http://csrc.nist.gov/groups/STM/cavp/documents/dss/186-3ecdsatestvectors.zip (SigVer.rsp) + +The algorithm DER was synthesized to match, and the signature (provided as an r +and s tuple) was encoded into a Ecdsa-Sig-Value and then a BIT STRING. + +It uses ECDSA verification, using curve prime256v1 and SHA-512 + + + +-----BEGIN PUBLIC KEY----- +MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEnLDPaTA9r8dh1ORoe07PA55tNKuWSvgIENjVWKS +o1vctUSM6F4iSCobuCKGWLHnvoxf7eHnil9rSFG25lfoceA== +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=2 l= 89 cons: SEQUENCE + 2:d=1 hl=2 l= 19 cons: SEQUENCE + 4:d=2 hl=2 l= 7 prim: OBJECT :id-ecPublicKey + 13:d=2 hl=2 l= 8 prim: OBJECT :prime256v1 + 23:d=1 hl=2 l= 66 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MAoGCCqGSM49BAME +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 10 cons: SEQUENCE + 2:d=1 hl=2 l= 8 prim: OBJECT :ecdsa-with-SHA512 + + + +-----BEGIN DATA----- +bikyFTMBpO72gOZCiSmtrpiMEI1mijH/VdBImUfXX/gaRr+J6E1kAfAjvm6HaI+814TXhcqEZzV +SSstS0ARSyEBApHnnzDMJNkQdk7vnIqlDKm4dsRK1yUA7ECcssTR/1hnUY/ep0iOtdv3gbYpog1 +APuEMjWr/5jiQb37VTjD4= +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A0cAMEQCIEufkeQoUocmGh0ckjz2Gc1SwXXP5/G+YKUljGEDSLo9AiAoxF+QHXHEGymGOOwNaoX +X/LDDO7/sWpyBCEa2OSiahA== +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=2 l= 71 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-secp384r1-sha256-corrupted-data.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-secp384r1-sha256-corrupted-data.pem new file mode 100644 index 00000000000..b0a781e65d5 --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-secp384r1-sha256-corrupted-data.pem @@ -0,0 +1,53 @@ +This is the same test as ecdsa-secp384r1-sha256.pem, except the DATA section +has been corrupted. The third byte has been set to 0. + +This signature should NOT verify successfully. + + + +-----BEGIN PUBLIC KEY----- +MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEXFhBi+WKXuxeK9yCbC9jqEchwjCNsQ4RXAsJ07oHZ+Q +qz55cNIY5BAhcQ0QYY5jv9BimGL9SuhUuOSuS3Pn9rrsIFGcFsihy4kDr8rq5+7RbN8bV057gW5 +emYjLtvDsQ +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=2 l= 118 cons: SEQUENCE + 2:d=1 hl=2 l= 16 cons: SEQUENCE + 4:d=2 hl=2 l= 7 prim: OBJECT :id-ecPublicKey + 13:d=2 hl=2 l= 5 prim: OBJECT :secp384r1 + 20:d=1 hl=2 l= 98 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MAoGCCqGSM49BAMC +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 10 cons: SEQUENCE + 2:d=1 hl=2 l= 8 prim: OBJECT :ecdsa-with-SHA256 + + + +-----BEGIN DATA----- +MIIA6KADAgECAgkAtUVxft6/Vc0wCgYIKoZIzj0EAwIwbzELMAkGA1UEBhMCQVUxEzARBgNVBAg +MClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEMMAoGA1UEAw +wDYWhhMRowGAYJKoZIhvcNAQkBFgtzdXBAZm9vLmNvbTAeFw0xNTA3MDIwMDM4MTRaFw0xNjA3M +DEwMDM4MTRaMG8xCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJ +bnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxDDAKBgNVBAMMA2FoYTEaMBgGCSqGSIb3DQEJARYLc3V +wQGZvby5jb20wdjAQBgcqhkjOPQIBBgUrgQQAIgNiAARcWEGL5Ype7F4r3IJsL2OoRyHCMI2xDh +FcCwnTugdn5CrPnlw0hjkECFxDRBhjmO/0GKYYv1K6FS45K5Lc+f2uuwgUZwWyKHLiQOvyurn7t +Fs3xtXTnuBbl6ZiMu28OxCjUDBOMB0GA1UdDgQWBBR6nDgtPalG2JvSlWzdGRCi/Cu7NjAfBgNV +HSMEGDAWgBR6nDgtPalG2JvSlWzdGRCi/Cu7NjAMBgNVHRMEBTADAQH/ +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A2kAMGYCMQCDwMSZVJZ8qThiNTV7VX57m8fdNnNS6cXIjRYoh4SozlYWmWGh87nhmJJCeD16jVM +CMQDkroAY8oNi8RxLUor+LozhhVgu24tu6lcp4MP8H3Zy8bBea5HerAd1AqJp3Ox7KDU= +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=2 l= 105 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-secp384r1-sha256.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-secp384r1-sha256.pem new file mode 100644 index 00000000000..8f5b947ea9f --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-secp384r1-sha256.pem @@ -0,0 +1,84 @@ +This test data was produced by creating a self-signed EC cert using OpenSSL, +and then extracting the relevant fields. + +It uses ECDSA with curve secp384r1 an SHA-256. + +(1) Generate self-signed certificate + + openssl ecparam -out ec_key.pem -name secp384r1 -genkey + openssl req -new -key ec_key.pem -x509 -nodes -days 365 -out cert.pem + +(2) Extract public key + + openssl x509 -in cert.pem -pubkey -noout > pubkey.pem + cat pubkey.pem + +(3) Extract signed data (tbsCertificate) + + openssl asn1parse -in cert.pem -out tbs -noout -strparse 4 + base64 tbs + +(4) Extract signature algorithm + + # Find the offset of the signature algorithm near the end (496 in this case) + openssl asn1parse -in cert.pem + + openssl asn1parse -in cert.pem -out alg -noout -strparse 496 + base64 alg + +(5) Extract the signature + + # Find the final offset of BIT STRING (508 in this case) + openssl asn1parse -in cert.pem + + openssl asn1parse -in cert.pem -out sig -noout -strparse 508 + base64 sig + + + +-----BEGIN PUBLIC KEY----- +MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEXFhBi+WKXuxeK9yCbC9jqEchwjCNsQ4RXAsJ07oHZ+Q +qz55cNIY5BAhcQ0QYY5jv9BimGL9SuhUuOSuS3Pn9rrsIFGcFsihy4kDr8rq5+7RbN8bV057gW5 +emYjLtvDsQ +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=2 l= 118 cons: SEQUENCE + 2:d=1 hl=2 l= 16 cons: SEQUENCE + 4:d=2 hl=2 l= 7 prim: OBJECT :id-ecPublicKey + 13:d=2 hl=2 l= 5 prim: OBJECT :secp384r1 + 20:d=1 hl=2 l= 98 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MAoGCCqGSM49BAMC +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 10 cons: SEQUENCE + 2:d=1 hl=2 l= 8 prim: OBJECT :ecdsa-with-SHA256 + + + +-----BEGIN DATA----- +MIIB6KADAgECAgkAtUVxft6/Vc0wCgYIKoZIzj0EAwIwbzELMAkGA1UEBhMCQVUxEzARBgNVBAg +MClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEMMAoGA1UEAw +wDYWhhMRowGAYJKoZIhvcNAQkBFgtzdXBAZm9vLmNvbTAeFw0xNTA3MDIwMDM4MTRaFw0xNjA3M +DEwMDM4MTRaMG8xCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJ +bnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxDDAKBgNVBAMMA2FoYTEaMBgGCSqGSIb3DQEJARYLc3V +wQGZvby5jb20wdjAQBgcqhkjOPQIBBgUrgQQAIgNiAARcWEGL5Ype7F4r3IJsL2OoRyHCMI2xDh +FcCwnTugdn5CrPnlw0hjkECFxDRBhjmO/0GKYYv1K6FS45K5Lc+f2uuwgUZwWyKHLiQOvyurn7t +Fs3xtXTnuBbl6ZiMu28OxCjUDBOMB0GA1UdDgQWBBR6nDgtPalG2JvSlWzdGRCi/Cu7NjAfBgNV +HSMEGDAWgBR6nDgtPalG2JvSlWzdGRCi/Cu7NjAMBgNVHRMEBTADAQH/ +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A2kAMGYCMQCDwMSZVJZ8qThiNTV7VX57m8fdNnNS6cXIjRYoh4SozlYWmWGh87nhmJJCeD16jVM +CMQDkroAY8oNi8RxLUor+LozhhVgu24tu6lcp4MP8H3Zy8bBea5HerAd1AqJp3Ox7KDU= +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=2 l= 105 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-using-rsa-key.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-using-rsa-key.pem new file mode 100644 index 00000000000..95fe33d97d9 --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ecdsa-using-rsa-key.pem @@ -0,0 +1,51 @@ +This test specifies an ECDSA signature algorithm (and a valid ecdsa signature), +HOWEVER it provides an RSA key. Verification should fail. + + + +-----BEGIN PUBLIC KEY----- +MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQClbkoOcBAXWJpRh9x+qEHRVvLsDjatUqRN/rH +mH3rZkdjFEFb/7bFitMDyg6EqiKOU3/Umq3KRy7MHzqv84LHf1c2VCAltWyuLbfXWce9jd8CSHL +I8Jwpw4lmOb/idGfEFrMLT8Ms18pKA4Thrb2TE7yLh4fINDOjP+yJJvZohNwIDAQAB +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=3 l= 159 cons: SEQUENCE + 3:d=1 hl=2 l= 13 cons: SEQUENCE + 5:d=2 hl=2 l= 9 prim: OBJECT :rsaEncryption + 16:d=2 hl=2 l= 0 prim: NULL + 18:d=1 hl=3 l= 141 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MAoGCCqGSM49BAMC +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 10 cons: SEQUENCE + 2:d=1 hl=2 l= 8 prim: OBJECT :ecdsa-with-SHA256 + + + +-----BEGIN DATA----- +MIIB6KADAgECAgkAtUVxft6/Vc0wCgYIKoZIzj0EAwIwbzELMAkGA1UEBhMCQVUxEzARBgNVBAg +MClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEMMAoGA1UEAw +wDYWhhMRowGAYJKoZIhvcNAQkBFgtzdXBAZm9vLmNvbTAeFw0xNTA3MDIwMDM4MTRaFw0xNjA3M +DEwMDM4MTRaMG8xCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJ +bnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxDDAKBgNVBAMMA2FoYTEaMBgGCSqGSIb3DQEJARYLc3V +wQGZvby5jb20wdjAQBgcqhkjOPQIBBgUrgQQAIgNiAARcWEGL5Ype7F4r3IJsL2OoRyHCMI2xDh +FcCwnTugdn5CrPnlw0hjkECFxDRBhjmO/0GKYYv1K6FS45K5Lc+f2uuwgUZwWyKHLiQOvyurn7t +Fs3xtXTnuBbl6ZiMu28OxCjUDBOMB0GA1UdDgQWBBR6nDgtPalG2JvSlWzdGRCi/Cu7NjAfBgNV +HSMEGDAWgBR6nDgtPalG2JvSlWzdGRCi/Cu7NjAMBgNVHRMEBTADAQH/ +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A2kAMGYCMQCDwMSZVJZ8qThiNTV7VX57m8fdNnNS6cXIjRYoh4SozlYWmWGh87nhmJJCeD16jVM +CMQDkroAY8oNi8RxLUor+LozhhVgu24tu6lcp4MP8H3Zy8bBea5HerAd1AqJp3Ox7KDU= +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=2 l= 105 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/ecdsa-prime256v1-sha256-compressed.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/ecdsa-prime256v1-sha256-compressed.pem new file mode 100644 index 00000000000..d5b14737909 --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/ecdsa-prime256v1-sha256-compressed.pem @@ -0,0 +1,37 @@ +Copy of the uncompressed version, but with the public key compressed manually +using `openssl ec`. + + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=2 l= 57 cons: SEQUENCE + 2:d=1 hl=2 l= 19 cons: SEQUENCE + 4:d=2 hl=2 l= 7 prim: OBJECT :id-ecPublicKey + 13:d=2 hl=2 l= 8 prim: OBJECT :prime256v1 + 23:d=1 hl=2 l= 34 prim: BIT STRING + +-----BEGIN PUBLIC KEY----- +MDkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDIgADBKrsc2NXJvIT+4qeZNo7hjLkFJWpRNAEW1IuunJ +A+tU= +-----END PUBLIC KEY----- + + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 10 cons: SEQUENCE + 2:d=1 hl=2 l= 8 prim: OBJECT :ecdsa-with-SHA256 + +-----BEGIN ALGORITHM----- +MAoGCCqGSM49BAMC +-----END ALGORITHM----- + +-----BEGIN DATA----- +MTIzNDAw +-----END DATA----- + + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=2 l= 73 prim: BIT STRING + +-----BEGIN SIGNATURE----- +A0kAMEYCIQCo6hUMuAEl1zgcTB8dqOneJxH5kXBgQGpz15BFGeUTiAIhAPOrn6aL1HlzpzstQEg +MK6UMIsnXbsIXJXKIKTKFRJuG +-----END SIGNATURE----- diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/ecdsa-prime256v1-sha256-spki-inside-spki.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/ecdsa-prime256v1-sha256-spki-inside-spki.pem new file mode 100644 index 00000000000..7924b45029a --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/ecdsa-prime256v1-sha256-spki-inside-spki.pem @@ -0,0 +1,36 @@ +This is a copy of ecdsa-prime256v1-sha256.pem, but +with the SPKI BIT STRING being the SPKI again. + + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=2 l= 115 cons: SEQUENCE + 2:d=1 hl=2 l= 19 cons: SEQUENCE + 4:d=2 hl=2 l= 7 prim: OBJECT :id-ecPublicKey + 13:d=2 hl=2 l= 8 prim: OBJECT :prime256v1 + 23:d=1 hl=2 l= 92 prim: BIT STRING + +-----BEGIN PUBLIC KEY----- +MHMwEwYHKoZIzj0CAQYIKoZIzj0DAQcDXAAwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQEqux +zY1cm8hP7ip5k2juGMuQUlalE0ARbUi66ckD61YfZMVeYqqOlugF3V4fO0F6q97Tgn8gdbRqlRu +g2XVJd +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 10 cons: SEQUENCE + 2:d=1 hl=2 l= 8 prim: OBJECT :ecdsa-with-SHA256 + +-----BEGIN ALGORITHM----- +MAoGCCqGSM49BAMC +-----END ALGORITHM----- + +-----BEGIN DATA----- +MTIzNDAw +-----END DATA----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=2 l= 73 prim: BIT STRING + +-----BEGIN SIGNATURE----- +A0kAMEYCIQCo6hUMuAEl1zgcTB8dqOneJxH5kXBgQGpz15BFGeUTiAIhAPOrn6aL1HlzpzstQEg +MK6UMIsnXbsIXJXKIKTKFRJuG +-----END SIGNATURE----- diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/ecdsa-prime256v1-sha256.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/ecdsa-prime256v1-sha256.pem new file mode 100644 index 00000000000..2932be6c874 --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/ecdsa-prime256v1-sha256.pem @@ -0,0 +1,38 @@ +The key, message, and signature come from wycheproof ecdsa_secp256r1_sha256_test.json + +The signature was wrapped in an additional BITSTRING. + + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=2 l= 89 cons: SEQUENCE + 2:d=1 hl=2 l= 19 cons: SEQUENCE + 4:d=2 hl=2 l= 7 prim: OBJECT :id-ecPublicKey + 13:d=2 hl=2 l= 8 prim: OBJECT :prime256v1 + 23:d=1 hl=2 l= 66 prim: BIT STRING + +-----BEGIN PUBLIC KEY----- +MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEBKrsc2NXJvIT+4qeZNo7hjLkFJWpRNAEW1IuunJ +A+tWH2TFXmKqjpboBd1eHztBeqve04J/IHW0apUboNl1SXQ== +-----END PUBLIC KEY----- + + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 10 cons: SEQUENCE + 2:d=1 hl=2 l= 8 prim: OBJECT :ecdsa-with-SHA256 + +-----BEGIN ALGORITHM----- +MAoGCCqGSM49BAMC +-----END ALGORITHM----- + +-----BEGIN DATA----- +MTIzNDAw +-----END DATA----- + + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=2 l= 73 prim: BIT STRING + +-----BEGIN SIGNATURE----- +A0kAMEYCIQCo6hUMuAEl1zgcTB8dqOneJxH5kXBgQGpz15BFGeUTiAIhAPOrn6aL1HlzpzstQEg +MK6UMIsnXbsIXJXKIKTKFRJuG +-----END SIGNATURE----- diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/make-pss.py b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/make-pss.py new file mode 100644 index 00000000000..7708bc8e61f --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/make-pss.py @@ -0,0 +1,59 @@ +# Copyright 2016 Joseph Birr-Pixton. +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +import subprocess +import glob +import hashlib +import os + +TOP = '../../../../../' + +def dump(bin, type): + return '-----BEGIN %s-----\n%s-----END %s-----\n' % \ + (type, bin.encode('base64'), type) + +def gen(outfile, paramfile, hashfn): + param = open(paramfile).read() + + rand = os.urandom(64) + hash = getattr(hashlib, hashfn)(rand).digest() + + proc = subprocess.Popen(['openssl', 'pkeyutl', + '-inkey', 'priv.pem', + '-sign', + '-pkeyopt', 'rsa_padding_mode:pss', + '-pkeyopt', 'rsa_pss_saltlen:-1', + '-pkeyopt', 'digest:%s' % hashfn + ], + stdout = subprocess.PIPE, + stdin = subprocess.PIPE) + + sig, _ = proc.communicate(hash) + + with open(outfile, 'w') as f: + print >>f, dump(open('pub.der').read(), 'PUBLIC KEY') + print >>f, dump(param, 'ALGORITHM') + print >>f, dump(rand, 'DATA') + + assert len(sig) == 256 # only works with 2048-bit keys + # turn it into a DER bitstring + print >>f, dump('\x03\x82\x01\x01\x00' + sig, 'SIGNATURE') + +if __name__ == '__main__': + subprocess.check_call('openssl genrsa -out priv.pem 2048', shell = True) + subprocess.check_call('openssl rsa -pubout -out pub.pem -in priv.pem', shell = True) + subprocess.check_call('openssl asn1parse -inform pem -in pub.pem -out pub.der', shell = True) + gen('rsa-pss-sha256-salt32.pem', TOP + 'src/data/alg-pss-sha256.der', 'sha256') + gen('rsa-pss-sha384-salt48.pem', TOP + 'src/data/alg-pss-sha384.der', 'sha384') + gen('rsa-pss-sha512-salt64.pem', TOP + 'src/data/alg-pss-sha512.der', 'sha512') diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/priv.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/priv.pem new file mode 100644 index 00000000000..dea5059d4e2 --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/priv.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpAIBAAKCAQEAtVDcg1BMqPneiNBL5+mjEB5mxjJzgkmClZR5z1jNht+As6+M +lgflni0bB8LjhWbIt+dZ6Bt4cSHOnAOnkMDOFwtrxJE6Eg1GQ2ux9nDVNvrQkoOL +znXrxMh/af0pcSo8kItDmkqbV/fi3Q7agpbcWc/4wTZOfO6lns4nb5s08oaUv3uF +5Wc0sktNr6he6R3zSQ6YK5KZFzQdnEtGc4gwHWXZ9xt4JeANht3m4RNpMY89qZsZ +xmqoewYHuXQUAfl7W0DC3hoxOoLwSqL2bt2zMMeR8WAo51YY0cJnzAEETcnWIM6e +alb5Osj3iSEknxRTley47SsODQ0maUUWj8wEjwIDAQABAoIBAFBAVQmt7fBQgAWQ +JDimeWz198k7pVKCVND94Zg7luReYmmlhpUVM7V6A1/BC9EMuERlmq6YEgwIyZjW +KUFxhQZAINfk64334CSRMzh/om9uPgjLPoMIQG1dzL9NtR0Ic7wKV8afxPf/mKL9 +Iwvv1+HMoi5qafzz58xNNLk6OgopdZ6H2aX0QtHy/jkMfpE3od7W6Xc+lSVUO7HG +zmN3pHaM5K5n59cX9jpg/K+a0loceY5vmqUfXyh6IP6h1XyAb2NTpU04klDEFEnU +tyaYtxL4ZMZzefoeVXVbCl7qeOE7KGIz7gcvsqL7T8dkK+uYf6mLENeyUvkCKiTG +QAqon0kCgYEA6pLLAYpRo9JbLYlYNt9iTFwIU+R8RcxzZrltm7OUqztmaVq4pOek +cPw/2sCMvqeEWuGhv+bbeIsDUWADU9NFkWySlVRKEFKGb3ECv3A07yfP2K22exOZ +/SglNZKB/ycvpOMcNKnJD5folRrh0actdVG8vOf/sN+887vE77u0f6sCgYEAxeC0 +/6831k/EWYzQf+OfeLqx4ABgkgqxvMXO3YCp44+DD4l8TVWfP4Ahfj5p0zCbXIv3 +5OcxdVwjNljZw4Y5vDNwcDK7vKwp9ne+H9xJB7Yedfr7oyJbqIvJ1nd6jmXoL7GA +dX9xSxJ1CucD7RAY99MS77y8xm0sTbFoI6SvOq0CgYEApeQihXhYvE6sBMw5ArWA +QxhjG1FfQc2RX3iLt62M2nwrtR5frt/TP8RlNEMwRjUaOVuQlLKjS+Cj/Ay2zbWA +YZQzJkByEJEMWgvGMbUc+nVhXI+dmfUG1i5qAjUWkmgYHbgv3l6kvs5jwe88/JQK +ZgnkPISmI2RXsNd+MzzALfkCgYB/56HXa/ERzHnE0KqtH/si1LrJajUB8Xu14761 +msc12rwCvQHmEyRerXn42msZIeAq0CaqhW6Ix8fTB1erdQW4yx8wxvpnGHn/YKM6 +gO+L1oKWDGe/qSPKLKGIya4kgWa1/Wxlhr06o3GYXH9DKxaYio1A/aSgNk1e4v/H +mlnR+QKBgQDd2cdhBTXIo5FZSONip5GG2Ku9m60qGSyPTCqxLNWBfYE/fu0aFCUU +GemqA2ygxFnyCG1Af0SDWwQFH8W7BJ6H1geJVcwVKLrZokKOul8kdwXCxz1J2XGe +gskT4Dsd9K8TSU3J09XVKhC5SrF0vDjdXOE6rtFSqa/bs7B2JcfNwQ== +-----END RSA PRIVATE KEY----- diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/pub.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/pub.pem new file mode 100644 index 00000000000..7ece334f7ed --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/pub.pem @@ -0,0 +1,9 @@ +-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtVDcg1BMqPneiNBL5+mj +EB5mxjJzgkmClZR5z1jNht+As6+Mlgflni0bB8LjhWbIt+dZ6Bt4cSHOnAOnkMDO +FwtrxJE6Eg1GQ2ux9nDVNvrQkoOLznXrxMh/af0pcSo8kItDmkqbV/fi3Q7agpbc +Wc/4wTZOfO6lns4nb5s08oaUv3uF5Wc0sktNr6he6R3zSQ6YK5KZFzQdnEtGc4gw +HWXZ9xt4JeANht3m4RNpMY89qZsZxmqoewYHuXQUAfl7W0DC3hoxOoLwSqL2bt2z +MMeR8WAo51YY0cJnzAEETcnWIM6ealb5Osj3iSEknxRTley47SsODQ0maUUWj8wE +jwIDAQAB +-----END PUBLIC KEY----- diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/rsa-pss-sha256-salt32-corrupted-data.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/rsa-pss-sha256-salt32-corrupted-data.pem new file mode 100644 index 00000000000..a32f564abec --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/rsa-pss-sha256-salt32-corrupted-data.pem @@ -0,0 +1,63 @@ +This has had DATA corrupted, so the signature is not valid. + + + +-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtVDcg1BMqPneiNBL5+mjEB5mxjJzgkm +ClZR5z1jNht+As6+Mlgflni0bB8LjhWbIt+dZ6Bt4cSHOnAOnkMDOFwtrxJE6Eg1GQ2ux9nDVNv +rQkoOLznXrxMh/af0pcSo8kItDmkqbV/fi3Q7agpbcWc/4wTZOfO6lns4nb5s08oaUv3uF5Wc0s +ktNr6he6R3zSQ6YK5KZFzQdnEtGc4gwHWXZ9xt4JeANht3m4RNpMY89qZsZxmqoewYHuXQUAfl7 +W0DC3hoxOoLwSqL2bt2zMMeR8WAo51YY0cJnzAEETcnWIM6ealb5Osj3iSEknxRTley47SsODQ0 +maUUWj8wEjwIDAQAB +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=4 l= 290 cons: SEQUENCE + 4:d=1 hl=2 l= 13 cons: SEQUENCE + 6:d=2 hl=2 l= 9 prim: OBJECT :rsaEncryption + 17:d=2 hl=2 l= 0 prim: NULL + 19:d=1 hl=4 l= 271 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MEEGCSqGSIb3DQEBCjA0oA8wDQYJYIZIAWUDBAIBBQChHDAaBgkqhkiG9w0BAQgwDQYJYIZIAWU +DBAIBBQCiAwIBIA== +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 65 cons: SEQUENCE + 2:d=1 hl=2 l= 9 prim: OBJECT :rsassaPss + 13:d=1 hl=2 l= 52 cons: SEQUENCE + 15:d=2 hl=2 l= 15 cons: cont [ 0 ] + 17:d=3 hl=2 l= 13 cons: SEQUENCE + 19:d=4 hl=2 l= 9 prim: OBJECT :sha256 + 30:d=4 hl=2 l= 0 prim: NULL + 32:d=2 hl=2 l= 28 cons: cont [ 1 ] + 34:d=3 hl=2 l= 26 cons: SEQUENCE + 36:d=4 hl=2 l= 9 prim: OBJECT :mgf1 + 47:d=4 hl=2 l= 13 cons: SEQUENCE + 49:d=5 hl=2 l= 9 prim: OBJECT :sha256 + 60:d=5 hl=2 l= 0 prim: NULL + 62:d=2 hl=2 l= 3 cons: cont [ 2 ] + 64:d=3 hl=2 l= 1 prim: INTEGER :20 + + + +-----BEGIN DATA----- +K6BCjy4hCNAZBmRT+wS4h5wDg7pO67oHFabDt5cXNp8X6sLNH2vjICLtO2niPwZ/Yk2ySxC8MgO +/+U9sdSXxqA== +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A4IBAQCZqlXJhviFKOKHe1ssbm0ThtAnAbcuP3ACBZyfpBjfYlxAgltNzBnmEtxjsbZQPMXHDHy +Y+fdEXwK2vboCz7BzIRXcrcJGzjsBc2zPeNZlmhaadIoa5d8jy3kxnT+f3YVjKGZBqwDaqE5Kie +jhV0laTK+cNGFXo9a3ylICok+s4jVN2Y7qE+ImgyANbZyn1d6W6VnFf4GVvin2hFwTCcZnKA6Db +NYnArbbNmHmMB2S+1Kw9dAklnzZmwWgNSRirtTpUHTBIWYq3B0hPL8IzwKk89/iKDaY2fpV/Wnt +oL2mgM7oa/7+oQWa27BGYftYZmDpIQtNbUeO4VBnaeqGgA5f +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=4 l= 257 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/rsa-pss-sha256-salt32.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/rsa-pss-sha256-salt32.pem new file mode 100644 index 00000000000..c588d0d1aec --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/rsa-pss-sha256-salt32.pem @@ -0,0 +1,63 @@ + + + + +-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtVDcg1BMqPneiNBL5+mjEB5mxjJzgkm +ClZR5z1jNht+As6+Mlgflni0bB8LjhWbIt+dZ6Bt4cSHOnAOnkMDOFwtrxJE6Eg1GQ2ux9nDVNv +rQkoOLznXrxMh/af0pcSo8kItDmkqbV/fi3Q7agpbcWc/4wTZOfO6lns4nb5s08oaUv3uF5Wc0s +ktNr6he6R3zSQ6YK5KZFzQdnEtGc4gwHWXZ9xt4JeANht3m4RNpMY89qZsZxmqoewYHuXQUAfl7 +W0DC3hoxOoLwSqL2bt2zMMeR8WAo51YY0cJnzAEETcnWIM6ealb5Osj3iSEknxRTley47SsODQ0 +maUUWj8wEjwIDAQAB +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=4 l= 290 cons: SEQUENCE + 4:d=1 hl=2 l= 13 cons: SEQUENCE + 6:d=2 hl=2 l= 9 prim: OBJECT :rsaEncryption + 17:d=2 hl=2 l= 0 prim: NULL + 19:d=1 hl=4 l= 271 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MEEGCSqGSIb3DQEBCjA0oA8wDQYJYIZIAWUDBAIBBQChHDAaBgkqhkiG9w0BAQgwDQYJYIZIAWU +DBAIBBQCiAwIBIA== +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 65 cons: SEQUENCE + 2:d=1 hl=2 l= 9 prim: OBJECT :rsassaPss + 13:d=1 hl=2 l= 52 cons: SEQUENCE + 15:d=2 hl=2 l= 15 cons: cont [ 0 ] + 17:d=3 hl=2 l= 13 cons: SEQUENCE + 19:d=4 hl=2 l= 9 prim: OBJECT :sha256 + 30:d=4 hl=2 l= 0 prim: NULL + 32:d=2 hl=2 l= 28 cons: cont [ 1 ] + 34:d=3 hl=2 l= 26 cons: SEQUENCE + 36:d=4 hl=2 l= 9 prim: OBJECT :mgf1 + 47:d=4 hl=2 l= 13 cons: SEQUENCE + 49:d=5 hl=2 l= 9 prim: OBJECT :sha256 + 60:d=5 hl=2 l= 0 prim: NULL + 62:d=2 hl=2 l= 3 cons: cont [ 2 ] + 64:d=3 hl=2 l= 1 prim: INTEGER :20 + + + +-----BEGIN DATA----- +K5BCjy4hCNAZBmRT+wS4h5wDg7pO67oHFabDt5cXNp8X6sLNH2vjICLtO2niPwZ/Yk2ySxC8MgO +/+U9sdSXxqA== +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A4IBAQCZqlXJhviFKOKHe1ssbm0ThtAnAbcuP3ACBZyfpBjfYlxAgltNzBnmEtxjsbZQPMXHDHy +Y+fdEXwK2vboCz7BzIRXcrcJGzjsBc2zPeNZlmhaadIoa5d8jy3kxnT+f3YVjKGZBqwDaqE5Kie +jhV0laTK+cNGFXo9a3ylICok+s4jVN2Y7qE+ImgyANbZyn1d6W6VnFf4GVvin2hFwTCcZnKA6Db +NYnArbbNmHmMB2S+1Kw9dAklnzZmwWgNSRirtTpUHTBIWYq3B0hPL8IzwKk89/iKDaY2fpV/Wnt +oL2mgM7oa/7+oQWa27BGYftYZmDpIQtNbUeO4VBnaeqGgA5f +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=4 l= 257 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/rsa-pss-sha384-salt48-corrupted-data.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/rsa-pss-sha384-salt48-corrupted-data.pem new file mode 100644 index 00000000000..7d3daa949bb --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/rsa-pss-sha384-salt48-corrupted-data.pem @@ -0,0 +1,63 @@ +This has had DATA corrupted, so the signature is not valid. + + + +-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtVDcg1BMqPneiNBL5+mjEB5mxjJzgkm +ClZR5z1jNht+As6+Mlgflni0bB8LjhWbIt+dZ6Bt4cSHOnAOnkMDOFwtrxJE6Eg1GQ2ux9nDVNv +rQkoOLznXrxMh/af0pcSo8kItDmkqbV/fi3Q7agpbcWc/4wTZOfO6lns4nb5s08oaUv3uF5Wc0s +ktNr6he6R3zSQ6YK5KZFzQdnEtGc4gwHWXZ9xt4JeANht3m4RNpMY89qZsZxmqoewYHuXQUAfl7 +W0DC3hoxOoLwSqL2bt2zMMeR8WAo51YY0cJnzAEETcnWIM6ealb5Osj3iSEknxRTley47SsODQ0 +maUUWj8wEjwIDAQAB +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=4 l= 290 cons: SEQUENCE + 4:d=1 hl=2 l= 13 cons: SEQUENCE + 6:d=2 hl=2 l= 9 prim: OBJECT :rsaEncryption + 17:d=2 hl=2 l= 0 prim: NULL + 19:d=1 hl=4 l= 271 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MEEGCSqGSIb3DQEBCjA0oA8wDQYJYIZIAWUDBAICBQChHDAaBgkqhkiG9w0BAQgwDQYJYIZIAWU +DBAICBQCiAwIBMA== +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 65 cons: SEQUENCE + 2:d=1 hl=2 l= 9 prim: OBJECT :rsassaPss + 13:d=1 hl=2 l= 52 cons: SEQUENCE + 15:d=2 hl=2 l= 15 cons: cont [ 0 ] + 17:d=3 hl=2 l= 13 cons: SEQUENCE + 19:d=4 hl=2 l= 9 prim: OBJECT :sha384 + 30:d=4 hl=2 l= 0 prim: NULL + 32:d=2 hl=2 l= 28 cons: cont [ 1 ] + 34:d=3 hl=2 l= 26 cons: SEQUENCE + 36:d=4 hl=2 l= 9 prim: OBJECT :mgf1 + 47:d=4 hl=2 l= 13 cons: SEQUENCE + 49:d=5 hl=2 l= 9 prim: OBJECT :sha384 + 60:d=5 hl=2 l= 0 prim: NULL + 62:d=2 hl=2 l= 3 cons: cont [ 2 ] + 64:d=3 hl=2 l= 1 prim: INTEGER :30 + + + +-----BEGIN DATA----- +TDrlz5dKOqfOQhirwHj00bsVlf+0WEe2qMe9l6SVr9SHB4Eow26r+aU7+pGZFp774O041xIeU2g +ZHYzNWBjGZQ== +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A4IBAQBvlL4AuwL3hEobMolBzR/0gzuJ9u4ATWEPO5uTiBtdJ5Nx9O6gFCrtZMwfEU9q4bzazKV +yWRSpn23GZjlmNYhFCNlfY3l6IlhxGEVz/YeOglrBR8hFbA17835jTmcCR09G6SZ7Wwm8NV7riw +woW15A1N2axuaAAcCxf9T48uehAmXrfApJygl2PWeKzzATUAuGzLLmQ0hNGVvUraxCJfiehtnMl +kWUiSZgjvmXKv6N2JtN8dHMHVEzPTBou4a25ozQIRAIGFvZYcDm5DW4CNJqFM1mTv2BEeOCW5hw +Bt60xm8kXOX4OGwgEyB/aHttWHPdAiFUoODo5j4MtcvajuWt +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=4 l= 257 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/rsa-pss-sha384-salt48.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/rsa-pss-sha384-salt48.pem new file mode 100644 index 00000000000..2a07e28577f --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/rsa-pss-sha384-salt48.pem @@ -0,0 +1,63 @@ + + + + +-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtVDcg1BMqPneiNBL5+mjEB5mxjJzgkm +ClZR5z1jNht+As6+Mlgflni0bB8LjhWbIt+dZ6Bt4cSHOnAOnkMDOFwtrxJE6Eg1GQ2ux9nDVNv +rQkoOLznXrxMh/af0pcSo8kItDmkqbV/fi3Q7agpbcWc/4wTZOfO6lns4nb5s08oaUv3uF5Wc0s +ktNr6he6R3zSQ6YK5KZFzQdnEtGc4gwHWXZ9xt4JeANht3m4RNpMY89qZsZxmqoewYHuXQUAfl7 +W0DC3hoxOoLwSqL2bt2zMMeR8WAo51YY0cJnzAEETcnWIM6ealb5Osj3iSEknxRTley47SsODQ0 +maUUWj8wEjwIDAQAB +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=4 l= 290 cons: SEQUENCE + 4:d=1 hl=2 l= 13 cons: SEQUENCE + 6:d=2 hl=2 l= 9 prim: OBJECT :rsaEncryption + 17:d=2 hl=2 l= 0 prim: NULL + 19:d=1 hl=4 l= 271 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MEEGCSqGSIb3DQEBCjA0oA8wDQYJYIZIAWUDBAICBQChHDAaBgkqhkiG9w0BAQgwDQYJYIZIAWU +DBAICBQCiAwIBMA== +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 65 cons: SEQUENCE + 2:d=1 hl=2 l= 9 prim: OBJECT :rsassaPss + 13:d=1 hl=2 l= 52 cons: SEQUENCE + 15:d=2 hl=2 l= 15 cons: cont [ 0 ] + 17:d=3 hl=2 l= 13 cons: SEQUENCE + 19:d=4 hl=2 l= 9 prim: OBJECT :sha384 + 30:d=4 hl=2 l= 0 prim: NULL + 32:d=2 hl=2 l= 28 cons: cont [ 1 ] + 34:d=3 hl=2 l= 26 cons: SEQUENCE + 36:d=4 hl=2 l= 9 prim: OBJECT :mgf1 + 47:d=4 hl=2 l= 13 cons: SEQUENCE + 49:d=5 hl=2 l= 9 prim: OBJECT :sha384 + 60:d=5 hl=2 l= 0 prim: NULL + 62:d=2 hl=2 l= 3 cons: cont [ 2 ] + 64:d=3 hl=2 l= 1 prim: INTEGER :30 + + + +-----BEGIN DATA----- +TDRlz5dKOqfOQhirwHj00bsVlf+0WEe2qMe9l6SVr9SHB4Eow26r+aU7+pGZFp774O041xIeU2g +ZHYzNWBjGZQ== +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A4IBAQBvlL4AuwL3hEobMolBzR/0gzuJ9u4ATWEPO5uTiBtdJ5Nx9O6gFCrtZMwfEU9q4bzazKV +yWRSpn23GZjlmNYhFCNlfY3l6IlhxGEVz/YeOglrBR8hFbA17835jTmcCR09G6SZ7Wwm8NV7riw +woW15A1N2axuaAAcCxf9T48uehAmXrfApJygl2PWeKzzATUAuGzLLmQ0hNGVvUraxCJfiehtnMl +kWUiSZgjvmXKv6N2JtN8dHMHVEzPTBou4a25ozQIRAIGFvZYcDm5DW4CNJqFM1mTv2BEeOCW5hw +Bt60xm8kXOX4OGwgEyB/aHttWHPdAiFUoODo5j4MtcvajuWt +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=4 l= 257 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/rsa-pss-sha512-salt64-corrupted-data.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/rsa-pss-sha512-salt64-corrupted-data.pem new file mode 100644 index 00000000000..9269d3cf8c9 --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/rsa-pss-sha512-salt64-corrupted-data.pem @@ -0,0 +1,63 @@ +This has had DATA corrupted, so the signature is not valid. + + + +-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtVDcg1BMqPneiNBL5+mjEB5mxjJzgkm +ClZR5z1jNht+As6+Mlgflni0bB8LjhWbIt+dZ6Bt4cSHOnAOnkMDOFwtrxJE6Eg1GQ2ux9nDVNv +rQkoOLznXrxMh/af0pcSo8kItDmkqbV/fi3Q7agpbcWc/4wTZOfO6lns4nb5s08oaUv3uF5Wc0s +ktNr6he6R3zSQ6YK5KZFzQdnEtGc4gwHWXZ9xt4JeANht3m4RNpMY89qZsZxmqoewYHuXQUAfl7 +W0DC3hoxOoLwSqL2bt2zMMeR8WAo51YY0cJnzAEETcnWIM6ealb5Osj3iSEknxRTley47SsODQ0 +maUUWj8wEjwIDAQAB +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=4 l= 290 cons: SEQUENCE + 4:d=1 hl=2 l= 13 cons: SEQUENCE + 6:d=2 hl=2 l= 9 prim: OBJECT :rsaEncryption + 17:d=2 hl=2 l= 0 prim: NULL + 19:d=1 hl=4 l= 271 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MEEGCSqGSIb3DQEBCjA0oA8wDQYJYIZIAWUDBAIDBQChHDAaBgkqhkiG9w0BAQgwDQYJYIZIAWU +DBAIDBQCiAwIBQA== +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 65 cons: SEQUENCE + 2:d=1 hl=2 l= 9 prim: OBJECT :rsassaPss + 13:d=1 hl=2 l= 52 cons: SEQUENCE + 15:d=2 hl=2 l= 15 cons: cont [ 0 ] + 17:d=3 hl=2 l= 13 cons: SEQUENCE + 19:d=4 hl=2 l= 9 prim: OBJECT :sha512 + 30:d=4 hl=2 l= 0 prim: NULL + 32:d=2 hl=2 l= 28 cons: cont [ 1 ] + 34:d=3 hl=2 l= 26 cons: SEQUENCE + 36:d=4 hl=2 l= 9 prim: OBJECT :mgf1 + 47:d=4 hl=2 l= 13 cons: SEQUENCE + 49:d=5 hl=2 l= 9 prim: OBJECT :sha512 + 60:d=5 hl=2 l= 0 prim: NULL + 62:d=2 hl=2 l= 3 cons: cont [ 2 ] + 64:d=3 hl=2 l= 1 prim: INTEGER :40 + + + +-----BEGIN DATA----- +BENGYY+GrDsvawb08kP/OZ0iWbG5yBlJpCIJ1YLPfTCjEouvBzwAkWpUEsI3zk0N8+xcMyJ3qOi +pIsX4YnFfPw== +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A4IBAQBPA1K787NaEycdAHDfil1/F2imI9PcVD5ZuloBz9Qj1q4ZfdZ9PMagunDBVRQoBr1VDhI +6VkDfyQvhKebIbSsfk/qJoNZGCZtsKhXcGm5ZI2+fUbbMW7EwlKle8SqXCHRAIICND/qwundcqp +kLNHOqOK8GRUYHnJcMmQbMCBUx9aw3IRu2LRp6FtBwA16stpSat/NlX+aH79f1B/uoFpDVzG7Kw +oqmAuv81vOVQSCNTn4MrCyxmJTLqbk6frXN7nRF+SQOPksUwXXYgpzGyFhrwgUHwkc3skNx/jOT +fpWnvjOUVbi80Sa9i7EIOcmt4IP4a3BRPWT/MTYDDPADIgVf +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=4 l= 257 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/rsa-pss-sha512-salt64.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/rsa-pss-sha512-salt64.pem new file mode 100644 index 00000000000..fdbab2af45c --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/ours/rsa-pss-sha512-salt64.pem @@ -0,0 +1,63 @@ + + + + +-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtVDcg1BMqPneiNBL5+mjEB5mxjJzgkm +ClZR5z1jNht+As6+Mlgflni0bB8LjhWbIt+dZ6Bt4cSHOnAOnkMDOFwtrxJE6Eg1GQ2ux9nDVNv +rQkoOLznXrxMh/af0pcSo8kItDmkqbV/fi3Q7agpbcWc/4wTZOfO6lns4nb5s08oaUv3uF5Wc0s +ktNr6he6R3zSQ6YK5KZFzQdnEtGc4gwHWXZ9xt4JeANht3m4RNpMY89qZsZxmqoewYHuXQUAfl7 +W0DC3hoxOoLwSqL2bt2zMMeR8WAo51YY0cJnzAEETcnWIM6ealb5Osj3iSEknxRTley47SsODQ0 +maUUWj8wEjwIDAQAB +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=4 l= 290 cons: SEQUENCE + 4:d=1 hl=2 l= 13 cons: SEQUENCE + 6:d=2 hl=2 l= 9 prim: OBJECT :rsaEncryption + 17:d=2 hl=2 l= 0 prim: NULL + 19:d=1 hl=4 l= 271 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MEEGCSqGSIb3DQEBCjA0oA8wDQYJYIZIAWUDBAIDBQChHDAaBgkqhkiG9w0BAQgwDQYJYIZIAWU +DBAIDBQCiAwIBQA== +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 65 cons: SEQUENCE + 2:d=1 hl=2 l= 9 prim: OBJECT :rsassaPss + 13:d=1 hl=2 l= 52 cons: SEQUENCE + 15:d=2 hl=2 l= 15 cons: cont [ 0 ] + 17:d=3 hl=2 l= 13 cons: SEQUENCE + 19:d=4 hl=2 l= 9 prim: OBJECT :sha512 + 30:d=4 hl=2 l= 0 prim: NULL + 32:d=2 hl=2 l= 28 cons: cont [ 1 ] + 34:d=3 hl=2 l= 26 cons: SEQUENCE + 36:d=4 hl=2 l= 9 prim: OBJECT :mgf1 + 47:d=4 hl=2 l= 13 cons: SEQUENCE + 49:d=5 hl=2 l= 9 prim: OBJECT :sha512 + 60:d=5 hl=2 l= 0 prim: NULL + 62:d=2 hl=2 l= 3 cons: cont [ 2 ] + 64:d=3 hl=2 l= 1 prim: INTEGER :40 + + + +-----BEGIN DATA----- +BEnGYY+GrDsvawb08kP/OZ0iWbG5yBlJpCIJ1YLPfTCjEouvBzwAkWpUEsI3zk0N8+xcMyJ3qOi +pIsX4YnFfPw== +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A4IBAQBPA1K787NaEycdAHDfil1/F2imI9PcVD5ZuloBz9Qj1q4ZfdZ9PMagunDBVRQoBr1VDhI +6VkDfyQvhKebIbSsfk/qJoNZGCZtsKhXcGm5ZI2+fUbbMW7EwlKle8SqXCHRAIICND/qwundcqp +kLNHOqOK8GRUYHnJcMmQbMCBUx9aw3IRu2LRp6FtBwA16stpSat/NlX+aH79f1B/uoFpDVzG7Kw +oqmAuv81vOVQSCNTn4MrCyxmJTLqbk6frXN7nRF+SQOPksUwXXYgpzGyFhrwgUHwkc3skNx/jOT +fpWnvjOUVbi80Sa9i7EIOcmt4IP4a3BRPWT/MTYDDPADIgVf +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=4 l= 257 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha1-bad-key-der-length.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha1-bad-key-der-length.pem new file mode 100644 index 00000000000..c88eeee91e9 --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha1-bad-key-der-length.pem @@ -0,0 +1,44 @@ +Same test as rsa-pkcs1-sha1.pem except the length of the first SEQUENCE has +been increased by 2 (which makes it invalid). + + + +-----BEGIN PUBLIC KEY----- +MIOfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQClbkoOcBAXWJpRh9x+qEHRVvLsDjatUqRN/rH +mH3rZkdjFEFb/7bFitMDyg6EqiKOU3/Umq3KRy7MHzqv84LHf1c2VCAltWyuLbfXWce9jd8CSHL +I8Jwpw4lmOb/idGfEFrMLT8Ms18pKA4Thrb2TE7yLh4fINDOjP+yJJvZohNwIDAQAB +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] +Error in encoding + + + +-----BEGIN ALGORITHM----- +MA0GCSqGSIb3DQEBBQUA +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 13 cons: SEQUENCE + 2:d=1 hl=2 l= 9 prim: OBJECT :sha1WithRSAEncryption + 13:d=1 hl=2 l= 0 prim: NULL + + + +-----BEGIN DATA----- +zch9oiPXht87ReC7vHITJtHuKvgGzDFUdcxvDZxm4bYjcdRc4jkuGskoRMMQEC8Vag2NUsH0xAu +jqmUJV4bLdpdXplY7qVj+0LzJhOi1F6PV9RWyO4pB50qoZ2k/kN+wYabobfqu5kRywA5fIJRXKc +vr538Gznjgj0CY+6QfnWGTwDF+i2DUtghKy0LSnjgIo7w3LYXjMRcPy/fMctC3HClmSLOk0Q9BY +pXQgHqmJcqydE/Z6o/SI8QlNwKYKL0WvgJUbxMP0uM7k20mduCK7RtzMYt1CgFn0A== +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A4GBAGvDoGZWhCkwokfjDVhktNgZI2unxollhirX28TiSvKOhrtTHwM1i+X7dHd8YIb4UMrviT8 +Nb8wtDJHsATaTtOoAuAzUmqxOy1+JEa/lOa2kqPOCPR0T5HLRSQVHxlnHYX89JAh9228rcglhZ/ +wJfKsY6aRY/LY0zc6O41iUxITX +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=3 l= 129 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha1-bad-key-der-null.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha1-bad-key-der-null.pem new file mode 100644 index 00000000000..49bddd7d01c --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha1-bad-key-der-null.pem @@ -0,0 +1,52 @@ +Same test as rsa-pkcs1-sha1.pem except an extra NULL (0x05, 0x00) has been +appended to the SPKI. + +The DER can still be parsed, however it should fail due to the unconsumed data +at the end. + + + +-----BEGIN PUBLIC KEY----- +MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQClbkoOcBAXWJpRh9x+qEHRVvLsDjatUqRN/rH +mH3rZkdjFEFb/7bFitMDyg6EqiKOU3/Umq3KRy7MHzqv84LHf1c2VCAltWyuLbfXWce9jd8CSHL +I8Jwpw4lmOb/idGfEFrMLT8Ms18pKA4Thrb2TE7yLh4fINDOjP+yJJvZohNwIDAQABBQA= +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=3 l= 159 cons: SEQUENCE + 3:d=1 hl=2 l= 13 cons: SEQUENCE + 5:d=2 hl=2 l= 9 prim: OBJECT :rsaEncryption + 16:d=2 hl=2 l= 0 prim: NULL + 18:d=1 hl=3 l= 141 prim: BIT STRING + 162:d=0 hl=2 l= 0 prim: NULL + + + +-----BEGIN ALGORITHM----- +MA0GCSqGSIb3DQEBBQUA +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 13 cons: SEQUENCE + 2:d=1 hl=2 l= 9 prim: OBJECT :sha1WithRSAEncryption + 13:d=1 hl=2 l= 0 prim: NULL + + + +-----BEGIN DATA----- +zch9oiPXht87ReC7vHITJtHuKvgGzDFUdcxvDZxm4bYjcdRc4jkuGskoRMMQEC8Vag2NUsH0xAu +jqmUJV4bLdpdXplY7qVj+0LzJhOi1F6PV9RWyO4pB50qoZ2k/kN+wYabobfqu5kRywA5fIJRXKc +vr538Gznjgj0CY+6QfnWGTwDF+i2DUtghKy0LSnjgIo7w3LYXjMRcPy/fMctC3HClmSLOk0Q9BY +pXQgHqmJcqydE/Z6o/SI8QlNwKYKL0WvgJUbxMP0uM7k20mduCK7RtzMYt1CgFn0A== +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A4GBAGvDoGZWhCkwokfjDVhktNgZI2unxollhirX28TiSvKOhrtTHwM1i+X7dHd8YIb4UMrviT8 +Nb8wtDJHsATaTtOoAuAzUmqxOy1+JEa/lOa2kqPOCPR0T5HLRSQVHxlnHYX89JAh9228rcglhZ/ +wJfKsY6aRY/LY0zc6O41iUxITX +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=3 l= 129 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha1-key-params-absent.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha1-key-params-absent.pem new file mode 100644 index 00000000000..9de50a80788 --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha1-key-params-absent.pem @@ -0,0 +1,49 @@ +Same test as rsa-pkcs1-sha1.pem, except the SPKI has been modified so the +algorithm parameters are absent rather than NULL. + +This should fail because RFC 3279 says the parameters MUST be NULL. + + + +-----BEGIN PUBLIC KEY----- +MIGdMAsGCSqGSIb3DQEBAQOBjQAwgYkCgYEApW5KDnAQF1iaUYfcfqhB0Vby7A42rVKkTf6x5h9 +62ZHYxRBW/+2xYrTA8oOhKoijlN/1JqtykcuzB86r/OCx39XNlQgJbVsri2311nHvY3fAkhyyPC +cKcOJZjm/4nRnxBazC0/DLNfKSgOE4a29kxO8i4eHyDQzoz/siSb2aITcCAwEAAQ== +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=3 l= 157 cons: SEQUENCE + 3:d=1 hl=2 l= 11 cons: SEQUENCE + 5:d=2 hl=2 l= 9 prim: OBJECT :rsaEncryption + 16:d=1 hl=3 l= 141 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MA0GCSqGSIb3DQEBBQUA +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 13 cons: SEQUENCE + 2:d=1 hl=2 l= 9 prim: OBJECT :sha1WithRSAEncryption + 13:d=1 hl=2 l= 0 prim: NULL + + + +-----BEGIN DATA----- +zch9oiPXht87ReC7vHITJtHuKvgGzDFUdcxvDZxm4bYjcdRc4jkuGskoRMMQEC8Vag2NUsH0xAu +jqmUJV4bLdpdXplY7qVj+0LzJhOi1F6PV9RWyO4pB50qoZ2k/kN+wYabobfqu5kRywA5fIJRXKc +vr538Gznjgj0CY+6QfnWGTwDF+i2DUtghKy0LSnjgIo7w3LYXjMRcPy/fMctC3HClmSLOk0Q9BY +pXQgHqmJcqydE/Z6o/SI8QlNwKYKL0WvgJUbxMP0uM7k20mduCK7RtzMYt1CgFn0A== +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A4GBAGvDoGZWhCkwokfjDVhktNgZI2unxollhirX28TiSvKOhrtTHwM1i+X7dHd8YIb4UMrviT8 +Nb8wtDJHsATaTtOoAuAzUmqxOy1+JEa/lOa2kqPOCPR0T5HLRSQVHxlnHYX89JAh9228rcglhZ/ +wJfKsY6aRY/LY0zc6O41iUxITX +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=3 l= 129 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha1-using-pss-key-no-params.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha1-using-pss-key-no-params.pem new file mode 100644 index 00000000000..8ac2d027ed5 --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha1-using-pss-key-no-params.pem @@ -0,0 +1,51 @@ +This is the same test as rsa-pkcs1-sha1.pem, except the SPKI has been modified +so that the key algorithm is rsaPss (1.2.840.113549.1.1.10) with absent +parameters. + +Subsequently this should fail, as a PSS key should not be used with a signature +algorithm for PKCS#1 v1.5. + + + +-----BEGIN PUBLIC KEY----- +MIGdMAsGCSqGSIb3DQEBCgOBjQAwgYkCgYEApW5KDnAQF1iaUYfcfqhB0Vby7A42rVKkTf6x5h9 +62ZHYxRBW/+2xYrTA8oOhKoijlN/1JqtykcuzB86r/OCx39XNlQgJbVsri2311nHvY3fAkhyyPC +cKcOJZjm/4nRnxBazC0/DLNfKSgOE4a29kxO8i4eHyDQzoz/siSb2aITcCAwEAAQ== +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=3 l= 157 cons: SEQUENCE + 3:d=1 hl=2 l= 11 cons: SEQUENCE + 5:d=2 hl=2 l= 9 prim: OBJECT :rsassaPss + 16:d=1 hl=3 l= 141 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MA0GCSqGSIb3DQEBBQUA +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 13 cons: SEQUENCE + 2:d=1 hl=2 l= 9 prim: OBJECT :sha1WithRSAEncryption + 13:d=1 hl=2 l= 0 prim: NULL + + + +-----BEGIN DATA----- +zch9oiPXht87ReC7vHITJtHuKvgGzDFUdcxvDZxm4bYjcdRc4jkuGskoRMMQEC8Vag2NUsH0xAu +jqmUJV4bLdpdXplY7qVj+0LzJhOi1F6PV9RWyO4pB50qoZ2k/kN+wYabobfqu5kRywA5fIJRXKc +vr538Gznjgj0CY+6QfnWGTwDF+i2DUtghKy0LSnjgIo7w3LYXjMRcPy/fMctC3HClmSLOk0Q9BY +pXQgHqmJcqydE/Z6o/SI8QlNwKYKL0WvgJUbxMP0uM7k20mduCK7RtzMYt1CgFn0A== +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A4GBAGvDoGZWhCkwokfjDVhktNgZI2unxollhirX28TiSvKOhrtTHwM1i+X7dHd8YIb4UMrviT8 +Nb8wtDJHsATaTtOoAuAzUmqxOy1+JEa/lOa2kqPOCPR0T5HLRSQVHxlnHYX89JAh9228rcglhZ/ +wJfKsY6aRY/LY0zc6O41iUxITX +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=3 l= 129 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha1-wrong-algorithm.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha1-wrong-algorithm.pem new file mode 100644 index 00000000000..812546b8f89 --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha1-wrong-algorithm.pem @@ -0,0 +1,48 @@ +This is the same as rsa-pkcs1-sha1.pem, however the ALGORITHM has been change +to have SHA256 instead of SHA1. Using this algorithm verification should fail. + + + +-----BEGIN PUBLIC KEY----- +MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQClbkoOcBAXWJpRh9x+qEHRVvLsDjatUqRN/rH +mH3rZkdjFEFb/7bFitMDyg6EqiKOU3/Umq3KRy7MHzqv84LHf1c2VCAltWyuLbfXWce9jd8CSHL +I8Jwpw4lmOb/idGfEFrMLT8Ms18pKA4Thrb2TE7yLh4fINDOjP+yJJvZohNwIDAQAB +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=3 l= 159 cons: SEQUENCE + 3:d=1 hl=2 l= 13 cons: SEQUENCE + 5:d=2 hl=2 l= 9 prim: OBJECT :rsaEncryption + 16:d=2 hl=2 l= 0 prim: NULL + 18:d=1 hl=3 l= 141 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MA0GCSqGSIb3DQEBCwUA +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 13 cons: SEQUENCE + 2:d=1 hl=2 l= 9 prim: OBJECT :sha256WithRSAEncryption + 13:d=1 hl=2 l= 0 prim: NULL + + + +-----BEGIN DATA----- +zch9oiPXht87ReC7vHITJtHuKvgGzDFUdcxvDZxm4bYjcdRc4jkuGskoRMMQEC8Vag2NUsH0xAu +jqmUJV4bLdpdXplY7qVj+0LzJhOi1F6PV9RWyO4pB50qoZ2k/kN+wYabobfqu5kRywA5fIJRXKc +vr538Gznjgj0CY+6QfnWGTwDF+i2DUtghKy0LSnjgIo7w3LYXjMRcPy/fMctC3HClmSLOk0Q9BY +pXQgHqmJcqydE/Z6o/SI8QlNwKYKL0WvgJUbxMP0uM7k20mduCK7RtzMYt1CgFn0A== +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A4GBAGvDoGZWhCkwokfjDVhktNgZI2unxollhirX28TiSvKOhrtTHwM1i+X7dHd8YIb4UMrviT8 +Nb8wtDJHsATaTtOoAuAzUmqxOy1+JEa/lOa2kqPOCPR0T5HLRSQVHxlnHYX89JAh9228rcglhZ/ +wJfKsY6aRY/LY0zc6O41iUxITX +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=3 l= 129 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha1.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha1.pem new file mode 100644 index 00000000000..8170f7d2766 --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha1.pem @@ -0,0 +1,53 @@ +The key, message, and signature come from Example 1 of: +ftp://ftp.rsa.com/pub/rsalabs/tmp/pkcs1v15sign-vectors.txt + +(The algorithm DER was synthesized to match, and the signature enclosed in a BIT STRING). + +It uses an RSA key with modulus length of 1024 bits, PKCS#1 v1.5 padding, and +SHA-1 as the digest. + + + +-----BEGIN PUBLIC KEY----- +MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQClbkoOcBAXWJpRh9x+qEHRVvLsDjatUqRN/rH +mH3rZkdjFEFb/7bFitMDyg6EqiKOU3/Umq3KRy7MHzqv84LHf1c2VCAltWyuLbfXWce9jd8CSHL +I8Jwpw4lmOb/idGfEFrMLT8Ms18pKA4Thrb2TE7yLh4fINDOjP+yJJvZohNwIDAQAB +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=3 l= 159 cons: SEQUENCE + 3:d=1 hl=2 l= 13 cons: SEQUENCE + 5:d=2 hl=2 l= 9 prim: OBJECT :rsaEncryption + 16:d=2 hl=2 l= 0 prim: NULL + 18:d=1 hl=3 l= 141 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MA0GCSqGSIb3DQEBBQUA +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 13 cons: SEQUENCE + 2:d=1 hl=2 l= 9 prim: OBJECT :sha1WithRSAEncryption + 13:d=1 hl=2 l= 0 prim: NULL + + + +-----BEGIN DATA----- +zch9oiPXht87ReC7vHITJtHuKvgGzDFUdcxvDZxm4bYjcdRc4jkuGskoRMMQEC8Vag2NUsH0xAu +jqmUJV4bLdpdXplY7qVj+0LzJhOi1F6PV9RWyO4pB50qoZ2k/kN+wYabobfqu5kRywA5fIJRXKc +vr538Gznjgj0CY+6QfnWGTwDF+i2DUtghKy0LSnjgIo7w3LYXjMRcPy/fMctC3HClmSLOk0Q9BY +pXQgHqmJcqydE/Z6o/SI8QlNwKYKL0WvgJUbxMP0uM7k20mduCK7RtzMYt1CgFn0A== +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A4GBAGvDoGZWhCkwokfjDVhktNgZI2unxollhirX28TiSvKOhrtTHwM1i+X7dHd8YIb4UMrviT8 +Nb8wtDJHsATaTtOoAuAzUmqxOy1+JEa/lOa2kqPOCPR0T5HLRSQVHxlnHYX89JAh9228rcglhZ/ +wJfKsY6aRY/LY0zc6O41iUxITX +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=3 l= 129 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha256-key-encoded-ber.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha256-key-encoded-ber.pem new file mode 100644 index 00000000000..dec6f3710c9 --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha256-key-encoded-ber.pem @@ -0,0 +1,62 @@ +This is the same test as rsa-pkcs1-sha256.pem except the SPKI has been encoded +using a non-minimal length for the outtermost SEQUENCE. + +Under DER, the tag-length-value encodings should be minimal and hence this should fail. + +Specifically the SPKI start was changed from: + 30 81 9f +To: + 30 82 00 9f + +(the length of 0x9F is being expressed using 2 bytes instead of 1) + + + +-----BEGIN PUBLIC KEY----- +MIIAnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAqkfgdjI9YqzadSZ2Ns0CEEUD8+8m7OplIx0 +94X+QD8mooNrunwT04asbLIINGL4qiI/+9IVSvyV3Kj9c4EeQIbANGoJ8AI3wf6MOBB/txxGFed +qqcTffKVMQvtZdoYFbZ/MQkvyRsoyvunb/pWcN4sSaF9kY1bXSeP3J99fBIYUCAwEAAQ== +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=4 l= 159 cons: SEQUENCE + 4:d=1 hl=2 l= 13 cons: SEQUENCE + 6:d=2 hl=2 l= 9 prim: OBJECT :rsaEncryption + 17:d=2 hl=2 l= 0 prim: NULL + 19:d=1 hl=3 l= 141 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MA0GCSqGSIb3DQEBCwUA +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 13 cons: SEQUENCE + 2:d=1 hl=2 l= 9 prim: OBJECT :sha256WithRSAEncryption + 13:d=1 hl=2 l= 0 prim: NULL + + + +-----BEGIN DATA----- +MIIB46ADAgECAgkA3l4tFOVii0UwDQYJKoZIhvcNAQELBQAwVjELMAkGA1UEBhMCQVUxEzARBgN +VBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEPMA0GA1 +UEAwwGTXkga2V5MB4XDTE1MDcwMjE3MDYzOVoXDTE2MDcwMTE3MDYzOVowVjELMAkGA1UEBhMCQ +VUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0 +ZDEPMA0GA1UEAwwGTXkga2V5MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqR+B2Mj1irNp +1JnY2zQIQRQPz7ybs6mUjHT3hf5APyaig2u6fBPThqxssgg0YviqIj/70hVK/JXcqP1zgR5AhsA +0agnwAjfB/ow4EH+3HEYV52qpxN98pUxC+1l2hgVtn8xCS/JGyjK+6dv+lZw3ixJoX2RjVtdJ4/ +cn318EhhQIDAQABo1AwTjAdBgNVHQ4EFgQUzQBVKTEknyLndWd2HTsBdTKvyikwHwYDVR0jBBgw +FoAUzQBVKTEknyLndWd2HTsBdTKvyikwDAYDVR0TBAUwAwEB/w== +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A4GBADrHSmFSJw/Gv7hs5PNzpaJwAri/sitarIZfzN/SjR+n8L8yeTEoiDb1+BkxlFvXvPHTaOK +oO3WlslNNOxh1W5/JkYYGOUkCcyIjnln6qS560imcr3VNjomT/M8M2Iss+rJiKau1TRuaP7H8i6 ++Gqf3saGdr8/LnvFAdNQvkalQt +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=3 l= 129 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha256-spki-non-null-params.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha256-spki-non-null-params.pem new file mode 100644 index 00000000000..9201933fd18 --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha256-spki-non-null-params.pem @@ -0,0 +1,59 @@ +This is the same test as rsa-pkcs1-sha256.pem except the SPKI has been tampered +with. The parameters have been changed from NULL to an INTEGER. + +This was done by changing: + + 05 00 (NULL) +To: + 02 00 (INTEGER) + + + +-----BEGIN PUBLIC KEY----- +MIGfMA0GCSqGSIb3DQEBAQIAA4GNADCBiQKBgQCqR+B2Mj1irNp1JnY2zQIQRQPz7ybs6mUjHT3 +hf5APyaig2u6fBPThqxssgg0YviqIj/70hVK/JXcqP1zgR5AhsA0agnwAjfB/ow4EH+3HEYV52q +pxN98pUxC+1l2hgVtn8xCS/JGyjK+6dv+lZw3ixJoX2RjVtdJ4/cn318EhhQIDAQAB +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=3 l= 159 cons: SEQUENCE + 3:d=1 hl=2 l= 13 cons: SEQUENCE + 5:d=2 hl=2 l= 9 prim: OBJECT :rsaEncryption + 16:d=2 hl=2 l= 0 prim: INTEGER :00 + 18:d=1 hl=3 l= 141 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MA0GCSqGSIb3DQEBCwUA +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 13 cons: SEQUENCE + 2:d=1 hl=2 l= 9 prim: OBJECT :sha256WithRSAEncryption + 13:d=1 hl=2 l= 0 prim: NULL + + + +-----BEGIN DATA----- +MIIB46ADAgECAgkA3l4tFOVii0UwDQYJKoZIhvcNAQELBQAwVjELMAkGA1UEBhMCQVUxEzARBgN +VBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEPMA0GA1 +UEAwwGTXkga2V5MB4XDTE1MDcwMjE3MDYzOVoXDTE2MDcwMTE3MDYzOVowVjELMAkGA1UEBhMCQ +VUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0 +ZDEPMA0GA1UEAwwGTXkga2V5MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqR+B2Mj1irNp +1JnY2zQIQRQPz7ybs6mUjHT3hf5APyaig2u6fBPThqxssgg0YviqIj/70hVK/JXcqP1zgR5AhsA +0agnwAjfB/ow4EH+3HEYV52qpxN98pUxC+1l2hgVtn8xCS/JGyjK+6dv+lZw3ixJoX2RjVtdJ4/ +cn318EhhQIDAQABo1AwTjAdBgNVHQ4EFgQUzQBVKTEknyLndWd2HTsBdTKvyikwHwYDVR0jBBgw +FoAUzQBVKTEknyLndWd2HTsBdTKvyikwDAYDVR0TBAUwAwEB/w== +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A4GBADrHSmFSJw/Gv7hs5PNzpaJwAri/sitarIZfzN/SjR+n8L8yeTEoiDb1+BkxlFvXvPHTaOK +oO3WlslNNOxh1W5/JkYYGOUkCcyIjnln6qS560imcr3VNjomT/M8M2Iss+rJiKau1TRuaP7H8i6 ++Gqf3saGdr8/LnvFAdNQvkalQt +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=3 l= 129 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha256-using-ecdsa-algorithm.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha256-using-ecdsa-algorithm.pem new file mode 100644 index 00000000000..122fe8d9d54 --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha256-using-ecdsa-algorithm.pem @@ -0,0 +1,55 @@ +This test specified a valid RSA PKCS#1 v.1.5 signature and RSA key (the same as rsa-pkcs1-sha256.pem). + +The problem however is the signature algorithm is indicated as being ECDSA. + +Signature verification consequently should fail. + + + +-----BEGIN PUBLIC KEY----- +MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqR+B2Mj1irNp1JnY2zQIQRQPz7ybs6mUjHT3 +hf5APyaig2u6fBPThqxssgg0YviqIj/70hVK/JXcqP1zgR5AhsA0agnwAjfB/ow4EH+3HEYV52q +pxN98pUxC+1l2hgVtn8xCS/JGyjK+6dv+lZw3ixJoX2RjVtdJ4/cn318EhhQIDAQAB +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=3 l= 159 cons: SEQUENCE + 3:d=1 hl=2 l= 13 cons: SEQUENCE + 5:d=2 hl=2 l= 9 prim: OBJECT :rsaEncryption + 16:d=2 hl=2 l= 0 prim: NULL + 18:d=1 hl=3 l= 141 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MAoGCCqGSM49BAMC +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 10 cons: SEQUENCE + 2:d=1 hl=2 l= 8 prim: OBJECT :ecdsa-with-SHA256 + + + +-----BEGIN DATA----- +MIIB46ADAgECAgkA3l4tFOVii0UwDQYJKoZIhvcNAQELBQAwVjELMAkGA1UEBhMCQVUxEzARBgN +VBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEPMA0GA1 +UEAwwGTXkga2V5MB4XDTE1MDcwMjE3MDYzOVoXDTE2MDcwMTE3MDYzOVowVjELMAkGA1UEBhMCQ +VUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0 +ZDEPMA0GA1UEAwwGTXkga2V5MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqR+B2Mj1irNp +1JnY2zQIQRQPz7ybs6mUjHT3hf5APyaig2u6fBPThqxssgg0YviqIj/70hVK/JXcqP1zgR5AhsA +0agnwAjfB/ow4EH+3HEYV52qpxN98pUxC+1l2hgVtn8xCS/JGyjK+6dv+lZw3ixJoX2RjVtdJ4/ +cn318EhhQIDAQABo1AwTjAdBgNVHQ4EFgQUzQBVKTEknyLndWd2HTsBdTKvyikwHwYDVR0jBBgw +FoAUzQBVKTEknyLndWd2HTsBdTKvyikwDAYDVR0TBAUwAwEB/w== +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A4GBADrHSmFSJw/Gv7hs5PNzpaJwAri/sitarIZfzN/SjR+n8L8yeTEoiDb1+BkxlFvXvPHTaOK +oO3WlslNNOxh1W5/JkYYGOUkCcyIjnln6qS560imcr3VNjomT/M8M2Iss+rJiKau1TRuaP7H8i6 ++Gqf3saGdr8/LnvFAdNQvkalQt +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=3 l= 129 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha256-using-id-ea-rsa.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha256-using-id-ea-rsa.pem new file mode 100644 index 00000000000..1e308f2ee13 --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha256-using-id-ea-rsa.pem @@ -0,0 +1,54 @@ +This is the same test as rsa-pkcs1-sha256.pem except the SPKI has been tampered +with. Rather than using an rsaEncryption OID for the key's algorithm, it uses +id-ea-rsa (2.5.8.1.1). + + + +-----BEGIN PUBLIC KEY----- +MIGaMAgGBFUIAQEFAAOBjQAwgYkCgYEAqkfgdjI9YqzadSZ2Ns0CEEUD8+8m7OplIx094X+QD8m +ooNrunwT04asbLIINGL4qiI/+9IVSvyV3Kj9c4EeQIbANGoJ8AI3wf6MOBB/txxGFedqqcTffKV +MQvtZdoYFbZ/MQkvyRsoyvunb/pWcN4sSaF9kY1bXSeP3J99fBIYUCAwEAAQ== +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=3 l= 154 cons: SEQUENCE + 3:d=1 hl=2 l= 8 cons: SEQUENCE + 5:d=2 hl=2 l= 4 prim: OBJECT :rsa + 11:d=2 hl=2 l= 0 prim: NULL + 13:d=1 hl=3 l= 141 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MA0GCSqGSIb3DQEBCwUA +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 13 cons: SEQUENCE + 2:d=1 hl=2 l= 9 prim: OBJECT :sha256WithRSAEncryption + 13:d=1 hl=2 l= 0 prim: NULL + + + +-----BEGIN DATA----- +MIIB46ADAgECAgkA3l4tFOVii0UwDQYJKoZIhvcNAQELBQAwVjELMAkGA1UEBhMCQVUxEzARBgN +VBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEPMA0GA1 +UEAwwGTXkga2V5MB4XDTE1MDcwMjE3MDYzOVoXDTE2MDcwMTE3MDYzOVowVjELMAkGA1UEBhMCQ +VUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0 +ZDEPMA0GA1UEAwwGTXkga2V5MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqR+B2Mj1irNp +1JnY2zQIQRQPz7ybs6mUjHT3hf5APyaig2u6fBPThqxssgg0YviqIj/70hVK/JXcqP1zgR5AhsA +0agnwAjfB/ow4EH+3HEYV52qpxN98pUxC+1l2hgVtn8xCS/JGyjK+6dv+lZw3ixJoX2RjVtdJ4/ +cn318EhhQIDAQABo1AwTjAdBgNVHQ4EFgQUzQBVKTEknyLndWd2HTsBdTKvyikwHwYDVR0jBBgw +FoAUzQBVKTEknyLndWd2HTsBdTKvyikwDAYDVR0TBAUwAwEB/w== +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A4GBADrHSmFSJw/Gv7hs5PNzpaJwAri/sitarIZfzN/SjR+n8L8yeTEoiDb1+BkxlFvXvPHTaOK +oO3WlslNNOxh1W5/JkYYGOUkCcyIjnln6qS560imcr3VNjomT/M8M2Iss+rJiKau1TRuaP7H8i6 ++Gqf3saGdr8/LnvFAdNQvkalQt +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=3 l= 129 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha256.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha256.pem new file mode 100644 index 00000000000..591812195fa --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pkcs1-sha256.pem @@ -0,0 +1,86 @@ +This test data was produced by creating a self-signed EC cert using OpenSSL, +and then extracting the relevant fields. + +It uses RSA PKCS#1 v1.5 with SHA-256 and a 1024-bit key. + +(1) Generate self-signed certificate + + openssl genrsa -out rsa_key.pem 1024 + openssl req -new -key rsa_key.pem -x509 -nodes -days 365 -out cert.pem + +(2) Extract public key + + openssl x509 -in cert.pem -pubkey -noout > pubkey.pem + cat pubkey.pem + +(3) Extract signed data (tbsCertificate) + + openssl asn1parse -in cert.pem -out tbs -noout -strparse 4 + base64 tbs + +(4) Extract signature algorithm + + # Find the offset of the signature algorithm near the end (491 in this case) + openssl asn1parse -in cert.pem + + openssl asn1parse -in cert.pem -out alg -noout -strparse 491 + base64 alg + +(5) Extract the signature + + # Find the final offset of BIT STRING (506 in this case) + openssl asn1parse -in cert.pem + + openssl asn1parse -in cert.pem -out sig -noout -strparse 506 + base64 sig + + + +-----BEGIN PUBLIC KEY----- +MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqR+B2Mj1irNp1JnY2zQIQRQPz7ybs6mUjHT3 +hf5APyaig2u6fBPThqxssgg0YviqIj/70hVK/JXcqP1zgR5AhsA0agnwAjfB/ow4EH+3HEYV52q +pxN98pUxC+1l2hgVtn8xCS/JGyjK+6dv+lZw3ixJoX2RjVtdJ4/cn318EhhQIDAQAB +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=3 l= 159 cons: SEQUENCE + 3:d=1 hl=2 l= 13 cons: SEQUENCE + 5:d=2 hl=2 l= 9 prim: OBJECT :rsaEncryption + 16:d=2 hl=2 l= 0 prim: NULL + 18:d=1 hl=3 l= 141 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MA0GCSqGSIb3DQEBCwUA +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 13 cons: SEQUENCE + 2:d=1 hl=2 l= 9 prim: OBJECT :sha256WithRSAEncryption + 13:d=1 hl=2 l= 0 prim: NULL + + + +-----BEGIN DATA----- +MIIB46ADAgECAgkA3l4tFOVii0UwDQYJKoZIhvcNAQELBQAwVjELMAkGA1UEBhMCQVUxEzARBgN +VBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEPMA0GA1 +UEAwwGTXkga2V5MB4XDTE1MDcwMjE3MDYzOVoXDTE2MDcwMTE3MDYzOVowVjELMAkGA1UEBhMCQ +VUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0 +ZDEPMA0GA1UEAwwGTXkga2V5MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqR+B2Mj1irNp +1JnY2zQIQRQPz7ybs6mUjHT3hf5APyaig2u6fBPThqxssgg0YviqIj/70hVK/JXcqP1zgR5AhsA +0agnwAjfB/ow4EH+3HEYV52qpxN98pUxC+1l2hgVtn8xCS/JGyjK+6dv+lZw3ixJoX2RjVtdJ4/ +cn318EhhQIDAQABo1AwTjAdBgNVHQ4EFgQUzQBVKTEknyLndWd2HTsBdTKvyikwHwYDVR0jBBgw +FoAUzQBVKTEknyLndWd2HTsBdTKvyikwDAYDVR0TBAUwAwEB/w== +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A4GBADrHSmFSJw/Gv7hs5PNzpaJwAri/sitarIZfzN/SjR+n8L8yeTEoiDb1+BkxlFvXvPHTaOK +oO3WlslNNOxh1W5/JkYYGOUkCcyIjnln6qS560imcr3VNjomT/M8M2Iss+rJiKau1TRuaP7H8i6 ++Gqf3saGdr8/LnvFAdNQvkalQt +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=3 l= 129 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha1-salt20-using-pss-key-no-params.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha1-salt20-using-pss-key-no-params.pem new file mode 100644 index 00000000000..cbbb0c0040b --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha1-salt20-using-pss-key-no-params.pem @@ -0,0 +1,48 @@ +This is the same test as rsa-pss-sha1-salt20.pem, except the public key's +algorithm identifier has been changed from rsaEncryption (1.2.840.113549.1.1.1) +to rsaPss (1.2.840.113549.1.1.10). + + + +-----BEGIN PUBLIC KEY----- +MIGdMAsGCSqGSIb3DQEBCgOBjQAwgYkCgYEApW5KDnAQF1iaUYfcfqhB0Vby7A42rVKkTf6x5h9 +62ZHYxRBW/+2xYrTA8oOhKoijlN/1JqtykcuzB86r/OCx39XNlQgJbVsri2311nHvY3fAkhyyPC +cKcOJZjm/4nRnxBazC0/DLNfKSgOE4a29kxO8i4eHyDQzoz/siSb2aITcCAwEAAQ== +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=3 l= 157 cons: SEQUENCE + 3:d=1 hl=2 l= 11 cons: SEQUENCE + 5:d=2 hl=2 l= 9 prim: OBJECT :rsassaPss + 16:d=1 hl=3 l= 141 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MA0GCSqGSIb3DQEBCjAA +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 13 cons: SEQUENCE + 2:d=1 hl=2 l= 9 prim: OBJECT :rsassaPss + 13:d=1 hl=2 l= 0 cons: SEQUENCE + + + +-----BEGIN DATA----- +zch9oiPXht87ReC7vHITJtHuKvgGzDFUdcxvDZxm4bYjcdRc4jkuGskoRMMQEC8Vag2NUsH0xAu +jqmUJV4bLdpdXplY7qVj+0LzJhOi1F6PV9RWyO4pB50qoZ2k/kN+wYabobfqu5kRywA5fIJRXKc +vr538Gznjgj0CY+6QfnWGTwDF+i2DUtghKy0LSnjgIo7w3LYXjMRcPy/fMctC3HClmSLOk0Q9BY +pXQgHqmJcqydE/Z6o/SI8QlNwKYKL0WvgJUbxMP0uM7k20mduCK7RtzMYt1CgFn0A== +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A4GBAJB0MI+1mOlwGyKUOI5S+XH6rCtgpRRa8YXfUoe17SiH5Xzn/UTchjTkB8jg5DYLwibz7CJ +/nZ5UY46NMfUFEhXfbrucL5V5qndZijj5FLW5wb2DxOL584Kg0Ko1Qv/uZZhKYBvGnrKN6yfcoS +yCwtTD9mzVAPH/K5lNik4wy7M8 +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=3 l= 129 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha1-salt20-using-pss-key-with-null-params.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha1-salt20-using-pss-key-with-null-params.pem new file mode 100644 index 00000000000..aa3053ab088 --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha1-salt20-using-pss-key-with-null-params.pem @@ -0,0 +1,50 @@ +This is the same test as rsa-pss-sha1-salt20.pem, except the public key's +algorithm identifier has been changed from rsaEncryption (1.2.840.113549.1.1.1) +to rsaPss (1.2.840.113549.1.1.10). Note that the PSS parameters have been +encoded as NULL which is incorrect. + + + +-----BEGIN PUBLIC KEY----- +MIGfMA0GCSqGSIb3DQEBCgUAA4GNADCBiQKBgQClbkoOcBAXWJpRh9x+qEHRVvLsDjatUqRN/rH +mH3rZkdjFEFb/7bFitMDyg6EqiKOU3/Umq3KRy7MHzqv84LHf1c2VCAltWyuLbfXWce9jd8CSHL +I8Jwpw4lmOb/idGfEFrMLT8Ms18pKA4Thrb2TE7yLh4fINDOjP+yJJvZohNwIDAQAB +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=3 l= 159 cons: SEQUENCE + 3:d=1 hl=2 l= 13 cons: SEQUENCE + 5:d=2 hl=2 l= 9 prim: OBJECT :rsassaPss + 16:d=2 hl=2 l= 0 prim: NULL + 18:d=1 hl=3 l= 141 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MA0GCSqGSIb3DQEBCjAA +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 13 cons: SEQUENCE + 2:d=1 hl=2 l= 9 prim: OBJECT :rsassaPss + 13:d=1 hl=2 l= 0 cons: SEQUENCE + + + +-----BEGIN DATA----- +zch9oiPXht87ReC7vHITJtHuKvgGzDFUdcxvDZxm4bYjcdRc4jkuGskoRMMQEC8Vag2NUsH0xAu +jqmUJV4bLdpdXplY7qVj+0LzJhOi1F6PV9RWyO4pB50qoZ2k/kN+wYabobfqu5kRywA5fIJRXKc +vr538Gznjgj0CY+6QfnWGTwDF+i2DUtghKy0LSnjgIo7w3LYXjMRcPy/fMctC3HClmSLOk0Q9BY +pXQgHqmJcqydE/Z6o/SI8QlNwKYKL0WvgJUbxMP0uM7k20mduCK7RtzMYt1CgFn0A== +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A4GBAJB0MI+1mOlwGyKUOI5S+XH6rCtgpRRa8YXfUoe17SiH5Xzn/UTchjTkB8jg5DYLwibz7CJ +/nZ5UY46NMfUFEhXfbrucL5V5qndZijj5FLW5wb2DxOL584Kg0Ko1Qv/uZZhKYBvGnrKN6yfcoS +yCwtTD9mzVAPH/K5lNik4wy7M8 +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=3 l= 129 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha1-salt20.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha1-salt20.pem new file mode 100644 index 00000000000..e569aac8f60 --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha1-salt20.pem @@ -0,0 +1,53 @@ +The key, message, and signature come from Example 1.1 of: +ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1-vec.zip (pss-vect.txt) + +(The algorithm DER was synthesized to match, and the signature enclosed in a BIT STRING). + +It uses an RSA key with modulus length of 1024 bits, PSS padding, +SHA-1 as the digest, MGF1 with SHA-1, and salt length of 20. + + + +-----BEGIN PUBLIC KEY----- +MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQClbkoOcBAXWJpRh9x+qEHRVvLsDjatUqRN/rH +mH3rZkdjFEFb/7bFitMDyg6EqiKOU3/Umq3KRy7MHzqv84LHf1c2VCAltWyuLbfXWce9jd8CSHL +I8Jwpw4lmOb/idGfEFrMLT8Ms18pKA4Thrb2TE7yLh4fINDOjP+yJJvZohNwIDAQAB +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=3 l= 159 cons: SEQUENCE + 3:d=1 hl=2 l= 13 cons: SEQUENCE + 5:d=2 hl=2 l= 9 prim: OBJECT :rsaEncryption + 16:d=2 hl=2 l= 0 prim: NULL + 18:d=1 hl=3 l= 141 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MA0GCSqGSIb3DQEBCjAA +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 13 cons: SEQUENCE + 2:d=1 hl=2 l= 9 prim: OBJECT :rsassaPss + 13:d=1 hl=2 l= 0 cons: SEQUENCE + + + +-----BEGIN DATA----- +zch9oiPXht87ReC7vHITJtHuKvgGzDFUdcxvDZxm4bYjcdRc4jkuGskoRMMQEC8Vag2NUsH0xAu +jqmUJV4bLdpdXplY7qVj+0LzJhOi1F6PV9RWyO4pB50qoZ2k/kN+wYabobfqu5kRywA5fIJRXKc +vr538Gznjgj0CY+6QfnWGTwDF+i2DUtghKy0LSnjgIo7w3LYXjMRcPy/fMctC3HClmSLOk0Q9BY +pXQgHqmJcqydE/Z6o/SI8QlNwKYKL0WvgJUbxMP0uM7k20mduCK7RtzMYt1CgFn0A== +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A4GBAJB0MI+1mOlwGyKUOI5S+XH6rCtgpRRa8YXfUoe17SiH5Xzn/UTchjTkB8jg5DYLwibz7CJ +/nZ5UY46NMfUFEhXfbrucL5V5qndZijj5FLW5wb2DxOL584Kg0Ko1Qv/uZZhKYBvGnrKN6yfcoS +yCwtTD9mzVAPH/K5lNik4wy7M8 +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=3 l= 129 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha1-wrong-salt.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha1-wrong-salt.pem new file mode 100644 index 00000000000..e945674f046 --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha1-wrong-salt.pem @@ -0,0 +1,51 @@ +Same as rsa-pss-sha1-wrong-salt.pem except the ALGORITHM has been changed to +have a salt of 23. When verified using this algorithm it will fail, however if +the default salt of 20 were used it would succeed. + + + +-----BEGIN PUBLIC KEY----- +MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQClbkoOcBAXWJpRh9x+qEHRVvLsDjatUqRN/rH +mH3rZkdjFEFb/7bFitMDyg6EqiKOU3/Umq3KRy7MHzqv84LHf1c2VCAltWyuLbfXWce9jd8CSHL +I8Jwpw4lmOb/idGfEFrMLT8Ms18pKA4Thrb2TE7yLh4fINDOjP+yJJvZohNwIDAQAB +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=3 l= 159 cons: SEQUENCE + 3:d=1 hl=2 l= 13 cons: SEQUENCE + 5:d=2 hl=2 l= 9 prim: OBJECT :rsaEncryption + 16:d=2 hl=2 l= 0 prim: NULL + 18:d=1 hl=3 l= 141 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MBIGCSqGSIb3DQEBCjAFogMCARc= +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 18 cons: SEQUENCE + 2:d=1 hl=2 l= 9 prim: OBJECT :rsassaPss + 13:d=1 hl=2 l= 5 cons: SEQUENCE + 15:d=2 hl=2 l= 3 cons: cont [ 2 ] + 17:d=3 hl=2 l= 1 prim: INTEGER :17 + + + +-----BEGIN DATA----- +zch9oiPXht87ReC7vHITJtHuKvgGzDFUdcxvDZxm4bYjcdRc4jkuGskoRMMQEC8Vag2NUsH0xAu +jqmUJV4bLdpdXplY7qVj+0LzJhOi1F6PV9RWyO4pB50qoZ2k/kN+wYabobfqu5kRywA5fIJRXKc +vr538Gznjgj0CY+6QfnWGTwDF+i2DUtghKy0LSnjgIo7w3LYXjMRcPy/fMctC3HClmSLOk0Q9BY +pXQgHqmJcqydE/Z6o/SI8QlNwKYKL0WvgJUbxMP0uM7k20mduCK7RtzMYt1CgFn0A== +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A4GBAJB0MI+1mOlwGyKUOI5S+XH6rCtgpRRa8YXfUoe17SiH5Xzn/UTchjTkB8jg5DYLwibz7CJ +/nZ5UY46NMfUFEhXfbrucL5V5qndZijj5FLW5wb2DxOL584Kg0Ko1Qv/uZZhKYBvGnrKN6yfcoS +yCwtTD9mzVAPH/K5lNik4wy7M8 +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=3 l= 129 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha256-mgf1-sha512-salt33.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha256-mgf1-sha512-salt33.pem new file mode 100644 index 00000000000..1889e04df8c --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha256-mgf1-sha512-salt33.pem @@ -0,0 +1,67 @@ +This test exercises using a different hash function parameter to the mask gen +function (SHA-256 for the hash, but SHA-512 for the MGF1 hash). + +This test data was constructed manually by calling signing functions from +OpenSSL code. + +It constructs an RSASSA-PSS signature using: + * Key with modulus 1024 bit + * Salt length 33 bytes + * Digest function of SHA-256 + * Mask gen function of MGF1 with SHA-512 + + + +-----BEGIN PUBLIC KEY----- +MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQClbkoOcBAXWJpRh9x+qEHRVvLsDjatUqRN/rH +mH3rZkdjFEFb/7bFitMDyg6EqiKOU3/Umq3KRy7MHzqv84LHf1c2VCAltWyuLbfXWce9jd8CSHL +I8Jwpw4lmOb/idGfEFrMLT8Ms18pKA4Thrb2TE7yLh4fINDOjP+yJJvZohNwIDAQAB +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=3 l= 159 cons: SEQUENCE + 3:d=1 hl=2 l= 13 cons: SEQUENCE + 5:d=2 hl=2 l= 9 prim: OBJECT :rsaEncryption + 16:d=2 hl=2 l= 0 prim: NULL + 18:d=1 hl=3 l= 141 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MEEGCSqGSIb3DQEBCjA0oA8wDQYJYIZIAWUDBAIBBQChHDAaBgkqhkiG9w0BAQgwDQYJYIZIAWU +DBAIDBQCiAwIBIQ== +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 65 cons: SEQUENCE + 2:d=1 hl=2 l= 9 prim: OBJECT :rsassaPss + 13:d=1 hl=2 l= 52 cons: SEQUENCE + 15:d=2 hl=2 l= 15 cons: cont [ 0 ] + 17:d=3 hl=2 l= 13 cons: SEQUENCE + 19:d=4 hl=2 l= 9 prim: OBJECT :sha256 + 30:d=4 hl=2 l= 0 prim: NULL + 32:d=2 hl=2 l= 28 cons: cont [ 1 ] + 34:d=3 hl=2 l= 26 cons: SEQUENCE + 36:d=4 hl=2 l= 9 prim: OBJECT :mgf1 + 47:d=4 hl=2 l= 13 cons: SEQUENCE + 49:d=5 hl=2 l= 9 prim: OBJECT :sha512 + 60:d=5 hl=2 l= 0 prim: NULL + 62:d=2 hl=2 l= 3 cons: cont [ 2 ] + 64:d=3 hl=2 l= 1 prim: INTEGER :21 + + + +-----BEGIN DATA----- +VGVzdCBtZXNzYWdlIHRvIGJlIHNpZ25lZC4uLg== +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A4GBAFob0HSC5uuTqKu4J/lj+5bDa+Hhij4H3klWnvt6Yc+wwPza7/UC4lgGGyvZqD32RUEdt7v +Z14qqYNk53b5aj4C2gBMvLzV7Pay4mmQM4DSWa5JHMxTILqE3DDqihrbMcBw2q3XAsLcjeqLWQ9 +yp8tfnV21h98qsCLtErrxZWHRr +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=3 l= 129 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha256-salt10-using-pss-key-with-params.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha256-salt10-using-pss-key-with-params.pem new file mode 100644 index 00000000000..77f412fa473 --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha256-salt10-using-pss-key-with-params.pem @@ -0,0 +1,74 @@ +This is the same test as rsa-pss-sha256-salt10.pem except instead of specifying +the SPKI using rsaEncryption it is specified using rsaPss along with +parameters that match those of the signature algorithm. + + + +-----BEGIN PUBLIC KEY----- +MIHRMEEGCSqGSIb3DQEBCjA0oA8wDQYJYIZIAWUDBAIBBQChHDAaBgkqhkiG9w0BAQgwDQYJYIZ +IAWUDBAIBBQCiAwIBCgOBiwAwgYcCgYEAvkmbXn8GyD+gKT4xRlyOtrWK+SC65Sp7W5v+t6py2x +JkES6z/UMdMaKn5QlBVmkpSUoOiR7VYTkYtLUbDR+5d4Oyas99DzhM+zX00oJPXdOAYjomvxgLY +5YcYZ3NsgyuQG8i9uJ2yAo3JZSQz+tywacahPGEbTMId7o+MQHsnHsCARE= +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=3 l= 209 cons: SEQUENCE + 3:d=1 hl=2 l= 65 cons: SEQUENCE + 5:d=2 hl=2 l= 9 prim: OBJECT :rsassaPss + 16:d=2 hl=2 l= 52 cons: SEQUENCE + 18:d=3 hl=2 l= 15 cons: cont [ 0 ] + 20:d=4 hl=2 l= 13 cons: SEQUENCE + 22:d=5 hl=2 l= 9 prim: OBJECT :sha256 + 33:d=5 hl=2 l= 0 prim: NULL + 35:d=3 hl=2 l= 28 cons: cont [ 1 ] + 37:d=4 hl=2 l= 26 cons: SEQUENCE + 39:d=5 hl=2 l= 9 prim: OBJECT :mgf1 + 50:d=5 hl=2 l= 13 cons: SEQUENCE + 52:d=6 hl=2 l= 9 prim: OBJECT :sha256 + 63:d=6 hl=2 l= 0 prim: NULL + 65:d=3 hl=2 l= 3 cons: cont [ 2 ] + 67:d=4 hl=2 l= 1 prim: INTEGER :0A + 70:d=1 hl=3 l= 139 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MEEGCSqGSIb3DQEBCjA0oA8wDQYJYIZIAWUDBAIBBQChHDAaBgkqhkiG9w0BAQgwDQYJYIZIAWU +DBAIBBQCiAwIBCg== +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 65 cons: SEQUENCE + 2:d=1 hl=2 l= 9 prim: OBJECT :rsassaPss + 13:d=1 hl=2 l= 52 cons: SEQUENCE + 15:d=2 hl=2 l= 15 cons: cont [ 0 ] + 17:d=3 hl=2 l= 13 cons: SEQUENCE + 19:d=4 hl=2 l= 9 prim: OBJECT :sha256 + 30:d=4 hl=2 l= 0 prim: NULL + 32:d=2 hl=2 l= 28 cons: cont [ 1 ] + 34:d=3 hl=2 l= 26 cons: SEQUENCE + 36:d=4 hl=2 l= 9 prim: OBJECT :mgf1 + 47:d=4 hl=2 l= 13 cons: SEQUENCE + 49:d=5 hl=2 l= 9 prim: OBJECT :sha256 + 60:d=5 hl=2 l= 0 prim: NULL + 62:d=2 hl=2 l= 3 cons: cont [ 2 ] + 64:d=3 hl=2 l= 1 prim: INTEGER :0A + + + +-----BEGIN DATA----- +x/UnD8pyX5vRn1GajXzKPMXAeQJAKfO65RD5sCFA/iOJCOT2wY8HqJxofIaEZpsfHbK6+SUaPIK +frMtJMIThbsnijViGgHSl1iIWZ91uUo0W/iyfPbTPr2xNzoyEOa84zqqqnOLsrnvI9KWlXjv5bf +nNV1xPnLMnlRuM3+QIcWg= +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A4GBABHhafL9QLB2Qbl2iiqxmWX7bCfxD88DI/zG0S608cBrMw3aoepQRAevop3p6+A3T+nR59D +/vV/Bzzo0RuQUVBXSqyT3ibNGTFxDola7wdaSz38EgB2sW7QBpKA6t9VyioYMGeGk3Hl8pULIID +zsLmAesMUfVn8u2gIrC5693u76 +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=3 l= 129 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha256-salt10-using-pss-key-with-wrong-params.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha256-salt10-using-pss-key-with-wrong-params.pem new file mode 100644 index 00000000000..f569228c30a --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha256-salt10-using-pss-key-with-wrong-params.pem @@ -0,0 +1,74 @@ +This is the same test as rsa-pss-sha256-salt10-using-pss-key-with-params.pem +except the hash in the PSS key's parameters has been changed from SHA-256 to +SHA-384. + + + +-----BEGIN PUBLIC KEY----- +MIHRMEEGCSqGSIb3DQEBCjA0oA8wDQYJYIZIAWUDBAICBQChHDAaBgkqhkiG9w0BAQgwDQYJYIZ +IAWUDBAIBBQCiAwIBCgOBiwAwgYcCgYEAvkmbXn8GyD+gKT4xRlyOtrWK+SC65Sp7W5v+t6py2x +JkES6z/UMdMaKn5QlBVmkpSUoOiR7VYTkYtLUbDR+5d4Oyas99DzhM+zX00oJPXdOAYjomvxgLY +5YcYZ3NsgyuQG8i9uJ2yAo3JZSQz+tywacahPGEbTMId7o+MQHsnHsCARE= +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=3 l= 209 cons: SEQUENCE + 3:d=1 hl=2 l= 65 cons: SEQUENCE + 5:d=2 hl=2 l= 9 prim: OBJECT :rsassaPss + 16:d=2 hl=2 l= 52 cons: SEQUENCE + 18:d=3 hl=2 l= 15 cons: cont [ 0 ] + 20:d=4 hl=2 l= 13 cons: SEQUENCE + 22:d=5 hl=2 l= 9 prim: OBJECT :sha384 + 33:d=5 hl=2 l= 0 prim: NULL + 35:d=3 hl=2 l= 28 cons: cont [ 1 ] + 37:d=4 hl=2 l= 26 cons: SEQUENCE + 39:d=5 hl=2 l= 9 prim: OBJECT :mgf1 + 50:d=5 hl=2 l= 13 cons: SEQUENCE + 52:d=6 hl=2 l= 9 prim: OBJECT :sha256 + 63:d=6 hl=2 l= 0 prim: NULL + 65:d=3 hl=2 l= 3 cons: cont [ 2 ] + 67:d=4 hl=2 l= 1 prim: INTEGER :0A + 70:d=1 hl=3 l= 139 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MEEGCSqGSIb3DQEBCjA0oA8wDQYJYIZIAWUDBAIBBQChHDAaBgkqhkiG9w0BAQgwDQYJYIZIAWU +DBAIBBQCiAwIBCg== +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 65 cons: SEQUENCE + 2:d=1 hl=2 l= 9 prim: OBJECT :rsassaPss + 13:d=1 hl=2 l= 52 cons: SEQUENCE + 15:d=2 hl=2 l= 15 cons: cont [ 0 ] + 17:d=3 hl=2 l= 13 cons: SEQUENCE + 19:d=4 hl=2 l= 9 prim: OBJECT :sha256 + 30:d=4 hl=2 l= 0 prim: NULL + 32:d=2 hl=2 l= 28 cons: cont [ 1 ] + 34:d=3 hl=2 l= 26 cons: SEQUENCE + 36:d=4 hl=2 l= 9 prim: OBJECT :mgf1 + 47:d=4 hl=2 l= 13 cons: SEQUENCE + 49:d=5 hl=2 l= 9 prim: OBJECT :sha256 + 60:d=5 hl=2 l= 0 prim: NULL + 62:d=2 hl=2 l= 3 cons: cont [ 2 ] + 64:d=3 hl=2 l= 1 prim: INTEGER :0A + + + +-----BEGIN DATA----- +x/UnD8pyX5vRn1GajXzKPMXAeQJAKfO65RD5sCFA/iOJCOT2wY8HqJxofIaEZpsfHbK6+SUaPIK +frMtJMIThbsnijViGgHSl1iIWZ91uUo0W/iyfPbTPr2xNzoyEOa84zqqqnOLsrnvI9KWlXjv5bf +nNV1xPnLMnlRuM3+QIcWg= +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A4GBABHhafL9QLB2Qbl2iiqxmWX7bCfxD88DI/zG0S608cBrMw3aoepQRAevop3p6+A3T+nR59D +/vV/Bzzo0RuQUVBXSqyT3ibNGTFxDola7wdaSz38EgB2sW7QBpKA6t9VyioYMGeGk3Hl8pULIID +zsLmAesMUfVn8u2gIrC5693u76 +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=3 l= 129 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha256-salt10.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha256-salt10.pem new file mode 100644 index 00000000000..424c803a0b1 --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-pss-sha256-salt10.pem @@ -0,0 +1,65 @@ +The key, message, and signature come from: +http://csrc.nist.gov/groups/STM/cavp/documents/dss/186-2rsatestvectors.zip (SigVerPSS_186-3.rsp) + +(The algorithm DER was synthesized to match, and the signature wrapped in a BIT STRING). + +It uses an RSA key with modulus length of 1024 bits, PSS padding, +SHA-256 as the digest, MGF1 with SHA-256, and salt length of 10. + + + +-----BEGIN PUBLIC KEY----- +MIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQC+SZtefwbIP6ApPjFGXI62tYr5ILrlKntbm/6 +3qnLbEmQRLrP9Qx0xoqflCUFWaSlJSg6JHtVhORi0tRsNH7l3g7Jqz30POEz7NfTSgk9d04BiOi +a/GAtjlhxhnc2yDK5AbyL24nbICjcllJDP63LBpxqE8YRtMwh3uj4xAeycewIBEQ== +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=3 l= 157 cons: SEQUENCE + 3:d=1 hl=2 l= 13 cons: SEQUENCE + 5:d=2 hl=2 l= 9 prim: OBJECT :rsaEncryption + 16:d=2 hl=2 l= 0 prim: NULL + 18:d=1 hl=3 l= 139 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MEEGCSqGSIb3DQEBCjA0oA8wDQYJYIZIAWUDBAIBBQChHDAaBgkqhkiG9w0BAQgwDQYJYIZIAWU +DBAIBBQCiAwIBCg== +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 65 cons: SEQUENCE + 2:d=1 hl=2 l= 9 prim: OBJECT :rsassaPss + 13:d=1 hl=2 l= 52 cons: SEQUENCE + 15:d=2 hl=2 l= 15 cons: cont [ 0 ] + 17:d=3 hl=2 l= 13 cons: SEQUENCE + 19:d=4 hl=2 l= 9 prim: OBJECT :sha256 + 30:d=4 hl=2 l= 0 prim: NULL + 32:d=2 hl=2 l= 28 cons: cont [ 1 ] + 34:d=3 hl=2 l= 26 cons: SEQUENCE + 36:d=4 hl=2 l= 9 prim: OBJECT :mgf1 + 47:d=4 hl=2 l= 13 cons: SEQUENCE + 49:d=5 hl=2 l= 9 prim: OBJECT :sha256 + 60:d=5 hl=2 l= 0 prim: NULL + 62:d=2 hl=2 l= 3 cons: cont [ 2 ] + 64:d=3 hl=2 l= 1 prim: INTEGER :0A + + + +-----BEGIN DATA----- +x/UnD8pyX5vRn1GajXzKPMXAeQJAKfO65RD5sCFA/iOJCOT2wY8HqJxofIaEZpsfHbK6+SUaPIK +frMtJMIThbsnijViGgHSl1iIWZ91uUo0W/iyfPbTPr2xNzoyEOa84zqqqnOLsrnvI9KWlXjv5bf +nNV1xPnLMnlRuM3+QIcWg= +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A4GBABHhafL9QLB2Qbl2iiqxmWX7bCfxD88DI/zG0S608cBrMw3aoepQRAevop3p6+A3T+nR59D +/vV/Bzzo0RuQUVBXSqyT3ibNGTFxDola7wdaSz38EgB2sW7QBpKA6t9VyioYMGeGk3Hl8pULIID +zsLmAesMUfVn8u2gIrC5693u76 +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=3 l= 129 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-using-ec-key.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-using-ec-key.pem new file mode 100644 index 00000000000..b4c043ed7b2 --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa-using-ec-key.pem @@ -0,0 +1,52 @@ +This test specifies an RSA PKCS#1 v1.5 signature algorithm (and a valid RSA +signature), HOWEVER it provides an EC key. Verification should fail. + + + +-----BEGIN PUBLIC KEY----- +MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEnLDPaTA9r8dh1ORoe07PA55tNKuWSvgIENjVWKS +o1vctUSM6F4iSCobuCKGWLHnvoxf7eHnil9rSFG25lfoceA== +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=2 l= 89 cons: SEQUENCE + 2:d=1 hl=2 l= 19 cons: SEQUENCE + 4:d=2 hl=2 l= 7 prim: OBJECT :id-ecPublicKey + 13:d=2 hl=2 l= 8 prim: OBJECT :prime256v1 + 23:d=1 hl=2 l= 66 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MA0GCSqGSIb3DQEBCwUA +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 13 cons: SEQUENCE + 2:d=1 hl=2 l= 9 prim: OBJECT :sha256WithRSAEncryption + 13:d=1 hl=2 l= 0 prim: NULL + + + +-----BEGIN DATA----- +MIIB46ADAgECAgkA3l4tFOVii0UwDQYJKoZIhvcNAQELBQAwVjELMAkGA1UEBhMCQVUxEzARBgN +VBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEPMA0GA1 +UEAwwGTXkga2V5MB4XDTE1MDcwMjE3MDYzOVoXDTE2MDcwMTE3MDYzOVowVjELMAkGA1UEBhMCQ +VUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0 +ZDEPMA0GA1UEAwwGTXkga2V5MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqR+B2Mj1irNp +1JnY2zQIQRQPz7ybs6mUjHT3hf5APyaig2u6fBPThqxssgg0YviqIj/70hVK/JXcqP1zgR5AhsA +0agnwAjfB/ow4EH+3HEYV52qpxN98pUxC+1l2hgVtn8xCS/JGyjK+6dv+lZw3ixJoX2RjVtdJ4/ +cn318EhhQIDAQABo1AwTjAdBgNVHQ4EFgQUzQBVKTEknyLndWd2HTsBdTKvyikwHwYDVR0jBBgw +FoAUzQBVKTEknyLndWd2HTsBdTKvyikwDAYDVR0TBAUwAwEB/w== +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A4GBADrHSmFSJw/Gv7hs5PNzpaJwAri/sitarIZfzN/SjR+n8L8yeTEoiDb1+BkxlFvXvPHTaOK +oO3WlslNNOxh1W5/JkYYGOUkCcyIjnln6qS560imcr3VNjomT/M8M2Iss+rJiKau1TRuaP7H8i6 ++Gqf3saGdr8/LnvFAdNQvkalQt +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=3 l= 129 prim: BIT STRING diff --git a/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa2048-pkcs1-sha512.pem b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa2048-pkcs1-sha512.pem new file mode 100644 index 00000000000..69f3556221e --- /dev/null +++ b/vendor/rustls-webpki-legacy/third-party/chromium/data/verify_signed_data/rsa2048-pkcs1-sha512.pem @@ -0,0 +1,93 @@ +This test data was produced by creating a self-signed RSA cert using OpenSSL, +and then extracting the relevant fields. + +It uses RSA PKCS#1 v1.5 with SHA-512 and a 2048-bit key. + +(1) Generate self-signed certificate + + openssl genrsa -out rsa_key.pem 2048 + openssl req -new -key rsa_key.pem -x509 -nodes -days 365 -sha512 -out cert.pem + +(2) Extract public key + + openssl x509 -in cert.pem -pubkey -noout > pubkey.pem + cat pubkey.pem + +(3) Extract signed data (tbsCertificate) + + openssl asn1parse -in cert.pem -out tbs -noout -strparse 4 + base64 tbs + +(4) Extract signature algorithm + + # Find the offset of the signature algorithm near the end (589 in this case) + openssl asn1parse -in cert.pem + + openssl asn1parse -in cert.pem -out alg -noout -strparse 589 + base64 alg + +(5) Extract the signature + + # Find the final offset of BIT STRING (506 in this case) + openssl asn1parse -in cert.pem + + openssl asn1parse -in cert.pem -out sig -noout -strparse 506 + base64 sig + + + +-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzcu2shJRrXFAwMkf30y2AY1zIg9VF/h +egYcejzdR2AzUb8vU2TXld2i8pp44l+DrvtqmzS7G+yxx3uOx+zsoqBaUT0c9HfkbE+IRmcLkQF +vYpSpm6Eu8OS14CSmEtiR91Et8LR0+bd0Gn3pgmb+epFJBaBPeDSiI/smqKCs7yP04+tS4Q4r47 +G04LhSp4/hmqH32b4Gcm9nsihHV9FfPfVdxDQUEJp3AgyBPwhPZEAyhoQS73TjjxXHqJRSz37Sl +ueMVPuNncqbT4nAMKz25J1CtRlQh21uZzfY2QRP3m6rAZquQUos1febC6A7qmhQljWKKmXtfVY+ +fAamstdHrWwIDAQAB +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=4 l= 290 cons: SEQUENCE + 4:d=1 hl=2 l= 13 cons: SEQUENCE + 6:d=2 hl=2 l= 9 prim: OBJECT :rsaEncryption + 17:d=2 hl=2 l= 0 prim: NULL + 19:d=1 hl=4 l= 271 prim: BIT STRING + + + +-----BEGIN ALGORITHM----- +MA0GCSqGSIb3DQEBDQUA +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 13 cons: SEQUENCE + 2:d=1 hl=2 l= 9 prim: OBJECT :sha512WithRSAEncryption + 13:d=1 hl=2 l= 0 prim: NULL + + + +-----BEGIN DATA----- +MIICRaADAgECAgkA7jWRLkwHvHswDQYJKoZIhvcNAQENBQAwRTELMAkGA1UEBhMCQVUxEzARBgN +VBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0xNT +A3MjgwMjIyMzFaFw0xNjA3MjcwMjIyMzFaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lL +VN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggEiMA0GCSqGSIb3DQEB +AQUAA4IBDwAwggEKAoIBAQDNy7ayElGtcUDAyR/fTLYBjXMiD1UX+F6Bhx6PN1HYDNRvy9TZNeV +3aLymnjiX4Ou+2qbNLsb7LHHe47H7OyioFpRPRz0d+RsT4hGZwuRAW9ilKmboS7w5LXgJKYS2JH +3US3wtHT5t3QafemCZv56kUkFoE94NKIj+yaooKzvI/Tj61LhDivjsbTguFKnj+GaoffZvgZyb2 +eyKEdX0V899V3ENBQQmncCDIE/CE9kQDKGhBLvdOOPFceolFLPftKW54xU+42dyptPicAwrPbkn +UK1GVCHbW5nN9jZBE/ebqsBmq5BSizV95sLoDuqaFCWNYoqZe19Vj58Bqay10etbAgMBAAGjUDB +OMB0GA1UdDgQWBBRsCPajkEscZM6SpLbNTa/7dY5azzAfBgNVHSMEGDAWgBRsCPajkEscZM6SpL +bNTa/7dY5azzAMBgNVHRMEBTADAQH/ +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A4IBAQAhKSNq+X/CfzhtNsMo6MJpTBjJBV5fhHerIZr6e3ozCTBCR29vYsVnJ4/6i5lL1pNeOhM +ldthnuSlMzTS1Zme1OqRWB3U8QmwCFwhDxW/i4fdT8kxDAmELNp4z0GcXbe27V895PE0R/m8P47 +B6xbra+SQlEMW12K1EndUqrO6vgLbobV14mveWdgc0KIOnDKgsTHV8NTV1w3qtp1ujfvizYfBZu +yyMOA1yZPDpREZtClro7lufwDQ7+LgSdtNLMDAMzapfIjAEPVNVLmJzMgzaHqMsZM8gP8vWAdfc +R4mCmWXVotrM6d1rjJGdRADAONYCC4/+d1IMkVGoVfpaej6I +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=4 l= 257 prim: BIT STRING