pyhanko-cli 0.3.0__tar.gz → 0.3.1__tar.gz
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.
- pyhanko_cli-0.3.1/MANIFEST.in +3 -0
- {pyhanko_cli-0.3.0/src/pyhanko_cli.egg-info → pyhanko_cli-0.3.1}/PKG-INFO +3 -3
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyproject.toml +3 -3
- pyhanko_cli-0.3.1/src/pyhanko/cli/version.py +2 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1/src/pyhanko_cli.egg-info}/PKG-INFO +3 -3
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/src/pyhanko_cli.egg-info/SOURCES.txt +8 -1
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/src/pyhanko_cli.egg-info/requires.txt +2 -2
- pyhanko_cli-0.3.1/tests/__init__.py +0 -0
- pyhanko_cli-0.3.1/tests/conftest.py +225 -0
- pyhanko_cli-0.3.1/tests/validation/__init__.py +0 -0
- pyhanko_cli-0.3.1/tests/validation/conftest.py +149 -0
- pyhanko_cli-0.3.1/tests/validation/test_cli_legacy_ltv.py +125 -0
- pyhanko_cli-0.3.1/tests/validation/test_cli_qualified_validation.py +745 -0
- pyhanko_cli-0.3.1/tests/validation/test_cli_validation.py +816 -0
- pyhanko_cli-0.3.0/MANIFEST.in +0 -1
- pyhanko_cli-0.3.0/src/pyhanko/cli/version.py +0 -2
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/LICENSE +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/README.md +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/__init__.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/__init__.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/certomancer_trust_lists.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/certomancer.yml +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-dsa/intermediate_ca.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-dsa/ocsp.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-dsa/params.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-dsa/root_ca.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-dsa/signer.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-dsa/signer2.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-dsa/tsa.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-dsa/tsa2.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-ecdsa/decrypter-x25519.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-ecdsa/decrypter-x448.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-ecdsa/decrypter1.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-ecdsa/decrypter2.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-ecdsa/decrypter3.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-ecdsa/intermediate_ca.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-ecdsa/ocsp.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-ecdsa/root_ca.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-ecdsa/signer.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-ecdsa/signer2.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-ecdsa/tsa.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-ecdsa/tsa2.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-ed25519/intermediate_ca.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-ed25519/ocsp.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-ed25519/root_ca.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-ed25519/signer.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-ed25519/signer2.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-ed25519/tsa.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-ed25519/tsa2.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-ed448/intermediate_ca.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-ed448/ocsp.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-ed448/root_ca.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-ed448/signer.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-ed448/signer2.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-ed448/tsa.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-ed448/tsa2.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-rsa/indep_tsa.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-rsa/indep_tsa_root.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-rsa/interm_aa.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-rsa/intermediate_ca.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-rsa/leaf_aa.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-rsa/ocsp.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-rsa/root_aa.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-rsa/root_ca.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-rsa/signer.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-rsa/signer2.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-rsa/tsa.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/keys-rsa/tsa2.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/ocsp.req.der +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/ocsp.resp.der +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/real-misissued-qtst-cert.cer +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/real-qcert.cer +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/real-qtst-cert.cer +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/selfsigned.cert.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/selfsigned.key.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/selfsigned.pfx +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/some-chain.cert.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/testing-ca/ca-chain.cert.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/testing-ca/interm/decrypter1-old.cert.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/testing-ca/interm/decrypter1.cert.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/testing-ca/interm/decrypter1.pfx +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/testing-ca/interm/decrypter2.cert.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/testing-ca/interm/decrypter2.pfx +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/testing-ca/interm/interm-ocsp.cert.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/testing-ca/interm/interm-ocsp.pfx +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/testing-ca/interm/signer1-long.cert.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/testing-ca/interm/signer1-long.pfx +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/testing-ca/interm/signer1.cert.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/testing-ca/interm/signer1.pfx +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/testing-ca/interm/signer2.cert.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/testing-ca/interm/signer2.pfx +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/testing-ca/root/interm.cert.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/testing-ca/root/interm.pfx +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/testing-ca/root/root.cert.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/testing-ca/root/root.pfx +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/testing-ca/root/tsa.cert.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/testing-ca/root/tsa.pfx +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/testing-ca/root/tsa2.cert.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/testing-ca/root/tsa2.pfx +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/testing-ca-setup/ca-setup.sh +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/testing-ca-setup/openssl.base.cnf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/testing-ca-setup/pkcs11-setup-certomancer.sh +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/testing-ca-setup/pkcs11-setup.sh +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/testing-ca-setup/setup-params +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/crypto/tsa.cert.pem +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/fonts/FreeSerif.otf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/fonts/LICENSE.Noto +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/fonts/LICENSE.freeserif +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/fonts/NotoSans-Regular.ttf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/fonts/NotoSansArabic-Regular.ttf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/fonts/NotoSerifJP-Regular.otf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/fonts/NotoSerifSubset.otf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/img/stamp-indexed.png +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/img/stamp.png +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/.gitignore +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/broken-objstream1.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/broken-objstream2.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/broken-objstream3.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/broken-objstream4.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/broken-objstream5.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/broken-objstream6.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/certified-with-indirect-refs-in-dir.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/circular-page-tree.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/coverage-anomalies/base.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/coverage-anomalies/one-byterange.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/coverage-anomalies/signature-gap-too-big.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/coverage-anomalies/tail-uncovered.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/coverage-anomalies/weird-byterange.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/ed448-disallowed-hash.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/ed448-shake256-nolen.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/embedded-encrypted-nocf.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/empty-a4.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/extensions-direct.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/extensions-indirect-not-all-paths.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/extensions-indirect.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/extensions-update-direct.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/extensions-update-indirect.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/fontembed.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/form-tree-circular-ref-input.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/form-update-ap-indirect-sneaky-trailer.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/form-update-no-override-appearance-stream-ap-indirect-sneaky.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/form-update-no-override-appearance-stream-ap-indirect.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/form-update-original-ap-type-wrong.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/form-update-override-appearance-stream-ap-indirect-sneaky.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/form-update-override-appearance-stream-ap-indirect.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/form-update-override-appearance-stream-sneaky.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/form-update-override-appearance-stream.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/info-bin-producer-string.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/layout-tests/arabic-box.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/layout-tests/bitmap-bg.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/layout-tests/code128-test.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/layout-tests/double-newline.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/layout-tests/fancy-qr-stamp-test.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/layout-tests/form-fill-result.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/layout-tests/four-stamps-fixed.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/layout-tests/four-stamps-natural.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/layout-tests/freeserif-test.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/layout-tests/ja-vert-stamps.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/layout-tests/leaky-graphics-state-stamp-no-corr-result.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/layout-tests/leaky-graphics-state-stamp-result.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/layout-tests/scaled-bitmap-bg.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/layout-tests/stamp-from-static-pdf.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/layout-tests/stamp-on-pdf-bg.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/layout-tests/text-stamp-color.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/layout-tests/undef-bg-size.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/leaky-graphics-state-doc.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/malformed-encrypt-dict1.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/malformed-encrypt-dict2.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-aes256-empty-encrypted-string.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-aes256-malformed-oe.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-aes256-malformed-perms.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-aes256.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-annotless.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-badxref.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-broken-xref-size.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-hybrid-xref-mswordstyle.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-hybrid-xref-weirdgen.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-hybrid-xref.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-illegal-header.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-one-field-indir-annots.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-pdf-ua-and-a.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-pubkey-aes256.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-pubkey-rc4-envelope.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-pubkey-rc4.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-pubkey-unknown-envelope-alg.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-rc4.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-signed-twice-both-created.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-signed-twice-no-sig-type.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-signed-twice-second-created.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-startxref-hopeless.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-startxref-hopeless2.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-startxref-hopeless3.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-startxref-obo1.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-startxref-obo2.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-startxref-obo3.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-startxref-obo4.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-startxref-obo5.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-startxref-obo6.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-startxref-same-line.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-two-fields-aes256.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-two-fields-pubkey-aes256.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-two-fields-pubkey-rc4.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-two-fields-signed-twice.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-two-fields-tagged.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-two-fields.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-two-pages.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-with-field-aes256.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-with-field-pubkey-aes256.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-with-field-pubkey-rc4.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-with-field-rc4.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-with-field-tagged.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-with-field.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-with-nonexistent-refs.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-with-orphaned-xrefs.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-with-simple-form.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-with-textfield-group-var.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-with-textfield-group.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal-xref.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/minimal.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/pades-lta-dss-indirect-arrs-test-2.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/pades-lta-dss-indirect-arrs-test.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/pades-with-old-style-signing-cert-attr-issser.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/pades-with-old-style-signing-cert-attr.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/page-tree-direct-kid.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/pdf-background-test.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/pdf-sig-with-econtent.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/pubkey-3des-test.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/pubkey-ecc-test.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/pubkey-rc2-test.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/safedocs/CompactedPDFSyntaxTest.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/safedocs/SOURCE +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/scribble-decomp.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/scribble-in-arr.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/scribble.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/separate-annots-kids-indir.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/sig-no-signed-attrs.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/sig-with-ski-sid.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/signed-encrypted-pubkey-with-catalog-ref.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/source +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/struct-tree-circular-ref.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/pdf/uncompressed-objstream-sample.pdf +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/tl/COPYRIGHT +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/tl/eu-lotl-pivot-282.xml +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/tl/eu-lotl-pivot-300.xml +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/tl/eu-lotl-pivot-335.xml +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/tl/eu-lotl-pivot-341.xml +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/tl/eu-lotl.xml +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/tl/tsl-be.xml +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/tl/tsl-ee.xml +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/xml/bad-xml/SOURCE +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/xml/bad-xml/cyclic.xml +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/xml/bad-xml/dtd.xml +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/xml/bad-xml/external.xml +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/xml/bad-xml/external_file.xml +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/xml/bad-xml/quadratic.xml +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/xml/bad-xml/simple-ns.xml +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/xml/bad-xml/simple.xml +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/xml/bad-xml/xmlbomb.xml +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/xml/bad-xml/xmlbomb2.xml +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/data/xml/bad-xml/xmp-with-harmless-entity.xml +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_data/samples.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_utils/__init__.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_utils/csc_utils/__init__.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_utils/csc_utils/csc_dummy_client.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_utils/layout_test_utils.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_utils/pkcs11_utils/__init__.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_utils/pkcs11_utils/config.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_utils/pkcs11_utils/fixtures.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/pyhanko_testing_commons/test_utils/signing_commons.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/setup.cfg +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/src/pyhanko/__main__.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/src/pyhanko/cli/__init__.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/src/pyhanko/cli/_ctx.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/src/pyhanko/cli/_root.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/src/pyhanko/cli/_trust.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/src/pyhanko/cli/cache.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/src/pyhanko/cli/commands/__init__.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/src/pyhanko/cli/commands/crypt.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/src/pyhanko/cli/commands/fields.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/src/pyhanko/cli/commands/signing/__init__.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/src/pyhanko/cli/commands/signing/pkcs11_cli.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/src/pyhanko/cli/commands/signing/plugin.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/src/pyhanko/cli/commands/signing/simple.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/src/pyhanko/cli/commands/signing/utils.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/src/pyhanko/cli/commands/stamp.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/src/pyhanko/cli/commands/validation/__init__.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/src/pyhanko/cli/commands/validation/ltv.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/src/pyhanko/cli/commands/validation/validate.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/src/pyhanko/cli/config.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/src/pyhanko/cli/plugin_api.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/src/pyhanko/cli/py.typed +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/src/pyhanko/cli/runtime.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/src/pyhanko/cli/utils.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/src/pyhanko_cli.egg-info/dependency_links.txt +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/src/pyhanko_cli.egg-info/entry_points.txt +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/src/pyhanko_cli.egg-info/top_level.txt +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/tests/test_cli_crypt.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/tests/test_cli_field_mgmt.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/tests/test_cli_ltv.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/tests/test_cli_plugins.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/tests/test_cli_signing.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/tests/test_cli_signing_pkcs11.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/tests/test_cli_stamp.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/tests/test_config.py +0 -0
- {pyhanko_cli-0.3.0 → pyhanko_cli-0.3.1}/tests/test_runtime.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyhanko-cli
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: CLI tools for stamping and signing PDF files
|
|
5
5
|
Author-email: Matthias Valvekens <dev@mvalvekens.be>
|
|
6
6
|
Maintainer-email: Matthias Valvekens <dev@mvalvekens.be>
|
|
@@ -27,8 +27,8 @@ Description-Content-Type: text/markdown
|
|
|
27
27
|
License-File: LICENSE
|
|
28
28
|
Requires-Dist: asn1crypto>=1.5.1
|
|
29
29
|
Requires-Dist: tzlocal>=4.3
|
|
30
|
-
Requires-Dist: pyhanko<0.35,>=0.34.
|
|
31
|
-
Requires-Dist: pyhanko-certvalidator<0.31,>=0.30.
|
|
30
|
+
Requires-Dist: pyhanko<0.35,>=0.34.1
|
|
31
|
+
Requires-Dist: pyhanko-certvalidator<0.31,>=0.30.1
|
|
32
32
|
Requires-Dist: click!=8.2.0,>=8.1.3
|
|
33
33
|
Requires-Dist: platformdirs>=4.3.8
|
|
34
34
|
Dynamic: license-file
|
|
@@ -33,12 +33,12 @@ requires-python = ">=3.10"
|
|
|
33
33
|
dependencies = [
|
|
34
34
|
"asn1crypto>=1.5.1",
|
|
35
35
|
"tzlocal>=4.3",
|
|
36
|
-
"pyhanko>=0.34.
|
|
37
|
-
"pyhanko-certvalidator>=0.30.
|
|
36
|
+
"pyhanko>=0.34.1,<0.35",
|
|
37
|
+
"pyhanko-certvalidator>=0.30.1,<0.31",
|
|
38
38
|
"click>=8.1.3,!=8.2.0",
|
|
39
39
|
"platformdirs>=4.3.8",
|
|
40
40
|
]
|
|
41
|
-
version = "0.3.
|
|
41
|
+
version = "0.3.1"
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
[project.readme]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyhanko-cli
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: CLI tools for stamping and signing PDF files
|
|
5
5
|
Author-email: Matthias Valvekens <dev@mvalvekens.be>
|
|
6
6
|
Maintainer-email: Matthias Valvekens <dev@mvalvekens.be>
|
|
@@ -27,8 +27,8 @@ Description-Content-Type: text/markdown
|
|
|
27
27
|
License-File: LICENSE
|
|
28
28
|
Requires-Dist: asn1crypto>=1.5.1
|
|
29
29
|
Requires-Dist: tzlocal>=4.3
|
|
30
|
-
Requires-Dist: pyhanko<0.35,>=0.34.
|
|
31
|
-
Requires-Dist: pyhanko-certvalidator<0.31,>=0.30.
|
|
30
|
+
Requires-Dist: pyhanko<0.35,>=0.34.1
|
|
31
|
+
Requires-Dist: pyhanko-certvalidator<0.31,>=0.30.1
|
|
32
32
|
Requires-Dist: click!=8.2.0,>=8.1.3
|
|
33
33
|
Requires-Dist: platformdirs>=4.3.8
|
|
34
34
|
Dynamic: license-file
|
|
@@ -283,6 +283,8 @@ src/pyhanko_cli.egg-info/dependency_links.txt
|
|
|
283
283
|
src/pyhanko_cli.egg-info/entry_points.txt
|
|
284
284
|
src/pyhanko_cli.egg-info/requires.txt
|
|
285
285
|
src/pyhanko_cli.egg-info/top_level.txt
|
|
286
|
+
tests/__init__.py
|
|
287
|
+
tests/conftest.py
|
|
286
288
|
tests/test_cli_crypt.py
|
|
287
289
|
tests/test_cli_field_mgmt.py
|
|
288
290
|
tests/test_cli_ltv.py
|
|
@@ -291,4 +293,9 @@ tests/test_cli_signing.py
|
|
|
291
293
|
tests/test_cli_signing_pkcs11.py
|
|
292
294
|
tests/test_cli_stamp.py
|
|
293
295
|
tests/test_config.py
|
|
294
|
-
tests/test_runtime.py
|
|
296
|
+
tests/test_runtime.py
|
|
297
|
+
tests/validation/__init__.py
|
|
298
|
+
tests/validation/conftest.py
|
|
299
|
+
tests/validation/test_cli_legacy_ltv.py
|
|
300
|
+
tests/validation/test_cli_qualified_validation.py
|
|
301
|
+
tests/validation/test_cli_validation.py
|
|
File without changes
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
import datetime
|
|
3
|
+
import os
|
|
4
|
+
|
|
5
|
+
import pytest
|
|
6
|
+
import requests_mock
|
|
7
|
+
import tzlocal
|
|
8
|
+
import yaml
|
|
9
|
+
from asn1crypto import pem, x509
|
|
10
|
+
from certomancer import PKIArchitecture
|
|
11
|
+
from certomancer.integrations.illusionist import Illusionist
|
|
12
|
+
from certomancer.registry import CertLabel, ServiceLabel
|
|
13
|
+
from click.testing import CliRunner
|
|
14
|
+
from freezegun import freeze_time
|
|
15
|
+
from pyhanko.pdf_utils.misc import PdfStrictReadError
|
|
16
|
+
from pyhanko.pdf_utils.reader import PdfFileReader
|
|
17
|
+
from pyhanko.sign.validation import (
|
|
18
|
+
validate_pdf_signature,
|
|
19
|
+
)
|
|
20
|
+
from pyhanko.sign.validation.ades import ades_lta_validation
|
|
21
|
+
from pyhanko.sign.validation.policy_decl import (
|
|
22
|
+
PdfSignatureValidationSpec,
|
|
23
|
+
SignatureValidationSpec,
|
|
24
|
+
)
|
|
25
|
+
from pyhanko_certvalidator import ValidationContext
|
|
26
|
+
from pyhanko_certvalidator.context import CertValidationPolicySpec
|
|
27
|
+
from pyhanko_certvalidator.policy_decl import (
|
|
28
|
+
REQUIRE_REVINFO,
|
|
29
|
+
CertRevTrustPolicy,
|
|
30
|
+
)
|
|
31
|
+
from pyhanko_certvalidator.registry import SimpleTrustManager
|
|
32
|
+
from pyhanko_testing_commons.test_data.samples import (
|
|
33
|
+
MINIMAL,
|
|
34
|
+
TESTING_CA,
|
|
35
|
+
TESTING_CA_ECDSA,
|
|
36
|
+
TESTING_CA_ED448,
|
|
37
|
+
TESTING_CA_ED25519,
|
|
38
|
+
TESTING_CA_QUALIFIED,
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
pytest_plugins = ["pyhanko_testing_commons.test_utils.pkcs11_utils.fixtures"]
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
INPUT_PATH = 'input.pdf'
|
|
45
|
+
SIGNED_OUTPUT_PATH = 'output.pdf'
|
|
46
|
+
DUMMY_PASSPHRASE = "secret"
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def _const(v):
|
|
50
|
+
def f(*_args, **_kwargs):
|
|
51
|
+
return v
|
|
52
|
+
|
|
53
|
+
return f
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
DEFAULT_CERTOMANCER_ARCHITECTURES = ["rsa", "ecdsa", "ed25519", "ed448"]
|
|
57
|
+
# no ed448 timestamping in Certomancer
|
|
58
|
+
# FIXME deal with the bug on the Certomancer end
|
|
59
|
+
LTV_CERTOMANCER_ARCHITECTURES = ["rsa", "ecdsa", "ed25519"]
|
|
60
|
+
CERTOMANCER_ARCHITECTURES = {
|
|
61
|
+
"rsa": TESTING_CA,
|
|
62
|
+
"ecdsa": TESTING_CA_ECDSA,
|
|
63
|
+
"ed25519": TESTING_CA_ED25519,
|
|
64
|
+
"ed448": TESTING_CA_ED448,
|
|
65
|
+
"qualified": TESTING_CA_QUALIFIED,
|
|
66
|
+
}
|
|
67
|
+
FREEZE_DT = datetime.datetime(2020, 8, 1, tzinfo=tzlocal.get_localzone())
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
@pytest.fixture(scope="module", params=DEFAULT_CERTOMANCER_ARCHITECTURES)
|
|
71
|
+
def pki_arch_name(request):
|
|
72
|
+
return request.param
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
@pytest.fixture
|
|
76
|
+
def pki_mocks_enabled():
|
|
77
|
+
return True
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
@pytest.fixture
|
|
81
|
+
def pki_arch(pki_arch_name, pki_mocks_enabled):
|
|
82
|
+
with freeze_time(FREEZE_DT):
|
|
83
|
+
arch = CERTOMANCER_ARCHITECTURES[pki_arch_name]
|
|
84
|
+
if pki_mocks_enabled:
|
|
85
|
+
with requests_mock.Mocker() as m:
|
|
86
|
+
Illusionist(arch).register(m)
|
|
87
|
+
yield arch
|
|
88
|
+
else:
|
|
89
|
+
yield arch
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
# cli_runner is autouse to ensure it gets priority in the dependency graph
|
|
93
|
+
@pytest.fixture(scope="function", autouse=True)
|
|
94
|
+
def cli_runner():
|
|
95
|
+
runner = CliRunner()
|
|
96
|
+
with runner.isolated_filesystem():
|
|
97
|
+
with open(INPUT_PATH, 'wb') as outf:
|
|
98
|
+
outf.write(MINIMAL)
|
|
99
|
+
yield runner
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
def _write_cert(
|
|
103
|
+
arch: PKIArchitecture, label: CertLabel, fname: str, use_pem: bool = True
|
|
104
|
+
) -> str:
|
|
105
|
+
cert = arch.get_cert(label)
|
|
106
|
+
with open(fname, 'wb') as outf:
|
|
107
|
+
if use_pem:
|
|
108
|
+
outf.write(pem.armor('CERTIFICATE', cert.dump()))
|
|
109
|
+
else:
|
|
110
|
+
outf.write(cert.dump())
|
|
111
|
+
return fname
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
@pytest.fixture
|
|
115
|
+
def root_cert_data(pki_arch):
|
|
116
|
+
return pki_arch.get_cert(CertLabel('root'))
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
@pytest.fixture
|
|
120
|
+
def root_cert(pki_arch):
|
|
121
|
+
return _write_cert(pki_arch, CertLabel('root'), 'root.cert.pem')
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
@pytest.fixture
|
|
125
|
+
def cert_chain(pki_arch, root_cert):
|
|
126
|
+
return (
|
|
127
|
+
root_cert,
|
|
128
|
+
_write_cert(pki_arch, CertLabel('interm'), 'interm.cert.pem'),
|
|
129
|
+
_write_cert(
|
|
130
|
+
pki_arch, CertLabel('signer1'), 'signer.crt', use_pem=False
|
|
131
|
+
),
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
@pytest.fixture
|
|
136
|
+
def timestamp_url(pki_arch: PKIArchitecture) -> str:
|
|
137
|
+
tsa = pki_arch.service_registry.get_tsa_info(ServiceLabel('tsa'))
|
|
138
|
+
return tsa.url
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
@pytest.fixture
|
|
142
|
+
def p12_keys(pki_arch, post_validate):
|
|
143
|
+
p12_bytes = pki_arch.package_pkcs12(
|
|
144
|
+
CertLabel("signer1"), password=DUMMY_PASSPHRASE.encode("utf8")
|
|
145
|
+
)
|
|
146
|
+
fname = 'signer.p12'
|
|
147
|
+
with open(fname, 'wb') as outf:
|
|
148
|
+
outf.write(p12_bytes)
|
|
149
|
+
return fname
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
def _write_config(config: dict, fname: str = 'pyhanko.yml'):
|
|
153
|
+
with open(fname, 'w') as outf:
|
|
154
|
+
yaml.dump(config, outf)
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
def _test_log(msg: str, *args):
|
|
158
|
+
# Use print instead of logger for now,
|
|
159
|
+
# since the `click` output stream management
|
|
160
|
+
# messes with the logging settings otherwise,
|
|
161
|
+
# causing writes to closed I/O handles.
|
|
162
|
+
# TODO: figure out how to handle this properly
|
|
163
|
+
print(msg.format(*args))
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
def _validate_last_sig_in(root: x509.Certificate, pdf_file, *, strict):
|
|
167
|
+
with open(pdf_file, 'rb') as result:
|
|
168
|
+
_test_log(f"Validating last signature in {pdf_file}...")
|
|
169
|
+
r = PdfFileReader(result, strict=strict)
|
|
170
|
+
# Little hack for the tests with encrypted files
|
|
171
|
+
if r.security_handler is not None:
|
|
172
|
+
r.decrypt("ownersecret")
|
|
173
|
+
last_sig = r.embedded_regular_signatures[-1]
|
|
174
|
+
# if there's a docts, we assume it's PAdES
|
|
175
|
+
trust_manager = SimpleTrustManager.build(
|
|
176
|
+
trust_roots=[root],
|
|
177
|
+
)
|
|
178
|
+
if r.embedded_timestamp_signatures:
|
|
179
|
+
ades_status = asyncio.run(
|
|
180
|
+
ades_lta_validation(
|
|
181
|
+
last_sig,
|
|
182
|
+
PdfSignatureValidationSpec(
|
|
183
|
+
SignatureValidationSpec(
|
|
184
|
+
cert_validation_policy=CertValidationPolicySpec(
|
|
185
|
+
trust_manager=trust_manager,
|
|
186
|
+
revinfo_policy=CertRevTrustPolicy(
|
|
187
|
+
REQUIRE_REVINFO,
|
|
188
|
+
),
|
|
189
|
+
),
|
|
190
|
+
)
|
|
191
|
+
),
|
|
192
|
+
)
|
|
193
|
+
)
|
|
194
|
+
status = ades_status.api_status
|
|
195
|
+
else:
|
|
196
|
+
vc = ValidationContext(
|
|
197
|
+
trust_manager=trust_manager, allow_fetching=True
|
|
198
|
+
)
|
|
199
|
+
status = validate_pdf_signature(
|
|
200
|
+
last_sig, signer_validation_context=vc
|
|
201
|
+
)
|
|
202
|
+
assert status.bottom_line, status.pretty_print_details()
|
|
203
|
+
_test_log("Validation successful")
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
@pytest.fixture
|
|
207
|
+
def post_validate(root_cert_data):
|
|
208
|
+
yield
|
|
209
|
+
input_passes_strict = True
|
|
210
|
+
if os.path.isfile(INPUT_PATH):
|
|
211
|
+
try:
|
|
212
|
+
with open(INPUT_PATH, 'rb') as inf:
|
|
213
|
+
PdfFileReader(inf)
|
|
214
|
+
except PdfStrictReadError:
|
|
215
|
+
_test_log(
|
|
216
|
+
f"Input file {INPUT_PATH} can't be opened in strict mode, "
|
|
217
|
+
f"will validate output {SIGNED_OUTPUT_PATH} in "
|
|
218
|
+
f"nonstrict mode as well"
|
|
219
|
+
)
|
|
220
|
+
input_passes_strict = False
|
|
221
|
+
|
|
222
|
+
if os.path.isfile(SIGNED_OUTPUT_PATH):
|
|
223
|
+
_validate_last_sig_in(
|
|
224
|
+
root_cert_data, SIGNED_OUTPUT_PATH, strict=input_passes_strict
|
|
225
|
+
)
|
|
File without changes
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
import getpass
|
|
3
|
+
from io import BytesIO
|
|
4
|
+
from typing import Optional
|
|
5
|
+
|
|
6
|
+
import pytest
|
|
7
|
+
from certomancer import PKIArchitecture
|
|
8
|
+
from certomancer.registry import CertLabel, KeyLabel, ServiceLabel
|
|
9
|
+
from pyhanko.pdf_utils.incremental_writer import IncrementalPdfFileWriter
|
|
10
|
+
from pyhanko.pdf_utils.writer import BasePdfFileWriter
|
|
11
|
+
from pyhanko.sign import PdfSignatureMetadata, SimpleSigner, fields, sign_pdf
|
|
12
|
+
from pyhanko.sign.signers.pdf_cms import select_suitable_signing_md
|
|
13
|
+
from pyhanko.sign.timestamps import HTTPTimeStamper
|
|
14
|
+
from pyhanko_certvalidator import ValidationContext
|
|
15
|
+
from pyhanko_certvalidator.registry import (
|
|
16
|
+
SimpleCertificateStore,
|
|
17
|
+
SimpleTrustManager,
|
|
18
|
+
)
|
|
19
|
+
from pyhanko_testing_commons.test_data.samples import (
|
|
20
|
+
MINIMAL,
|
|
21
|
+
MINIMAL_AES256,
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
from ..conftest import _const
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@pytest.fixture
|
|
28
|
+
def signer_cert_label():
|
|
29
|
+
return CertLabel('signer1')
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def write_input_to_validate(
|
|
33
|
+
pki_arch: PKIArchitecture,
|
|
34
|
+
fname: str,
|
|
35
|
+
w: Optional[BasePdfFileWriter],
|
|
36
|
+
weakened: bool = False,
|
|
37
|
+
wrong_key: bool = False,
|
|
38
|
+
signer_cert_label: CertLabel = CertLabel('signer1'),
|
|
39
|
+
):
|
|
40
|
+
registry = SimpleCertificateStore()
|
|
41
|
+
signing_cert_spec = pki_arch.get_cert_spec(signer_cert_label)
|
|
42
|
+
registry.register(
|
|
43
|
+
pki_arch.get_cert(signing_cert_spec.resolve_issuer_cert(pki_arch))
|
|
44
|
+
)
|
|
45
|
+
registry.register(pki_arch.get_cert(CertLabel('root')))
|
|
46
|
+
signer = SimpleSigner(
|
|
47
|
+
signing_cert=pki_arch.get_cert(signer_cert_label),
|
|
48
|
+
cert_registry=registry,
|
|
49
|
+
signing_key=pki_arch.key_set.get_private_key(
|
|
50
|
+
KeyLabel('signer1') if not wrong_key else KeyLabel('signer2')
|
|
51
|
+
),
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
if weakened:
|
|
55
|
+
md = 'sha1'
|
|
56
|
+
else:
|
|
57
|
+
md = select_suitable_signing_md(signer.signing_cert.public_key)
|
|
58
|
+
out = BytesIO()
|
|
59
|
+
if w:
|
|
60
|
+
sign_pdf(
|
|
61
|
+
pdf_out=w,
|
|
62
|
+
signature_meta=PdfSignatureMetadata(
|
|
63
|
+
field_name='Sig1', md_algorithm=md
|
|
64
|
+
),
|
|
65
|
+
signer=signer,
|
|
66
|
+
output=out,
|
|
67
|
+
)
|
|
68
|
+
else:
|
|
69
|
+
ci = asyncio.run(
|
|
70
|
+
signer.async_sign_general_data(
|
|
71
|
+
MINIMAL,
|
|
72
|
+
md,
|
|
73
|
+
)
|
|
74
|
+
)
|
|
75
|
+
out.write(ci.dump())
|
|
76
|
+
with open(fname, 'wb') as outf:
|
|
77
|
+
outf.write(out.getvalue())
|
|
78
|
+
return fname
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def write_ltv_input_to_validate(
|
|
82
|
+
pki_arch: PKIArchitecture,
|
|
83
|
+
signer_cert_label: CertLabel,
|
|
84
|
+
tsa_label: ServiceLabel,
|
|
85
|
+
fname: str = 'to-validate.pdf',
|
|
86
|
+
pades_style: bool = True,
|
|
87
|
+
):
|
|
88
|
+
registry = SimpleCertificateStore()
|
|
89
|
+
signing_cert_spec = pki_arch.get_cert_spec(signer_cert_label)
|
|
90
|
+
registry.register(
|
|
91
|
+
pki_arch.get_cert(signing_cert_spec.resolve_issuer_cert(pki_arch))
|
|
92
|
+
)
|
|
93
|
+
root_cert = pki_arch.get_cert(CertLabel('root'))
|
|
94
|
+
registry.register(root_cert)
|
|
95
|
+
signer = SimpleSigner(
|
|
96
|
+
signing_cert=pki_arch.get_cert(signer_cert_label),
|
|
97
|
+
cert_registry=registry,
|
|
98
|
+
signing_key=pki_arch.key_set.get_private_key(KeyLabel('signer1')),
|
|
99
|
+
)
|
|
100
|
+
tsa = pki_arch.service_registry.get_tsa_info(tsa_label)
|
|
101
|
+
|
|
102
|
+
with open(fname, 'wb') as outf:
|
|
103
|
+
w = IncrementalPdfFileWriter(BytesIO(MINIMAL))
|
|
104
|
+
sign_pdf(
|
|
105
|
+
pdf_out=w,
|
|
106
|
+
signature_meta=PdfSignatureMetadata(
|
|
107
|
+
field_name='Sig1',
|
|
108
|
+
validation_context=ValidationContext(
|
|
109
|
+
trust_manager=SimpleTrustManager.build(
|
|
110
|
+
trust_roots=[root_cert]
|
|
111
|
+
),
|
|
112
|
+
allow_fetching=True,
|
|
113
|
+
),
|
|
114
|
+
subfilter=fields.SigSeedSubFilter.PADES
|
|
115
|
+
if pades_style
|
|
116
|
+
else None,
|
|
117
|
+
embed_validation_info=True,
|
|
118
|
+
use_pades_lta=True,
|
|
119
|
+
),
|
|
120
|
+
signer=signer,
|
|
121
|
+
timestamper=HTTPTimeStamper(url=tsa.url),
|
|
122
|
+
output=outf,
|
|
123
|
+
)
|
|
124
|
+
return fname
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
@pytest.fixture(params=["regular", "encrypted"])
|
|
128
|
+
def input_to_validate(
|
|
129
|
+
pki_arch: PKIArchitecture, monkeypatch, request, signer_cert_label
|
|
130
|
+
):
|
|
131
|
+
if request.param == "encrypted":
|
|
132
|
+
w = IncrementalPdfFileWriter(BytesIO(MINIMAL_AES256))
|
|
133
|
+
monkeypatch.setattr(getpass, 'getpass', value=_const('ownersecret'))
|
|
134
|
+
w.encrypt(b"ownersecret")
|
|
135
|
+
else:
|
|
136
|
+
w = IncrementalPdfFileWriter(BytesIO(MINIMAL))
|
|
137
|
+
|
|
138
|
+
return write_input_to_validate(
|
|
139
|
+
pki_arch, 'to-validate.pdf', w, signer_cert_label=signer_cert_label
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
@pytest.fixture(scope="function")
|
|
144
|
+
def ltv_input_to_validate(pki_arch: PKIArchitecture, signer_cert_label):
|
|
145
|
+
return write_ltv_input_to_validate(
|
|
146
|
+
pki_arch,
|
|
147
|
+
signer_cert_label=signer_cert_label,
|
|
148
|
+
tsa_label=ServiceLabel('tsa'),
|
|
149
|
+
)
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import pytest
|
|
2
|
+
from certomancer.registry import CertLabel, ServiceLabel
|
|
3
|
+
from pyhanko.cli import cli_root
|
|
4
|
+
|
|
5
|
+
from ..conftest import LTV_CERTOMANCER_ARCHITECTURES
|
|
6
|
+
from .conftest import write_ltv_input_to_validate
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@pytest.fixture(scope="module", params=LTV_CERTOMANCER_ARCHITECTURES)
|
|
10
|
+
def pki_arch_name(request):
|
|
11
|
+
return request.param
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@pytest.fixture(scope="function")
|
|
15
|
+
def catch_ltv_warning():
|
|
16
|
+
with pytest.warns(UserWarning, match="adesverify instead"):
|
|
17
|
+
yield
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def test_ltv_validate_success(
|
|
21
|
+
cli_runner, root_cert, ltv_input_to_validate, catch_ltv_warning
|
|
22
|
+
):
|
|
23
|
+
result = cli_runner.invoke(
|
|
24
|
+
cli_root,
|
|
25
|
+
[
|
|
26
|
+
'sign',
|
|
27
|
+
'validate',
|
|
28
|
+
'--ltv-profile',
|
|
29
|
+
'pades-lta',
|
|
30
|
+
'--trust',
|
|
31
|
+
root_cert,
|
|
32
|
+
ltv_input_to_validate,
|
|
33
|
+
],
|
|
34
|
+
)
|
|
35
|
+
assert not result.exception, result.output
|
|
36
|
+
assert 'INTACT:TRUSTED' in result.output
|
|
37
|
+
assert 'TIMESTAMP_TOKEN<INTACT:TRUSTED>' in result.output
|
|
38
|
+
assert 'EXTENDED_WITH_LTA_UPDATES' in result.output
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def test_ltv_validate_adobe_style(
|
|
42
|
+
cli_runner, pki_arch, root_cert, catch_ltv_warning
|
|
43
|
+
):
|
|
44
|
+
fname = write_ltv_input_to_validate(
|
|
45
|
+
pki_arch,
|
|
46
|
+
signer_cert_label=CertLabel('signer1'),
|
|
47
|
+
tsa_label=ServiceLabel('tsa'),
|
|
48
|
+
pades_style=False,
|
|
49
|
+
)
|
|
50
|
+
result = cli_runner.invoke(
|
|
51
|
+
cli_root,
|
|
52
|
+
[
|
|
53
|
+
'sign',
|
|
54
|
+
'validate',
|
|
55
|
+
'--ltv-profile',
|
|
56
|
+
'adobe',
|
|
57
|
+
'--trust',
|
|
58
|
+
root_cert,
|
|
59
|
+
fname,
|
|
60
|
+
],
|
|
61
|
+
)
|
|
62
|
+
assert not result.exception, result.output
|
|
63
|
+
assert 'INTACT:TRUSTED' in result.output
|
|
64
|
+
assert 'TIMESTAMP_TOKEN<INTACT:TRUSTED>' in result.output
|
|
65
|
+
assert 'UNTOUCHED' in result.output
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def test_ltv_validate_fail_no_revinfo(
|
|
69
|
+
cli_runner, root_cert, input_to_validate, catch_ltv_warning
|
|
70
|
+
):
|
|
71
|
+
result = cli_runner.invoke(
|
|
72
|
+
cli_root,
|
|
73
|
+
[
|
|
74
|
+
'sign',
|
|
75
|
+
'validate',
|
|
76
|
+
'--ltv-profile',
|
|
77
|
+
'pades-lta',
|
|
78
|
+
'--trust',
|
|
79
|
+
root_cert,
|
|
80
|
+
input_to_validate,
|
|
81
|
+
],
|
|
82
|
+
)
|
|
83
|
+
assert result.exit_code == 1
|
|
84
|
+
assert 'REVINFO_FAILURE' in result.output
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
def test_ltv_validate_fail_no_revinfo_pretty(
|
|
88
|
+
cli_runner, root_cert, input_to_validate, catch_ltv_warning
|
|
89
|
+
):
|
|
90
|
+
result = cli_runner.invoke(
|
|
91
|
+
cli_root,
|
|
92
|
+
[
|
|
93
|
+
'sign',
|
|
94
|
+
'validate',
|
|
95
|
+
'--pretty-print',
|
|
96
|
+
'--ltv-profile',
|
|
97
|
+
'pades-lta',
|
|
98
|
+
'--trust',
|
|
99
|
+
root_cert,
|
|
100
|
+
input_to_validate,
|
|
101
|
+
],
|
|
102
|
+
)
|
|
103
|
+
assert result.exit_code == 1
|
|
104
|
+
assert 'No DSS found' in result.output
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def test_ltv_validate_not_compatible_with_validation_time(
|
|
108
|
+
cli_runner, root_cert, input_to_validate
|
|
109
|
+
):
|
|
110
|
+
result = cli_runner.invoke(
|
|
111
|
+
cli_root,
|
|
112
|
+
[
|
|
113
|
+
'sign',
|
|
114
|
+
'validate',
|
|
115
|
+
'--ltv-profile',
|
|
116
|
+
'pades-lta',
|
|
117
|
+
'--validation-time',
|
|
118
|
+
'2020-11-01T10:00:00',
|
|
119
|
+
'--trust',
|
|
120
|
+
root_cert,
|
|
121
|
+
input_to_validate,
|
|
122
|
+
],
|
|
123
|
+
)
|
|
124
|
+
assert result.exit_code == 1
|
|
125
|
+
assert 'not compatible with --ltv-profile' in result.output
|