Registry / auth-security / xmlsig

xmlsig

JSON →
library1.0.1pypypi✓ verified 80d ago

Python based XML signature library for creating and verifying XML Digital Signatures (XMLDSIG). Version 1.0.1 is the latest stable release. Development appears sporadic; last release was several years ago.

pip install xmlsig
INSTALL
IMPORT
SIG · XMLSIG
X
xmlsig
auth-securitypythonv1.0.1
Install
3.0s avg
Import
Disk
45MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 46.4MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.0s · import 0.000s · 47MB
45MB installed
● package 45MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SignatureContext
from xmlsig import SignatureContext
from xmlsig import XMLSig

Basic signing and verification of an XML document.

from xmlsig import XMLSig, constants from lxml import etree # Load XML to sign doc = etree.fromstring(b'<root><data>secret</data></root>') # Create XMLSig instance (using a dummy key for demo) sig = XMLSig(doc, sign_key_path='/path/to/private.pem', cert_path='/path/to/cert.pem') sig.sign() # Verify signature sig2 = XMLSig(doc) verified = sig2.verify() print('Signature verified:', verified)
Debug
Known issues
deprecatedThe library uses the deprecated 'xmlsig' namespace; newer alternatives like signxml are more actively maintained.
fix
Consider migrating to 'signxml' (pip install signxml) for active support and up-to-date XMLDSIG standards.
affects: 1.0.x
gotchaXMLSig expects paths to PEM files; passing incorrect file paths or malformed keys raises exceptions without clear messages.
fix
Ensure private key and certificate files exist and are in PEM format. Test file paths before calling sign().
affects: all
breakingIncompatibility with newer lxml versions (like lxml 4.x+) may cause AttributeError on certain element operations.
fix
Pin lxml to version 3.x or use signxml which supports newer lxml.
affects: 1.0.1
Upgrade
Version history
1.0.1latest on PyPI · released May 10, 2023
Audit
Dependencies
signxmloptionalxmlsig is a wrapper around signxml for XML signature operations
lxmloptionalUsed for XML parsing and manipulation
Agent activity
49 hits · last 30 days
node
41
OpenAI (training)
1
Resources
xmlsig — pip install xmlsig · libregistry