pyhanko-eoi-plugin


Namepyhanko-eoi-plugin JSON
Version 0.1.0 PyPI version JSON
download
home_page
SummarypyHanko plugin for Slovenian eOI cards
upload_time2024-03-12 09:29:21
maintainer
docs_urlNone
author
requires_python>=3.10
licenseMIT
keywords signature pdf digital-signature pkcs11
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            python-eoi-plugin
=================


Introduction
^^^^^^^^^^^^

This package provides a plugin for `pyHanko <https://github.com/MatthiasValvekens/pyHanko>`_'s
PDF signing CLI. The implementation is a very thin convenience wrapper around the PKCS#11
functionality included within the "core" pyHanko library.


Installation
^^^^^^^^^^^^

Assuming you are installing with ``pip``, running
``pip install pyhanko-eoi-plugin`` will install both pyHanko and the plugin.
If you already have a working pyHanko install, take care to ensure that
the plugin is installed in the same Python environment.

PyHanko makes use of Python's package entry point mechanism to discover
plugins, so installing both side-by-side should suffice. To test whether
everything works, run ``pyhanko sign addsig`` and verify that ``eoi``
appears in the list of subcommands.


Installation troubleshooting
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

If you're having issues getting the plugin autodection to work, you can
also add the following snippet to your PyHanko configuration file:

.. code-block:: yaml

   plugins:
     - pyhanko_eoi.cli:EOIPlugin


This will work as long as you ensure that ``pyhanko_eoi`` is importable.



Signing a PDF file using a Slovenian eOI card
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

To sign a PDF file using your eOI card and pyHanko's CLI (with this plugin),
use the ``eoi`` subcommand to ``addsig``, with the ``--lib`` parameter to
tell pyHanko where to look for the eOI PKCS#11 library.

.. note::
    Of course, you can also use the ``pkcs11`` subcommand, but ``eoi`` provides an extra layer
    of convenience.

On Linux, it is named ``opensc-pkcs11.so`` and can usually be found under
``/usr/lib`` or ``/usr/local/lib``.
On macOS, it is named ``opensc-pkcs11.dylib``, and can similarly be found under
``/usr/local/lib``.
The Windows version is typically installed to ``C:\Windows\System32`` and is
called ``opensc-pkcs11.dll``.


On Linux, this boils down to the following:

.. code-block:: bash

    pyhanko sign addsig --field Sig1 eoi --user-pin 12345 \
        --lib /path/to/epensc-pkcs11.so input.pdf output.pdf


.. warning::
    This command will produce a non-repudiable signature using the 'Signature'
    certificate on your eOI card. These signatures are legally equivalent to
    a normal "wet" signature wherever they are allowed, so use them with care.

    In particular, you should only allow software you trust\ [#disclaimer]_
    to use the 'Signature' certificate!

.. [#disclaimer]
    This obviously also applies to pyHanko itself.


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pyhanko-eoi-plugin",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "Miha \u0160etina <miha.setina@gmail.com>",
    "keywords": "signature,pdf,digital-signature,pkcs11",
    "author": "",
    "author_email": "Miha \u0160etina <miha.setina@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/ba/11/79838c02c653fb04ed81d76db8888d61490efbdffb9ed465c86a613bd447/pyhanko-eoi-plugin-0.1.0.tar.gz",
    "platform": null,
    "description": "python-eoi-plugin\n=================\n\n\nIntroduction\n^^^^^^^^^^^^\n\nThis package provides a plugin for `pyHanko <https://github.com/MatthiasValvekens/pyHanko>`_'s\nPDF signing CLI. The implementation is a very thin convenience wrapper around the PKCS#11\nfunctionality included within the \"core\" pyHanko library.\n\n\nInstallation\n^^^^^^^^^^^^\n\nAssuming you are installing with ``pip``, running\n``pip install pyhanko-eoi-plugin`` will install both pyHanko and the plugin.\nIf you already have a working pyHanko install, take care to ensure that\nthe plugin is installed in the same Python environment.\n\nPyHanko makes use of Python's package entry point mechanism to discover\nplugins, so installing both side-by-side should suffice. To test whether\neverything works, run ``pyhanko sign addsig`` and verify that ``eoi``\nappears in the list of subcommands.\n\n\nInstallation troubleshooting\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nIf you're having issues getting the plugin autodection to work, you can\nalso add the following snippet to your PyHanko configuration file:\n\n.. code-block:: yaml\n\n   plugins:\n     - pyhanko_eoi.cli:EOIPlugin\n\n\nThis will work as long as you ensure that ``pyhanko_eoi`` is importable.\n\n\n\nSigning a PDF file using a Slovenian eOI card\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nTo sign a PDF file using your eOI card and pyHanko's CLI (with this plugin),\nuse the ``eoi`` subcommand to ``addsig``, with the ``--lib`` parameter to\ntell pyHanko where to look for the eOI PKCS#11 library.\n\n.. note::\n    Of course, you can also use the ``pkcs11`` subcommand, but ``eoi`` provides an extra layer\n    of convenience.\n\nOn Linux, it is named ``opensc-pkcs11.so`` and can usually be found under\n``/usr/lib`` or ``/usr/local/lib``.\nOn macOS, it is named ``opensc-pkcs11.dylib``, and can similarly be found under\n``/usr/local/lib``.\nThe Windows version is typically installed to ``C:\\Windows\\System32`` and is\ncalled ``opensc-pkcs11.dll``.\n\n\nOn Linux, this boils down to the following:\n\n.. code-block:: bash\n\n    pyhanko sign addsig --field Sig1 eoi --user-pin 12345 \\\n        --lib /path/to/epensc-pkcs11.so input.pdf output.pdf\n\n\n.. warning::\n    This command will produce a non-repudiable signature using the 'Signature'\n    certificate on your eOI card. These signatures are legally equivalent to\n    a normal \"wet\" signature wherever they are allowed, so use them with care.\n\n    In particular, you should only allow software you trust\\ [#disclaimer]_\n    to use the 'Signature' certificate!\n\n.. [#disclaimer]\n    This obviously also applies to pyHanko itself.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "pyHanko plugin for Slovenian eOI cards",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/msetina/pyhanko-eoi-plugin",
        "Issue Tracker": "https://github.com/msetina/pyhanko-eoi-plugin/issues",
        "Source Code": "https://github.com/msetina/pyhanko-eoi-plugin"
    },
    "split_keywords": [
        "signature",
        "pdf",
        "digital-signature",
        "pkcs11"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ba2369e7cd8ee66463e0e2ac1ac792817e27f02c8a7b0a3c7708274f26d14e38",
                "md5": "87f47be3094178ab2ebddcef86699563",
                "sha256": "8642e329f3f891eca8987cf23f01a0b3011caac0d789fc6171c24cc86a65c345"
            },
            "downloads": -1,
            "filename": "pyhanko_eoi_plugin-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "87f47be3094178ab2ebddcef86699563",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 6594,
            "upload_time": "2024-03-12T09:29:19",
            "upload_time_iso_8601": "2024-03-12T09:29:19.965324Z",
            "url": "https://files.pythonhosted.org/packages/ba/23/69e7cd8ee66463e0e2ac1ac792817e27f02c8a7b0a3c7708274f26d14e38/pyhanko_eoi_plugin-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ba1179838c02c653fb04ed81d76db8888d61490efbdffb9ed465c86a613bd447",
                "md5": "78e59c324db0a79ba734dd5d538c03c9",
                "sha256": "7d966592a005dd0c93986d702dbbb7f86da758a28bb8e427ecccca4a83ec6c22"
            },
            "downloads": -1,
            "filename": "pyhanko-eoi-plugin-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "78e59c324db0a79ba734dd5d538c03c9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 5965,
            "upload_time": "2024-03-12T09:29:21",
            "upload_time_iso_8601": "2024-03-12T09:29:21.911917Z",
            "url": "https://files.pythonhosted.org/packages/ba/11/79838c02c653fb04ed81d76db8888d61490efbdffb9ed465c86a613bd447/pyhanko-eoi-plugin-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-12 09:29:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "msetina",
    "github_project": "pyhanko-eoi-plugin",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pyhanko-eoi-plugin"
}
        
Elapsed time: 0.21771s