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:
@@ -294,11 +294,16 @@ fn read(path: &Path) -> Result<String, String> {
|
||||
std::fs::read_to_string(path).map_err(|error| format!("{}: {error}", path.display()))
|
||||
}
|
||||
|
||||
/// The CRL file's revocations; none without one (no file, or not set).
|
||||
/// The CRL file's revocations; none without one (not set, or no file:
|
||||
/// warned, a CRL deleted by mistake would revoke nothing silently).
|
||||
fn load_revocations(path: Option<&Path>, ca: &str) -> Result<Revocations, String> {
|
||||
let Some(path) = path.filter(|path| path.exists()) else {
|
||||
let Some(path) = path else {
|
||||
return Ok(Revocations::none());
|
||||
};
|
||||
if !path.exists() {
|
||||
warn!("{}: no such file, nothing revoked", path.display());
|
||||
return Ok(Revocations::none());
|
||||
}
|
||||
Revocations::load(&read(path)?, ca).map_err(|error| format!("{}: {error}", path.display()))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user