95ec91daa1
* Create credential verifier in authenticator * Add new version of peer storage with client id * Fix v1 to what it was before * Compact storage into ecash verifier * Fix non-linux build * Less overlapping conditions * Remove moved code * Use handler thread for each peer * Re-spawn stored handles at startup * Keep new function without async & Result * Put query peer in function too * Query bandwidth * Fix clippy * Replace tap with inspect_err * Fix copyright year * Handle version 2 on the reqeust deser * Add protocol type in req/resp messages
23 lines
590 B
Rust
23 lines
590 B
Rust
// Copyright 2024 - Nym Technologies SA <contact@nymtech.net>
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
use thiserror::Error;
|
|
|
|
#[derive(Debug, Error)]
|
|
pub enum Error {
|
|
#[error("the provided base64-encoded client MAC ('{mac}') was malformed: {source}")]
|
|
MalformedClientMac {
|
|
mac: String,
|
|
#[source]
|
|
source: base64::DecodeError,
|
|
},
|
|
|
|
#[cfg(feature = "verify")]
|
|
#[error("failed to verify mac provided by '{client}': {source}")]
|
|
FailedClientMacVerification {
|
|
client: String,
|
|
#[source]
|
|
source: hmac::digest::MacError,
|
|
},
|
|
}
|