XAdES helpers
Ta treść nie jest jeszcze dostępna w Twoim języku.
Public certificate loading, TEST certificate generation, XML signing, and local signer helpers.
Operations
Section titled “Operations”| Operation | Summary | Variants |
|---|---|---|
| Local signer: Create | Public LocalSigner.create API surface. | Class |
| Local signer: Sign | Sign XML bytes with the certificate and key held by this signer. | Class |
| Load certificate from pem | Load an X.509 certificate from PEM data or a PEM file path. | Function |
| Load private key from pem | Load an RSA or EC private key from PEM data or a PEM file path. | Function |
| Load certificate and key from p12 | Load a certificate and RSA or EC private key from a PKCS#12 (.p12 / .pfx) file. | Function |
| Generate test certificate | Generate a self-signed RSA-2048 certificate for XAdES auth on the TEST environment. | Function |
| Generate personal test certificate | Generate a self-signed RSA-2048 certificate for a person (XAdES auth). | Function |
| Build auth token request xml | Build the XML payload that is signed for XAdES authentication. | Function |
| Sign xades | Sign XML with an enveloped XAdES-B signature. | Function |
XAdES exports
Section titled “XAdES exports”Generated from public symbols in ksef2.core.xades.
| Symbol | Import | Source |
|---|---|---|
XAdESPrivateKey | from ksef2.core.xades import XAdESPrivateKey | src/ksef2/core/xades.py:33 |
load_certificate_from_pem | from ksef2.core.xades import load_certificate_from_pem | src/ksef2/core/xades.py:36 |
load_private_key_from_pem | from ksef2.core.xades import load_private_key_from_pem | src/ksef2/core/xades.py:62 |
load_certificate_and_key_from_p12 | from ksef2.core.xades import load_certificate_and_key_from_p12 | src/ksef2/core/xades.py:87 |
generate_test_certificate | from ksef2.core.xades import generate_test_certificate | src/ksef2/core/xades.py:121 |
generate_personal_test_certificate | from ksef2.core.xades import generate_personal_test_certificate | src/ksef2/core/xades.py:152 |
build_auth_token_request_xml | from ksef2.core.xades import build_auth_token_request_xml | src/ksef2/core/xades.py:193 |
sign_xades | from ksef2.core.xades import sign_xades | src/ksef2/core/xades.py:223 |
LocalSigner | from ksef2.core.xades import LocalSigner | src/ksef2/core/xades.py:260 |