pyhanko-cli 0.1.2__tar.gz → 0.2.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.1.2/src/pyhanko_cli.egg-info → pyhanko_cli-0.2.1}/PKG-INFO +8 -6
- {pyhanko_cli-0.1.2 → pyhanko_cli-0.2.1}/README.md +1 -1
- {pyhanko_cli-0.1.2 → pyhanko_cli-0.2.1}/pyproject.toml +10 -10
- pyhanko_cli-0.2.1/src/pyhanko/cli/__init__.py +12 -0
- {pyhanko_cli-0.1.2 → pyhanko_cli-0.2.1}/src/pyhanko/cli/_ctx.py +1 -1
- {pyhanko_cli-0.1.2 → pyhanko_cli-0.2.1}/src/pyhanko/cli/_root.py +6 -12
- pyhanko_cli-0.2.1/src/pyhanko/cli/_trust.py +570 -0
- pyhanko_cli-0.2.1/src/pyhanko/cli/cache.py +19 -0
- {pyhanko_cli-0.1.2 → pyhanko_cli-0.2.1}/src/pyhanko/cli/commands/crypt.py +5 -7
- {pyhanko_cli-0.1.2 → pyhanko_cli-0.2.1}/src/pyhanko/cli/commands/fields.py +1 -1
- {pyhanko_cli-0.1.2 → pyhanko_cli-0.2.1}/src/pyhanko/cli/commands/signing/__init__.py +29 -15
- {pyhanko_cli-0.1.2 → pyhanko_cli-0.2.1}/src/pyhanko/cli/commands/signing/plugin.py +7 -3
- {pyhanko_cli-0.1.2 → pyhanko_cli-0.2.1}/src/pyhanko/cli/commands/signing/simple.py +4 -4
- {pyhanko_cli-0.1.2 → pyhanko_cli-0.2.1}/src/pyhanko/cli/commands/signing/utils.py +1 -2
- {pyhanko_cli-0.1.2 → pyhanko_cli-0.2.1}/src/pyhanko/cli/commands/stamp.py +1 -1
- pyhanko_cli-0.2.1/src/pyhanko/cli/commands/validation/__init__.py +2 -0
- {pyhanko_cli-0.1.2 → pyhanko_cli-0.2.1}/src/pyhanko/cli/commands/validation/ltv.py +28 -30
- pyhanko_cli-0.2.1/src/pyhanko/cli/commands/validation/validate.py +598 -0
- {pyhanko_cli-0.1.2 → pyhanko_cli-0.2.1}/src/pyhanko/cli/config.py +25 -36
- {pyhanko_cli-0.1.2 → pyhanko_cli-0.2.1}/src/pyhanko/cli/plugin_api.py +8 -6
- pyhanko_cli-0.2.1/src/pyhanko/cli/version.py +2 -0
- {pyhanko_cli-0.1.2 → pyhanko_cli-0.2.1/src/pyhanko_cli.egg-info}/PKG-INFO +8 -6
- {pyhanko_cli-0.1.2 → pyhanko_cli-0.2.1}/src/pyhanko_cli.egg-info/SOURCES.txt +1 -0
- pyhanko_cli-0.2.1/src/pyhanko_cli.egg-info/requires.txt +6 -0
- pyhanko_cli-0.1.2/src/pyhanko/cli/__init__.py +0 -12
- pyhanko_cli-0.1.2/src/pyhanko/cli/_trust.py +0 -159
- pyhanko_cli-0.1.2/src/pyhanko/cli/commands/validation/__init__.py +0 -2
- pyhanko_cli-0.1.2/src/pyhanko/cli/commands/validation/validate.py +0 -363
- pyhanko_cli-0.1.2/src/pyhanko/cli/version.py +0 -2
- pyhanko_cli-0.1.2/src/pyhanko_cli.egg-info/requires.txt +0 -5
- {pyhanko_cli-0.1.2 → pyhanko_cli-0.2.1}/LICENSE +0 -0
- {pyhanko_cli-0.1.2 → pyhanko_cli-0.2.1}/MANIFEST.in +0 -0
- {pyhanko_cli-0.1.2 → pyhanko_cli-0.2.1}/setup.cfg +0 -0
- {pyhanko_cli-0.1.2 → pyhanko_cli-0.2.1}/src/pyhanko/__main__.py +0 -0
- {pyhanko_cli-0.1.2 → pyhanko_cli-0.2.1}/src/pyhanko/cli/commands/__init__.py +0 -0
- {pyhanko_cli-0.1.2 → pyhanko_cli-0.2.1}/src/pyhanko/cli/commands/signing/pkcs11_cli.py +0 -0
- {pyhanko_cli-0.1.2 → pyhanko_cli-0.2.1}/src/pyhanko/cli/py.typed +0 -0
- {pyhanko_cli-0.1.2 → pyhanko_cli-0.2.1}/src/pyhanko/cli/runtime.py +0 -0
- {pyhanko_cli-0.1.2 → pyhanko_cli-0.2.1}/src/pyhanko/cli/utils.py +0 -0
- {pyhanko_cli-0.1.2 → pyhanko_cli-0.2.1}/src/pyhanko_cli.egg-info/dependency_links.txt +0 -0
- {pyhanko_cli-0.1.2 → pyhanko_cli-0.2.1}/src/pyhanko_cli.egg-info/entry_points.txt +0 -0
- {pyhanko_cli-0.1.2 → pyhanko_cli-0.2.1}/src/pyhanko_cli.egg-info/top_level.txt +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyhanko-cli
|
|
3
|
-
Version: 0.1
|
|
3
|
+
Version: 0.2.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>
|
|
7
7
|
License-Expression: MIT
|
|
8
8
|
Project-URL: Homepage, https://github.com/MatthiasValvekens/pyHanko
|
|
9
|
-
Project-URL: Documentation, https://pyhanko.
|
|
10
|
-
Project-URL: Changes, https://pyhanko.
|
|
9
|
+
Project-URL: Documentation, https://docs.pyhanko.eu/
|
|
10
|
+
Project-URL: Changes, https://docs.pyhanko.eu/en/latest/changelog.html
|
|
11
11
|
Project-URL: Source Code, https://github.com/MatthiasValvekens/pyHanko
|
|
12
12
|
Project-URL: Issue Tracker, https://github.com/MatthiasValvekens/pyHanko/issues
|
|
13
13
|
Keywords: signature,pdf,pades,digital-signature,pkcs11
|
|
@@ -20,6 +20,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.11
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.12
|
|
22
22
|
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
23
24
|
Classifier: Topic :: Security :: Cryptography
|
|
24
25
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
25
26
|
Requires-Python: >=3.9
|
|
@@ -27,9 +28,10 @@ Description-Content-Type: text/markdown
|
|
|
27
28
|
License-File: LICENSE
|
|
28
29
|
Requires-Dist: asn1crypto>=1.5.1
|
|
29
30
|
Requires-Dist: tzlocal>=4.3
|
|
30
|
-
Requires-Dist: pyhanko<0.
|
|
31
|
-
Requires-Dist: pyhanko-certvalidator<0.
|
|
31
|
+
Requires-Dist: pyhanko<0.33,>=0.32.0
|
|
32
|
+
Requires-Dist: pyhanko-certvalidator<0.30,>=0.29.0
|
|
32
33
|
Requires-Dist: click!=8.2.0,>=8.1.3
|
|
34
|
+
Requires-Dist: platformdirs>=4.3.8
|
|
33
35
|
Dynamic: license-file
|
|
34
36
|
|
|
35
37
|
The lack of open-source CLI tooling to handle digitally signing and stamping PDF files was bothering me, so I went ahead and rolled my own.
|
|
@@ -45,7 +47,7 @@ pip install pyhanko-cli
|
|
|
45
47
|
|
|
46
48
|
### Documentation
|
|
47
49
|
|
|
48
|
-
The [documentation for pyHanko is hosted on ReadTheDocs](https://pyhanko.
|
|
50
|
+
The [documentation for pyHanko is hosted on ReadTheDocs](https://docs.pyhanko.eu/en/latest/)
|
|
49
51
|
and includes information on CLI usage, library usage, and API reference documentation derived from
|
|
50
52
|
inline docstrings.
|
|
51
53
|
|
|
@@ -11,7 +11,7 @@ pip install pyhanko-cli
|
|
|
11
11
|
|
|
12
12
|
### Documentation
|
|
13
13
|
|
|
14
|
-
The [documentation for pyHanko is hosted on ReadTheDocs](https://pyhanko.
|
|
14
|
+
The [documentation for pyHanko is hosted on ReadTheDocs](https://docs.pyhanko.eu/en/latest/)
|
|
15
15
|
and includes information on CLI usage, library usage, and API reference documentation derived from
|
|
16
16
|
inline docstrings.
|
|
17
17
|
|
|
@@ -26,6 +26,7 @@ classifiers = [
|
|
|
26
26
|
"Programming Language :: Python :: 3.11",
|
|
27
27
|
"Programming Language :: Python :: 3.12",
|
|
28
28
|
"Programming Language :: Python :: 3.13",
|
|
29
|
+
"Programming Language :: Python :: 3.14",
|
|
29
30
|
"Topic :: Security :: Cryptography",
|
|
30
31
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
31
32
|
]
|
|
@@ -33,11 +34,12 @@ requires-python = ">=3.9"
|
|
|
33
34
|
dependencies = [
|
|
34
35
|
"asn1crypto>=1.5.1",
|
|
35
36
|
"tzlocal>=4.3",
|
|
36
|
-
"pyhanko>=0.
|
|
37
|
-
"pyhanko-certvalidator>=0.
|
|
37
|
+
"pyhanko>=0.32.0,<0.33",
|
|
38
|
+
"pyhanko-certvalidator>=0.29.0,<0.30",
|
|
38
39
|
"click>=8.1.3,!=8.2.0",
|
|
40
|
+
"platformdirs>=4.3.8",
|
|
39
41
|
]
|
|
40
|
-
version = "0.1
|
|
42
|
+
version = "0.2.1"
|
|
41
43
|
|
|
42
44
|
|
|
43
45
|
[project.readme]
|
|
@@ -46,8 +48,8 @@ content-type = "text/markdown"
|
|
|
46
48
|
|
|
47
49
|
[project.urls]
|
|
48
50
|
Homepage = "https://github.com/MatthiasValvekens/pyHanko"
|
|
49
|
-
Documentation = "https://pyhanko.
|
|
50
|
-
Changes = "https://pyhanko.
|
|
51
|
+
Documentation = "https://docs.pyhanko.eu/"
|
|
52
|
+
Changes = "https://docs.pyhanko.eu/en/latest/changelog.html"
|
|
51
53
|
"Source Code" = "https://github.com/MatthiasValvekens/pyHanko"
|
|
52
54
|
"Issue Tracker" = "https://github.com/MatthiasValvekens/pyHanko/issues"
|
|
53
55
|
|
|
@@ -58,16 +60,14 @@ testing-base = [
|
|
|
58
60
|
"requests-mock>=1.8.0",
|
|
59
61
|
"freezegun>=1.1.0",
|
|
60
62
|
"certomancer>=0.13.0,<0.14",
|
|
61
|
-
"pytest-cov>=4.0,<
|
|
62
|
-
"pytest-asyncio
|
|
63
|
-
"pytest-asyncio==0.26.0;python_version>=\"3.9\"",
|
|
64
|
-
"backports.zoneinfo[tzdata];python_version<\"3.9\"",
|
|
63
|
+
"pytest-cov>=4.0,<7.1",
|
|
64
|
+
"pytest-asyncio>=1.1.0,<2.0",
|
|
65
65
|
]
|
|
66
66
|
testing = [
|
|
67
67
|
{include-group = "testing-base"},
|
|
68
68
|
"aiohttp>=3.9,<3.13",
|
|
69
69
|
"pytest-aiohttp>=1.0.4,<1.2.0",
|
|
70
|
-
"pyhanko[pkcs11,opentype,async_http,image-support,qr]"
|
|
70
|
+
"pyhanko[pkcs11,opentype,async_http,image-support,qr,etsi]"
|
|
71
71
|
]
|
|
72
72
|
|
|
73
73
|
[project.scripts]
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from pyhanko.cli._root import cli_root
|
|
2
|
+
from pyhanko.cli.commands.crypt import * # noqa: F403
|
|
3
|
+
from pyhanko.cli.commands.fields import * # noqa: F403
|
|
4
|
+
from pyhanko.cli.commands.signing import * # noqa: F403
|
|
5
|
+
from pyhanko.cli.commands.stamp import * # noqa: F403
|
|
6
|
+
from pyhanko.cli.commands.validation import * # noqa: F403
|
|
7
|
+
|
|
8
|
+
__all__ = ['cli_root', 'launch']
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def launch():
|
|
12
|
+
cli_root(prog_name='pyhanko') # pragma: nocover
|
|
@@ -2,8 +2,8 @@ from dataclasses import dataclass, field
|
|
|
2
2
|
from typing import Optional
|
|
3
3
|
|
|
4
4
|
from pyhanko.cli.config import CLIConfig
|
|
5
|
-
from pyhanko.sign import PdfSignatureMetadata
|
|
6
5
|
from pyhanko.sign.fields import SigFieldSpec
|
|
6
|
+
from pyhanko.sign.signers import PdfSignatureMetadata
|
|
7
7
|
from pyhanko.stamp import BaseStampStyle
|
|
8
8
|
|
|
9
9
|
|
|
@@ -25,11 +25,10 @@ full_version = f"{lib_version} (CLI {cli_version})"
|
|
|
25
25
|
@click.option(
|
|
26
26
|
'--config',
|
|
27
27
|
help=(
|
|
28
|
-
'YAML file to load configuration from'
|
|
29
|
-
f'[default: {DEFAULT_CONFIG_FILE}]'
|
|
28
|
+
f'YAML file to load configuration from[default: {DEFAULT_CONFIG_FILE}]'
|
|
30
29
|
),
|
|
31
30
|
required=False,
|
|
32
|
-
type=
|
|
31
|
+
type=str,
|
|
33
32
|
)
|
|
34
33
|
@click.option(
|
|
35
34
|
'--verbose',
|
|
@@ -57,14 +56,15 @@ def _root(ctx: click.Context, config, verbose, no_plugins):
|
|
|
57
56
|
pass
|
|
58
57
|
except IOError as e:
|
|
59
58
|
raise click.ClickException(
|
|
60
|
-
f"Failed to read {DEFAULT_CONFIG_FILE}: {
|
|
59
|
+
f"Failed to read {DEFAULT_CONFIG_FILE}: {e!s}"
|
|
61
60
|
)
|
|
62
61
|
else:
|
|
63
62
|
try:
|
|
64
|
-
|
|
63
|
+
with open(config, 'r') as f:
|
|
64
|
+
config_text = f.read()
|
|
65
65
|
except IOError as e:
|
|
66
66
|
raise click.ClickException(
|
|
67
|
-
f"Failed to read configuration: {
|
|
67
|
+
f"Failed to read configuration: {e!s}",
|
|
68
68
|
)
|
|
69
69
|
|
|
70
70
|
ctx.ensure_object(CLIContext)
|
|
@@ -96,12 +96,6 @@ def _root(ctx: click.Context, config, verbose, no_plugins):
|
|
|
96
96
|
log_config['pyhanko_certvalidator.fetchers'] = LogConfig(
|
|
97
97
|
level=logging.WARNING, output=log_output
|
|
98
98
|
)
|
|
99
|
-
if 'fontTools.subset' not in log_config:
|
|
100
|
-
# the fontTools subsetter has a very noisy INFO log, so
|
|
101
|
-
# set that one to WARNING by default
|
|
102
|
-
log_config['fontTools.subset'] = LogConfig(
|
|
103
|
-
level=logging.WARNING, output=log_output
|
|
104
|
-
)
|
|
105
99
|
|
|
106
100
|
logging_setup(log_config, verbose)
|
|
107
101
|
|