pyauth / tsp-client Goto Github PK
View Code? Open in Web Editor NEWA Python IETF Time-Stamp Protocol (TSP) (RFC 3161) client
License: Apache License 2.0
A Python IETF Time-Stamp Protocol (TSP) (RFC 3161) client
License: Apache License 2.0
I would appreciate a separate execuatable "tsp-client" or something that I can call to have a file timestamped.
running test.py fails with this output.
This is in a Linux Mint 20 system with python 3.8.
Traceback (most recent call last):
File "./test.py", line 36, in test_basic_tsp_client_operations
signed = self.signer.sign(message)
File "/lvm1/home/sl/work/work23/tsr/tsp-client/tsp_client/signer.py", line 65, in sign
verify_result = self._verifier.verify(tst, nonce=nonce, message_digest=digest)
File "/lvm1/home/sl/work/work23/tsr/tsp-client/tsp_client/verifier.py", line 173, in verify
signing_cert = self._extract_signing_cert(signer_info, certificates=certificates)
File "/lvm1/home/sl/work/work23/tsr/tsp-client/tsp_client/verifier.py", line 123, in _extract_signing_cert
store = self._get_ca_store()
File "/lvm1/home/sl/work/work23/tsr/tsp-client/tsp_client/verifier.py", line 98, in _get_ca_store
store.load_locations(cafile=ca_pem_file, capath=ca_path) # type: ignore
AttributeError: 'X509Store' object has no attribute 'load_locations'
Traceback (most recent call last):
File "./test.py", line 60, in test_set_custom_tsa
signed = self.signer.sign(message, signing_settings=signing_settings)
File "/lvm1/home/sl/work/work23/tsr/tsp-client/tsp_client/signer.py", line 65, in sign
verify_result = self._verifier.verify(tst, nonce=nonce, message_digest=digest)
File "/lvm1/home/sl/work/work23/tsr/tsp-client/tsp_client/verifier.py", line 173, in verify
signing_cert = self._extract_signing_cert(signer_info, certificates=certificates)
File "/lvm1/home/sl/work/work23/tsr/tsp-client/tsp_client/verifier.py", line 123, in _extract_signing_cert
store = self._get_ca_store()
File "/lvm1/home/sl/work/work23/tsr/tsp-client/tsp_client/verifier.py", line 98, in _get_ca_store
store.load_locations(cafile=ca_pem_file, capath=ca_path) # type: ignore
AttributeError: 'X509Store' object has no attribute 'load_locations'
Ran 2 tests in 0.296s
FAILED (errors=2)
'
The link to Documentation does not exist.
tsp-client takes a message and hashes it. This is inefficient for large files because they have to be help in memory. Python 3.11 added helper functions for efficient hashing of files: https://docs.python.org/3/library/hashlib.html#file-hashing. It would be nice if we were able to use them.
I propose the extend the interface of TSPSigner.sign()
so that it takes either a message or a digest. That would allow users to pass a digest without breaking backwards compatibility.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.