pyhanko.sign.timestamps.dummy_client module

class pyhanko.sign.timestamps.dummy_client.DummyTimeStamper(tsa_cert: asn1crypto.x509.Certificate, tsa_key: asn1crypto.keys.PrivateKeyInfo, certs_to_embed: Optional[pyhanko_certvalidator.registry.CertificateStore] = None, fixed_dt: Optional[datetime.datetime] = None, include_nonce=True, override_md=None)

Bases: pyhanko.sign.timestamps.api.TimeStamper

Timestamper that acts as its own TSA. It accepts all requests and signs them using the certificate provided. Used for testing purposes.

request_tsa_response(req: asn1crypto.tsp.TimeStampReq) asn1crypto.tsp.TimeStampResp
async async_request_tsa_response(req: asn1crypto.tsp.TimeStampReq) asn1crypto.tsp.TimeStampResp

Submit the specified timestamp request to the server.


req – Request body to submit.


A timestamp response from the server.


IOError – Raised in case of an I/O issue in the communication with the timestamping server.