Skip to content

XAdES helpers

Public certificate loading, TEST certificate generation, XML signing, and local signer helpers.

OperationSummaryVariants
Local signer: CreatePublic LocalSigner.create API surface.Class
Local signer: SignSign XML bytes with the certificate and key held by this signer.Class
Load certificate from pemLoad an X.509 certificate from PEM data or a PEM file path.Function
Load private key from pemLoad an RSA or EC private key from PEM data or a PEM file path.Function
Load certificate and key from p12Load a certificate and RSA or EC private key from a PKCS#12 (.p12 / .pfx) file.Function
Generate test certificateGenerate a self-signed RSA-2048 certificate for XAdES auth on the TEST environment.Function
Generate personal test certificateGenerate a self-signed RSA-2048 certificate for a person (XAdES auth).Function
Build auth token request xmlBuild the XML payload that is signed for XAdES authentication.Function
Sign xadesSign XML with an enveloped XAdES-B signature.Function

Generated from public symbols in ksef2.core.xades.

SymbolImportSource
XAdESPrivateKeyfrom ksef2.core.xades import XAdESPrivateKeysrc/ksef2/core/xades.py:33
load_certificate_from_pemfrom ksef2.core.xades import load_certificate_from_pemsrc/ksef2/core/xades.py:36
load_private_key_from_pemfrom ksef2.core.xades import load_private_key_from_pemsrc/ksef2/core/xades.py:62
load_certificate_and_key_from_p12from ksef2.core.xades import load_certificate_and_key_from_p12src/ksef2/core/xades.py:87
generate_test_certificatefrom ksef2.core.xades import generate_test_certificatesrc/ksef2/core/xades.py:121
generate_personal_test_certificatefrom ksef2.core.xades import generate_personal_test_certificatesrc/ksef2/core/xades.py:152
build_auth_token_request_xmlfrom ksef2.core.xades import build_auth_token_request_xmlsrc/ksef2/core/xades.py:193
sign_xadesfrom ksef2.core.xades import sign_xadessrc/ksef2/core/xades.py:223
LocalSignerfrom ksef2.core.xades import LocalSignersrc/ksef2/core/xades.py:260