pyhanko-cli 0.2.1__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.2.1/src/pyhanko_cli.egg-info → pyhanko_cli-0.3.1}/PKG-INFO +4 -5
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/certomancer_trust_lists.py +191 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/certomancer.yml +870 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-dsa/intermediate_ca.key.pem +9 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-dsa/ocsp.key.pem +9 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-dsa/params.pem +9 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-dsa/root_ca.key.pem +9 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-dsa/signer.key.pem +9 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-dsa/signer2.key.pem +9 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-dsa/tsa.key.pem +9 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-dsa/tsa2.key.pem +9 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-ecdsa/decrypter-x25519.key.pem +3 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-ecdsa/decrypter-x448.key.pem +4 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-ecdsa/decrypter1.key.pem +5 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-ecdsa/decrypter2.key.pem +6 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-ecdsa/decrypter3.key.pem +7 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-ecdsa/intermediate_ca.key.pem +9 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-ecdsa/ocsp.key.pem +9 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-ecdsa/root_ca.key.pem +9 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-ecdsa/signer.key.pem +9 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-ecdsa/signer2.key.pem +9 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-ecdsa/tsa.key.pem +9 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-ecdsa/tsa2.key.pem +9 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-ed25519/intermediate_ca.key.pem +3 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-ed25519/ocsp.key.pem +3 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-ed25519/root_ca.key.pem +3 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-ed25519/signer.key.pem +3 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-ed25519/signer2.key.pem +3 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-ed25519/tsa.key.pem +3 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-ed25519/tsa2.key.pem +3 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-ed448/intermediate_ca.key.pem +4 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-ed448/ocsp.key.pem +4 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-ed448/root_ca.key.pem +4 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-ed448/signer.key.pem +4 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-ed448/signer2.key.pem +4 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-ed448/tsa.key.pem +4 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-ed448/tsa2.key.pem +4 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-rsa/indep_tsa.key.pem +27 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-rsa/indep_tsa_root.key.pem +27 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-rsa/interm_aa.key.pem +27 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-rsa/intermediate_ca.key.pem +30 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-rsa/leaf_aa.key.pem +27 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-rsa/ocsp.key.pem +30 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-rsa/root_aa.key.pem +27 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-rsa/root_ca.key.pem +30 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-rsa/signer.key.pem +30 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-rsa/signer2.key.pem +30 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-rsa/tsa.key.pem +30 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/keys-rsa/tsa2.key.pem +30 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/ocsp.req.der +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/ocsp.resp.der +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/real-misissued-qtst-cert.cer +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/real-qcert.cer +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/real-qtst-cert.cer +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/selfsigned.cert.pem +33 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/selfsigned.key.pem +54 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/selfsigned.pfx +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/some-chain.cert.pem +45 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/testing-ca/ca-chain.cert.pem +44 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/testing-ca/interm/decrypter1-old.cert.pem +25 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/testing-ca/interm/decrypter1.cert.pem +26 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/testing-ca/interm/decrypter1.pfx +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/testing-ca/interm/decrypter2.cert.pem +25 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/testing-ca/interm/decrypter2.pfx +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/testing-ca/interm/interm-ocsp.cert.pem +22 -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.1/pyhanko_testing_commons/test_data/data/crypto/testing-ca/interm/signer1-long.cert.pem +25 -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.1/pyhanko_testing_commons/test_data/data/crypto/testing-ca/interm/signer1.cert.pem +25 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/testing-ca/interm/signer1.pfx +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/testing-ca/interm/signer2.cert.pem +25 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/testing-ca/interm/signer2.pfx +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/testing-ca/root/interm.cert.pem +23 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/testing-ca/root/interm.pfx +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/testing-ca/root/root.cert.pem +21 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/testing-ca/root/root.pfx +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/testing-ca/root/tsa.cert.pem +23 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/testing-ca/root/tsa.pfx +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/testing-ca/root/tsa2.cert.pem +23 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/testing-ca/root/tsa2.pfx +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/testing-ca-setup/ca-setup.sh +273 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/testing-ca-setup/openssl.base.cnf +116 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/testing-ca-setup/pkcs11-setup-certomancer.sh +32 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/testing-ca-setup/pkcs11-setup.sh +110 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/testing-ca-setup/setup-params +93 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/crypto/tsa.cert.pem +22 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/fonts/FreeSerif.otf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/fonts/LICENSE.Noto +92 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/fonts/LICENSE.freeserif +29 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/fonts/NotoSans-Regular.ttf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/fonts/NotoSansArabic-Regular.ttf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/fonts/NotoSerifJP-Regular.otf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/fonts/NotoSerifSubset.otf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/img/stamp-indexed.png +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/img/stamp.png +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/.gitignore +1 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/broken-objstream1.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/broken-objstream2.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/broken-objstream3.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/broken-objstream4.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/broken-objstream5.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/broken-objstream6.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/certified-with-indirect-refs-in-dir.pdf +151 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/circular-page-tree.pdf +65 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/coverage-anomalies/base.pdf +122 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/coverage-anomalies/one-byterange.pdf +122 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/coverage-anomalies/signature-gap-too-big.pdf +123 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/coverage-anomalies/tail-uncovered.pdf +122 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/coverage-anomalies/weird-byterange.pdf +122 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/ed448-disallowed-hash.pdf +164 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/ed448-shake256-nolen.pdf +164 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/embedded-encrypted-nocf.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/empty-a4.pdf +56 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/extensions-direct.pdf +391 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/extensions-indirect-not-all-paths.pdf +412 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/extensions-indirect.pdf +395 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/extensions-update-direct.pdf +401 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/extensions-update-indirect.pdf +410 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/fontembed.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/form-tree-circular-ref-input.pdf +180 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/form-update-ap-indirect-sneaky-trailer.pdf +332 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/form-update-no-override-appearance-stream-ap-indirect-sneaky.pdf +331 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/form-update-no-override-appearance-stream-ap-indirect.pdf +330 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/form-update-original-ap-type-wrong.pdf +324 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/form-update-override-appearance-stream-ap-indirect-sneaky.pdf +315 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/form-update-override-appearance-stream-ap-indirect.pdf +314 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/form-update-override-appearance-stream-sneaky.pdf +313 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/form-update-override-appearance-stream.pdf +312 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/info-bin-producer-string.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/layout-tests/arabic-box.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/layout-tests/bitmap-bg.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/layout-tests/code128-test.pdf +228 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/layout-tests/double-newline.pdf +0 -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.1/pyhanko_testing_commons/test_data/data/pdf/layout-tests/form-fill-result.pdf +0 -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.1/pyhanko_testing_commons/test_data/data/pdf/layout-tests/four-stamps-natural.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/layout-tests/freeserif-test.pdf +0 -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.1/pyhanko_testing_commons/test_data/data/pdf/layout-tests/leaky-graphics-state-stamp-no-corr-result.pdf +0 -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.1/pyhanko_testing_commons/test_data/data/pdf/layout-tests/scaled-bitmap-bg.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/layout-tests/stamp-from-static-pdf.pdf +124 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/layout-tests/stamp-on-pdf-bg.pdf +132 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/layout-tests/text-stamp-color.pdf +155 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/layout-tests/undef-bg-size.pdf +119 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/leaky-graphics-state-doc.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/malformed-encrypt-dict1.pdf +31 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/malformed-encrypt-dict2.pdf +31 -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.1/pyhanko_testing_commons/test_data/data/pdf/minimal-aes256-malformed-oe.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-aes256-malformed-perms.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-aes256.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-annotless.pdf +99 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-badxref.pdf +57 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-broken-xref-size.pdf +87 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-hybrid-xref-mswordstyle.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-hybrid-xref-weirdgen.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-hybrid-xref.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-illegal-header.pdf +58 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-one-field-indir-annots.pdf +122 -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.1/pyhanko_testing_commons/test_data/data/pdf/minimal-pubkey-aes256.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-pubkey-rc4-envelope.pdf +87 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-pubkey-rc4.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-pubkey-unknown-envelope-alg.pdf +86 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-rc4.pdf +31 -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.1/pyhanko_testing_commons/test_data/data/pdf/minimal-signed-twice-no-sig-type.pdf +281 -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.1/pyhanko_testing_commons/test_data/data/pdf/minimal-startxref-hopeless.pdf +58 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-startxref-hopeless2.pdf +59 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-startxref-hopeless3.pdf +58 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-startxref-obo1.pdf +58 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-startxref-obo2.pdf +58 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-startxref-obo3.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-startxref-obo4.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-startxref-obo5.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-startxref-obo6.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-startxref-same-line.pdf +57 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-two-fields-aes256.pdf +0 -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.1/pyhanko_testing_commons/test_data/data/pdf/minimal-two-fields-pubkey-rc4.pdf +0 -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.1/pyhanko_testing_commons/test_data/data/pdf/minimal-two-fields-tagged.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-two-fields.pdf +126 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-two-pages.pdf +87 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-with-field-aes256.pdf +0 -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.1/pyhanko_testing_commons/test_data/data/pdf/minimal-with-field-pubkey-rc4.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-with-field-rc4.pdf +39 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-with-field-tagged.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-with-field.pdf +115 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-with-nonexistent-refs.pdf +58 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-with-orphaned-xrefs.pdf +58 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-with-simple-form.pdf +164 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-with-textfield-group-var.pdf +183 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-with-textfield-group.pdf +180 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal-xref.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/minimal.pdf +58 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/pades-lta-dss-indirect-arrs-test-2.pdf +626 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/pades-lta-dss-indirect-arrs-test.pdf +491 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/pades-with-old-style-signing-cert-attr-issser.pdf +137 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/pades-with-old-style-signing-cert-attr.pdf +137 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/page-tree-direct-kid.pdf +62 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/pdf-background-test.pdf +93 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/pdf-sig-with-econtent.pdf +138 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/pubkey-3des-test.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/pubkey-ecc-test.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/pubkey-rc2-test.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/safedocs/CompactedPDFSyntaxTest.pdf +79 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/safedocs/SOURCE +1 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/scribble-decomp.pdf +94 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/scribble-in-arr.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/scribble.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/separate-annots-kids-indir.pdf +307 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/sig-no-signed-attrs.pdf +130 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/sig-with-ski-sid.pdf +0 -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.1/pyhanko_testing_commons/test_data/data/pdf/source +25 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/struct-tree-circular-ref.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/pdf/uncompressed-objstream-sample.pdf +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/tl/COPYRIGHT +7 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/tl/eu-lotl-pivot-282.xml +2113 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/tl/eu-lotl-pivot-300.xml +2113 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/tl/eu-lotl-pivot-335.xml +2223 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/tl/eu-lotl-pivot-341.xml +2189 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/tl/eu-lotl.xml +2159 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/tl/tsl-be.xml +6802 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/tl/tsl-ee.xml +4904 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/xml/bad-xml/SOURCE +1 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/xml/bad-xml/cyclic.xml +5 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/xml/bad-xml/dtd.xml +7 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/xml/bad-xml/external.xml +4 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/xml/bad-xml/external_file.xml +4 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/xml/bad-xml/quadratic.xml +4 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/xml/bad-xml/simple-ns.xml +7 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/xml/bad-xml/simple.xml +6 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/xml/bad-xml/xmlbomb.xml +7 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/xml/bad-xml/xmlbomb2.xml +4 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/data/xml/bad-xml/xmp-with-harmless-entity.xml +20 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/samples.py +166 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_utils/__init__.py +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_utils/csc_utils/__init__.py +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_utils/csc_utils/csc_dummy_client.py +89 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_utils/layout_test_utils.py +92 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_utils/pkcs11_utils/__init__.py +0 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_utils/pkcs11_utils/config.py +55 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_utils/pkcs11_utils/fixtures.py +199 -0
- pyhanko_cli-0.3.1/pyhanko_testing_commons/test_utils/signing_commons.py +279 -0
- {pyhanko_cli-0.2.1 → pyhanko_cli-0.3.1}/pyproject.toml +9 -21
- {pyhanko_cli-0.2.1 → pyhanko_cli-0.3.1}/src/pyhanko/cli/_root.py +3 -10
- pyhanko_cli-0.3.1/src/pyhanko/cli/commands/__init__.py +0 -0
- {pyhanko_cli-0.2.1 → pyhanko_cli-0.3.1}/src/pyhanko/cli/commands/signing/pkcs11_cli.py +35 -1
- pyhanko_cli-0.3.1/src/pyhanko/cli/py.typed +0 -0
- pyhanko_cli-0.3.1/src/pyhanko/cli/version.py +2 -0
- {pyhanko_cli-0.2.1 → pyhanko_cli-0.3.1/src/pyhanko_cli.egg-info}/PKG-INFO +4 -5
- pyhanko_cli-0.3.1/src/pyhanko_cli.egg-info/SOURCES.txt +301 -0
- {pyhanko_cli-0.2.1 → 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/test_cli_crypt.py +548 -0
- pyhanko_cli-0.3.1/tests/test_cli_field_mgmt.py +175 -0
- pyhanko_cli-0.3.1/tests/test_cli_ltv.py +249 -0
- pyhanko_cli-0.3.1/tests/test_cli_plugins.py +158 -0
- pyhanko_cli-0.3.1/tests/test_cli_signing.py +1490 -0
- pyhanko_cli-0.3.1/tests/test_cli_signing_pkcs11.py +362 -0
- pyhanko_cli-0.3.1/tests/test_cli_stamp.py +278 -0
- pyhanko_cli-0.3.1/tests/test_config.py +1344 -0
- pyhanko_cli-0.3.1/tests/test_runtime.py +136 -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.2.1/MANIFEST.in +0 -5
- pyhanko_cli-0.2.1/src/pyhanko/cli/version.py +0 -2
- pyhanko_cli-0.2.1/src/pyhanko_cli.egg-info/SOURCES.txt +0 -34
- {pyhanko_cli-0.2.1 → pyhanko_cli-0.3.1}/LICENSE +0 -0
- {pyhanko_cli-0.2.1 → pyhanko_cli-0.3.1}/README.md +0 -0
- {pyhanko_cli-0.2.1/src/pyhanko/cli/commands → pyhanko_cli-0.3.1/pyhanko_testing_commons}/__init__.py +0 -0
- /pyhanko_cli-0.2.1/src/pyhanko/cli/py.typed → /pyhanko_cli-0.3.1/pyhanko_testing_commons/test_data/__init__.py +0 -0
- {pyhanko_cli-0.2.1 → pyhanko_cli-0.3.1}/setup.cfg +0 -0
- {pyhanko_cli-0.2.1 → pyhanko_cli-0.3.1}/src/pyhanko/__main__.py +0 -0
- {pyhanko_cli-0.2.1 → pyhanko_cli-0.3.1}/src/pyhanko/cli/__init__.py +0 -0
- {pyhanko_cli-0.2.1 → pyhanko_cli-0.3.1}/src/pyhanko/cli/_ctx.py +0 -0
- {pyhanko_cli-0.2.1 → pyhanko_cli-0.3.1}/src/pyhanko/cli/_trust.py +0 -0
- {pyhanko_cli-0.2.1 → pyhanko_cli-0.3.1}/src/pyhanko/cli/cache.py +0 -0
- {pyhanko_cli-0.2.1 → pyhanko_cli-0.3.1}/src/pyhanko/cli/commands/crypt.py +0 -0
- {pyhanko_cli-0.2.1 → pyhanko_cli-0.3.1}/src/pyhanko/cli/commands/fields.py +0 -0
- {pyhanko_cli-0.2.1 → pyhanko_cli-0.3.1}/src/pyhanko/cli/commands/signing/__init__.py +0 -0
- {pyhanko_cli-0.2.1 → pyhanko_cli-0.3.1}/src/pyhanko/cli/commands/signing/plugin.py +0 -0
- {pyhanko_cli-0.2.1 → pyhanko_cli-0.3.1}/src/pyhanko/cli/commands/signing/simple.py +0 -0
- {pyhanko_cli-0.2.1 → pyhanko_cli-0.3.1}/src/pyhanko/cli/commands/signing/utils.py +0 -0
- {pyhanko_cli-0.2.1 → pyhanko_cli-0.3.1}/src/pyhanko/cli/commands/stamp.py +0 -0
- {pyhanko_cli-0.2.1 → pyhanko_cli-0.3.1}/src/pyhanko/cli/commands/validation/__init__.py +0 -0
- {pyhanko_cli-0.2.1 → pyhanko_cli-0.3.1}/src/pyhanko/cli/commands/validation/ltv.py +0 -0
- {pyhanko_cli-0.2.1 → pyhanko_cli-0.3.1}/src/pyhanko/cli/commands/validation/validate.py +0 -0
- {pyhanko_cli-0.2.1 → pyhanko_cli-0.3.1}/src/pyhanko/cli/config.py +0 -0
- {pyhanko_cli-0.2.1 → pyhanko_cli-0.3.1}/src/pyhanko/cli/plugin_api.py +0 -0
- {pyhanko_cli-0.2.1 → pyhanko_cli-0.3.1}/src/pyhanko/cli/runtime.py +0 -0
- {pyhanko_cli-0.2.1 → pyhanko_cli-0.3.1}/src/pyhanko/cli/utils.py +0 -0
- {pyhanko_cli-0.2.1 → pyhanko_cli-0.3.1}/src/pyhanko_cli.egg-info/dependency_links.txt +0 -0
- {pyhanko_cli-0.2.1 → pyhanko_cli-0.3.1}/src/pyhanko_cli.egg-info/entry_points.txt +0 -0
- {pyhanko_cli-0.2.1 → pyhanko_cli-0.3.1}/src/pyhanko_cli.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyhanko-cli
|
|
3
|
-
Version: 0.
|
|
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>
|
|
@@ -15,7 +15,6 @@ Classifier: Development Status :: 4 - Beta
|
|
|
15
15
|
Classifier: Intended Audience :: Developers
|
|
16
16
|
Classifier: Operating System :: OS Independent
|
|
17
17
|
Classifier: Programming Language :: Python :: 3
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.10
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
21
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
@@ -23,13 +22,13 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
23
22
|
Classifier: Programming Language :: Python :: 3.14
|
|
24
23
|
Classifier: Topic :: Security :: Cryptography
|
|
25
24
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
26
|
-
Requires-Python: >=3.
|
|
25
|
+
Requires-Python: >=3.10
|
|
27
26
|
Description-Content-Type: text/markdown
|
|
28
27
|
License-File: LICENSE
|
|
29
28
|
Requires-Dist: asn1crypto>=1.5.1
|
|
30
29
|
Requires-Dist: tzlocal>=4.3
|
|
31
|
-
Requires-Dist: pyhanko<0.
|
|
32
|
-
Requires-Dist: pyhanko-certvalidator<0.
|
|
30
|
+
Requires-Dist: pyhanko<0.35,>=0.34.1
|
|
31
|
+
Requires-Dist: pyhanko-certvalidator<0.31,>=0.30.1
|
|
33
32
|
Requires-Dist: click!=8.2.0,>=8.1.3
|
|
34
33
|
Requires-Dist: platformdirs>=4.3.8
|
|
35
34
|
Dynamic: license-file
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
from typing import List, Tuple
|
|
2
|
+
from urllib.parse import urlparse
|
|
3
|
+
|
|
4
|
+
from aiohttp.test_utils import TestClient
|
|
5
|
+
from aiohttp.typedefs import StrOrURL
|
|
6
|
+
from asn1crypto import pem
|
|
7
|
+
from certomancer import PKIArchitecture
|
|
8
|
+
from certomancer.registry import CertLabel, EntityLabel
|
|
9
|
+
from cryptography.hazmat.primitives import serialization
|
|
10
|
+
from lxml.etree import fromstring, tostring
|
|
11
|
+
from pyhanko.generated.etsi import MimeType, ts_119612
|
|
12
|
+
from pyhanko.sign.validation.qualified.eutl_parse import (
|
|
13
|
+
ETSI_TSL_MIME_TYPE,
|
|
14
|
+
STATUS_GRANTED,
|
|
15
|
+
)
|
|
16
|
+
from pyhanko.sign.validation.qualified.tsp import CA_QC_URI, QTST_URI
|
|
17
|
+
from signxml import SignatureMethod
|
|
18
|
+
from signxml.xades import XAdESSigner
|
|
19
|
+
from xsdata.formats.dataclass.serializers import XmlSerializer
|
|
20
|
+
from xsdata.formats.dataclass.serializers.config import SerializerConfig
|
|
21
|
+
from xsdata.models.datatype import XmlDateTime
|
|
22
|
+
from yarl import URL
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def _certomancer_pki_as_service_definitions(pki_arch: PKIArchitecture):
|
|
26
|
+
# register all self-issued certs as CAs
|
|
27
|
+
for iss, certs in pki_arch.enumerate_certs_by_issuer():
|
|
28
|
+
for cert_spec in certs:
|
|
29
|
+
if iss != cert_spec.subject:
|
|
30
|
+
continue
|
|
31
|
+
name = f"{pki_arch.arch_label}: CA {cert_spec.label}"
|
|
32
|
+
yield ts_119612.TSPService(
|
|
33
|
+
ts_119612.ServiceInformation(
|
|
34
|
+
service_type_identifier=ts_119612.ServiceTypeIdentifier(
|
|
35
|
+
CA_QC_URI
|
|
36
|
+
),
|
|
37
|
+
service_name=ts_119612.InternationalNamesType(
|
|
38
|
+
(
|
|
39
|
+
ts_119612.MultiLangNormStringType(
|
|
40
|
+
value=name,
|
|
41
|
+
lang="en",
|
|
42
|
+
),
|
|
43
|
+
)
|
|
44
|
+
),
|
|
45
|
+
service_digital_identity=ts_119612.ServiceDigitalIdentity(
|
|
46
|
+
(
|
|
47
|
+
ts_119612.DigitalIdentityType(
|
|
48
|
+
x509_certificate=pki_arch.get_cert(
|
|
49
|
+
cert_spec.label
|
|
50
|
+
).dump()
|
|
51
|
+
),
|
|
52
|
+
)
|
|
53
|
+
),
|
|
54
|
+
service_status=ts_119612.ServiceStatus(STATUS_GRANTED),
|
|
55
|
+
status_starting_time=XmlDateTime.from_datetime(
|
|
56
|
+
cert_spec.validity.valid_from
|
|
57
|
+
),
|
|
58
|
+
)
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
for tsa_info in pki_arch.service_registry.list_time_stamping_services():
|
|
62
|
+
name = f"{pki_arch.arch_label}: TSA {tsa_info.label}"
|
|
63
|
+
yield ts_119612.TSPService(
|
|
64
|
+
ts_119612.ServiceInformation(
|
|
65
|
+
service_type_identifier=ts_119612.ServiceTypeIdentifier(
|
|
66
|
+
QTST_URI
|
|
67
|
+
),
|
|
68
|
+
service_name=ts_119612.InternationalNamesType(
|
|
69
|
+
(
|
|
70
|
+
ts_119612.MultiLangNormStringType(
|
|
71
|
+
value=name,
|
|
72
|
+
lang="en",
|
|
73
|
+
),
|
|
74
|
+
)
|
|
75
|
+
),
|
|
76
|
+
service_digital_identity=ts_119612.ServiceDigitalIdentity(
|
|
77
|
+
(
|
|
78
|
+
ts_119612.DigitalIdentityType(
|
|
79
|
+
x509_certificate=pki_arch.get_cert(
|
|
80
|
+
tsa_info.signing_cert
|
|
81
|
+
).dump()
|
|
82
|
+
),
|
|
83
|
+
)
|
|
84
|
+
),
|
|
85
|
+
service_status=ts_119612.ServiceStatus(STATUS_GRANTED),
|
|
86
|
+
status_starting_time=XmlDateTime.from_datetime(
|
|
87
|
+
pki_arch.get_cert_spec(
|
|
88
|
+
tsa_info.signing_cert
|
|
89
|
+
).validity.valid_from
|
|
90
|
+
),
|
|
91
|
+
)
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def _sign_tl(
|
|
96
|
+
xml_root: ts_119612.TrustServiceStatusList,
|
|
97
|
+
pki_arch: PKIArchitecture,
|
|
98
|
+
tlso_entity: EntityLabel,
|
|
99
|
+
):
|
|
100
|
+
tlso_cert_label = pki_arch.get_unique_cert_for_entity(tlso_entity)
|
|
101
|
+
tlso_cert_spec = pki_arch.get_cert_spec(tlso_cert_label)
|
|
102
|
+
tlso_priv_key = pki_arch.key_set.get_private_key(tlso_cert_spec.subject_key)
|
|
103
|
+
|
|
104
|
+
priv_key = serialization.load_der_private_key(
|
|
105
|
+
tlso_priv_key.dump(), password=None
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
config = SerializerConfig(indent=" ")
|
|
109
|
+
data = XmlSerializer(config=config).render(xml_root)
|
|
110
|
+
data_read_back = fromstring(data.encode('utf8'))
|
|
111
|
+
signed = XAdESSigner(signature_algorithm=SignatureMethod.ECDSA_SHA256).sign(
|
|
112
|
+
data_read_back,
|
|
113
|
+
key=priv_key,
|
|
114
|
+
cert=pem.armor(
|
|
115
|
+
"CERTIFICATE", pki_arch.get_cert(tlso_cert_label).dump()
|
|
116
|
+
),
|
|
117
|
+
always_add_key_value=False,
|
|
118
|
+
)
|
|
119
|
+
return tostring(signed).decode('utf8')
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def certomancer_pki_as_trusted_list(
|
|
123
|
+
pki_arch: PKIArchitecture, tlso_entity: EntityLabel
|
|
124
|
+
):
|
|
125
|
+
xml_root = ts_119612.TrustServiceStatusList(
|
|
126
|
+
scheme_information=ts_119612.SchemeInformation(),
|
|
127
|
+
trust_service_provider_list=ts_119612.TrustServiceProviderList(
|
|
128
|
+
trust_service_provider=tuple(
|
|
129
|
+
ts_119612.TrustServiceProvider(
|
|
130
|
+
tspservices=ts_119612.TSPServices((svc,))
|
|
131
|
+
)
|
|
132
|
+
for svc in _certomancer_pki_as_service_definitions(pki_arch)
|
|
133
|
+
)
|
|
134
|
+
),
|
|
135
|
+
)
|
|
136
|
+
return _sign_tl(xml_root, pki_arch, tlso_entity)
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
def certomancer_lotl(
|
|
140
|
+
pki_arch: PKIArchitecture,
|
|
141
|
+
lotl_tlso_entity: EntityLabel,
|
|
142
|
+
entries: List[Tuple[CertLabel, str, str]],
|
|
143
|
+
):
|
|
144
|
+
pointers = [
|
|
145
|
+
ts_119612.OtherTSLPointer(
|
|
146
|
+
tsllocation=url,
|
|
147
|
+
service_digital_identities=ts_119612.ServiceDigitalIdentities(
|
|
148
|
+
service_digital_identity=(
|
|
149
|
+
ts_119612.ServiceDigitalIdentity(
|
|
150
|
+
(
|
|
151
|
+
ts_119612.DigitalIdentityType(
|
|
152
|
+
x509_certificate=pki_arch.get_cert(
|
|
153
|
+
tlso_cert
|
|
154
|
+
).dump()
|
|
155
|
+
),
|
|
156
|
+
)
|
|
157
|
+
),
|
|
158
|
+
)
|
|
159
|
+
),
|
|
160
|
+
additional_information=ts_119612.AdditionalInformation(
|
|
161
|
+
other_information=(
|
|
162
|
+
ts_119612.AnyType(
|
|
163
|
+
content=(
|
|
164
|
+
ts_119612.SchemeTerritory(territory),
|
|
165
|
+
MimeType(ETSI_TSL_MIME_TYPE),
|
|
166
|
+
)
|
|
167
|
+
),
|
|
168
|
+
),
|
|
169
|
+
),
|
|
170
|
+
)
|
|
171
|
+
for tlso_cert, territory, url in entries
|
|
172
|
+
]
|
|
173
|
+
|
|
174
|
+
xml_root = ts_119612.TrustServiceStatusList(
|
|
175
|
+
scheme_information=ts_119612.SchemeInformation(
|
|
176
|
+
scheme_information_uri=ts_119612.SchemeInformationURI(uri=tuple()),
|
|
177
|
+
pointers_to_other_tsl=ts_119612.PointersToOtherTSL(
|
|
178
|
+
other_tslpointer=tuple(pointers)
|
|
179
|
+
),
|
|
180
|
+
),
|
|
181
|
+
)
|
|
182
|
+
return _sign_tl(xml_root, pki_arch, lotl_tlso_entity)
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
class PathRetainingClient(TestClient):
|
|
186
|
+
def make_url(self, path: StrOrURL) -> URL:
|
|
187
|
+
components = urlparse(path)
|
|
188
|
+
# only remember the path part, forget about the host etc.
|
|
189
|
+
# (this is so we can test with real EUTL files using aiohttp
|
|
190
|
+
# testing utils)
|
|
191
|
+
return super().make_url(components.path)
|