pi-codex-auto-review 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -10
- package/dist/approval-commands.d.ts +4 -0
- package/dist/approval-commands.js +176 -0
- package/dist/approval-commands.js.map +1 -0
- package/dist/approval-settings.d.ts +9 -0
- package/dist/approval-settings.js +40 -0
- package/dist/approval-settings.js.map +1 -0
- package/dist/approvals.d.ts +2 -1
- package/dist/approvals.js +3 -2
- package/dist/approvals.js.map +1 -1
- package/dist/cli.js +5 -5
- package/dist/cli.js.map +1 -1
- package/dist/contracts.d.ts +2 -0
- package/dist/contracts.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +26 -38
- package/dist/index.js.map +1 -1
- package/dist/policy/index.d.ts +0 -1
- package/dist/policy/index.js +11 -32
- package/dist/policy/index.js.map +1 -1
- package/dist/review/context.d.ts +14 -1
- package/dist/review/context.js +83 -13
- package/dist/review/context.js.map +1 -1
- package/dist/review/investigation.d.ts +3 -3
- package/dist/review/investigation.js +1 -1
- package/dist/review/investigation.js.map +1 -1
- package/dist/review/lifecycle.js +2 -2
- package/dist/review/lifecycle.js.map +1 -1
- package/dist/review/policy.js +20 -3
- package/dist/review/policy.js.map +1 -1
- package/dist/review/user-input.d.ts +5 -0
- package/dist/review/user-input.js +31 -0
- package/dist/review/user-input.js.map +1 -0
- package/dist/reviewer.d.ts +11 -1
- package/dist/reviewer.js +12 -2
- package/dist/reviewer.js.map +1 -1
- package/dist/tools/controller.d.ts +11 -6
- package/dist/tools/controller.js +102 -55
- package/dist/tools/controller.js.map +1 -1
- package/dist/tools/environment.d.ts +2 -0
- package/dist/tools/environment.js +9 -0
- package/dist/tools/environment.js.map +1 -0
- package/dist/tools/executor.d.ts +14 -0
- package/dist/tools/executor.js +75 -0
- package/dist/tools/executor.js.map +1 -0
- package/dist/tools/external.d.ts +1 -0
- package/dist/tools/external.js.map +1 -1
- package/dist/tools/mcp.js +1 -0
- package/dist/tools/mcp.js.map +1 -1
- package/dist/tools/mutation-queue.d.ts +1 -0
- package/dist/tools/mutation-queue.js +16 -0
- package/dist/tools/mutation-queue.js.map +1 -0
- package/docs/publishing.md +7 -7
- package/docs/security/dependencies.md +13 -3
- package/docs/testing/auto-review-protection.md +31 -8
- package/docs/usage.md +33 -18
- package/package.json +11 -14
- package/dist/sandbox/broker.d.ts +0 -1
- package/dist/sandbox/broker.js +0 -139
- package/dist/sandbox/broker.js.map +0 -1
- package/dist/sandbox/config.d.ts +0 -5
- package/dist/sandbox/config.js +0 -97
- package/dist/sandbox/config.js.map +0 -1
- package/dist/sandbox/directory-scan.d.ts +0 -1
- package/dist/sandbox/directory-scan.js +0 -32
- package/dist/sandbox/directory-scan.js.map +0 -1
- package/dist/sandbox/executor.d.ts +0 -20
- package/dist/sandbox/executor.js +0 -146
- package/dist/sandbox/executor.js.map +0 -1
- package/dist/sandbox/hard-links.d.ts +0 -4
- package/dist/sandbox/hard-links.js +0 -155
- package/dist/sandbox/hard-links.js.map +0 -1
- package/dist/sandbox/linux-read-paths.d.ts +0 -7
- package/dist/sandbox/linux-read-paths.js +0 -47
- package/dist/sandbox/linux-read-paths.js.map +0 -1
- package/dist/sandbox/paths.d.ts +0 -3
- package/dist/sandbox/paths.js +0 -10
- package/dist/sandbox/paths.js.map +0 -1
- package/dist/sandbox/runtime-write-paths.d.ts +0 -2
- package/dist/sandbox/runtime-write-paths.js +0 -8
- package/dist/sandbox/runtime-write-paths.js.map +0 -1
- package/dist/sandbox/seccomp.d.ts +0 -5
- package/dist/sandbox/seccomp.js +0 -16
- package/dist/sandbox/seccomp.js.map +0 -1
- package/dist/sandbox/worker.d.ts +0 -1
- package/dist/sandbox/worker.js +0 -78
- package/dist/sandbox/worker.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/LICENSE +0 -201
- package/node_modules/@anthropic-ai/sandbox-runtime/README.md +0 -901
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/cli.d.ts +0 -3
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/cli.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/cli.js +0 -472
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/cli.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/index.d.ts +0 -19
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/index.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/index.js +0 -17
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/index.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/address.d.ts +0 -52
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/address.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/address.js +0 -153
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/address.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/aws-sigv4.d.ts +0 -164
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/aws-sigv4.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/aws-sigv4.js +0 -246
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/aws-sigv4.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/body-substitution.d.ts +0 -58
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/body-substitution.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/body-substitution.js +0 -128
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/body-substitution.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-aws-pairs.d.ts +0 -124
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-aws-pairs.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-aws-pairs.js +0 -258
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-aws-pairs.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-decode.d.ts +0 -87
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-decode.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-decode.js +0 -138
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-decode.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-extract.d.ts +0 -67
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-extract.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-extract.js +0 -113
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-extract.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-env.d.ts +0 -70
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-env.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-env.js +0 -171
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-env.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-files.d.ts +0 -120
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-files.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-files.js +0 -281
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-files.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-sentinel.d.ts +0 -108
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-sentinel.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-sentinel.js +0 -208
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-sentinel.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/domain-pattern.d.ts +0 -82
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/domain-pattern.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/domain-pattern.js +0 -155
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/domain-pattern.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/generate-seccomp-filter.d.ts +0 -44
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/generate-seccomp-filter.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/generate-seccomp-filter.js +0 -220
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/generate-seccomp-filter.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/http-proxy.d.ts +0 -150
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/http-proxy.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/http-proxy.js +0 -678
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/http-proxy.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/java-proxy-agent.d.ts +0 -32
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/java-proxy-agent.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/java-proxy-agent.js +0 -111
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/java-proxy-agent.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-sandbox-utils.d.ts +0 -305
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-sandbox-utils.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-sandbox-utils.js +0 -2605
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-sandbox-utils.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-violation-monitor.d.ts +0 -55
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-violation-monitor.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-violation-monitor.js +0 -152
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-violation-monitor.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/listen-in-range.d.ts +0 -12
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/listen-in-range.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/listen-in-range.js +0 -43
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/listen-in-range.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/macos-sandbox-utils.d.ts +0 -116
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/macos-sandbox-utils.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/macos-sandbox-utils.js +0 -1195
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/macos-sandbox-utils.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-ca.d.ts +0 -200
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-ca.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-ca.js +0 -443
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-ca.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-leaf.d.ts +0 -28
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-leaf.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-leaf.js +0 -114
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-leaf.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mux-proxy.d.ts +0 -59
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mux-proxy.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mux-proxy.js +0 -159
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mux-proxy.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/parent-proxy.d.ts +0 -147
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/parent-proxy.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/parent-proxy.js +0 -445
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/parent-proxy.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/read-deny-glob.d.ts +0 -17
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/read-deny-glob.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/read-deny-glob.js +0 -163
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/read-deny-glob.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/request-filter.d.ts +0 -83
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/request-filter.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/request-filter.js +0 -212
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/request-filter.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/resolved-address-guard.d.ts +0 -76
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/resolved-address-guard.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/resolved-address-guard.js +0 -221
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/resolved-address-guard.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-config.d.ts +0 -1691
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-config.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-config.js +0 -1233
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-config.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-manager.d.ts +0 -97
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-manager.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-manager.js +0 -1937
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-manager.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-schemas.d.ts +0 -113
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-schemas.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-schemas.js +0 -3
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-schemas.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-utils.d.ts +0 -411
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-utils.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-utils.js +0 -1408
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-utils.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-violation-store.d.ts +0 -37
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-violation-store.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-violation-store.js +0 -125
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-violation-store.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/socks-proxy.d.ts +0 -57
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/socks-proxy.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/socks-proxy.js +0 -332
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/socks-proxy.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/tls-terminate-proxy.d.ts +0 -100
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/tls-terminate-proxy.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/tls-terminate-proxy.js +0 -546
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/tls-terminate-proxy.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/windows-sandbox-utils.d.ts +0 -923
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/windows-sandbox-utils.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/windows-sandbox-utils.js +0 -1419
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/windows-sandbox-utils.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/config-loader.d.ts +0 -31
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/config-loader.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/config-loader.js +0 -69
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/config-loader.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/debug.d.ts +0 -7
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/debug.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/debug.js +0 -25
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/debug.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/platform.d.ts +0 -15
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/platform.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/platform.js +0 -49
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/platform.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/ripgrep.d.ts +0 -17
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/ripgrep.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/ripgrep.js +0 -37
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/ripgrep.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/shell-quote.d.ts +0 -27
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/shell-quote.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/shell-quote.js +0 -47
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/shell-quote.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/which.d.ts +0 -9
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/which.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/which.js +0 -25
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/which.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/package.json +0 -88
- package/node_modules/@anthropic-ai/sandbox-runtime/vendor/java-proxy-agent/build.ts +0 -95
- package/node_modules/@anthropic-ai/sandbox-runtime/vendor/java-proxy-agent/srt-proxy-agent.jar +0 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/vendor/seccomp/arm64/apply-seccomp +0 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/vendor/seccomp/build.ts +0 -69
- package/node_modules/@anthropic-ai/sandbox-runtime/vendor/seccomp/x64/apply-seccomp +0 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/vendor/srt-win/arm64/srt-win.exe +0 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/vendor/srt-win/build.ts +0 -28
- package/node_modules/@anthropic-ai/sandbox-runtime/vendor/srt-win/x64/srt-win.exe +0 -0
- package/node_modules/@pondwader/socks5-server/.github/workflows/ci.yml +0 -27
- package/node_modules/@pondwader/socks5-server/LICENSE +0 -20
- package/node_modules/@pondwader/socks5-server/README.md +0 -151
- package/node_modules/@pondwader/socks5-server/dist/index.d.mts +0 -87
- package/node_modules/@pondwader/socks5-server/dist/index.d.ts +0 -87
- package/node_modules/@pondwader/socks5-server/dist/index.js +0 -346
- package/node_modules/@pondwader/socks5-server/dist/index.mjs +0 -307
- package/node_modules/@pondwader/socks5-server/package.json +0 -31
- package/node_modules/commander/LICENSE +0 -22
- package/node_modules/commander/Readme.md +0 -1157
- package/node_modules/commander/esm.mjs +0 -16
- package/node_modules/commander/index.js +0 -24
- package/node_modules/commander/lib/argument.js +0 -149
- package/node_modules/commander/lib/command.js +0 -2509
- package/node_modules/commander/lib/error.js +0 -39
- package/node_modules/commander/lib/help.js +0 -520
- package/node_modules/commander/lib/option.js +0 -330
- package/node_modules/commander/lib/suggestSimilar.js +0 -101
- package/node_modules/commander/package-support.json +0 -16
- package/node_modules/commander/package.json +0 -84
- package/node_modules/commander/typings/esm.d.mts +0 -3
- package/node_modules/commander/typings/index.d.ts +0 -969
- package/node_modules/node-forge/.editorconfig +0 -17
- package/node_modules/node-forge/.eslintrc.js +0 -24
- package/node_modules/node-forge/.github/workflows/main.yaml +0 -96
- package/node_modules/node-forge/.istanbul.yml +0 -2
- package/node_modules/node-forge/.npmignore +0 -15
- package/node_modules/node-forge/CHANGELOG.md +0 -555
- package/node_modules/node-forge/CONTRIBUTING.md +0 -18
- package/node_modules/node-forge/LICENSE +0 -331
- package/node_modules/node-forge/README.md +0 -2071
- package/node_modules/node-forge/RELEASE.md +0 -19
- package/node_modules/node-forge/SECURITY.md +0 -5
- package/node_modules/node-forge/examples/create-cert.js +0 -110
- package/node_modules/node-forge/examples/create-csr.js +0 -66
- package/node_modules/node-forge/examples/create-pkcs12.js +0 -160
- package/node_modules/node-forge/examples/imap.js +0 -46
- package/node_modules/node-forge/examples/sign-p7.js +0 -115
- package/node_modules/node-forge/examples/tls.js +0 -189
- package/node_modules/node-forge/flash/PooledSocket.as +0 -18
- package/node_modules/node-forge/flash/README.md +0 -48
- package/node_modules/node-forge/flash/SocketEvent.as +0 -36
- package/node_modules/node-forge/flash/SocketPool.as +0 -754
- package/node_modules/node-forge/flash/mod_fsp/README +0 -135
- package/node_modules/node-forge/flash/mod_fsp/mod_fsp.c +0 -415
- package/node_modules/node-forge/flash/package.json +0 -28
- package/node_modules/node-forge/flash/policyserver.js +0 -65
- package/node_modules/node-forge/flash/policyserver.py +0 -112
- package/node_modules/node-forge/flash/swf/SocketPool.swf +0 -0
- package/node_modules/node-forge/karma-sauce.conf.js +0 -79
- package/node_modules/node-forge/karma.conf.js +0 -133
- package/node_modules/node-forge/lib/aes.js +0 -1091
- package/node_modules/node-forge/lib/aesCipherSuites.js +0 -282
- package/node_modules/node-forge/lib/asn1-validator.js +0 -91
- package/node_modules/node-forge/lib/asn1.js +0 -1503
- package/node_modules/node-forge/lib/baseN.js +0 -186
- package/node_modules/node-forge/lib/cipher.js +0 -230
- package/node_modules/node-forge/lib/cipherModes.js +0 -999
- package/node_modules/node-forge/lib/des.js +0 -496
- package/node_modules/node-forge/lib/ed25519.js +0 -1091
- package/node_modules/node-forge/lib/forge.js +0 -13
- package/node_modules/node-forge/lib/form.js +0 -149
- package/node_modules/node-forge/lib/hmac.js +0 -146
- package/node_modules/node-forge/lib/http.js +0 -1346
- package/node_modules/node-forge/lib/index.all.js +0 -16
- package/node_modules/node-forge/lib/index.js +0 -33
- package/node_modules/node-forge/lib/jsbn.js +0 -1294
- package/node_modules/node-forge/lib/kem.js +0 -168
- package/node_modules/node-forge/lib/log.js +0 -319
- package/node_modules/node-forge/lib/md.all.js +0 -13
- package/node_modules/node-forge/lib/md.js +0 -11
- package/node_modules/node-forge/lib/md5.js +0 -289
- package/node_modules/node-forge/lib/mgf.js +0 -12
- package/node_modules/node-forge/lib/mgf1.js +0 -57
- package/node_modules/node-forge/lib/oids.js +0 -180
- package/node_modules/node-forge/lib/pbe.js +0 -1023
- package/node_modules/node-forge/lib/pbkdf2.js +0 -211
- package/node_modules/node-forge/lib/pem.js +0 -237
- package/node_modules/node-forge/lib/pkcs1.js +0 -276
- package/node_modules/node-forge/lib/pkcs12.js +0 -1078
- package/node_modules/node-forge/lib/pkcs7.js +0 -1260
- package/node_modules/node-forge/lib/pkcs7asn1.js +0 -410
- package/node_modules/node-forge/lib/pki.js +0 -102
- package/node_modules/node-forge/lib/prime.js +0 -297
- package/node_modules/node-forge/lib/prime.worker.js +0 -168
- package/node_modules/node-forge/lib/prng.js +0 -419
- package/node_modules/node-forge/lib/pss.js +0 -241
- package/node_modules/node-forge/lib/random.js +0 -191
- package/node_modules/node-forge/lib/rc2.js +0 -410
- package/node_modules/node-forge/lib/rsa.js +0 -1973
- package/node_modules/node-forge/lib/sha1.js +0 -319
- package/node_modules/node-forge/lib/sha256.js +0 -327
- package/node_modules/node-forge/lib/sha512.js +0 -561
- package/node_modules/node-forge/lib/socket.js +0 -287
- package/node_modules/node-forge/lib/ssh.js +0 -236
- package/node_modules/node-forge/lib/tls.js +0 -4282
- package/node_modules/node-forge/lib/tlssocket.js +0 -249
- package/node_modules/node-forge/lib/util.js +0 -2652
- package/node_modules/node-forge/lib/x509.js +0 -3251
- package/node_modules/node-forge/lib/xhr.js +0 -738
- package/node_modules/node-forge/package.json +0 -123
- package/node_modules/node-forge/tests/.eslintrc.js +0 -5
- package/node_modules/node-forge/tests/README.md +0 -4
- package/node_modules/node-forge/tests/benchmarks/aes-speed.js +0 -62
- package/node_modules/node-forge/tests/benchmarks/so-44303784.js +0 -246
- package/node_modules/node-forge/tests/flash/README.md +0 -7
- package/node_modules/node-forge/tests/flash/Test.as +0 -96
- package/node_modules/node-forge/tests/flash/build-flash.xml +0 -7
- package/node_modules/node-forge/tests/flash/index.html +0 -28
- package/node_modules/node-forge/tests/index.html +0 -33
- package/node_modules/node-forge/tests/issues/heartbleed.js +0 -55
- package/node_modules/node-forge/tests/issues/issue-428.html +0 -95
- package/node_modules/node-forge/tests/issues/issue-428.js +0 -375
- package/node_modules/node-forge/tests/karma/index.js +0 -8
- package/node_modules/node-forge/tests/karma/testWorker.js +0 -65
- package/node_modules/node-forge/tests/karma/web-worker-rsa.js +0 -55
- package/node_modules/node-forge/tests/legacy/common.html +0 -65
- package/node_modules/node-forge/tests/legacy/common.js +0 -2199
- package/node_modules/node-forge/tests/legacy/form.html +0 -148
- package/node_modules/node-forge/tests/legacy/form.js +0 -40
- package/node_modules/node-forge/tests/legacy/http.html +0 -235
- package/node_modules/node-forge/tests/legacy/index.html +0 -70
- package/node_modules/node-forge/tests/legacy/keygen.html +0 -113
- package/node_modules/node-forge/tests/legacy/login.css +0 -26
- package/node_modules/node-forge/tests/legacy/loginDemo.html +0 -32
- package/node_modules/node-forge/tests/legacy/loginDemo.js +0 -149
- package/node_modules/node-forge/tests/legacy/performance.html +0 -533
- package/node_modules/node-forge/tests/legacy/result.txt +0 -1
- package/node_modules/node-forge/tests/legacy/socketPool.html +0 -302
- package/node_modules/node-forge/tests/legacy/tasks.html +0 -54
- package/node_modules/node-forge/tests/legacy/tasks.js +0 -378
- package/node_modules/node-forge/tests/legacy/tls.html +0 -389
- package/node_modules/node-forge/tests/legacy/webid.html +0 -89
- package/node_modules/node-forge/tests/legacy/webid.js +0 -313
- package/node_modules/node-forge/tests/legacy/ws-webid.js +0 -120
- package/node_modules/node-forge/tests/legacy/xhr.html +0 -67
- package/node_modules/node-forge/tests/legacy/xhr.js +0 -590
- package/node_modules/node-forge/tests/pocs/ghsa-2328-f5f3-gj25.js +0 -85
- package/node_modules/node-forge/tests/pocs/ghsa-ppp5-5v6c-4jwp.js +0 -166
- package/node_modules/node-forge/tests/pocs/ghsa-q67f-28xg-22rw.js +0 -103
- package/node_modules/node-forge/tests/security/cve-2025-12816.js +0 -75
- package/node_modules/node-forge/tests/security/ghsa-554w-wpv2-vw27.js +0 -81
- package/node_modules/node-forge/tests/security/index.js +0 -3
- package/node_modules/node-forge/tests/server.crt +0 -26
- package/node_modules/node-forge/tests/server.js +0 -87
- package/node_modules/node-forge/tests/server.key +0 -27
- package/node_modules/node-forge/tests/support/task.js +0 -718
- package/node_modules/node-forge/tests/tests.css +0 -61
- package/node_modules/node-forge/tests/unit/aes.js +0 -1498
- package/node_modules/node-forge/tests/unit/asn1.js +0 -1337
- package/node_modules/node-forge/tests/unit/csr.js +0 -129
- package/node_modules/node-forge/tests/unit/des.js +0 -231
- package/node_modules/node-forge/tests/unit/ed25519.js +0 -395
- package/node_modules/node-forge/tests/unit/forge.js +0 -2
- package/node_modules/node-forge/tests/unit/hmac.js +0 -64
- package/node_modules/node-forge/tests/unit/index.html +0 -20
- package/node_modules/node-forge/tests/unit/index.js +0 -27
- package/node_modules/node-forge/tests/unit/jsbn.js +0 -40
- package/node_modules/node-forge/tests/unit/kem.js +0 -167
- package/node_modules/node-forge/tests/unit/md5.js +0 -114
- package/node_modules/node-forge/tests/unit/mgf1.js +0 -16
- package/node_modules/node-forge/tests/unit/pbkdf2.js +0 -182
- package/node_modules/node-forge/tests/unit/pem.js +0 -159
- package/node_modules/node-forge/tests/unit/pkcs1.js +0 -1077
- package/node_modules/node-forge/tests/unit/pkcs12.js +0 -739
- package/node_modules/node-forge/tests/unit/pkcs7.js +0 -792
- package/node_modules/node-forge/tests/unit/random.js +0 -48
- package/node_modules/node-forge/tests/unit/rc2.js +0 -88
- package/node_modules/node-forge/tests/unit/rsa.js +0 -1278
- package/node_modules/node-forge/tests/unit/sha1.js +0 -72
- package/node_modules/node-forge/tests/unit/sha256.js +0 -79
- package/node_modules/node-forge/tests/unit/sha512.js +0 -200
- package/node_modules/node-forge/tests/unit/ssh.js +0 -175
- package/node_modules/node-forge/tests/unit/tls.js +0 -175
- package/node_modules/node-forge/tests/unit/util.js +0 -595
- package/node_modules/node-forge/tests/unit/x509.js +0 -1986
- package/node_modules/node-forge/tests/websockets/server-webid.js +0 -495
- package/node_modules/node-forge/tests/websockets/server-ws.js +0 -158
- package/node_modules/node-forge/webpack-tests.config.js +0 -26
- package/node_modules/node-forge/webpack.config.js +0 -130
- package/node_modules/zod/LICENSE +0 -21
- package/node_modules/zod/README.md +0 -208
- package/node_modules/zod/index.cjs +0 -33
- package/node_modules/zod/index.d.cts +0 -4
- package/node_modules/zod/index.d.ts +0 -4
- package/node_modules/zod/index.js +0 -4
- package/node_modules/zod/package.json +0 -118
- package/node_modules/zod/src/index.ts +0 -4
- package/node_modules/zod/src/v3/ZodError.ts +0 -330
- package/node_modules/zod/src/v3/benchmarks/datetime.ts +0 -58
- package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +0 -80
- package/node_modules/zod/src/v3/benchmarks/index.ts +0 -59
- package/node_modules/zod/src/v3/benchmarks/ipv4.ts +0 -57
- package/node_modules/zod/src/v3/benchmarks/object.ts +0 -69
- package/node_modules/zod/src/v3/benchmarks/primitives.ts +0 -162
- package/node_modules/zod/src/v3/benchmarks/realworld.ts +0 -63
- package/node_modules/zod/src/v3/benchmarks/string.ts +0 -55
- package/node_modules/zod/src/v3/benchmarks/union.ts +0 -80
- package/node_modules/zod/src/v3/errors.ts +0 -13
- package/node_modules/zod/src/v3/external.ts +0 -6
- package/node_modules/zod/src/v3/helpers/enumUtil.ts +0 -17
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +0 -8
- package/node_modules/zod/src/v3/helpers/parseUtil.ts +0 -176
- package/node_modules/zod/src/v3/helpers/partialUtil.ts +0 -34
- package/node_modules/zod/src/v3/helpers/typeAliases.ts +0 -2
- package/node_modules/zod/src/v3/helpers/util.ts +0 -224
- package/node_modules/zod/src/v3/index.ts +0 -4
- package/node_modules/zod/src/v3/locales/en.ts +0 -124
- package/node_modules/zod/src/v3/standard-schema.ts +0 -113
- package/node_modules/zod/src/v3/tests/Mocker.ts +0 -54
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +0 -157
- package/node_modules/zod/src/v3/tests/anyunknown.test.ts +0 -28
- package/node_modules/zod/src/v3/tests/array.test.ts +0 -71
- package/node_modules/zod/src/v3/tests/async-parsing.test.ts +0 -388
- package/node_modules/zod/src/v3/tests/async-refinements.test.ts +0 -46
- package/node_modules/zod/src/v3/tests/base.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/bigint.test.ts +0 -55
- package/node_modules/zod/src/v3/tests/branded.test.ts +0 -53
- package/node_modules/zod/src/v3/tests/catch.test.ts +0 -220
- package/node_modules/zod/src/v3/tests/coerce.test.ts +0 -133
- package/node_modules/zod/src/v3/tests/complex.test.ts +0 -56
- package/node_modules/zod/src/v3/tests/custom.test.ts +0 -31
- package/node_modules/zod/src/v3/tests/date.test.ts +0 -32
- package/node_modules/zod/src/v3/tests/deepmasking.test.ts +0 -186
- package/node_modules/zod/src/v3/tests/default.test.ts +0 -112
- package/node_modules/zod/src/v3/tests/description.test.ts +0 -33
- package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +0 -315
- package/node_modules/zod/src/v3/tests/enum.test.ts +0 -80
- package/node_modules/zod/src/v3/tests/error.test.ts +0 -551
- package/node_modules/zod/src/v3/tests/firstparty.test.ts +0 -87
- package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +0 -21
- package/node_modules/zod/src/v3/tests/function.test.ts +0 -257
- package/node_modules/zod/src/v3/tests/generics.test.ts +0 -48
- package/node_modules/zod/src/v3/tests/instanceof.test.ts +0 -37
- package/node_modules/zod/src/v3/tests/intersection.test.ts +0 -110
- package/node_modules/zod/src/v3/tests/language-server.source.ts +0 -76
- package/node_modules/zod/src/v3/tests/language-server.test.ts +0 -207
- package/node_modules/zod/src/v3/tests/literal.test.ts +0 -36
- package/node_modules/zod/src/v3/tests/map.test.ts +0 -110
- package/node_modules/zod/src/v3/tests/masking.test.ts +0 -4
- package/node_modules/zod/src/v3/tests/mocker.test.ts +0 -19
- package/node_modules/zod/src/v3/tests/nan.test.ts +0 -21
- package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +0 -87
- package/node_modules/zod/src/v3/tests/nullable.test.ts +0 -42
- package/node_modules/zod/src/v3/tests/number.test.ts +0 -176
- package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/object.test.ts +0 -434
- package/node_modules/zod/src/v3/tests/optional.test.ts +0 -42
- package/node_modules/zod/src/v3/tests/parseUtil.test.ts +0 -23
- package/node_modules/zod/src/v3/tests/parser.test.ts +0 -41
- package/node_modules/zod/src/v3/tests/partials.test.ts +0 -243
- package/node_modules/zod/src/v3/tests/pickomit.test.ts +0 -111
- package/node_modules/zod/src/v3/tests/pipeline.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/preprocess.test.ts +0 -186
- package/node_modules/zod/src/v3/tests/primitive.test.ts +0 -440
- package/node_modules/zod/src/v3/tests/promise.test.ts +0 -90
- package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -194
- package/node_modules/zod/src/v3/tests/record.test.ts +0 -171
- package/node_modules/zod/src/v3/tests/recursive.test.ts +0 -197
- package/node_modules/zod/src/v3/tests/refine.test.ts +0 -313
- package/node_modules/zod/src/v3/tests/safeparse.test.ts +0 -27
- package/node_modules/zod/src/v3/tests/set.test.ts +0 -142
- package/node_modules/zod/src/v3/tests/standard-schema.test.ts +0 -83
- package/node_modules/zod/src/v3/tests/string.test.ts +0 -916
- package/node_modules/zod/src/v3/tests/transformer.test.ts +0 -233
- package/node_modules/zod/src/v3/tests/tuple.test.ts +0 -90
- package/node_modules/zod/src/v3/tests/unions.test.ts +0 -57
- package/node_modules/zod/src/v3/tests/validations.test.ts +0 -133
- package/node_modules/zod/src/v3/tests/void.test.ts +0 -15
- package/node_modules/zod/src/v3/types.ts +0 -5136
- package/node_modules/zod/src/v4/classic/checks.ts +0 -30
- package/node_modules/zod/src/v4/classic/coerce.ts +0 -27
- package/node_modules/zod/src/v4/classic/compat.ts +0 -66
- package/node_modules/zod/src/v4/classic/errors.ts +0 -75
- package/node_modules/zod/src/v4/classic/external.ts +0 -50
- package/node_modules/zod/src/v4/classic/index.ts +0 -5
- package/node_modules/zod/src/v4/classic/iso.ts +0 -90
- package/node_modules/zod/src/v4/classic/parse.ts +0 -33
- package/node_modules/zod/src/v4/classic/schemas.ts +0 -2054
- package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +0 -26
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +0 -264
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +0 -210
- package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +0 -381
- package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +0 -68
- package/node_modules/zod/src/v4/classic/tests/base.test.ts +0 -7
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +0 -54
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +0 -63
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +0 -252
- package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +0 -20
- package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +0 -160
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +0 -352
- package/node_modules/zod/src/v4/classic/tests/custom.test.ts +0 -40
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +0 -31
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +0 -296
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +0 -313
- package/node_modules/zod/src/v4/classic/tests/description.test.ts +0 -32
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +0 -619
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +0 -285
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +0 -527
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +0 -711
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +0 -91
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +0 -175
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +0 -268
- package/node_modules/zod/src/v4/classic/tests/generics.test.ts +0 -72
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +0 -829
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +0 -34
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +0 -171
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +0 -108
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +0 -227
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +0 -92
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +0 -196
- package/node_modules/zod/src/v4/classic/tests/nan.test.ts +0 -21
- package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +0 -168
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +0 -86
- package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +0 -22
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +0 -247
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +0 -563
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +0 -123
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +0 -147
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +0 -127
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +0 -81
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +0 -37
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +0 -298
- package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +0 -175
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +0 -81
- package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +0 -23
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -252
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +0 -342
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +0 -356
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +0 -532
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +0 -204
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +0 -179
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +0 -57
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +0 -109
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +0 -881
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +0 -66
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +0 -758
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +0 -2314
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +0 -250
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +0 -163
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +0 -94
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +0 -283
- package/node_modules/zod/src/v4/classic/tests/void.test.ts +0 -12
- package/node_modules/zod/src/v4/core/api.ts +0 -1594
- package/node_modules/zod/src/v4/core/checks.ts +0 -1283
- package/node_modules/zod/src/v4/core/config.ts +0 -15
- package/node_modules/zod/src/v4/core/core.ts +0 -134
- package/node_modules/zod/src/v4/core/doc.ts +0 -44
- package/node_modules/zod/src/v4/core/errors.ts +0 -424
- package/node_modules/zod/src/v4/core/function.ts +0 -176
- package/node_modules/zod/src/v4/core/index.ts +0 -15
- package/node_modules/zod/src/v4/core/json-schema.ts +0 -143
- package/node_modules/zod/src/v4/core/parse.ts +0 -94
- package/node_modules/zod/src/v4/core/regexes.ts +0 -135
- package/node_modules/zod/src/v4/core/registries.ts +0 -96
- package/node_modules/zod/src/v4/core/schemas.ts +0 -3842
- package/node_modules/zod/src/v4/core/standard-schema.ts +0 -64
- package/node_modules/zod/src/v4/core/tests/index.test.ts +0 -46
- package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +0 -124
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +0 -22
- package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +0 -128
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +0 -69
- package/node_modules/zod/src/v4/core/to-json-schema.ts +0 -977
- package/node_modules/zod/src/v4/core/util.ts +0 -775
- package/node_modules/zod/src/v4/core/versions.ts +0 -5
- package/node_modules/zod/src/v4/core/zsf.ts +0 -323
- package/node_modules/zod/src/v4/index.ts +0 -4
- package/node_modules/zod/src/v4/locales/ar.ts +0 -125
- package/node_modules/zod/src/v4/locales/az.ts +0 -121
- package/node_modules/zod/src/v4/locales/be.ts +0 -184
- package/node_modules/zod/src/v4/locales/ca.ts +0 -127
- package/node_modules/zod/src/v4/locales/cs.ts +0 -142
- package/node_modules/zod/src/v4/locales/de.ts +0 -124
- package/node_modules/zod/src/v4/locales/en.ts +0 -127
- package/node_modules/zod/src/v4/locales/eo.ts +0 -125
- package/node_modules/zod/src/v4/locales/es.ts +0 -125
- package/node_modules/zod/src/v4/locales/fa.ts +0 -134
- package/node_modules/zod/src/v4/locales/fi.ts +0 -131
- package/node_modules/zod/src/v4/locales/fr-CA.ts +0 -126
- package/node_modules/zod/src/v4/locales/fr.ts +0 -124
- package/node_modules/zod/src/v4/locales/he.ts +0 -125
- package/node_modules/zod/src/v4/locales/hu.ts +0 -126
- package/node_modules/zod/src/v4/locales/id.ts +0 -125
- package/node_modules/zod/src/v4/locales/index.ts +0 -39
- package/node_modules/zod/src/v4/locales/it.ts +0 -125
- package/node_modules/zod/src/v4/locales/ja.ts +0 -122
- package/node_modules/zod/src/v4/locales/kh.ts +0 -126
- package/node_modules/zod/src/v4/locales/ko.ts +0 -131
- package/node_modules/zod/src/v4/locales/mk.ts +0 -127
- package/node_modules/zod/src/v4/locales/ms.ts +0 -124
- package/node_modules/zod/src/v4/locales/nl.ts +0 -126
- package/node_modules/zod/src/v4/locales/no.ts +0 -124
- package/node_modules/zod/src/v4/locales/ota.ts +0 -125
- package/node_modules/zod/src/v4/locales/pl.ts +0 -126
- package/node_modules/zod/src/v4/locales/ps.ts +0 -133
- package/node_modules/zod/src/v4/locales/pt.ts +0 -123
- package/node_modules/zod/src/v4/locales/ru.ts +0 -184
- package/node_modules/zod/src/v4/locales/sl.ts +0 -126
- package/node_modules/zod/src/v4/locales/sv.ts +0 -127
- package/node_modules/zod/src/v4/locales/ta.ts +0 -125
- package/node_modules/zod/src/v4/locales/th.ts +0 -126
- package/node_modules/zod/src/v4/locales/tr.ts +0 -121
- package/node_modules/zod/src/v4/locales/ua.ts +0 -126
- package/node_modules/zod/src/v4/locales/ur.ts +0 -126
- package/node_modules/zod/src/v4/locales/vi.ts +0 -125
- package/node_modules/zod/src/v4/locales/zh-CN.ts +0 -123
- package/node_modules/zod/src/v4/locales/zh-TW.ts +0 -125
- package/node_modules/zod/src/v4/mini/checks.ts +0 -32
- package/node_modules/zod/src/v4/mini/coerce.ts +0 -22
- package/node_modules/zod/src/v4/mini/external.ts +0 -40
- package/node_modules/zod/src/v4/mini/index.ts +0 -3
- package/node_modules/zod/src/v4/mini/iso.ts +0 -62
- package/node_modules/zod/src/v4/mini/parse.ts +0 -1
- package/node_modules/zod/src/v4/mini/schemas.ts +0 -1579
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +0 -129
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +0 -51
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +0 -144
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +0 -36
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +0 -22
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +0 -43
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +0 -871
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +0 -95
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +0 -185
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +0 -43
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +0 -275
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +0 -299
- package/node_modules/zod/src/v4-mini/index.ts +0 -1
- package/node_modules/zod/v3/ZodError.cjs +0 -138
- package/node_modules/zod/v3/ZodError.d.cts +0 -164
- package/node_modules/zod/v3/ZodError.d.ts +0 -164
- package/node_modules/zod/v3/ZodError.js +0 -133
- package/node_modules/zod/v3/errors.cjs +0 -17
- package/node_modules/zod/v3/errors.d.cts +0 -5
- package/node_modules/zod/v3/errors.d.ts +0 -5
- package/node_modules/zod/v3/errors.js +0 -9
- package/node_modules/zod/v3/external.cjs +0 -22
- package/node_modules/zod/v3/external.d.cts +0 -6
- package/node_modules/zod/v3/external.d.ts +0 -6
- package/node_modules/zod/v3/external.js +0 -6
- package/node_modules/zod/v3/helpers/enumUtil.cjs +0 -2
- package/node_modules/zod/v3/helpers/enumUtil.d.cts +0 -8
- package/node_modules/zod/v3/helpers/enumUtil.d.ts +0 -8
- package/node_modules/zod/v3/helpers/enumUtil.js +0 -1
- package/node_modules/zod/v3/helpers/errorUtil.cjs +0 -9
- package/node_modules/zod/v3/helpers/errorUtil.d.cts +0 -9
- package/node_modules/zod/v3/helpers/errorUtil.d.ts +0 -9
- package/node_modules/zod/v3/helpers/errorUtil.js +0 -6
- package/node_modules/zod/v3/helpers/parseUtil.cjs +0 -124
- package/node_modules/zod/v3/helpers/parseUtil.d.cts +0 -78
- package/node_modules/zod/v3/helpers/parseUtil.d.ts +0 -78
- package/node_modules/zod/v3/helpers/parseUtil.js +0 -109
- package/node_modules/zod/v3/helpers/partialUtil.cjs +0 -2
- package/node_modules/zod/v3/helpers/partialUtil.d.cts +0 -8
- package/node_modules/zod/v3/helpers/partialUtil.d.ts +0 -8
- package/node_modules/zod/v3/helpers/partialUtil.js +0 -1
- package/node_modules/zod/v3/helpers/typeAliases.cjs +0 -2
- package/node_modules/zod/v3/helpers/typeAliases.d.cts +0 -2
- package/node_modules/zod/v3/helpers/typeAliases.d.ts +0 -2
- package/node_modules/zod/v3/helpers/typeAliases.js +0 -1
- package/node_modules/zod/v3/helpers/util.cjs +0 -137
- package/node_modules/zod/v3/helpers/util.d.cts +0 -85
- package/node_modules/zod/v3/helpers/util.d.ts +0 -85
- package/node_modules/zod/v3/helpers/util.js +0 -133
- package/node_modules/zod/v3/index.cjs +0 -33
- package/node_modules/zod/v3/index.d.cts +0 -4
- package/node_modules/zod/v3/index.d.ts +0 -4
- package/node_modules/zod/v3/index.js +0 -4
- package/node_modules/zod/v3/locales/en.cjs +0 -111
- package/node_modules/zod/v3/locales/en.d.cts +0 -3
- package/node_modules/zod/v3/locales/en.d.ts +0 -3
- package/node_modules/zod/v3/locales/en.js +0 -109
- package/node_modules/zod/v3/standard-schema.cjs +0 -2
- package/node_modules/zod/v3/standard-schema.d.cts +0 -102
- package/node_modules/zod/v3/standard-schema.d.ts +0 -102
- package/node_modules/zod/v3/standard-schema.js +0 -1
- package/node_modules/zod/v3/types.cjs +0 -3775
- package/node_modules/zod/v3/types.d.cts +0 -1031
- package/node_modules/zod/v3/types.d.ts +0 -1031
- package/node_modules/zod/v3/types.js +0 -3693
- package/node_modules/zod/v4/classic/checks.cjs +0 -32
- package/node_modules/zod/v4/classic/checks.d.cts +0 -1
- package/node_modules/zod/v4/classic/checks.d.ts +0 -1
- package/node_modules/zod/v4/classic/checks.js +0 -1
- package/node_modules/zod/v4/classic/coerce.cjs +0 -47
- package/node_modules/zod/v4/classic/coerce.d.cts +0 -17
- package/node_modules/zod/v4/classic/coerce.d.ts +0 -17
- package/node_modules/zod/v4/classic/coerce.js +0 -17
- package/node_modules/zod/v4/classic/compat.cjs +0 -57
- package/node_modules/zod/v4/classic/compat.d.cts +0 -46
- package/node_modules/zod/v4/classic/compat.d.ts +0 -46
- package/node_modules/zod/v4/classic/compat.js +0 -27
- package/node_modules/zod/v4/classic/errors.cjs +0 -67
- package/node_modules/zod/v4/classic/errors.d.cts +0 -30
- package/node_modules/zod/v4/classic/errors.d.ts +0 -30
- package/node_modules/zod/v4/classic/errors.js +0 -41
- package/node_modules/zod/v4/classic/external.cjs +0 -70
- package/node_modules/zod/v4/classic/external.d.cts +0 -13
- package/node_modules/zod/v4/classic/external.d.ts +0 -13
- package/node_modules/zod/v4/classic/external.js +0 -18
- package/node_modules/zod/v4/classic/index.cjs +0 -33
- package/node_modules/zod/v4/classic/index.d.cts +0 -4
- package/node_modules/zod/v4/classic/index.d.ts +0 -4
- package/node_modules/zod/v4/classic/index.js +0 -4
- package/node_modules/zod/v4/classic/iso.cjs +0 -60
- package/node_modules/zod/v4/classic/iso.d.cts +0 -22
- package/node_modules/zod/v4/classic/iso.d.ts +0 -22
- package/node_modules/zod/v4/classic/iso.js +0 -30
- package/node_modules/zod/v4/classic/parse.cjs +0 -32
- package/node_modules/zod/v4/classic/parse.d.cts +0 -23
- package/node_modules/zod/v4/classic/parse.d.ts +0 -23
- package/node_modules/zod/v4/classic/parse.js +0 -6
- package/node_modules/zod/v4/classic/schemas.cjs +0 -1109
- package/node_modules/zod/v4/classic/schemas.d.cts +0 -630
- package/node_modules/zod/v4/classic/schemas.d.ts +0 -630
- package/node_modules/zod/v4/classic/schemas.js +0 -1006
- package/node_modules/zod/v4/core/api.cjs +0 -1039
- package/node_modules/zod/v4/core/api.d.cts +0 -284
- package/node_modules/zod/v4/core/api.d.ts +0 -284
- package/node_modules/zod/v4/core/api.js +0 -906
- package/node_modules/zod/v4/core/checks.cjs +0 -591
- package/node_modules/zod/v4/core/checks.d.cts +0 -278
- package/node_modules/zod/v4/core/checks.d.ts +0 -278
- package/node_modules/zod/v4/core/checks.js +0 -565
- package/node_modules/zod/v4/core/core.cjs +0 -67
- package/node_modules/zod/v4/core/core.d.cts +0 -49
- package/node_modules/zod/v4/core/core.d.ts +0 -49
- package/node_modules/zod/v4/core/core.js +0 -61
- package/node_modules/zod/v4/core/doc.cjs +0 -39
- package/node_modules/zod/v4/core/doc.d.cts +0 -14
- package/node_modules/zod/v4/core/doc.d.ts +0 -14
- package/node_modules/zod/v4/core/doc.js +0 -35
- package/node_modules/zod/v4/core/errors.cjs +0 -226
- package/node_modules/zod/v4/core/errors.d.cts +0 -208
- package/node_modules/zod/v4/core/errors.d.ts +0 -208
- package/node_modules/zod/v4/core/errors.js +0 -195
- package/node_modules/zod/v4/core/function.cjs +0 -102
- package/node_modules/zod/v4/core/function.d.cts +0 -52
- package/node_modules/zod/v4/core/function.d.ts +0 -52
- package/node_modules/zod/v4/core/function.js +0 -75
- package/node_modules/zod/v4/core/index.cjs +0 -44
- package/node_modules/zod/v4/core/index.d.cts +0 -15
- package/node_modules/zod/v4/core/index.d.ts +0 -15
- package/node_modules/zod/v4/core/index.js +0 -15
- package/node_modules/zod/v4/core/json-schema.cjs +0 -2
- package/node_modules/zod/v4/core/json-schema.d.cts +0 -87
- package/node_modules/zod/v4/core/json-schema.d.ts +0 -87
- package/node_modules/zod/v4/core/json-schema.js +0 -1
- package/node_modules/zod/v4/core/parse.cjs +0 -87
- package/node_modules/zod/v4/core/parse.d.cts +0 -25
- package/node_modules/zod/v4/core/parse.d.ts +0 -25
- package/node_modules/zod/v4/core/parse.js +0 -57
- package/node_modules/zod/v4/core/regexes.cjs +0 -103
- package/node_modules/zod/v4/core/regexes.d.cts +0 -62
- package/node_modules/zod/v4/core/regexes.d.ts +0 -62
- package/node_modules/zod/v4/core/regexes.js +0 -95
- package/node_modules/zod/v4/core/registries.cjs +0 -56
- package/node_modules/zod/v4/core/registries.d.cts +0 -35
- package/node_modules/zod/v4/core/registries.d.ts +0 -35
- package/node_modules/zod/v4/core/registries.js +0 -51
- package/node_modules/zod/v4/core/schemas.cjs +0 -1748
- package/node_modules/zod/v4/core/schemas.d.cts +0 -1041
- package/node_modules/zod/v4/core/schemas.d.ts +0 -1041
- package/node_modules/zod/v4/core/schemas.js +0 -1717
- package/node_modules/zod/v4/core/standard-schema.cjs +0 -2
- package/node_modules/zod/v4/core/standard-schema.d.cts +0 -55
- package/node_modules/zod/v4/core/standard-schema.d.ts +0 -55
- package/node_modules/zod/v4/core/standard-schema.js +0 -1
- package/node_modules/zod/v4/core/to-json-schema.cjs +0 -854
- package/node_modules/zod/v4/core/to-json-schema.d.cts +0 -88
- package/node_modules/zod/v4/core/to-json-schema.d.ts +0 -88
- package/node_modules/zod/v4/core/to-json-schema.js +0 -849
- package/node_modules/zod/v4/core/util.cjs +0 -539
- package/node_modules/zod/v4/core/util.d.cts +0 -183
- package/node_modules/zod/v4/core/util.d.ts +0 -183
- package/node_modules/zod/v4/core/util.js +0 -493
- package/node_modules/zod/v4/core/versions.cjs +0 -8
- package/node_modules/zod/v4/core/versions.d.cts +0 -5
- package/node_modules/zod/v4/core/versions.d.ts +0 -5
- package/node_modules/zod/v4/core/versions.js +0 -5
- package/node_modules/zod/v4/index.cjs +0 -22
- package/node_modules/zod/v4/index.d.cts +0 -3
- package/node_modules/zod/v4/index.d.ts +0 -3
- package/node_modules/zod/v4/index.js +0 -3
- package/node_modules/zod/v4/locales/ar.cjs +0 -142
- package/node_modules/zod/v4/locales/ar.d.cts +0 -4
- package/node_modules/zod/v4/locales/ar.d.ts +0 -4
- package/node_modules/zod/v4/locales/ar.js +0 -116
- package/node_modules/zod/v4/locales/az.cjs +0 -141
- package/node_modules/zod/v4/locales/az.d.cts +0 -4
- package/node_modules/zod/v4/locales/az.d.ts +0 -4
- package/node_modules/zod/v4/locales/az.js +0 -115
- package/node_modules/zod/v4/locales/be.cjs +0 -190
- package/node_modules/zod/v4/locales/be.d.cts +0 -4
- package/node_modules/zod/v4/locales/be.d.ts +0 -4
- package/node_modules/zod/v4/locales/be.js +0 -164
- package/node_modules/zod/v4/locales/ca.cjs +0 -144
- package/node_modules/zod/v4/locales/ca.d.cts +0 -4
- package/node_modules/zod/v4/locales/ca.d.ts +0 -4
- package/node_modules/zod/v4/locales/ca.js +0 -118
- package/node_modules/zod/v4/locales/cs.cjs +0 -161
- package/node_modules/zod/v4/locales/cs.d.cts +0 -4
- package/node_modules/zod/v4/locales/cs.d.ts +0 -4
- package/node_modules/zod/v4/locales/cs.js +0 -135
- package/node_modules/zod/v4/locales/de.cjs +0 -142
- package/node_modules/zod/v4/locales/de.d.cts +0 -4
- package/node_modules/zod/v4/locales/de.d.ts +0 -4
- package/node_modules/zod/v4/locales/de.js +0 -116
- package/node_modules/zod/v4/locales/en.cjs +0 -145
- package/node_modules/zod/v4/locales/en.d.cts +0 -5
- package/node_modules/zod/v4/locales/en.d.ts +0 -5
- package/node_modules/zod/v4/locales/en.js +0 -117
- package/node_modules/zod/v4/locales/eo.cjs +0 -144
- package/node_modules/zod/v4/locales/eo.d.cts +0 -5
- package/node_modules/zod/v4/locales/eo.d.ts +0 -5
- package/node_modules/zod/v4/locales/eo.js +0 -116
- package/node_modules/zod/v4/locales/es.cjs +0 -143
- package/node_modules/zod/v4/locales/es.d.cts +0 -4
- package/node_modules/zod/v4/locales/es.d.ts +0 -4
- package/node_modules/zod/v4/locales/es.js +0 -117
- package/node_modules/zod/v4/locales/fa.cjs +0 -148
- package/node_modules/zod/v4/locales/fa.d.cts +0 -4
- package/node_modules/zod/v4/locales/fa.d.ts +0 -4
- package/node_modules/zod/v4/locales/fa.js +0 -122
- package/node_modules/zod/v4/locales/fi.cjs +0 -148
- package/node_modules/zod/v4/locales/fi.d.cts +0 -4
- package/node_modules/zod/v4/locales/fi.d.ts +0 -4
- package/node_modules/zod/v4/locales/fi.js +0 -122
- package/node_modules/zod/v4/locales/fr-CA.cjs +0 -143
- package/node_modules/zod/v4/locales/fr-CA.d.cts +0 -4
- package/node_modules/zod/v4/locales/fr-CA.d.ts +0 -4
- package/node_modules/zod/v4/locales/fr-CA.js +0 -117
- package/node_modules/zod/v4/locales/fr.cjs +0 -142
- package/node_modules/zod/v4/locales/fr.d.cts +0 -4
- package/node_modules/zod/v4/locales/fr.d.ts +0 -4
- package/node_modules/zod/v4/locales/fr.js +0 -116
- package/node_modules/zod/v4/locales/he.cjs +0 -143
- package/node_modules/zod/v4/locales/he.d.cts +0 -4
- package/node_modules/zod/v4/locales/he.d.ts +0 -4
- package/node_modules/zod/v4/locales/he.js +0 -117
- package/node_modules/zod/v4/locales/hu.cjs +0 -143
- package/node_modules/zod/v4/locales/hu.d.cts +0 -4
- package/node_modules/zod/v4/locales/hu.d.ts +0 -4
- package/node_modules/zod/v4/locales/hu.js +0 -117
- package/node_modules/zod/v4/locales/id.cjs +0 -142
- package/node_modules/zod/v4/locales/id.d.cts +0 -4
- package/node_modules/zod/v4/locales/id.d.ts +0 -4
- package/node_modules/zod/v4/locales/id.js +0 -116
- package/node_modules/zod/v4/locales/index.cjs +0 -84
- package/node_modules/zod/v4/locales/index.d.cts +0 -39
- package/node_modules/zod/v4/locales/index.d.ts +0 -39
- package/node_modules/zod/v4/locales/index.js +0 -39
- package/node_modules/zod/v4/locales/it.cjs +0 -143
- package/node_modules/zod/v4/locales/it.d.cts +0 -4
- package/node_modules/zod/v4/locales/it.d.ts +0 -4
- package/node_modules/zod/v4/locales/it.js +0 -117
- package/node_modules/zod/v4/locales/ja.cjs +0 -141
- package/node_modules/zod/v4/locales/ja.d.cts +0 -4
- package/node_modules/zod/v4/locales/ja.d.ts +0 -4
- package/node_modules/zod/v4/locales/ja.js +0 -115
- package/node_modules/zod/v4/locales/kh.cjs +0 -143
- package/node_modules/zod/v4/locales/kh.d.cts +0 -4
- package/node_modules/zod/v4/locales/kh.d.ts +0 -4
- package/node_modules/zod/v4/locales/kh.js +0 -117
- package/node_modules/zod/v4/locales/ko.cjs +0 -147
- package/node_modules/zod/v4/locales/ko.d.cts +0 -4
- package/node_modules/zod/v4/locales/ko.d.ts +0 -4
- package/node_modules/zod/v4/locales/ko.js +0 -121
- package/node_modules/zod/v4/locales/mk.cjs +0 -144
- package/node_modules/zod/v4/locales/mk.d.cts +0 -4
- package/node_modules/zod/v4/locales/mk.d.ts +0 -4
- package/node_modules/zod/v4/locales/mk.js +0 -118
- package/node_modules/zod/v4/locales/ms.cjs +0 -142
- package/node_modules/zod/v4/locales/ms.d.cts +0 -4
- package/node_modules/zod/v4/locales/ms.d.ts +0 -4
- package/node_modules/zod/v4/locales/ms.js +0 -116
- package/node_modules/zod/v4/locales/nl.cjs +0 -143
- package/node_modules/zod/v4/locales/nl.d.cts +0 -4
- package/node_modules/zod/v4/locales/nl.d.ts +0 -4
- package/node_modules/zod/v4/locales/nl.js +0 -117
- package/node_modules/zod/v4/locales/no.cjs +0 -142
- package/node_modules/zod/v4/locales/no.d.cts +0 -4
- package/node_modules/zod/v4/locales/no.d.ts +0 -4
- package/node_modules/zod/v4/locales/no.js +0 -116
- package/node_modules/zod/v4/locales/ota.cjs +0 -143
- package/node_modules/zod/v4/locales/ota.d.cts +0 -4
- package/node_modules/zod/v4/locales/ota.d.ts +0 -4
- package/node_modules/zod/v4/locales/ota.js +0 -117
- package/node_modules/zod/v4/locales/pl.cjs +0 -143
- package/node_modules/zod/v4/locales/pl.d.cts +0 -4
- package/node_modules/zod/v4/locales/pl.d.ts +0 -4
- package/node_modules/zod/v4/locales/pl.js +0 -117
- package/node_modules/zod/v4/locales/ps.cjs +0 -148
- package/node_modules/zod/v4/locales/ps.d.cts +0 -4
- package/node_modules/zod/v4/locales/ps.d.ts +0 -4
- package/node_modules/zod/v4/locales/ps.js +0 -122
- package/node_modules/zod/v4/locales/pt.cjs +0 -142
- package/node_modules/zod/v4/locales/pt.d.cts +0 -4
- package/node_modules/zod/v4/locales/pt.d.ts +0 -4
- package/node_modules/zod/v4/locales/pt.js +0 -116
- package/node_modules/zod/v4/locales/ru.cjs +0 -190
- package/node_modules/zod/v4/locales/ru.d.cts +0 -4
- package/node_modules/zod/v4/locales/ru.d.ts +0 -4
- package/node_modules/zod/v4/locales/ru.js +0 -164
- package/node_modules/zod/v4/locales/sl.cjs +0 -143
- package/node_modules/zod/v4/locales/sl.d.cts +0 -4
- package/node_modules/zod/v4/locales/sl.d.ts +0 -4
- package/node_modules/zod/v4/locales/sl.js +0 -117
- package/node_modules/zod/v4/locales/sv.cjs +0 -144
- package/node_modules/zod/v4/locales/sv.d.cts +0 -4
- package/node_modules/zod/v4/locales/sv.d.ts +0 -4
- package/node_modules/zod/v4/locales/sv.js +0 -118
- package/node_modules/zod/v4/locales/ta.cjs +0 -143
- package/node_modules/zod/v4/locales/ta.d.cts +0 -4
- package/node_modules/zod/v4/locales/ta.d.ts +0 -4
- package/node_modules/zod/v4/locales/ta.js +0 -117
- package/node_modules/zod/v4/locales/th.cjs +0 -143
- package/node_modules/zod/v4/locales/th.d.cts +0 -4
- package/node_modules/zod/v4/locales/th.d.ts +0 -4
- package/node_modules/zod/v4/locales/th.js +0 -117
- package/node_modules/zod/v4/locales/tr.cjs +0 -143
- package/node_modules/zod/v4/locales/tr.d.cts +0 -5
- package/node_modules/zod/v4/locales/tr.d.ts +0 -5
- package/node_modules/zod/v4/locales/tr.js +0 -115
- package/node_modules/zod/v4/locales/ua.cjs +0 -143
- package/node_modules/zod/v4/locales/ua.d.cts +0 -4
- package/node_modules/zod/v4/locales/ua.d.ts +0 -4
- package/node_modules/zod/v4/locales/ua.js +0 -117
- package/node_modules/zod/v4/locales/ur.cjs +0 -143
- package/node_modules/zod/v4/locales/ur.d.cts +0 -4
- package/node_modules/zod/v4/locales/ur.d.ts +0 -4
- package/node_modules/zod/v4/locales/ur.js +0 -117
- package/node_modules/zod/v4/locales/vi.cjs +0 -142
- package/node_modules/zod/v4/locales/vi.d.cts +0 -4
- package/node_modules/zod/v4/locales/vi.d.ts +0 -4
- package/node_modules/zod/v4/locales/vi.js +0 -116
- package/node_modules/zod/v4/locales/zh-CN.cjs +0 -142
- package/node_modules/zod/v4/locales/zh-CN.d.cts +0 -4
- package/node_modules/zod/v4/locales/zh-CN.d.ts +0 -4
- package/node_modules/zod/v4/locales/zh-CN.js +0 -116
- package/node_modules/zod/v4/locales/zh-TW.cjs +0 -143
- package/node_modules/zod/v4/locales/zh-TW.d.cts +0 -4
- package/node_modules/zod/v4/locales/zh-TW.d.ts +0 -4
- package/node_modules/zod/v4/locales/zh-TW.js +0 -117
- package/node_modules/zod/v4/mini/checks.cjs +0 -34
- package/node_modules/zod/v4/mini/checks.d.cts +0 -1
- package/node_modules/zod/v4/mini/checks.d.ts +0 -1
- package/node_modules/zod/v4/mini/checks.js +0 -1
- package/node_modules/zod/v4/mini/coerce.cjs +0 -47
- package/node_modules/zod/v4/mini/coerce.d.cts +0 -7
- package/node_modules/zod/v4/mini/coerce.d.ts +0 -7
- package/node_modules/zod/v4/mini/coerce.js +0 -17
- package/node_modules/zod/v4/mini/external.cjs +0 -62
- package/node_modules/zod/v4/mini/external.d.cts +0 -11
- package/node_modules/zod/v4/mini/external.d.ts +0 -11
- package/node_modules/zod/v4/mini/external.js +0 -13
- package/node_modules/zod/v4/mini/index.cjs +0 -32
- package/node_modules/zod/v4/mini/index.d.cts +0 -3
- package/node_modules/zod/v4/mini/index.d.ts +0 -3
- package/node_modules/zod/v4/mini/index.js +0 -3
- package/node_modules/zod/v4/mini/iso.cjs +0 -60
- package/node_modules/zod/v4/mini/iso.d.cts +0 -22
- package/node_modules/zod/v4/mini/iso.d.ts +0 -22
- package/node_modules/zod/v4/mini/iso.js +0 -30
- package/node_modules/zod/v4/mini/parse.cjs +0 -8
- package/node_modules/zod/v4/mini/parse.d.cts +0 -1
- package/node_modules/zod/v4/mini/parse.d.ts +0 -1
- package/node_modules/zod/v4/mini/parse.js +0 -1
- package/node_modules/zod/v4/mini/schemas.cjs +0 -839
- package/node_modules/zod/v4/mini/schemas.d.cts +0 -356
- package/node_modules/zod/v4/mini/schemas.d.ts +0 -356
- package/node_modules/zod/v4/mini/schemas.js +0 -732
- package/node_modules/zod/v4-mini/index.cjs +0 -17
- package/node_modules/zod/v4-mini/index.d.cts +0 -1
- package/node_modules/zod/v4-mini/index.d.ts +0 -1
- package/node_modules/zod/v4-mini/index.js +0 -1
|
@@ -1,1337 +0,0 @@
|
|
|
1
|
-
var ASSERT = require('assert');
|
|
2
|
-
var ASN1 = require('../../lib/asn1');
|
|
3
|
-
var UTIL = require('../../lib/util');
|
|
4
|
-
|
|
5
|
-
(function() {
|
|
6
|
-
describe('asn1', function() {
|
|
7
|
-
// TODO: add more ASN.1 coverage
|
|
8
|
-
|
|
9
|
-
it('should convert an OID to DER', function() {
|
|
10
|
-
ASSERT.equal(ASN1.oidToDer('1.2.840.113549').toHex(), '2a864886f70d');
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
it('should convert a 32b OID to DER', function() {
|
|
14
|
-
ASSERT.equal(ASN1.oidToDer('1.2.4294967295').toHex(), '2a8fffffff7f');
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
it('should not convert a >32b OID to DER', function() {
|
|
18
|
-
ASSERT.throws(
|
|
19
|
-
function() {
|
|
20
|
-
ASN1.oidToDer('1.2.4294967296');
|
|
21
|
-
},
|
|
22
|
-
/OID value too large; max is 32-bits./
|
|
23
|
-
);
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
it('should convert an OID from DER', function() {
|
|
27
|
-
var der = UTIL.hexToBytes('2a864886f70d');
|
|
28
|
-
ASSERT.equal(ASN1.derToOid(der), '1.2.840.113549');
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
it('should convert a 32b OID from DER', function() {
|
|
32
|
-
var der = UTIL.hexToBytes('2a8fffffff7f');
|
|
33
|
-
ASSERT.equal(ASN1.derToOid(der), '1.2.4294967295');
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
it('should convert a >32b OID from DER', function() {
|
|
37
|
-
var der = UTIL.hexToBytes('2a9080808001');
|
|
38
|
-
ASSERT.equal(ASN1.derToOid(der), '1.2.4294967297');
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
it('should convert a max safe int OID from DER', function() {
|
|
42
|
-
var der = UTIL.hexToBytes('2a8fffffffffffff7f');
|
|
43
|
-
ASSERT.equal(ASN1.derToOid(der), '1.2.9007199254740991');
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
it('should not convert a >max safe int OID from DER', function() {
|
|
47
|
-
ASSERT.throws(
|
|
48
|
-
function() {
|
|
49
|
-
// '1.2.9007199254740992'
|
|
50
|
-
var der = UTIL.hexToBytes('2a9080808080808000');
|
|
51
|
-
console.log(ASN1.derToOid(der));
|
|
52
|
-
},
|
|
53
|
-
/OID value too large; max is 53-bits./
|
|
54
|
-
);
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
it('should convert INTEGER 0 to DER', function() {
|
|
58
|
-
ASSERT.equal(ASN1.integerToDer(0).toHex(), '00');
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
it('should convert INTEGER 1 to DER', function() {
|
|
62
|
-
ASSERT.equal(ASN1.integerToDer(1).toHex(), '01');
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
it('should convert INTEGER 127 to DER', function() {
|
|
66
|
-
ASSERT.equal(ASN1.integerToDer(127).toHex(), '7f');
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
it('should convert INTEGER 128 to DER', function() {
|
|
70
|
-
ASSERT.equal(ASN1.integerToDer(128).toHex(), '0080');
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
it('should convert INTEGER 256 to DER', function() {
|
|
74
|
-
ASSERT.equal(ASN1.integerToDer(256).toHex(), '0100');
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
it('should convert INTEGER -128 to DER', function() {
|
|
78
|
-
ASSERT.equal(ASN1.integerToDer(-128).toHex(), '80');
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
it('should convert INTEGER -129 to DER', function() {
|
|
82
|
-
ASSERT.equal(ASN1.integerToDer(-129).toHex(), 'ff7f');
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
it('should convert INTEGER 32768 to DER', function() {
|
|
86
|
-
ASSERT.equal(ASN1.integerToDer(32768).toHex(), '008000');
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
it('should convert INTEGER -32768 to DER', function() {
|
|
90
|
-
ASSERT.equal(ASN1.integerToDer(-32768).toHex(), '8000');
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
it('should convert INTEGER -32769 to DER', function() {
|
|
94
|
-
ASSERT.equal(ASN1.integerToDer(-32769).toHex(), 'ff7fff');
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
it('should convert INTEGER 8388608 to DER', function() {
|
|
98
|
-
ASSERT.equal(ASN1.integerToDer(8388608).toHex(), '00800000');
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
it('should convert INTEGER -8388608 to DER', function() {
|
|
102
|
-
ASSERT.equal(ASN1.integerToDer(-8388608).toHex(), '800000');
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
it('should convert INTEGER -8388609 to DER', function() {
|
|
106
|
-
ASSERT.equal(ASN1.integerToDer(-8388609).toHex(), 'ff7fffff');
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
it('should convert INTEGER 2147483647 to DER', function() {
|
|
110
|
-
ASSERT.equal(ASN1.integerToDer(2147483647).toHex(), '7fffffff');
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
it('should convert INTEGER -2147483648 to DER', function() {
|
|
114
|
-
ASSERT.equal(ASN1.integerToDer(-2147483648).toHex(), '80000000');
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
it('should convert INTEGER 0 from DER', function() {
|
|
118
|
-
var der = UTIL.hexToBytes('00');
|
|
119
|
-
ASSERT.equal(ASN1.derToInteger(der), 0);
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
it('should convert INTEGER 1 from DER', function() {
|
|
123
|
-
var der = UTIL.hexToBytes('01');
|
|
124
|
-
ASSERT.equal(ASN1.derToInteger(der), 1);
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
it('should convert INTEGER 127 from DER', function() {
|
|
128
|
-
var der = UTIL.hexToBytes('7f');
|
|
129
|
-
ASSERT.equal(ASN1.derToInteger(der), 127);
|
|
130
|
-
});
|
|
131
|
-
|
|
132
|
-
it('should convert INTEGER 128 from DER', function() {
|
|
133
|
-
var der = UTIL.hexToBytes('0080');
|
|
134
|
-
ASSERT.equal(ASN1.derToInteger(der), 128);
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
it('should convert INTEGER 256 from DER', function() {
|
|
138
|
-
var der = UTIL.hexToBytes('0100');
|
|
139
|
-
ASSERT.equal(ASN1.derToInteger(der), 256);
|
|
140
|
-
});
|
|
141
|
-
|
|
142
|
-
it('should convert INTEGER -128 from DER', function() {
|
|
143
|
-
var der = UTIL.hexToBytes('80');
|
|
144
|
-
ASSERT.equal(ASN1.derToInteger(der), -128);
|
|
145
|
-
});
|
|
146
|
-
|
|
147
|
-
it('should convert INTEGER -129 from DER', function() {
|
|
148
|
-
var der = UTIL.hexToBytes('ff7f');
|
|
149
|
-
ASSERT.equal(ASN1.derToInteger(der), -129);
|
|
150
|
-
});
|
|
151
|
-
|
|
152
|
-
it('should convert INTEGER 32768 from DER', function() {
|
|
153
|
-
var der = UTIL.hexToBytes('008000');
|
|
154
|
-
ASSERT.equal(ASN1.derToInteger(der), 32768);
|
|
155
|
-
});
|
|
156
|
-
|
|
157
|
-
it('should convert INTEGER -32768 from DER', function() {
|
|
158
|
-
var der = UTIL.hexToBytes('8000');
|
|
159
|
-
ASSERT.equal(ASN1.derToInteger(der), -32768);
|
|
160
|
-
});
|
|
161
|
-
|
|
162
|
-
it('should convert INTEGER -32769 from DER', function() {
|
|
163
|
-
var der = UTIL.hexToBytes('ff7fff');
|
|
164
|
-
ASSERT.equal(ASN1.derToInteger(der), -32769);
|
|
165
|
-
});
|
|
166
|
-
|
|
167
|
-
it('should convert INTEGER 8388608 from DER', function() {
|
|
168
|
-
var der = UTIL.hexToBytes('00800000');
|
|
169
|
-
ASSERT.equal(ASN1.derToInteger(der), 8388608);
|
|
170
|
-
});
|
|
171
|
-
|
|
172
|
-
it('should convert INTEGER -8388608 from DER', function() {
|
|
173
|
-
var der = UTIL.hexToBytes('800000');
|
|
174
|
-
ASSERT.equal(ASN1.derToInteger(der), -8388608);
|
|
175
|
-
});
|
|
176
|
-
|
|
177
|
-
it('should convert INTEGER -8388609 from DER', function() {
|
|
178
|
-
var der = UTIL.hexToBytes('ff7fffff');
|
|
179
|
-
ASSERT.equal(ASN1.derToInteger(der), -8388609);
|
|
180
|
-
});
|
|
181
|
-
|
|
182
|
-
it('should convert INTEGER 2147483647 from DER', function() {
|
|
183
|
-
var der = UTIL.hexToBytes('7fffffff');
|
|
184
|
-
ASSERT.equal(ASN1.derToInteger(der), 2147483647);
|
|
185
|
-
});
|
|
186
|
-
|
|
187
|
-
it('should convert INTEGER -2147483648 from DER', function() {
|
|
188
|
-
var der = UTIL.hexToBytes('80000000');
|
|
189
|
-
ASSERT.equal(ASN1.derToInteger(der), -2147483648);
|
|
190
|
-
});
|
|
191
|
-
|
|
192
|
-
(function() {
|
|
193
|
-
var tests = [{
|
|
194
|
-
in: '20110223123400',
|
|
195
|
-
out: 1298464440000
|
|
196
|
-
}, {
|
|
197
|
-
in: '20110223123400.1',
|
|
198
|
-
out: 1298464440100
|
|
199
|
-
}, {
|
|
200
|
-
in: '20110223123400.123',
|
|
201
|
-
out: 1298464440123
|
|
202
|
-
}];
|
|
203
|
-
tests.forEach(function(test) {
|
|
204
|
-
it('should convert local generalized time "' + test.in + '" to a Date', function() {
|
|
205
|
-
var d = ASN1.generalizedTimeToDate(test.in);
|
|
206
|
-
var localOffset = d.getTimezoneOffset() * 60000;
|
|
207
|
-
ASSERT.equal(d.getTime(), test.out + localOffset);
|
|
208
|
-
});
|
|
209
|
-
});
|
|
210
|
-
})();
|
|
211
|
-
|
|
212
|
-
(function() {
|
|
213
|
-
var tests = [{
|
|
214
|
-
in: '20110223123400Z', // Wed Feb 23 12:34:00.000 UTC 2011
|
|
215
|
-
out: 1298464440000
|
|
216
|
-
}, {
|
|
217
|
-
in: '20110223123400.1Z', // Wed Feb 23 12:34:00.100 UTC 2011
|
|
218
|
-
out: 1298464440100
|
|
219
|
-
}, {
|
|
220
|
-
in: '20110223123400.123Z', // Wed Feb 23 12:34:00.123 UTC 2011
|
|
221
|
-
out: 1298464440123
|
|
222
|
-
}, {
|
|
223
|
-
in: '20110223123400+0200', // Wed Feb 23 10:34:00.000 UTC 2011
|
|
224
|
-
out: 1298457240000
|
|
225
|
-
}, {
|
|
226
|
-
in: '20110223123400.1+0200', // Wed Feb 23 10:34:00.100 UTC 2011
|
|
227
|
-
out: 1298457240100
|
|
228
|
-
}, {
|
|
229
|
-
in: '20110223123400.123+0200', // Wed Feb 23 10:34:00.123 UTC 2011
|
|
230
|
-
out: 1298457240123
|
|
231
|
-
}, {
|
|
232
|
-
in: '20110223123400-0200', // Wed Feb 23 14:34:00.000 UTC 2011
|
|
233
|
-
out: 1298471640000
|
|
234
|
-
}, {
|
|
235
|
-
in: '20110223123400.1-0200', // Wed Feb 23 14:34:00.100 UTC 2011
|
|
236
|
-
out: 1298471640100
|
|
237
|
-
}, {
|
|
238
|
-
in: '20110223123400.123-0200', // Wed Feb 23 14:34:00.123 UTC 2011
|
|
239
|
-
out: 1298471640123
|
|
240
|
-
}];
|
|
241
|
-
tests.forEach(function(test) {
|
|
242
|
-
it('should convert utc generalized time "' + test.in + '" to a Date', function() {
|
|
243
|
-
var d = ASN1.generalizedTimeToDate(test.in);
|
|
244
|
-
ASSERT.equal(d.getTime(), test.out);
|
|
245
|
-
});
|
|
246
|
-
});
|
|
247
|
-
})();
|
|
248
|
-
|
|
249
|
-
(function() {
|
|
250
|
-
var tests = [{
|
|
251
|
-
in: 'Jan 1 1949 00:00:00 GMT',
|
|
252
|
-
out: '19490101000000Z'
|
|
253
|
-
}, {
|
|
254
|
-
in: 'Jan 1 2000 00:00:00 GMT',
|
|
255
|
-
out: '20000101000000Z'
|
|
256
|
-
}, {
|
|
257
|
-
in: 'Jan 1 2050 00:00:00 GMT',
|
|
258
|
-
out: '20500101000000Z'
|
|
259
|
-
}, {
|
|
260
|
-
in: 'Mar 1 2100 00:00:00 GMT',
|
|
261
|
-
out: '21000301000000Z'
|
|
262
|
-
}];
|
|
263
|
-
tests.forEach(function(test) {
|
|
264
|
-
it('should convert date "' + test.in + '" to generalized time', function() {
|
|
265
|
-
var d = ASN1.dateToGeneralizedTime(new Date(test.in));
|
|
266
|
-
ASSERT.equal(d, test.out);
|
|
267
|
-
});
|
|
268
|
-
});
|
|
269
|
-
})();
|
|
270
|
-
|
|
271
|
-
(function() {
|
|
272
|
-
var tests = [{
|
|
273
|
-
in: '1102231234Z', // Wed Feb 23 12:34:00 UTC 2011
|
|
274
|
-
out: 1298464440000
|
|
275
|
-
}, {
|
|
276
|
-
in: '1102231234+0200', // Wed Feb 23 10:34:00 UTC 2011
|
|
277
|
-
out: 1298457240000
|
|
278
|
-
}, {
|
|
279
|
-
in: '1102231234-0200', // Wed Feb 23 14:34:00 UTC 2011
|
|
280
|
-
out: 1298471640000
|
|
281
|
-
}, {
|
|
282
|
-
in: '110223123456Z', // Wed Feb 23 12:34:56 UTC 2011
|
|
283
|
-
out: 1298464496000
|
|
284
|
-
}, {
|
|
285
|
-
in: '110223123456+0200', // Wed Feb 23 10:34:56 UTC 2011
|
|
286
|
-
out: 1298457296000
|
|
287
|
-
}, {
|
|
288
|
-
in: '110223123456-0200', // Wed Feb 23 14:34:56 UTC 2011
|
|
289
|
-
out: 1298471696000
|
|
290
|
-
}, {
|
|
291
|
-
in: '500101000000Z',
|
|
292
|
-
out: -631152000000
|
|
293
|
-
}];
|
|
294
|
-
tests.forEach(function(test) {
|
|
295
|
-
it('should convert utc time "' + test.in + '" to a Date', function() {
|
|
296
|
-
var d = ASN1.utcTimeToDate(test.in);
|
|
297
|
-
ASSERT.equal(d.getTime(), test.out);
|
|
298
|
-
});
|
|
299
|
-
});
|
|
300
|
-
})();
|
|
301
|
-
|
|
302
|
-
(function() {
|
|
303
|
-
var tests = [{
|
|
304
|
-
in: 'Sat Dec 31 1949 19:00:00 GMT-0500',
|
|
305
|
-
out: '500101000000Z'
|
|
306
|
-
}];
|
|
307
|
-
tests.forEach(function(test) {
|
|
308
|
-
it('should convert date "' + test.in + '" to utc time', function() {
|
|
309
|
-
var d = ASN1.dateToUtcTime(new Date(test.in));
|
|
310
|
-
ASSERT.equal(d, test.out);
|
|
311
|
-
});
|
|
312
|
-
});
|
|
313
|
-
})();
|
|
314
|
-
|
|
315
|
-
(function() {
|
|
316
|
-
// use function to avoid calling apis during setup
|
|
317
|
-
function _asn1(str) {
|
|
318
|
-
return function() {
|
|
319
|
-
return ASN1.fromDer(UTIL.hexToBytes(str.replace(/ /g, '')));
|
|
320
|
-
};
|
|
321
|
-
}
|
|
322
|
-
var tests = [{
|
|
323
|
-
name: 'empty strings',
|
|
324
|
-
obj1: '',
|
|
325
|
-
obj2: '',
|
|
326
|
-
equal: true
|
|
327
|
-
}, {
|
|
328
|
-
name: 'simple strings',
|
|
329
|
-
obj1: '\u0001',
|
|
330
|
-
obj2: '\u0001',
|
|
331
|
-
equal: true
|
|
332
|
-
}, {
|
|
333
|
-
name: 'simple strings',
|
|
334
|
-
obj1: '\u0000',
|
|
335
|
-
obj2: '\u0001',
|
|
336
|
-
equal: false
|
|
337
|
-
}, {
|
|
338
|
-
name: 'simple arrays',
|
|
339
|
-
obj1: ['', ''],
|
|
340
|
-
obj2: ['', ''],
|
|
341
|
-
equal: true
|
|
342
|
-
}, {
|
|
343
|
-
name: 'simple arrays',
|
|
344
|
-
obj1: ['', ''],
|
|
345
|
-
obj2: [''],
|
|
346
|
-
equal: false
|
|
347
|
-
}, {
|
|
348
|
-
name: 'INTEGERs',
|
|
349
|
-
obj1: _asn1('02 01 00'),
|
|
350
|
-
obj2: _asn1('02 01 00'),
|
|
351
|
-
equal: true
|
|
352
|
-
}, {
|
|
353
|
-
name: 'BER INTEGERs',
|
|
354
|
-
obj1: _asn1('02 01 01'),
|
|
355
|
-
obj2: _asn1('02 02 00 01'),
|
|
356
|
-
equal: false
|
|
357
|
-
}, {
|
|
358
|
-
name: 'BIT STRINGs',
|
|
359
|
-
obj1: _asn1('03 02 00 01'),
|
|
360
|
-
obj2: _asn1('03 02 00 01'),
|
|
361
|
-
equal: true
|
|
362
|
-
}, {
|
|
363
|
-
name: 'BIT STRINGs',
|
|
364
|
-
obj1: _asn1('03 02 00 01'),
|
|
365
|
-
obj2: _asn1('03 02 00 02'),
|
|
366
|
-
equal: false
|
|
367
|
-
}, {
|
|
368
|
-
name: 'BIT STRINGs sub INTEGER',
|
|
369
|
-
obj1: _asn1('03 04 00 02 01 01'),
|
|
370
|
-
obj2: _asn1('03 04 00 02 01 01'),
|
|
371
|
-
equal: true
|
|
372
|
-
}, {
|
|
373
|
-
name: 'mutated BIT STRINGs',
|
|
374
|
-
obj1: _asn1('03 04 00 02 01 01'),
|
|
375
|
-
obj2: _asn1('03 04 00 02 01 01'),
|
|
376
|
-
mutate: function(obj1, obj2) {
|
|
377
|
-
obj2.value[0].value = '\u0002';
|
|
378
|
-
},
|
|
379
|
-
equal: false
|
|
380
|
-
}];
|
|
381
|
-
tests.forEach(function(test, index) {
|
|
382
|
-
var name = 'should check ASN.1 ' +
|
|
383
|
-
(test.equal ? '' : 'not ') + 'equal: ' +
|
|
384
|
-
(test.name || '#' + index);
|
|
385
|
-
it(name, function() {
|
|
386
|
-
var obj1 = typeof test.obj1 === 'function' ? test.obj1() : test.obj1;
|
|
387
|
-
var obj2 = typeof test.obj2 === 'function' ? test.obj2() : test.obj2;
|
|
388
|
-
if(test.mutate) {
|
|
389
|
-
test.mutate(obj1, obj2);
|
|
390
|
-
}
|
|
391
|
-
ASSERT.equal(ASN1.equals(obj1, obj2), test.equal);
|
|
392
|
-
});
|
|
393
|
-
});
|
|
394
|
-
})();
|
|
395
|
-
|
|
396
|
-
(function() {
|
|
397
|
-
// use function to avoid calling apis during setup
|
|
398
|
-
function _asn1(str) {
|
|
399
|
-
return function() {
|
|
400
|
-
return ASN1.fromDer(UTIL.hexToBytes(str.replace(/ /g, '')));
|
|
401
|
-
};
|
|
402
|
-
}
|
|
403
|
-
var tests = [{
|
|
404
|
-
name: 'empty string',
|
|
405
|
-
obj: ''
|
|
406
|
-
}, {
|
|
407
|
-
name: 'simple string',
|
|
408
|
-
obj: '\u0001'
|
|
409
|
-
}, {
|
|
410
|
-
name: 'simple array',
|
|
411
|
-
obj: ['', '']
|
|
412
|
-
}, {
|
|
413
|
-
name: 'INTEGER',
|
|
414
|
-
obj: _asn1('02 01 00')
|
|
415
|
-
}, {
|
|
416
|
-
name: 'BER INTEGER',
|
|
417
|
-
obj: _asn1('02 01 01')
|
|
418
|
-
}, {
|
|
419
|
-
name: 'BIT STRING',
|
|
420
|
-
obj: _asn1('03 02 00 01')
|
|
421
|
-
}, {
|
|
422
|
-
name: 'BIT STRING sub INTEGER',
|
|
423
|
-
obj: _asn1('03 04 00 02 01 01')
|
|
424
|
-
}];
|
|
425
|
-
tests.forEach(function(test, index) {
|
|
426
|
-
var name = 'should check ASN.1 copy: ' + (test.name || '#' + index);
|
|
427
|
-
it(name, function() {
|
|
428
|
-
var obj = typeof test.obj === 'function' ? test.obj() : test.obj;
|
|
429
|
-
ASSERT.equal(ASN1.equals(ASN1.copy(obj), obj), true);
|
|
430
|
-
});
|
|
431
|
-
});
|
|
432
|
-
})();
|
|
433
|
-
|
|
434
|
-
(function() {
|
|
435
|
-
function _h2b(str) {
|
|
436
|
-
return UTIL.hexToBytes(str.replace(/ /g, ''));
|
|
437
|
-
}
|
|
438
|
-
function _add(b, str) {
|
|
439
|
-
b.putBytes(_h2b(str));
|
|
440
|
-
}
|
|
441
|
-
function _asn1dump(asn1) {
|
|
442
|
-
console.log(ASN1.prettyPrint(asn1));
|
|
443
|
-
console.log(JSON.stringify(asn1, null, 2));
|
|
444
|
-
}
|
|
445
|
-
function _asn1TestOne(strict, throws, options) {
|
|
446
|
-
options = options || {};
|
|
447
|
-
if(!('decodeBitStrings' in options)) {
|
|
448
|
-
options.decodeBitStrings = true;
|
|
449
|
-
}
|
|
450
|
-
// buffer strict test
|
|
451
|
-
var b = UTIL.createBuffer();
|
|
452
|
-
// init
|
|
453
|
-
options.init(b);
|
|
454
|
-
// bytes for round-trip comparison
|
|
455
|
-
var bytes = b.copy().bytes();
|
|
456
|
-
// copy for non-strict test
|
|
457
|
-
var bns = b.copy();
|
|
458
|
-
// create strict and non-strict asn1
|
|
459
|
-
var asn1assert = throws ? ASSERT.throws : function(f) { f(); };
|
|
460
|
-
var asn1;
|
|
461
|
-
var der;
|
|
462
|
-
asn1assert(function() {
|
|
463
|
-
asn1 = ASN1.fromDer(b, {
|
|
464
|
-
strict: strict,
|
|
465
|
-
decodeBitStrings: options.decodeBitStrings
|
|
466
|
-
});
|
|
467
|
-
});
|
|
468
|
-
// debug
|
|
469
|
-
if(options.dump && asn1) {
|
|
470
|
-
console.log('=== ' + (strict ? 'Strict' : 'Non Strict') + ' ===');
|
|
471
|
-
_asn1dump(asn1);
|
|
472
|
-
}
|
|
473
|
-
// basic check
|
|
474
|
-
if(!throws) {
|
|
475
|
-
ASSERT.ok(asn1);
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
// round-trip(ish) check
|
|
479
|
-
if(!throws) {
|
|
480
|
-
der = ASN1.toDer(asn1);
|
|
481
|
-
if(options.roundtrip) {
|
|
482
|
-
// byte comparisons for round-trip testing can fail due to
|
|
483
|
-
// semantically safe changes such as changing the length encoding.
|
|
484
|
-
// test a roundtrip for data where it makes sense.
|
|
485
|
-
ASSERT.equal(
|
|
486
|
-
UTIL.bytesToHex(bytes),
|
|
487
|
-
UTIL.bytesToHex(der.bytes()));
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
// validator check
|
|
492
|
-
if(!throws && options.v) {
|
|
493
|
-
var capture = {};
|
|
494
|
-
var errors = [];
|
|
495
|
-
var asn1ok = ASN1.validate(asn1, options.v, capture, errors);
|
|
496
|
-
ASSERT.deepEqual(errors, []);
|
|
497
|
-
if(options.captured) {
|
|
498
|
-
ASSERT.deepEqual(capture, options.captured);
|
|
499
|
-
} else {
|
|
500
|
-
ASSERT.deepEqual(capture, {});
|
|
501
|
-
}
|
|
502
|
-
ASSERT.ok(asn1ok);
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
return {
|
|
506
|
-
asn1: asn1,
|
|
507
|
-
der: der
|
|
508
|
-
};
|
|
509
|
-
}
|
|
510
|
-
function _asn1Test(options) {
|
|
511
|
-
var s = _asn1TestOne(true, options.strictThrows, options);
|
|
512
|
-
var ns = _asn1TestOne(false, options.nonStrictThrows, options);
|
|
513
|
-
|
|
514
|
-
// check asn1 equality
|
|
515
|
-
if(s.asn1 && ns.asn1) {
|
|
516
|
-
ASSERT.deepEqual(s.asn1, ns.asn1);
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
// check der equality
|
|
520
|
-
if(s.der && ns.der) {
|
|
521
|
-
ASSERT.equal(
|
|
522
|
-
UTIL.bytesToHex(s.der.bytes()),
|
|
523
|
-
UTIL.bytesToHex(ns.der.bytes()));
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
if(options.done) {
|
|
527
|
-
options.done({
|
|
528
|
-
strict: s,
|
|
529
|
-
nonStrict: ns
|
|
530
|
-
});
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
it('should convert BIT STRING from DER (short,empty)', function() {
|
|
535
|
-
_asn1Test({
|
|
536
|
-
init: function(b) {
|
|
537
|
-
// BIT STRING value=none
|
|
538
|
-
_add(b, '03 00');
|
|
539
|
-
},
|
|
540
|
-
dump: false,
|
|
541
|
-
roundtrip: true,
|
|
542
|
-
v: {
|
|
543
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
544
|
-
type: ASN1.Type.BITSTRING,
|
|
545
|
-
constructed: false,
|
|
546
|
-
captureBitStringContents: 'bits'
|
|
547
|
-
},
|
|
548
|
-
captured: {
|
|
549
|
-
bits: ''
|
|
550
|
-
}
|
|
551
|
-
});
|
|
552
|
-
});
|
|
553
|
-
|
|
554
|
-
it('should convert BIT STRING from DER (short,empty2)', function() {
|
|
555
|
-
_asn1Test({
|
|
556
|
-
init: function(b) {
|
|
557
|
-
// BIT STRING value=none
|
|
558
|
-
_add(b, '03 01 00');
|
|
559
|
-
},
|
|
560
|
-
dump: false,
|
|
561
|
-
roundtrip: true,
|
|
562
|
-
v: {
|
|
563
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
564
|
-
type: ASN1.Type.BITSTRING,
|
|
565
|
-
constructed: false,
|
|
566
|
-
captureBitStringContents: 'bitsC',
|
|
567
|
-
captureBitStringValue: 'bitsV'
|
|
568
|
-
},
|
|
569
|
-
captured: {
|
|
570
|
-
bitsC: _h2b('00'),
|
|
571
|
-
bitsV: ''
|
|
572
|
-
}
|
|
573
|
-
});
|
|
574
|
-
});
|
|
575
|
-
|
|
576
|
-
it('should convert BIT STRING from BER (short,invalid)', function() {
|
|
577
|
-
_asn1Test({
|
|
578
|
-
init: function(b) {
|
|
579
|
-
// BIT STRING value=partial
|
|
580
|
-
// invalid in strict mode, non-strict will read 1 of 2 bytes
|
|
581
|
-
_add(b, '03 02 00');
|
|
582
|
-
},
|
|
583
|
-
dump: false,
|
|
584
|
-
roundtrip: false,
|
|
585
|
-
strictThrows: true,
|
|
586
|
-
nonStrictThrows: false,
|
|
587
|
-
v: {
|
|
588
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
589
|
-
type: ASN1.Type.BITSTRING,
|
|
590
|
-
constructed: false,
|
|
591
|
-
captureBitStringContents: 'bits'
|
|
592
|
-
},
|
|
593
|
-
captured: {
|
|
594
|
-
// only for non-strict mode, truncated value
|
|
595
|
-
bits: _h2b('00')
|
|
596
|
-
}
|
|
597
|
-
});
|
|
598
|
-
});
|
|
599
|
-
|
|
600
|
-
it('should convert BIT STRING from DER (short)', function() {
|
|
601
|
-
_asn1Test({
|
|
602
|
-
init: function(b) {
|
|
603
|
-
// BIT STRING value=0110111001011101
|
|
604
|
-
_add(b, '03 03 00 6e 5d');
|
|
605
|
-
},
|
|
606
|
-
dump: false,
|
|
607
|
-
roundtrip: true,
|
|
608
|
-
v: {
|
|
609
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
610
|
-
type: ASN1.Type.BITSTRING,
|
|
611
|
-
constructed: false,
|
|
612
|
-
captureBitStringContents: 'bits'
|
|
613
|
-
},
|
|
614
|
-
captured: {
|
|
615
|
-
bits: _h2b('00 6e 5d')
|
|
616
|
-
}
|
|
617
|
-
});
|
|
618
|
-
});
|
|
619
|
-
|
|
620
|
-
it('should convert BIT STRING from DER (short2)', function() {
|
|
621
|
-
_asn1Test({
|
|
622
|
-
init: function(b) {
|
|
623
|
-
// BIT STRING value=0110111001011101
|
|
624
|
-
// contains an INTEGER=0x12
|
|
625
|
-
_add(b, '03 04 00 02 01 12');
|
|
626
|
-
},
|
|
627
|
-
dump: false,
|
|
628
|
-
roundtrip: true,
|
|
629
|
-
v: {
|
|
630
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
631
|
-
type: ASN1.Type.BITSTRING,
|
|
632
|
-
constructed: false,
|
|
633
|
-
// note captureBitStringContents used to get all bytes
|
|
634
|
-
// 'capture' would get the value structure
|
|
635
|
-
// 'captureAsn1' would get the value and sub-value structures
|
|
636
|
-
captureBitStringContents: 'bits',
|
|
637
|
-
value: [{
|
|
638
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
639
|
-
type: ASN1.Type.INTEGER,
|
|
640
|
-
constructed: false,
|
|
641
|
-
capture: 'int0'
|
|
642
|
-
}]
|
|
643
|
-
},
|
|
644
|
-
captured: {
|
|
645
|
-
bits: _h2b('00 02 01 12'),
|
|
646
|
-
int0: _h2b('12')
|
|
647
|
-
}
|
|
648
|
-
});
|
|
649
|
-
});
|
|
650
|
-
|
|
651
|
-
it('should convert BIT STRING from DER (short,unused1z)', function() {
|
|
652
|
-
_asn1Test({
|
|
653
|
-
init: function(b) {
|
|
654
|
-
// BIT STRING value=01101110010111011010111, unused=0
|
|
655
|
-
_add(b, '03 04 01 6e 5d ae');
|
|
656
|
-
},
|
|
657
|
-
dump: false,
|
|
658
|
-
roundtrip: true,
|
|
659
|
-
v: {
|
|
660
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
661
|
-
type: ASN1.Type.BITSTRING,
|
|
662
|
-
constructed: false,
|
|
663
|
-
captureBitStringContents: 'bits'
|
|
664
|
-
},
|
|
665
|
-
captured: {
|
|
666
|
-
bits: _h2b('01 6e 5d ae')
|
|
667
|
-
}
|
|
668
|
-
});
|
|
669
|
-
});
|
|
670
|
-
|
|
671
|
-
it('should convert BIT STRING from DER (short,unused6z)', function() {
|
|
672
|
-
_asn1Test({
|
|
673
|
-
init: function(b) {
|
|
674
|
-
// BIT STRING short len, value=011011100101110111, unused=000000
|
|
675
|
-
_add(b, '03 04 06 6e 5d c0');
|
|
676
|
-
},
|
|
677
|
-
dump: false,
|
|
678
|
-
roundtrip: true,
|
|
679
|
-
v: {
|
|
680
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
681
|
-
type: ASN1.Type.BITSTRING,
|
|
682
|
-
constructed: false,
|
|
683
|
-
captureBitStringContents: 'bits'
|
|
684
|
-
},
|
|
685
|
-
captured: {
|
|
686
|
-
bits: _h2b('06 6e 5d c0')
|
|
687
|
-
}
|
|
688
|
-
});
|
|
689
|
-
});
|
|
690
|
-
|
|
691
|
-
it('should convert BIT STRING from BER (short,unused6d)', function() {
|
|
692
|
-
_asn1Test({
|
|
693
|
-
init: function(b) {
|
|
694
|
-
// BIT STRING short len, value=011011100101110111, unused=100000
|
|
695
|
-
_add(b, '03 04 06 6e 5d e0');
|
|
696
|
-
},
|
|
697
|
-
dump: false,
|
|
698
|
-
roundtrip: true,
|
|
699
|
-
v: {
|
|
700
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
701
|
-
type: ASN1.Type.BITSTRING,
|
|
702
|
-
constructed: false,
|
|
703
|
-
captureBitStringContents: 'bits'
|
|
704
|
-
},
|
|
705
|
-
captured: {
|
|
706
|
-
bits: _h2b('06 6e 5d e0')
|
|
707
|
-
}
|
|
708
|
-
});
|
|
709
|
-
});
|
|
710
|
-
|
|
711
|
-
it('should convert BIT STRING from BER (long,unused6z)', function() {
|
|
712
|
-
_asn1Test({
|
|
713
|
-
init: function(b) {
|
|
714
|
-
// BIT STRING long len, value=011011100101110111, unused=000000
|
|
715
|
-
_add(b, '03 81 04 06 6e 5d c0');
|
|
716
|
-
},
|
|
717
|
-
dump: false,
|
|
718
|
-
// length is compressed
|
|
719
|
-
roundtrip: false,
|
|
720
|
-
v: {
|
|
721
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
722
|
-
type: ASN1.Type.BITSTRING,
|
|
723
|
-
constructed: false,
|
|
724
|
-
captureBitStringContents: 'bits'
|
|
725
|
-
},
|
|
726
|
-
captured: {
|
|
727
|
-
bits: _h2b('06 6e 5d c0')
|
|
728
|
-
}
|
|
729
|
-
});
|
|
730
|
-
});
|
|
731
|
-
|
|
732
|
-
it('should convert BIT STRING from BER (unused6z)', function() {
|
|
733
|
-
_asn1Test({
|
|
734
|
-
init: function(b) {
|
|
735
|
-
// BIT STRING constructed, value=0110111001011101+11, unused=000000
|
|
736
|
-
_add(b, '23 09');
|
|
737
|
-
_add(b, '03 03 00 6e 5d');
|
|
738
|
-
_add(b, '03 02 06 c0');
|
|
739
|
-
},
|
|
740
|
-
dump: false,
|
|
741
|
-
roundtrip: true,
|
|
742
|
-
v: {
|
|
743
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
744
|
-
type: ASN1.Type.BITSTRING,
|
|
745
|
-
constructed: true,
|
|
746
|
-
value: [{
|
|
747
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
748
|
-
type: ASN1.Type.BITSTRING,
|
|
749
|
-
constructed: false,
|
|
750
|
-
capture: 'bits0'
|
|
751
|
-
}, {
|
|
752
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
753
|
-
type: ASN1.Type.BITSTRING,
|
|
754
|
-
constructed: false,
|
|
755
|
-
capture: 'bits1'
|
|
756
|
-
}]
|
|
757
|
-
},
|
|
758
|
-
captured: {
|
|
759
|
-
bits0: _h2b('00 6e 5d'),
|
|
760
|
-
bits1: _h2b('06 c0')
|
|
761
|
-
}
|
|
762
|
-
});
|
|
763
|
-
});
|
|
764
|
-
|
|
765
|
-
it('should convert BIT STRING from BER (decode)', function() {
|
|
766
|
-
_asn1Test({
|
|
767
|
-
init: function(b) {
|
|
768
|
-
// create crafted DER BIT STRING data that includes encapsulated
|
|
769
|
-
// data. often used to store SEQUENCE of INTEGERs.
|
|
770
|
-
// add bit stream of bytes using long length
|
|
771
|
-
_add(b, '03 82 00 10');
|
|
772
|
-
// no padding
|
|
773
|
-
_add(b, '00');
|
|
774
|
-
// sequence of two ints
|
|
775
|
-
_add(b, '30 0D');
|
|
776
|
-
// add test int, long len
|
|
777
|
-
_add(b, '02 81 04 12 34 56 78');
|
|
778
|
-
// add test int, short len
|
|
779
|
-
_add(b, '02 04 87 65 43 21');
|
|
780
|
-
},
|
|
781
|
-
dump: false,
|
|
782
|
-
decodeBitStrings: true,
|
|
783
|
-
// long len will compress to short len
|
|
784
|
-
roundtrip: false,
|
|
785
|
-
v: {
|
|
786
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
787
|
-
type: ASN1.Type.BITSTRING,
|
|
788
|
-
constructed: false,
|
|
789
|
-
captureBitStringContents: 'bits',
|
|
790
|
-
value: [{
|
|
791
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
792
|
-
type: ASN1.Type.SEQUENCE,
|
|
793
|
-
constructed: true,
|
|
794
|
-
value: [{
|
|
795
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
796
|
-
type: ASN1.Type.INTEGER,
|
|
797
|
-
constructed: false,
|
|
798
|
-
capture: 'int0'
|
|
799
|
-
}, {
|
|
800
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
801
|
-
type: ASN1.Type.INTEGER,
|
|
802
|
-
constructed: false,
|
|
803
|
-
capture: 'int1'
|
|
804
|
-
}]
|
|
805
|
-
}]
|
|
806
|
-
},
|
|
807
|
-
captured: {
|
|
808
|
-
bits: _h2b(
|
|
809
|
-
'00' +
|
|
810
|
-
'30 0D' +
|
|
811
|
-
'02 81 04 12 34 56 78' +
|
|
812
|
-
'02 04 87 65 43 21'),
|
|
813
|
-
int0: _h2b('12 34 56 78'),
|
|
814
|
-
int1: _h2b('87 65 43 21')
|
|
815
|
-
}
|
|
816
|
-
});
|
|
817
|
-
});
|
|
818
|
-
|
|
819
|
-
it('should convert BIT STRING from BER (no decode)', function() {
|
|
820
|
-
_asn1Test({
|
|
821
|
-
init: function(b) {
|
|
822
|
-
// create crafted DER BIT STRING data that includes encapsulated
|
|
823
|
-
// data. often used to store SEQUENCE of INTEGERs.
|
|
824
|
-
// add bit stream
|
|
825
|
-
_add(b, '03 82 00 10');
|
|
826
|
-
// no padding
|
|
827
|
-
_add(b, '00');
|
|
828
|
-
// sequence of two ints
|
|
829
|
-
_add(b, '30 0D');
|
|
830
|
-
// add test int, long len
|
|
831
|
-
_add(b, '02 81 04 12 34 56 78');
|
|
832
|
-
// add test int, short len
|
|
833
|
-
_add(b, '02 04 87 65 43 21');
|
|
834
|
-
},
|
|
835
|
-
dump: false,
|
|
836
|
-
decodeBitStrings: false,
|
|
837
|
-
// long length is compressed
|
|
838
|
-
roundtrip: false,
|
|
839
|
-
v: {
|
|
840
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
841
|
-
type: ASN1.Type.BITSTRING,
|
|
842
|
-
constructed: false,
|
|
843
|
-
captureBitStringContents: 'bits'
|
|
844
|
-
},
|
|
845
|
-
captured: {
|
|
846
|
-
bits: _h2b(
|
|
847
|
-
'00' +
|
|
848
|
-
'30 0D' +
|
|
849
|
-
'02 81 04 12 34 56 78' +
|
|
850
|
-
'02 04 87 65 43 21')
|
|
851
|
-
}
|
|
852
|
-
});
|
|
853
|
-
});
|
|
854
|
-
|
|
855
|
-
it('should convert BIT STRING from DER (decode2)', function() {
|
|
856
|
-
_asn1Test({
|
|
857
|
-
init: function(b) {
|
|
858
|
-
// create crafted DER BIT STRING data that includes encapsulated
|
|
859
|
-
// data. often used to store SEQUENCE of INTEGERs.
|
|
860
|
-
// bit stream
|
|
861
|
-
_add(b, '03 81 8D');
|
|
862
|
-
// no padding
|
|
863
|
-
_add(b, '00');
|
|
864
|
-
// sequence
|
|
865
|
-
_add(b, '30 81 89');
|
|
866
|
-
// int header and leading 0
|
|
867
|
-
_add(b, '02 81 81 00');
|
|
868
|
-
// 1024 bit int
|
|
869
|
-
_add(b, 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0');
|
|
870
|
-
_add(b, 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F1');
|
|
871
|
-
_add(b, 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F2');
|
|
872
|
-
_add(b, 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F3');
|
|
873
|
-
_add(b, 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F4');
|
|
874
|
-
_add(b, 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F5');
|
|
875
|
-
_add(b, 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F6');
|
|
876
|
-
_add(b, 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F7');
|
|
877
|
-
// int header and 3 byte int
|
|
878
|
-
_add(b, '02 03 01 00 01');
|
|
879
|
-
},
|
|
880
|
-
dump: false,
|
|
881
|
-
decodeBitStrings: true,
|
|
882
|
-
roundtrip: true,
|
|
883
|
-
v: {
|
|
884
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
885
|
-
type: ASN1.Type.BITSTRING,
|
|
886
|
-
constructed: false,
|
|
887
|
-
value: [{
|
|
888
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
889
|
-
type: ASN1.Type.SEQUENCE,
|
|
890
|
-
constructed: true,
|
|
891
|
-
value: [{
|
|
892
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
893
|
-
type: ASN1.Type.INTEGER,
|
|
894
|
-
constructed: false,
|
|
895
|
-
capture: 'int0'
|
|
896
|
-
}, {
|
|
897
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
898
|
-
type: ASN1.Type.INTEGER,
|
|
899
|
-
constructed: false,
|
|
900
|
-
capture: 'int1'
|
|
901
|
-
}]
|
|
902
|
-
}]
|
|
903
|
-
},
|
|
904
|
-
captured: {
|
|
905
|
-
int0: _h2b('00' +
|
|
906
|
-
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0' +
|
|
907
|
-
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F1' +
|
|
908
|
-
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F2' +
|
|
909
|
-
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F3' +
|
|
910
|
-
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F4' +
|
|
911
|
-
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F5' +
|
|
912
|
-
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F6' +
|
|
913
|
-
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F7'),
|
|
914
|
-
int1: _h2b('01 00 01')
|
|
915
|
-
}
|
|
916
|
-
});
|
|
917
|
-
});
|
|
918
|
-
|
|
919
|
-
it('should convert BIT STRING from DER (sig)', function() {
|
|
920
|
-
_asn1Test({
|
|
921
|
-
init: function(b) {
|
|
922
|
-
// create crafted DER BIT STRING data similar to a signature that
|
|
923
|
-
// could be interpreted incorrectly as encapsulated data.
|
|
924
|
-
// add bit stream of 257 bytes
|
|
925
|
-
_add(b, '03 82 01 01');
|
|
926
|
-
// no unused
|
|
927
|
-
_add(b, '00');
|
|
928
|
-
// signature bits
|
|
929
|
-
_add(b, '25 81 FD 6E D3 AB 34 45 DE AE F1 5B EC 6A FB 79');
|
|
930
|
-
_add(b, '14 CD 7B B2 8E 48 59 AE 89 B1 55 60 11 AB BC 7F');
|
|
931
|
-
_add(b, '6D 6D FE 16 22 42 AC 57 CC E9 C0 3A 8D 1E F3 C3');
|
|
932
|
-
_add(b, '97 C8 23 53 DE E0 34 C3 A9 43 8B 2B D9 C0 24 FF');
|
|
933
|
-
_add(b, 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F4');
|
|
934
|
-
_add(b, 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F5');
|
|
935
|
-
_add(b, 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F6');
|
|
936
|
-
_add(b, 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F7');
|
|
937
|
-
_add(b, 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F8');
|
|
938
|
-
_add(b, 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F9');
|
|
939
|
-
_add(b, 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FA');
|
|
940
|
-
_add(b, 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FB');
|
|
941
|
-
_add(b, 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FC');
|
|
942
|
-
_add(b, 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FD');
|
|
943
|
-
_add(b, 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FE');
|
|
944
|
-
_add(b, 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF');
|
|
945
|
-
},
|
|
946
|
-
dump: false,
|
|
947
|
-
roundtrip: true,
|
|
948
|
-
v: {
|
|
949
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
950
|
-
type: ASN1.Type.BITSTRING,
|
|
951
|
-
constructed: false,
|
|
952
|
-
// captureBitStringContents not used to check if valude decoded
|
|
953
|
-
capture: 'sig'
|
|
954
|
-
},
|
|
955
|
-
captured: {
|
|
956
|
-
sig: _h2b(
|
|
957
|
-
'00' +
|
|
958
|
-
'25 81 FD 6E D3 AB 34 45 DE AE F1 5B EC 6A FB 79' +
|
|
959
|
-
'14 CD 7B B2 8E 48 59 AE 89 B1 55 60 11 AB BC 7F' +
|
|
960
|
-
'6D 6D FE 16 22 42 AC 57 CC E9 C0 3A 8D 1E F3 C3' +
|
|
961
|
-
'97 C8 23 53 DE E0 34 C3 A9 43 8B 2B D9 C0 24 FF' +
|
|
962
|
-
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F4' +
|
|
963
|
-
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F5' +
|
|
964
|
-
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F6' +
|
|
965
|
-
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F7' +
|
|
966
|
-
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F8' +
|
|
967
|
-
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F9' +
|
|
968
|
-
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FA' +
|
|
969
|
-
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FB' +
|
|
970
|
-
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FC' +
|
|
971
|
-
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FD' +
|
|
972
|
-
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FE' +
|
|
973
|
-
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF')
|
|
974
|
-
}
|
|
975
|
-
});
|
|
976
|
-
});
|
|
977
|
-
|
|
978
|
-
it('should convert BIT STRING from DER (sig2)', function() {
|
|
979
|
-
_asn1Test({
|
|
980
|
-
init: function(b) {
|
|
981
|
-
// create crafted DER BIT STRING data similar to a signature that
|
|
982
|
-
// could be interpreted incorrectly as encapsulated data.
|
|
983
|
-
// add bit stream of 257 bytes
|
|
984
|
-
_add(b, '03 82 01 01');
|
|
985
|
-
// no unused
|
|
986
|
-
_add(b, '00');
|
|
987
|
-
// signature bits
|
|
988
|
-
_add(b, '2B 05 9D 81 FB 07 2C CE 15 0A 39 CD D3 89 A7 83');
|
|
989
|
-
_add(b, '5C 99 5E B2 0D A4 E0 26 81 20 EF 5A 0F 23 46 E0');
|
|
990
|
-
_add(b, '46 4A 5D 7B 6A C9 4F B1 38 D5 FC 71 6A 32 06 6C');
|
|
991
|
-
_add(b, '68 15 9E F2 13 DB 2A 36 41 93 51 4C 98 EB 9F 32');
|
|
992
|
-
_add(b, '28 54 07 CE B2 05 92 A7 C8 DF 2F A1 E3 C9 9C 0A');
|
|
993
|
-
_add(b, 'E4 BE B3 88 17 CF 62 70 80 CD 10 B8 9B 08 E0 47');
|
|
994
|
-
_add(b, '61 24 12 16 C0 FC 70 D9 0A 4A 39 09 F4 51 F1 62');
|
|
995
|
-
_add(b, '0A 56 6B 46 C1 E2 0B FF 92 3E F5 A5 06 EE 55 0A');
|
|
996
|
-
_add(b, '6D FD DA 18 B9 C1 30 6E 98 CD 38 4D 9C C5 B5 6B');
|
|
997
|
-
_add(b, '81 19 B7 B1 19 52 5C F8 99 9D C2 EC A1 F5 96 A7');
|
|
998
|
-
_add(b, '66 79 A6 53 F8 17 67 64 52 F6 32 37 F4 CD 74 5A');
|
|
999
|
-
_add(b, '2F 59 35 06 90 6B CC F7 E6 7D 67 C4 FA 0C 7B 10');
|
|
1000
|
-
_add(b, '05 85 E8 4F E2 0E EF A0 D4 F8 57 EB BF 2F 14 42');
|
|
1001
|
-
_add(b, '62 01 09 08 35 5C 24 8C 0D 5D FD FA 52 58 D8 C9');
|
|
1002
|
-
_add(b, '10 45 4F AE 15 B0 9A 82 B9 FB 17 CC E6 A0 BD BA');
|
|
1003
|
-
_add(b, '76 BD 05 F1 70 69 43 9D 60 31 F9 F4 13 7A 8C 71');
|
|
1004
|
-
},
|
|
1005
|
-
dump: false,
|
|
1006
|
-
roundtrip: true,
|
|
1007
|
-
v: {
|
|
1008
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
1009
|
-
type: ASN1.Type.BITSTRING,
|
|
1010
|
-
constructed: false,
|
|
1011
|
-
// captureBitStringContents not used to check if valude decoded
|
|
1012
|
-
captureBitStringValue: 'bits'
|
|
1013
|
-
},
|
|
1014
|
-
captured: {
|
|
1015
|
-
bits: _h2b(
|
|
1016
|
-
'2B 05 9D 81 FB 07 2C CE 15 0A 39 CD D3 89 A7 83' +
|
|
1017
|
-
'5C 99 5E B2 0D A4 E0 26 81 20 EF 5A 0F 23 46 E0' +
|
|
1018
|
-
'46 4A 5D 7B 6A C9 4F B1 38 D5 FC 71 6A 32 06 6C' +
|
|
1019
|
-
'68 15 9E F2 13 DB 2A 36 41 93 51 4C 98 EB 9F 32' +
|
|
1020
|
-
'28 54 07 CE B2 05 92 A7 C8 DF 2F A1 E3 C9 9C 0A' +
|
|
1021
|
-
'E4 BE B3 88 17 CF 62 70 80 CD 10 B8 9B 08 E0 47' +
|
|
1022
|
-
'61 24 12 16 C0 FC 70 D9 0A 4A 39 09 F4 51 F1 62' +
|
|
1023
|
-
'0A 56 6B 46 C1 E2 0B FF 92 3E F5 A5 06 EE 55 0A' +
|
|
1024
|
-
'6D FD DA 18 B9 C1 30 6E 98 CD 38 4D 9C C5 B5 6B' +
|
|
1025
|
-
'81 19 B7 B1 19 52 5C F8 99 9D C2 EC A1 F5 96 A7' +
|
|
1026
|
-
'66 79 A6 53 F8 17 67 64 52 F6 32 37 F4 CD 74 5A' +
|
|
1027
|
-
'2F 59 35 06 90 6B CC F7 E6 7D 67 C4 FA 0C 7B 10' +
|
|
1028
|
-
'05 85 E8 4F E2 0E EF A0 D4 F8 57 EB BF 2F 14 42' +
|
|
1029
|
-
'62 01 09 08 35 5C 24 8C 0D 5D FD FA 52 58 D8 C9' +
|
|
1030
|
-
'10 45 4F AE 15 B0 9A 82 B9 FB 17 CC E6 A0 BD BA' +
|
|
1031
|
-
'76 BD 05 F1 70 69 43 9D 60 31 F9 F4 13 7A 8C 71')
|
|
1032
|
-
}
|
|
1033
|
-
});
|
|
1034
|
-
});
|
|
1035
|
-
|
|
1036
|
-
it('should convert BIT STRING from DER (sig3)', function() {
|
|
1037
|
-
_asn1Test({
|
|
1038
|
-
init: function(b) {
|
|
1039
|
-
// create crafted DER BIT STRING data similar to a signature that
|
|
1040
|
-
// could be interpreted incorrectly as encapsulated data.
|
|
1041
|
-
_add(b, '03 0B');
|
|
1042
|
-
// no unused
|
|
1043
|
-
_add(b, '00');
|
|
1044
|
-
// signature bits with structure with bad type and length
|
|
1045
|
-
_add(b, '2B 05 9D 05 F0 F1 F2 F3 F4 F5');
|
|
1046
|
-
},
|
|
1047
|
-
dump: false,
|
|
1048
|
-
roundtrip: true,
|
|
1049
|
-
v: {
|
|
1050
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
1051
|
-
type: ASN1.Type.BITSTRING,
|
|
1052
|
-
constructed: false,
|
|
1053
|
-
// captureBitStringContents not used to check if value decoded
|
|
1054
|
-
capture: 'sig'
|
|
1055
|
-
},
|
|
1056
|
-
captured: {
|
|
1057
|
-
sig: _h2b(
|
|
1058
|
-
'00' +
|
|
1059
|
-
'2B 05 9D 05 F0 F1 F2 F3 F4 F5')
|
|
1060
|
-
}
|
|
1061
|
-
});
|
|
1062
|
-
});
|
|
1063
|
-
|
|
1064
|
-
it('should convert BIT STRING from BER (decodable sig)', function() {
|
|
1065
|
-
_asn1Test({
|
|
1066
|
-
init: function(b) {
|
|
1067
|
-
// create crafted DER BIT STRING data similar to a signature that
|
|
1068
|
-
// could be interpreted as encapsulated data. data is such that
|
|
1069
|
-
// a round trip process could change the data due to INTEGER
|
|
1070
|
-
// optimization (removal of leading bytes) or length structure
|
|
1071
|
-
// compression (long to short).
|
|
1072
|
-
// add a basic bit stream "signature" with test data
|
|
1073
|
-
_add(b, '03 22');
|
|
1074
|
-
// no unused
|
|
1075
|
-
_add(b, '00');
|
|
1076
|
-
// everything after this point might be important bits, not ASN.1
|
|
1077
|
-
// SEQUENCE of tests
|
|
1078
|
-
_add(b, '30 1E');
|
|
1079
|
-
// signature bits
|
|
1080
|
-
// '02 02' prefix will be cause parsing as an integer
|
|
1081
|
-
// toDer will try to remove the extra 00.
|
|
1082
|
-
// tests the BIT STRING content/value saving feature
|
|
1083
|
-
_add(b, '02 02 00 7F');
|
|
1084
|
-
// similar example for -1:
|
|
1085
|
-
_add(b, '02 02 FF FF');
|
|
1086
|
-
// could extend out to any structure size:
|
|
1087
|
-
_add(b, '02 06 FF FF FF FF FF FF');
|
|
1088
|
-
// the roundtrip issue can exist for long lengths that could
|
|
1089
|
-
// compress to short lengths, this could be output as '02 02 01 23':
|
|
1090
|
-
_add(b, '02 81 02 01 23');
|
|
1091
|
-
// also an issue for indefinite length structures that will
|
|
1092
|
-
// have a known length later:
|
|
1093
|
-
_add(b, '30 80');
|
|
1094
|
-
// a few INTEGERs
|
|
1095
|
-
_add(b, '02 01 00');
|
|
1096
|
-
_add(b, '02 01 01');
|
|
1097
|
-
// done
|
|
1098
|
-
_add(b, '00 00');
|
|
1099
|
-
// other examples may exist
|
|
1100
|
-
},
|
|
1101
|
-
dump: false,
|
|
1102
|
-
// NOTE: arbitrary data can be recompacted, check saved data worked
|
|
1103
|
-
roundtrip: true,
|
|
1104
|
-
v: {
|
|
1105
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
1106
|
-
type: ASN1.Type.BITSTRING,
|
|
1107
|
-
constructed: false,
|
|
1108
|
-
captureBitStringValue: 'sig'
|
|
1109
|
-
},
|
|
1110
|
-
captured: {
|
|
1111
|
-
sig: _h2b(
|
|
1112
|
-
'30 1E' +
|
|
1113
|
-
'02 02 00 7F' +
|
|
1114
|
-
'02 02 FF FF' +
|
|
1115
|
-
'02 06 FF FF FF FF FF FF' +
|
|
1116
|
-
'02 81 02 01 23' +
|
|
1117
|
-
'30 80' +
|
|
1118
|
-
'02 01 00' +
|
|
1119
|
-
'02 01 01' +
|
|
1120
|
-
'00 00')
|
|
1121
|
-
}
|
|
1122
|
-
});
|
|
1123
|
-
});
|
|
1124
|
-
|
|
1125
|
-
it('should convert BIT STRING from strict DER', function() {
|
|
1126
|
-
_asn1Test({
|
|
1127
|
-
init: function(b) {
|
|
1128
|
-
// create crafted DER BIT STRING data that includes encapsulated
|
|
1129
|
-
// data. include valid data that would only parse in strict
|
|
1130
|
-
// mode.
|
|
1131
|
-
_add(b, '03 06');
|
|
1132
|
-
// no padding
|
|
1133
|
-
_add(b, '00');
|
|
1134
|
-
// sub-BIT STRING with valid length
|
|
1135
|
-
_add(b, '03 03 00 01 02');
|
|
1136
|
-
},
|
|
1137
|
-
dump: false,
|
|
1138
|
-
decodeBitStrings: true,
|
|
1139
|
-
roundtrip: true,
|
|
1140
|
-
v: {
|
|
1141
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
1142
|
-
type: ASN1.Type.BITSTRING,
|
|
1143
|
-
constructed: false,
|
|
1144
|
-
// default capture value has structural data
|
|
1145
|
-
// check contents and value
|
|
1146
|
-
captureBitStringContents: 'bitsC',
|
|
1147
|
-
captureBitStringValue: 'bitsV'
|
|
1148
|
-
},
|
|
1149
|
-
captured: {
|
|
1150
|
-
bitsC: _h2b('00 03 03 00 01 02'),
|
|
1151
|
-
bitsV: _h2b('03 03 00 01 02')
|
|
1152
|
-
}
|
|
1153
|
-
});
|
|
1154
|
-
});
|
|
1155
|
-
it('should convert BIT STRING from non-strict DER', function() {
|
|
1156
|
-
_asn1Test({
|
|
1157
|
-
init: function(b) {
|
|
1158
|
-
// create crafted DER BIT STRING data that includes encapsulated
|
|
1159
|
-
// data. include invalid data that would only parse in non-strict
|
|
1160
|
-
// mode. ensure it is never parsed.
|
|
1161
|
-
_add(b, '03 05');
|
|
1162
|
-
// no padding
|
|
1163
|
-
_add(b, '00');
|
|
1164
|
-
// sub-BIT STRING with invalid length, missing a byte
|
|
1165
|
-
_add(b, '03 03 00 01');
|
|
1166
|
-
},
|
|
1167
|
-
dump: false,
|
|
1168
|
-
decodeBitStrings: true,
|
|
1169
|
-
roundtrip: true,
|
|
1170
|
-
v: {
|
|
1171
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
1172
|
-
type: ASN1.Type.BITSTRING,
|
|
1173
|
-
constructed: false,
|
|
1174
|
-
// ensure default captures contents vs decoded structure
|
|
1175
|
-
capture: 'bits0',
|
|
1176
|
-
// check contents and value
|
|
1177
|
-
captureBitStringContents: 'bitsC',
|
|
1178
|
-
captureBitStringValue: 'bitsV'
|
|
1179
|
-
},
|
|
1180
|
-
captured: {
|
|
1181
|
-
bits0: _h2b('00 03 03 00 01'),
|
|
1182
|
-
bitsC: _h2b('00 03 03 00 01'),
|
|
1183
|
-
bitsV: _h2b('03 03 00 01')
|
|
1184
|
-
}
|
|
1185
|
-
});
|
|
1186
|
-
});
|
|
1187
|
-
|
|
1188
|
-
it('should convert indefinite length seq from BER', function() {
|
|
1189
|
-
_asn1Test({
|
|
1190
|
-
init: function(b) {
|
|
1191
|
-
// SEQUENCE
|
|
1192
|
-
_add(b, '30 80');
|
|
1193
|
-
// a few INTEGERs
|
|
1194
|
-
_add(b, '02 01 00');
|
|
1195
|
-
_add(b, '02 01 01');
|
|
1196
|
-
_add(b, '02 01 02');
|
|
1197
|
-
// done
|
|
1198
|
-
_add(b, '00 00');
|
|
1199
|
-
},
|
|
1200
|
-
dump: false,
|
|
1201
|
-
// roundtrip will know the sequence length
|
|
1202
|
-
roundtrip: false,
|
|
1203
|
-
v: {
|
|
1204
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
1205
|
-
type: ASN1.Type.SEQUENCE,
|
|
1206
|
-
constructed: true,
|
|
1207
|
-
value: [{
|
|
1208
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
1209
|
-
type: ASN1.Type.INTEGER,
|
|
1210
|
-
constructed: false,
|
|
1211
|
-
capture: 'int0'
|
|
1212
|
-
}, {
|
|
1213
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
1214
|
-
type: ASN1.Type.INTEGER,
|
|
1215
|
-
constructed: false,
|
|
1216
|
-
capture: 'int1'
|
|
1217
|
-
}, {
|
|
1218
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
1219
|
-
type: ASN1.Type.INTEGER,
|
|
1220
|
-
constructed: false,
|
|
1221
|
-
capture: 'int2'
|
|
1222
|
-
}]
|
|
1223
|
-
},
|
|
1224
|
-
captured: {
|
|
1225
|
-
int0: _h2b('00'),
|
|
1226
|
-
int1: _h2b('01'),
|
|
1227
|
-
int2: _h2b('02')
|
|
1228
|
-
}
|
|
1229
|
-
});
|
|
1230
|
-
});
|
|
1231
|
-
|
|
1232
|
-
it('should handle ASN.1 mutations', function() {
|
|
1233
|
-
_asn1Test({
|
|
1234
|
-
init: function(b) {
|
|
1235
|
-
// BIT STRING
|
|
1236
|
-
_add(b, '03 09 00');
|
|
1237
|
-
// SEQUENCE
|
|
1238
|
-
_add(b, '30 06');
|
|
1239
|
-
// a few INTEGERs
|
|
1240
|
-
_add(b, '02 01 00');
|
|
1241
|
-
_add(b, '02 01 01');
|
|
1242
|
-
},
|
|
1243
|
-
dump: false,
|
|
1244
|
-
// roundtrip will know the sequence length
|
|
1245
|
-
roundtrip: true,
|
|
1246
|
-
v: {
|
|
1247
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
1248
|
-
type: ASN1.Type.BITSTRING,
|
|
1249
|
-
constructed: false,
|
|
1250
|
-
captureBitStringContents: 'bits',
|
|
1251
|
-
value: [{
|
|
1252
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
1253
|
-
type: ASN1.Type.SEQUENCE,
|
|
1254
|
-
constructed: true,
|
|
1255
|
-
value: [{
|
|
1256
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
1257
|
-
type: ASN1.Type.INTEGER,
|
|
1258
|
-
constructed: false,
|
|
1259
|
-
capture: 'int0'
|
|
1260
|
-
}, {
|
|
1261
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
1262
|
-
type: ASN1.Type.INTEGER,
|
|
1263
|
-
constructed: false,
|
|
1264
|
-
capture: 'int1'
|
|
1265
|
-
}]
|
|
1266
|
-
}]
|
|
1267
|
-
},
|
|
1268
|
-
captured: {
|
|
1269
|
-
bits: _h2b('00 30 06 02 01 00 02 01 01'),
|
|
1270
|
-
int0: _h2b('00'),
|
|
1271
|
-
int1: _h2b('01')
|
|
1272
|
-
},
|
|
1273
|
-
done: function(data) {
|
|
1274
|
-
var asn1 = data.strict.asn1;
|
|
1275
|
-
// mutate
|
|
1276
|
-
asn1.value[0].value[0].value = _h2b('02');
|
|
1277
|
-
asn1.value[0].value[1].value = _h2b('03');
|
|
1278
|
-
// convert
|
|
1279
|
-
// must use new data vs saved BIT STRING data
|
|
1280
|
-
var der = ASN1.toDer(asn1);
|
|
1281
|
-
var expect = _h2b('03 09 00 30 06 02 01 02 02 01 03');
|
|
1282
|
-
// compare
|
|
1283
|
-
ASSERT.equal(UTIL.bytesToHex(der), UTIL.bytesToHex(expect));
|
|
1284
|
-
}
|
|
1285
|
-
});
|
|
1286
|
-
});
|
|
1287
|
-
|
|
1288
|
-
it('should convert BMP STRING from DER', function() {
|
|
1289
|
-
_asn1Test({
|
|
1290
|
-
init: function(b) {
|
|
1291
|
-
// BPMSTRING
|
|
1292
|
-
_add(b, '1e 08');
|
|
1293
|
-
_add(b, '01 02 03 04 05 06 07 08');
|
|
1294
|
-
},
|
|
1295
|
-
dump: false,
|
|
1296
|
-
roundtrip: true,
|
|
1297
|
-
v: {
|
|
1298
|
-
tagClass: ASN1.Class.UNIVERSAL,
|
|
1299
|
-
type: ASN1.Type.BPMSTRING,
|
|
1300
|
-
constructed: false,
|
|
1301
|
-
capture: 'bits'
|
|
1302
|
-
},
|
|
1303
|
-
captured: {
|
|
1304
|
-
bits: '\u0102\u0304\u0506\u0708'
|
|
1305
|
-
}
|
|
1306
|
-
});
|
|
1307
|
-
});
|
|
1308
|
-
|
|
1309
|
-
// TODO: how minimal should INTEGERs be encoded?
|
|
1310
|
-
// .. fromDer will create the full integer
|
|
1311
|
-
// .. toDer will remove only first byte if possible
|
|
1312
|
-
it('should minimally encode INTEGERs', function() {
|
|
1313
|
-
function _test(hin, hout) {
|
|
1314
|
-
var derIn = _h2b(hin);
|
|
1315
|
-
var derOut = ASN1.toDer(ASN1.fromDer(derIn));
|
|
1316
|
-
ASSERT.equal(
|
|
1317
|
-
UTIL.bytesToHex(derOut),
|
|
1318
|
-
UTIL.bytesToHex(_h2b(hout)));
|
|
1319
|
-
}
|
|
1320
|
-
// optimal
|
|
1321
|
-
_test('02 01 01', '02 01 01');
|
|
1322
|
-
_test('02 01 FF', '02 01 FF');
|
|
1323
|
-
_test('02 02 00 FF', '02 02 00 FF');
|
|
1324
|
-
|
|
1325
|
-
// remove leading 00s before a 0b0xxxxxxx
|
|
1326
|
-
_test('02 04 00 00 00 01', '02 03 00 00 01');
|
|
1327
|
-
// this would be more optimal
|
|
1328
|
-
//_test('02 04 00 00 00 01', '02 01 01');
|
|
1329
|
-
|
|
1330
|
-
// remove leading FFs before a 0b1xxxxxxx
|
|
1331
|
-
_test('02 04 FF FF FF FF', '02 03 FF FF FF');
|
|
1332
|
-
// this would be more optimal
|
|
1333
|
-
//_test('02 04 FF FF FF FF', '02 01 FF');
|
|
1334
|
-
});
|
|
1335
|
-
})();
|
|
1336
|
-
});
|
|
1337
|
-
})();
|