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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pyhanko-beid-plugin-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d12c102fb61fa09b512a0e97492be42cc97fbc427adc6adc5d552322c2b3e81 |
|
MD5 | e9cfa1419e30ebf64c2f9127d79ac6a2 |
|
BLAKE2b-256 | 636d955cf1824153418016abee7a6f9823ffb9220a86c6e96aca5488358a5d6e |
Hashes for pyhanko_beid_plugin-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25704686436bf3b95fd2508d351c024ac06ccafb73531b3eb46fd19d7245eaa5 |
|
MD5 | 4bffe9013c09bb6da2a30b78ec44eb51 |
|
BLAKE2b-256 | 26a46fb1935463bf3603997d14bb2ad66f53cb5174f6b459e77c21aaad239437 |