Skip to main content

pyHanko plugin for Belgian ID cards

Project description

Introduction

This package provides a plugin for pyHanko’s PDF signing CLI. The implementation is a very thin convenience wrapper around the PKCS#11 functionality included within the “core” pyHanko library.

It used to be part of pyHanko’s core feature set until version 0.22.0 for historical reasons.

Installation

Assuming you are installing with pip, running pip install pyhanko-beid-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 beid 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:

plugins:
  - pyhanko_beid.cli:BEIDPlugin

This will work as long as you ensure that pyhanko_beid is importable.

Signing a PDF file using a Belgian eID card

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

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

On Linux, this boils down to the following:

pyhanko sign addsig --field Sig1 beid \
    --lib /path/to/libbeidpkcs11.so input.pdf output.pdf

On all platforms, the eID middleware will prompt you to enter your PIN to create the signature.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyhanko_beid_plugin-0.2.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

pyhanko_beid_plugin-0.2.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file pyhanko_beid_plugin-0.2.0.tar.gz.

File metadata

  • Download URL: pyhanko_beid_plugin-0.2.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyhanko_beid_plugin-0.2.0.tar.gz
Algorithm Hash digest
SHA256 fa92931f9a1f6c7050195c0869cef916d14107f8f1cdfe17837d858660689771
MD5 e2594313852f4d8ace562b19a5663109
BLAKE2b-256 abb8e3aa86c2ae0cb776d8932860ed0742d89e2ed05cae5f6b6f46044acd1974

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhanko_beid_plugin-0.2.0.tar.gz:

Publisher: release.yml on MatthiasValvekens/pyhanko-beid-plugin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyhanko_beid_plugin-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pyhanko_beid_plugin-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f747020654129f718e7995f5d202141fa3fd2e76895a1c44a95d264b8e57f13e
MD5 ff94b34050c766f102a9000ba1b1b368
BLAKE2b-256 f8d62b8423d18825b85fa28289e9d4f10b5d98998a0819d6b4201f2bc3265aa8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhanko_beid_plugin-0.2.0-py3-none-any.whl:

Publisher: release.yml on MatthiasValvekens/pyhanko-beid-plugin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page