Userland USB Gadget implementation of CCID/ICCD class.
Implements an N-slots USB virtual IC card reader.
Requirements
Linux >= 4.9 for CCID class support
python3 (tested with 3.8 and 3.9)
python dependencies listed in setup.py
Usage
In a nutshell:
import f_ccid
with f_ccid.ICCDFunction(path, slot_count=1) as ccid:
ccid.slot_list[0].insert(card)
ccid.processEventsForever()
(but check out functionfs.gadget to setup configfs for you, and provide the path argument above)
This module does not provide any card implementation.
The expected card API is:
card.clearVolatiles() -> None
Called when virtual power is cut to the card, which means it must flush its volatile state.
card.getATR() -> bytearray
Called when the host tells the reader to power the card. This must return the Answer To Reset bytestring for this card. Note that the answer must be mutable: although it will not be altered by the reader, it will be passed on to C code which technically could mutate it.
card.runAPDU(: bytearray) -> bytearray
Called when the host requests an Application Protocol Data Unit to be executed by the card. The returned value must contain any response, followed by any status bytes. Only entire APDUs are sent to the card (assembly is done by the reader).
Metadata
Release files for usb-f-ccid 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| usb-f-ccid-0.2.tar.gz | 28.9 kB | Without provenance | Details for usb-f-ccid-0.2.tar.gz |
Release files / usb-f-ccid-0.2.tar.gz
| Download URL | usb-f-ccid-0.2.tar.gz |
|---|---|
| Size | 28.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cdaa1acaecc3bbf6ee707a72b3e9c3ea948e8734c5a41f3d26a517df238c3880
|
|
BLAKE2b-256 checksum How to use checksums |
e11105de39ce2c4badd75ad4bedc4db63fee47c0db0dbe4ce91d06bc3b89e3ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.4.2 requests/2.25.0 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.1
|
Security for usb-f-ccid 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.