mirror of
https://github.com/aziascreations/BakaShrot.git
synced 2026-11-23 20:58:46 +01:00
Added bench.ps1, Made a CRL file not there yet revoke nothing for clients too
- bench.ps1 runs the benchmarks (push_rate, replication_rate, compare_with_old) in release mode: -Only, -Sync full|normal. Plan step 13 done, every step of the plan is. - A CRL file named in client.toml that isn't there yet: nothing revoked (the tool, Python's from_file), as on the server, which now warns in its log. A path given to the DLL's SetCrl or Client(crl=...) stays a FileError. Decided in revamp.md, dropped from known-issues.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -326,8 +326,8 @@ class Client:
|
||||
@classmethod
|
||||
def from_file(cls, path: Union[str, os.PathLike], dll_path: Optional[str] = None) -> "Client":
|
||||
"""From a client.toml (server, ca, certificate, key, crl), the tools'
|
||||
too; paths in it are relative to its folder. Needs Python 3.11+
|
||||
(tomllib)."""
|
||||
too; paths in it are relative to its folder, a crl whose file isn't
|
||||
there yet is none. Needs Python 3.11+ (tomllib)."""
|
||||
import tomllib
|
||||
|
||||
try:
|
||||
@@ -351,7 +351,10 @@ class Client:
|
||||
value = get(key, required)
|
||||
return os.path.join(folder, value) if value else None
|
||||
|
||||
return cls(get("server"), file("ca"), file("certificate"), file("key"), file("crl", False), dll_path)
|
||||
# No CRL file yet: nothing revoked, as with the tools and the server.
|
||||
crl = file("crl", False)
|
||||
crl = crl if crl and os.path.exists(crl) else None
|
||||
return cls(get("server"), file("ca"), file("certificate"), file("key"), crl, dll_path)
|
||||
|
||||
# --- Connection --------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user