From a2bd5c77a86855ad9a141cba27729671f716bcfb Mon Sep 17 00:00:00 2001 From: Andrew Whitehead Date: Tue, 19 Dec 2023 11:37:22 -0800 Subject: [PATCH 1/4] move to thread safe FFI errors Signed-off-by: Andrew Whitehead --- src/ffi/error.rs | 68 +++++++--- src/ffi/key.rs | 122 +++++++++--------- src/ffi/log.rs | 14 +-- src/ffi/macros.rs | 4 +- src/ffi/migration.rs | 12 +- src/ffi/mod.rs | 1 - src/ffi/result_list.rs | 58 +++++---- src/ffi/store.rs | 278 ++++++++++++++++++++--------------------- 8 files changed, 296 insertions(+), 261 deletions(-) diff --git a/src/ffi/error.rs b/src/ffi/error.rs index cf20bc8e..15a55c81 100644 --- a/src/ffi/error.rs +++ b/src/ffi/error.rs @@ -1,13 +1,37 @@ use crate::error::{Error, ErrorKind}; +use std::collections::BTreeMap; use std::os::raw::c_char; -use std::sync::RwLock; +use std::sync::atomic::{AtomicI64, Ordering}; +use std::sync::Mutex; +use std::time::{Duration, Instant}; use ffi_support::rust_string_to_c; - use once_cell::sync::Lazy; -static LAST_ERROR: Lazy>> = Lazy::new(|| RwLock::new(None)); +struct StoredError { + error: Error, + time: Instant, +} + +static ERRORS: Lazy>> = + Lazy::new(|| Mutex::new(BTreeMap::new())); + +static ERROR_INDEX: AtomicI64 = AtomicI64::new(1); + +#[repr(C)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] +pub struct ErrorHandle(i64); + +impl ErrorHandle { + pub const OK: Self = Self(0); + + pub fn next() -> Self { + Self(ERROR_INDEX.fetch_add(1, Ordering::Relaxed)) + } +} + +pub const ERROR_EXPIRY: Duration = Duration::from_secs(30); #[derive(Debug, PartialEq, Eq, Copy, Clone, Serialize)] #[repr(i64)] @@ -50,37 +74,45 @@ impl From> for ErrorCode { } #[no_mangle] -pub extern "C" fn askar_get_current_error(error_json_p: *mut *const c_char) -> ErrorCode { - trace!("askar_get_current_error"); +pub extern "C" fn askar_fetch_error( + handle: ErrorHandle, + error_json_p: *mut *const c_char, +) -> ErrorCode { + trace!("askar_fetch_error"); - let error = rust_string_to_c(get_current_error_json()); + let error = rust_string_to_c(fetch_error_json(handle)); unsafe { *error_json_p = error }; ErrorCode::Success } -pub fn get_current_error_json() -> String { +pub fn fetch_error_json(handle: ErrorHandle) -> String { #[derive(Serialize)] struct ErrorJson { code: usize, message: String, } - if let Some(err) = Option::take(&mut *LAST_ERROR.write().unwrap()) { - let message = err.to_string(); - let code = ErrorCode::from(err.kind()) as usize; + let mut errors = ERRORS.lock().unwrap(); + if let Some(err) = errors.remove(&handle) { + let message = err.error.to_string(); + let code = ErrorCode::from(err.error.kind()) as usize; serde_json::json!(&ErrorJson { code, message }).to_string() } else { r#"{"code":0,"message":null}"#.to_owned() } } -pub fn set_last_error(error: Option) -> ErrorCode { - trace!("askar_set_last_error"); - let code = match error.as_ref() { - Some(err) => err.kind.into(), - None => ErrorCode::Success, - }; - *LAST_ERROR.write().unwrap() = error; - code +pub fn store_error(error: Error) -> ErrorHandle { + trace!("askar_store_error"); + let mut errors = ERRORS.lock().unwrap(); + let time = Instant::now(); + while let Some(entry) = errors.first_entry() { + if entry.get().time + ERROR_EXPIRY < time { + entry.remove(); + } + } + let handle = ErrorHandle::next(); + errors.insert(handle, StoredError { error, time }); + handle } diff --git a/src/ffi/key.rs b/src/ffi/key.rs index 099570de..1305534d 100644 --- a/src/ffi/key.rs +++ b/src/ffi/key.rs @@ -3,9 +3,9 @@ use std::{os::raw::c_char, str::FromStr}; use ffi_support::{rust_string_to_c, ByteBuffer, FfiStr}; use super::{ + error::ErrorHandle, handle::ArcHandle, secret::{EncryptedBuffer, SecretBuffer}, - ErrorCode, }; use crate::kms::{ crypto_box, crypto_box_open, crypto_box_random_nonce, crypto_box_seal, crypto_box_seal_open, @@ -25,7 +25,7 @@ pub extern "C" fn askar_key_generate( alg: FfiStr<'_>, ephemeral: i8, out: *mut LocalKeyHandle, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { let alg = alg.as_opt_str().unwrap_or_default(); trace!("Generate key: {}", alg); @@ -33,7 +33,7 @@ pub extern "C" fn askar_key_generate( let alg = KeyAlg::from_str(alg)?; let key = LocalKey::generate(alg, ephemeral != 0)?; unsafe { *out = LocalKeyHandle::create(key) }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -43,7 +43,7 @@ pub extern "C" fn askar_key_from_seed( seed: ByteBuffer, method: FfiStr<'_>, out: *mut LocalKeyHandle, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { let alg = alg.as_opt_str().unwrap_or_default(); trace!("Create key from seed: {}", alg); @@ -51,18 +51,18 @@ pub extern "C" fn askar_key_from_seed( let alg = KeyAlg::from_str(alg)?; let key = LocalKey::from_seed(alg, seed.as_slice(), method.as_opt_str())?; unsafe { *out = LocalKeyHandle::create(key) }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } #[no_mangle] -pub extern "C" fn askar_key_from_jwk(jwk: ByteBuffer, out: *mut LocalKeyHandle) -> ErrorCode { +pub extern "C" fn askar_key_from_jwk(jwk: ByteBuffer, out: *mut LocalKeyHandle) -> ErrorHandle { catch_err! { trace!("Load key from JWK"); check_useful_c_ptr!(out); let key = LocalKey::from_jwk_slice(jwk.as_slice())?; unsafe { *out = LocalKeyHandle::create(key) }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -71,7 +71,7 @@ pub extern "C" fn askar_key_from_public_bytes( alg: FfiStr<'_>, public: ByteBuffer, out: *mut LocalKeyHandle, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { let alg = alg.as_opt_str().unwrap_or_default(); trace!("Load key from public: {}", alg); @@ -79,7 +79,7 @@ pub extern "C" fn askar_key_from_public_bytes( let alg = KeyAlg::from_str(alg)?; let key = LocalKey::from_public_bytes(alg, public.as_slice())?; unsafe { *out = LocalKeyHandle::create(key) }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -87,14 +87,14 @@ pub extern "C" fn askar_key_from_public_bytes( pub extern "C" fn askar_key_get_public_bytes( handle: LocalKeyHandle, out: *mut SecretBuffer, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Get key public bytes: {}", handle); check_useful_c_ptr!(out); let key = handle.load()?; let public = key.to_public_bytes()?; unsafe { *out = SecretBuffer::from_secret(public) }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -103,7 +103,7 @@ pub extern "C" fn askar_key_from_secret_bytes( alg: FfiStr<'_>, secret: ByteBuffer, out: *mut LocalKeyHandle, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { let alg = alg.as_opt_str().unwrap_or_default(); trace!("Load key from secret: {}", alg); @@ -111,7 +111,7 @@ pub extern "C" fn askar_key_from_secret_bytes( let alg = KeyAlg::from_str(alg)?; let key = LocalKey::from_secret_bytes(alg, secret.as_slice())?; unsafe { *out = LocalKeyHandle::create(key) }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -119,14 +119,14 @@ pub extern "C" fn askar_key_from_secret_bytes( pub extern "C" fn askar_key_get_secret_bytes( handle: LocalKeyHandle, out: *mut SecretBuffer, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Get key secret bytes: {}", handle); check_useful_c_ptr!(out); let key = handle.load()?; let public = key.to_secret_bytes()?; unsafe { *out = SecretBuffer::from_secret(public) }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -135,7 +135,7 @@ pub extern "C" fn askar_key_convert( handle: LocalKeyHandle, alg: FfiStr<'_>, out: *mut LocalKeyHandle, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { let alg = alg.as_opt_str().unwrap_or_default(); trace!("Convert key: {} to {}", handle, alg); @@ -143,7 +143,7 @@ pub extern "C" fn askar_key_convert( let alg = KeyAlg::from_str(alg)?; let key = handle.load()?.convert_key(alg)?; unsafe { *out = LocalKeyHandle::create(key) }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -153,7 +153,7 @@ pub extern "C" fn askar_key_from_key_exchange( sk_handle: LocalKeyHandle, pk_handle: LocalKeyHandle, out: *mut LocalKeyHandle, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { let alg = alg.as_opt_str().unwrap_or_default(); trace!("Key exchange: {}, {}, {}", alg, sk_handle, pk_handle); @@ -163,7 +163,7 @@ pub extern "C" fn askar_key_from_key_exchange( let pk = pk_handle.load()?; let key = sk.to_key_exchange(alg, &pk)?; unsafe { *out = LocalKeyHandle::create(key) }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -176,24 +176,24 @@ pub extern "C" fn askar_key_free(handle: LocalKeyHandle) { pub extern "C" fn askar_key_get_algorithm( handle: LocalKeyHandle, out: *mut *const c_char, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Get key algorithm: {}", handle); check_useful_c_ptr!(out); let key = handle.load()?; unsafe { *out = rust_string_to_c(key.algorithm().as_str()) }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } #[no_mangle] -pub extern "C" fn askar_key_get_ephemeral(handle: LocalKeyHandle, out: *mut i8) -> ErrorCode { +pub extern "C" fn askar_key_get_ephemeral(handle: LocalKeyHandle, out: *mut i8) -> ErrorHandle { catch_err! { trace!("Get key ephemeral: {}", handle); check_useful_c_ptr!(out); let key = handle.load()?; unsafe { *out = key.ephemeral as i8 }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -202,7 +202,7 @@ pub extern "C" fn askar_key_get_jwk_public( handle: LocalKeyHandle, alg: FfiStr<'_>, out: *mut *const c_char, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Get key JWK public: {}", handle); check_useful_c_ptr!(out); @@ -210,7 +210,7 @@ pub extern "C" fn askar_key_get_jwk_public( let alg = alg.as_opt_str().map(KeyAlg::from_str).transpose()?; let jwk = key.to_jwk_public(alg)?; unsafe { *out = rust_string_to_c(jwk) }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -218,14 +218,14 @@ pub extern "C" fn askar_key_get_jwk_public( pub extern "C" fn askar_key_get_jwk_secret( handle: LocalKeyHandle, out: *mut SecretBuffer, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Get key JWK secret: {}", handle); check_useful_c_ptr!(out); let key = handle.load()?; let jwk = key.to_jwk_secret()?; unsafe { *out = SecretBuffer::from_secret(jwk) }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -234,7 +234,7 @@ pub extern "C" fn askar_key_get_jwk_thumbprint( handle: LocalKeyHandle, alg: FfiStr<'_>, out: *mut *const c_char, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Get key JWK thumbprint: {}", handle); check_useful_c_ptr!(out); @@ -242,7 +242,7 @@ pub extern "C" fn askar_key_get_jwk_thumbprint( let alg = alg.as_opt_str().map(KeyAlg::from_str).transpose()?; let thumb = key.to_jwk_thumbprint(alg)?; unsafe { *out = rust_string_to_c(thumb) }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -250,14 +250,14 @@ pub extern "C" fn askar_key_get_jwk_thumbprint( pub extern "C" fn askar_key_aead_random_nonce( handle: LocalKeyHandle, out: *mut SecretBuffer, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("AEAD create nonce: {}", handle); check_useful_c_ptr!(out); let key = handle.load()?; let nonce = key.aead_random_nonce()?; unsafe { *out = SecretBuffer::from_secret(nonce) }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -265,7 +265,7 @@ pub extern "C" fn askar_key_aead_random_nonce( pub extern "C" fn askar_key_aead_get_params( handle: LocalKeyHandle, out: *mut AeadParams, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("AEAD get params: {}", handle); check_useful_c_ptr!(out); @@ -275,7 +275,7 @@ pub extern "C" fn askar_key_aead_get_params( nonce_length: params.nonce_length as i32, tag_length: params.tag_length as i32 } }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -284,7 +284,7 @@ pub extern "C" fn askar_key_aead_get_padding( handle: LocalKeyHandle, msg_len: i64, out: *mut i32, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("AEAD get padding: {}", handle); check_useful_c_ptr!(out); @@ -294,7 +294,7 @@ pub extern "C" fn askar_key_aead_get_padding( let key = handle.load()?; let padding = key.aead_padding(msg_len as usize); unsafe { *out = padding as i32 }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -305,7 +305,7 @@ pub extern "C" fn askar_key_aead_encrypt( nonce: ByteBuffer, aad: ByteBuffer, out: *mut EncryptedBuffer, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("AEAD encrypt: {}", handle); check_useful_c_ptr!(out); @@ -313,7 +313,7 @@ pub extern "C" fn askar_key_aead_encrypt( let enc = key.aead_encrypt(message.as_slice(), nonce.as_slice(), aad.as_slice())?; let result = EncryptedBuffer::from_encrypted(enc); unsafe { *out = result }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -325,14 +325,14 @@ pub extern "C" fn askar_key_aead_decrypt( tag: ByteBuffer, aad: ByteBuffer, out: *mut SecretBuffer, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("AEAD decrypt: {}", handle); check_useful_c_ptr!(out); let key = handle.load()?; let dec = key.aead_decrypt((ciphertext.as_slice(), tag.as_slice()), nonce.as_slice(), aad.as_slice())?; unsafe { *out = SecretBuffer::from_secret(dec) }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -342,14 +342,14 @@ pub extern "C" fn askar_key_sign_message( message: ByteBuffer, sig_type: FfiStr<'_>, out: *mut SecretBuffer, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Sign message: {}", handle); check_useful_c_ptr!(out); let key = handle.load()?; let sig = key.sign_message(message.as_slice(), sig_type.as_opt_str())?; unsafe { *out = SecretBuffer::from_secret(sig) }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -360,14 +360,14 @@ pub extern "C" fn askar_key_verify_signature( signature: ByteBuffer, sig_type: FfiStr<'_>, out: *mut i8, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Verify signature: {}", handle); check_useful_c_ptr!(out); let key = handle.load()?; let verify = key.verify_signature(message.as_slice(), signature.as_slice(), sig_type.as_opt_str())?; unsafe { *out = verify as i8 }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -377,7 +377,7 @@ pub extern "C" fn askar_key_wrap_key( other: LocalKeyHandle, nonce: ByteBuffer, out: *mut EncryptedBuffer, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Wrap key: {}", handle); check_useful_c_ptr!(out); @@ -385,7 +385,7 @@ pub extern "C" fn askar_key_wrap_key( let other = other.load()?; let result = key.wrap_key(&other, nonce.as_slice())?; unsafe { *out = EncryptedBuffer::from_encrypted(result) }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -397,7 +397,7 @@ pub extern "C" fn askar_key_unwrap_key( nonce: ByteBuffer, tag: ByteBuffer, out: *mut LocalKeyHandle, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { let alg = alg.as_opt_str().unwrap_or_default(); trace!("Unwrap key: {}", handle); @@ -406,18 +406,18 @@ pub extern "C" fn askar_key_unwrap_key( let alg = KeyAlg::from_str(alg)?; let result = key.unwrap_key(alg, (ciphertext.as_slice(), tag.as_slice()), nonce.as_slice())?; unsafe { *out = LocalKeyHandle::create(result) }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } #[no_mangle] -pub extern "C" fn askar_key_crypto_box_random_nonce(out: *mut SecretBuffer) -> ErrorCode { +pub extern "C" fn askar_key_crypto_box_random_nonce(out: *mut SecretBuffer) -> ErrorHandle { catch_err! { trace!("crypto box random nonce"); check_useful_c_ptr!(out); let nonce = crypto_box_random_nonce()?; unsafe { *out = SecretBuffer::from_secret(&nonce[..]) }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -428,7 +428,7 @@ pub extern "C" fn askar_key_crypto_box( message: ByteBuffer, nonce: ByteBuffer, out: *mut SecretBuffer, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("crypto box: {}, {}", recip_key, sender_key); check_useful_c_ptr!(out); @@ -441,7 +441,7 @@ pub extern "C" fn askar_key_crypto_box( nonce.as_slice() )?; unsafe { *out = SecretBuffer::from_secret(message) }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -452,7 +452,7 @@ pub extern "C" fn askar_key_crypto_box_open( message: ByteBuffer, nonce: ByteBuffer, out: *mut SecretBuffer, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("crypto box open: {}, {}", recip_key, sender_key); check_useful_c_ptr!(out); @@ -465,7 +465,7 @@ pub extern "C" fn askar_key_crypto_box_open( nonce.as_slice() )?; unsafe { *out = SecretBuffer::from_secret(message) }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -474,14 +474,14 @@ pub extern "C" fn askar_key_crypto_box_seal( handle: LocalKeyHandle, message: ByteBuffer, out: *mut SecretBuffer, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("crypto box seal: {}", handle); check_useful_c_ptr!(out); let key = handle.load()?; let enc = crypto_box_seal(&key, message.as_slice())?; unsafe { *out = SecretBuffer::from_secret(enc) }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -490,14 +490,14 @@ pub extern "C" fn askar_key_crypto_box_seal_open( handle: LocalKeyHandle, ciphertext: ByteBuffer, out: *mut SecretBuffer, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("crypto box seal open: {}", handle); check_useful_c_ptr!(out); let key = handle.load()?; let enc = crypto_box_seal_open(&key, ciphertext.as_slice())?; unsafe { *out = SecretBuffer::from_secret(enc) }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -511,7 +511,7 @@ pub extern "C" fn askar_key_derive_ecdh_es( apv: ByteBuffer, receive: i8, out: *mut LocalKeyHandle, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { let alg = alg.as_opt_str().unwrap_or_default(); trace!("ECDH-ES: {}", alg); @@ -529,7 +529,7 @@ pub extern "C" fn askar_key_derive_ecdh_es( receive == 1 )?; unsafe { *out = LocalKeyHandle::create(key) }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -545,7 +545,7 @@ pub extern "C" fn askar_key_derive_ecdh_1pu( cc_tag: ByteBuffer, receive: i8, out: *mut LocalKeyHandle, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { let alg = alg.as_opt_str().unwrap_or_default(); trace!("ECDH-1PU: {}", alg); @@ -566,6 +566,6 @@ pub extern "C" fn askar_key_derive_ecdh_1pu( receive == 1 )?; unsafe { *out = LocalKeyHandle::create(key) }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } diff --git a/src/ffi/log.rs b/src/ffi/log.rs index abcc7c8e..17884bf8 100644 --- a/src/ffi/log.rs +++ b/src/ffi/log.rs @@ -6,7 +6,7 @@ use std::sync::atomic::{AtomicBool, Ordering}; use log::{LevelFilter, Metadata, Record}; use once_cell::sync::OnceCell; -use super::error::ErrorCode; +use super::error::ErrorHandle; use crate::error::Error; static LOGGER: OnceCell = OnceCell::new(); @@ -111,7 +111,7 @@ pub extern "C" fn askar_set_custom_logger( enabled: Option, flush: Option, max_level: i32, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { let max_level = get_level_filter(max_level)?; if LOGGER.set(CustomLogger::new(context, enabled, log, flush)).is_err() { @@ -121,7 +121,7 @@ pub extern "C" fn askar_set_custom_logger( |_| err_msg!(Input, "Repeated logger initialization"))?; log::set_max_level(max_level); debug!("Initialized custom logger"); - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -134,20 +134,20 @@ pub extern "C" fn askar_clear_custom_logger() { } #[no_mangle] -pub extern "C" fn askar_set_default_logger() -> ErrorCode { +pub extern "C" fn askar_set_default_logger() -> ErrorHandle { catch_err! { env_logger::try_init().map_err( |_| err_msg!(Input, "Repeated logger initialization"))?; debug!("Initialized default logger"); - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } #[no_mangle] -pub extern "C" fn askar_set_max_log_level(max_level: i32) -> ErrorCode { +pub extern "C" fn askar_set_max_log_level(max_level: i32) -> ErrorHandle { catch_err! { log::set_max_level(get_level_filter(max_level)?); - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } diff --git a/src/ffi/macros.rs b/src/ffi/macros.rs index 0f0410e7..8d92eb79 100644 --- a/src/ffi/macros.rs +++ b/src/ffi/macros.rs @@ -3,11 +3,11 @@ macro_rules! catch_err { match std::panic::catch_unwind(move || -> Result<_, $crate::error::Error> {$($e)*}) { Ok(Ok(a)) => a, Ok(Err(err)) => { // lib error - $crate::ffi::error::set_last_error(Some(err)) + $crate::ffi::error::store_error(err) } Err(_) => { // panic error let err: $crate::error::Error = err_msg!(Unexpected, "Panic during execution"); - $crate::ffi::error::set_last_error(Some(err)) + $crate::ffi::error::store_error(err) } } } diff --git a/src/ffi/migration.rs b/src/ffi/migration.rs index c397aa84..e540b1d8 100644 --- a/src/ffi/migration.rs +++ b/src/ffi/migration.rs @@ -4,7 +4,7 @@ use crate::storage::future::spawn_ok; use crate::storage::migration::IndySdkToAriesAskarMigration; use super::{ - error::{set_last_error, ErrorCode}, + error::{store_error, ErrorHandle}, CallbackId, EnsureCallback, }; @@ -24,9 +24,9 @@ pub extern "C" fn askar_migrate_indy_sdk( wallet_name: FfiStr<'_>, wallet_key: FfiStr<'_>, kdf_level: FfiStr<'_>, - cb: Option, + cb: Option, cb_id: CallbackId, -) -> ErrorCode { +) -> ErrorHandle { catch_err!( trace!("Migrate sqlite wallet from indy-sdk structure to aries-askar"); let cb = cb.ok_or_else(|| err_msg!("No callback provided"))?; @@ -37,8 +37,8 @@ pub extern "C" fn askar_migrate_indy_sdk( let cb = EnsureCallback::new(move |result| match result { - Ok(_) => cb(cb_id, ErrorCode::Success), - Err(err) => cb(cb_id, set_last_error(Some(err))), + Ok(_) => cb(cb_id, ErrorHandle::OK), + Err(err) => cb(cb_id, store_error(err)), }); spawn_ok(async move { @@ -49,6 +49,6 @@ pub extern "C" fn askar_migrate_indy_sdk( }.await; cb.resolve(result); }); - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) ) } diff --git a/src/ffi/mod.rs b/src/ffi/mod.rs index baa78d32..fdd9f054 100644 --- a/src/ffi/mod.rs +++ b/src/ffi/mod.rs @@ -28,7 +28,6 @@ mod tags; #[cfg(all(feature = "migration", feature = "sqlite"))] mod migration; -use self::error::ErrorCode; use crate::error::Error; pub type CallbackId = i64; diff --git a/src/ffi/result_list.rs b/src/ffi/result_list.rs index a4edd0f1..1e466064 100644 --- a/src/ffi/result_list.rs +++ b/src/ffi/result_list.rs @@ -1,7 +1,8 @@ use std::{ffi::CString, os::raw::c_char, ptr}; use super::{ - handle::ArcHandle, key::LocalKeyHandle, secret::SecretBuffer, tags::EntryTagSet, ErrorCode, + error::ErrorHandle, handle::ArcHandle, key::LocalKeyHandle, secret::SecretBuffer, + tags::EntryTagSet, }; use crate::{entry::Entry, error::Error, kms::KeyEntry}; @@ -54,12 +55,12 @@ pub type EntryListHandle = ArcHandle; pub type FfiEntryList = FfiResultList; #[no_mangle] -pub extern "C" fn askar_entry_list_count(handle: EntryListHandle, count: *mut i32) -> ErrorCode { +pub extern "C" fn askar_entry_list_count(handle: EntryListHandle, count: *mut i32) -> ErrorHandle { catch_err! { check_useful_c_ptr!(count); let results = handle.load()?; unsafe { *count = results.len() }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -68,13 +69,13 @@ pub extern "C" fn askar_entry_list_get_category( handle: EntryListHandle, index: i32, category: *mut *const c_char, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { check_useful_c_ptr!(category); let results = handle.load()?; let entry = results.get_row(index)?; unsafe { *category = CString::new(entry.category.as_str()).unwrap().into_raw() }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -83,13 +84,13 @@ pub extern "C" fn askar_entry_list_get_name( handle: EntryListHandle, index: i32, name: *mut *const c_char, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { check_useful_c_ptr!(name); let results = handle.load()?; let entry = results.get_row(index)?; unsafe { *name = CString::new(entry.name.as_str()).unwrap().into_raw() }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -98,13 +99,13 @@ pub extern "C" fn askar_entry_list_get_value( handle: EntryListHandle, index: i32, value: *mut SecretBuffer, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { check_useful_c_ptr!(value); let results = handle.load()?; let entry = results.get_row(index)?; unsafe { *value = SecretBuffer::from_secret(entry.value.as_ref()); } - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -113,7 +114,7 @@ pub extern "C" fn askar_entry_list_get_tags( handle: EntryListHandle, index: i32, tags: *mut *const c_char, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { check_useful_c_ptr!(tags); let results = handle.load()?; @@ -124,7 +125,7 @@ pub extern "C" fn askar_entry_list_get_tags( let tag_json = serde_json::to_vec(&EntryTagSet::from(entry.tags.as_slice())).unwrap(); unsafe { *tags = CString::new(tag_json).unwrap().into_raw() }; } - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -141,12 +142,12 @@ pub type FfiKeyEntryList = FfiResultList; pub extern "C" fn askar_key_entry_list_count( handle: KeyEntryListHandle, count: *mut i32, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { check_useful_c_ptr!(count); let results = handle.load()?; unsafe { *count = results.len() }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -160,7 +161,7 @@ pub extern "C" fn askar_key_entry_list_get_algorithm( handle: KeyEntryListHandle, index: i32, alg: *mut *const c_char, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { check_useful_c_ptr!(alg); let results = handle.load()?; @@ -170,7 +171,7 @@ pub extern "C" fn askar_key_entry_list_get_algorithm( } else { unsafe { *alg = ptr::null() }; } - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -179,13 +180,13 @@ pub extern "C" fn askar_key_entry_list_get_name( handle: KeyEntryListHandle, index: i32, name: *mut *const c_char, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { check_useful_c_ptr!(name); let results = handle.load()?; let entry = results.get_row(index)?; unsafe { *name = CString::new(entry.name.as_str()).unwrap().into_raw() }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -194,7 +195,7 @@ pub extern "C" fn askar_key_entry_list_get_metadata( handle: KeyEntryListHandle, index: i32, metadata: *mut *const c_char, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { check_useful_c_ptr!(metadata); let results = handle.load()?; @@ -204,7 +205,7 @@ pub extern "C" fn askar_key_entry_list_get_metadata( } else { unsafe { *metadata = ptr::null(); } } - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -213,7 +214,7 @@ pub extern "C" fn askar_key_entry_list_get_tags( handle: KeyEntryListHandle, index: i32, tags: *mut *const c_char, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { check_useful_c_ptr!(tags); let results = handle.load()?; @@ -224,7 +225,7 @@ pub extern "C" fn askar_key_entry_list_get_tags( let tag_json = serde_json::to_vec(&EntryTagSet::from(entry.tags.as_slice())).unwrap(); unsafe { *tags = CString::new(tag_json).unwrap().into_raw() }; } - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -233,7 +234,7 @@ pub extern "C" fn askar_key_entry_list_load_local( handle: KeyEntryListHandle, index: i32, out: *mut LocalKeyHandle, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Load key"); check_useful_c_ptr!(out); @@ -241,7 +242,7 @@ pub extern "C" fn askar_key_entry_list_load_local( let entry = results.get_row(index)?; let key = entry.load_local_key()?; unsafe { *out = LocalKeyHandle::create(key) }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -250,12 +251,15 @@ pub type StringListHandle = ArcHandle; pub type FfiStringList = FfiResultList; #[no_mangle] -pub extern "C" fn askar_string_list_count(handle: StringListHandle, count: *mut i32) -> ErrorCode { +pub extern "C" fn askar_string_list_count( + handle: StringListHandle, + count: *mut i32, +) -> ErrorHandle { catch_err! { check_useful_c_ptr!(count); let results = handle.load()?; unsafe { *count = results.len() }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -264,13 +268,13 @@ pub extern "C" fn askar_string_list_get_item( handle: StringListHandle, index: i32, item: *mut *const c_char, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { check_useful_c_ptr!(item); let results = handle.load()?; let entry = results.get_row(index)?; unsafe { *item = CString::new(entry.clone()).unwrap().into_raw() }; - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } diff --git a/src/ffi/store.rs b/src/ffi/store.rs index 95e7f0c7..b62c0a71 100644 --- a/src/ffi/store.rs +++ b/src/ffi/store.rs @@ -5,13 +5,13 @@ use ffi_support::{rust_string_to_c, ByteBuffer, FfiStr}; use once_cell::sync::Lazy; use super::{ - error::set_last_error, + error::{store_error, ErrorHandle}, key::LocalKeyHandle, result_list::{ EntryListHandle, FfiEntryList, FfiKeyEntryList, KeyEntryListHandle, StringListHandle, }, tags::EntryTagSet, - CallbackId, EnsureCallback, ErrorCode, ResourceHandle, + CallbackId, EnsureCallback, ResourceHandle, }; use crate::{ entry::{Entry, EntryOperation, Scan, TagFilter}, @@ -131,7 +131,7 @@ where pub extern "C" fn askar_store_generate_raw_key( seed: ByteBuffer, out: *mut *const c_char, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Create raw store key"); let seed = match seed.as_slice() { @@ -140,7 +140,7 @@ pub extern "C" fn askar_store_generate_raw_key( }; let key = Store::new_raw_key(seed)?; unsafe { *out = rust_string_to_c(key.to_string()); } - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -151,9 +151,9 @@ pub extern "C" fn askar_store_provision( pass_key: FfiStr<'_>, profile: FfiStr<'_>, recreate: i8, - cb: Option, + cb: Option, cb_id: CallbackId, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Provision store"); let cb = cb.ok_or_else(|| err_msg!("No callback provided"))?; @@ -168,9 +168,9 @@ pub extern "C" fn askar_store_provision( match result { Ok(sid) => { debug!("Provisioned store {}", sid); - cb(cb_id, ErrorCode::Success, sid) + cb(cb_id, ErrorHandle::OK, sid) } - Err(err) => cb(cb_id, set_last_error(Some(err)), StoreHandle::invalid()), + Err(err) => cb(cb_id, store_error(err), StoreHandle::invalid()), } ); spawn_ok(async move { @@ -186,7 +186,7 @@ pub extern "C" fn askar_store_provision( }.await; cb.resolve(result); }); - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -196,9 +196,9 @@ pub extern "C" fn askar_store_open( key_method: FfiStr<'_>, pass_key: FfiStr<'_>, profile: FfiStr<'_>, - cb: Option, + cb: Option, cb_id: CallbackId, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Open store"); let cb = cb.ok_or_else(|| err_msg!("No callback provided"))?; @@ -213,9 +213,9 @@ pub extern "C" fn askar_store_open( match result { Ok(sid) => { debug!("Opened store {}", sid); - cb(cb_id, ErrorCode::Success, sid) + cb(cb_id, ErrorHandle::OK, sid) } - Err(err) => cb(cb_id, set_last_error(Some(err)), StoreHandle::invalid()), + Err(err) => cb(cb_id, store_error(err), StoreHandle::invalid()), } ); spawn_ok(async move { @@ -230,31 +230,31 @@ pub extern "C" fn askar_store_open( }.await; cb.resolve(result); }); - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } #[no_mangle] pub extern "C" fn askar_store_remove( spec_uri: FfiStr<'_>, - cb: Option, + cb: Option, cb_id: CallbackId, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Remove store"); let cb = cb.ok_or_else(|| err_msg!("No callback provided"))?; let spec_uri = spec_uri.into_opt_string().ok_or_else(|| err_msg!("No store URI provided"))?; let cb = EnsureCallback::new(move |result: Result| match result { - Ok(removed) => cb(cb_id, ErrorCode::Success, removed as i8), - Err(err) => cb(cb_id, set_last_error(Some(err)), 0), + Ok(removed) => cb(cb_id, ErrorHandle::OK, removed as i8), + Err(err) => cb(cb_id, store_error(err), 0), } ); spawn_ok(async move { let result = Store::remove(spec_uri.as_str()).await; cb.resolve(result); }); - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -262,17 +262,17 @@ pub extern "C" fn askar_store_remove( pub extern "C" fn askar_store_create_profile( handle: StoreHandle, profile: FfiStr<'_>, - cb: Option, + cb: Option, cb_id: CallbackId, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Create profile"); let cb = cb.ok_or_else(|| err_msg!("No callback provided"))?; let profile = profile.into_opt_string(); let cb = EnsureCallback::new(move |result| match result { - Ok(name) => cb(cb_id, ErrorCode::Success, rust_string_to_c(name)), - Err(err) => cb(cb_id, set_last_error(Some(err)), ptr::null()), + Ok(name) => cb(cb_id, ErrorHandle::OK, rust_string_to_c(name)), + Err(err) => cb(cb_id, store_error(err), ptr::null()), } ); spawn_ok(async move { @@ -283,23 +283,23 @@ pub extern "C" fn askar_store_create_profile( }.await; cb.resolve(result); }); - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } #[no_mangle] pub extern "C" fn askar_store_get_profile_name( handle: StoreHandle, - cb: Option, + cb: Option, cb_id: CallbackId, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Get profile name"); let cb = cb.ok_or_else(|| err_msg!("No callback provided"))?; let cb = EnsureCallback::new(move |result| match result { - Ok(name) => cb(cb_id, ErrorCode::Success, rust_string_to_c(name)), - Err(err) => cb(cb_id, set_last_error(Some(err)), ptr::null_mut()), + Ok(name) => cb(cb_id, ErrorHandle::OK, rust_string_to_c(name)), + Err(err) => cb(cb_id, store_error(err), ptr::null_mut()), } ); spawn_ok(async move { @@ -309,16 +309,16 @@ pub extern "C" fn askar_store_get_profile_name( }.await; cb.resolve(result); }); - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } #[no_mangle] pub extern "C" fn askar_store_list_profiles( handle: StoreHandle, - cb: Option, + cb: Option, cb_id: CallbackId, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("List profiles"); let cb = cb.ok_or_else(|| err_msg!("No callback provided"))?; @@ -326,9 +326,9 @@ pub extern "C" fn askar_store_list_profiles( match result { Ok(rows) => { let res = StringListHandle::create(FfiStringList::from(rows)); - cb(cb_id, ErrorCode::Success, res) + cb(cb_id, ErrorHandle::OK, res) }, - Err(err) => cb(cb_id, set_last_error(Some(err)), StringListHandle::invalid()), + Err(err) => cb(cb_id, store_error(err), StringListHandle::invalid()), } ); spawn_ok(async move { @@ -339,7 +339,7 @@ pub extern "C" fn askar_store_list_profiles( }.await; cb.resolve(result); }); - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -347,17 +347,17 @@ pub extern "C" fn askar_store_list_profiles( pub extern "C" fn askar_store_remove_profile( handle: StoreHandle, profile: FfiStr<'_>, - cb: Option, + cb: Option, cb_id: CallbackId, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Remove profile"); let cb = cb.ok_or_else(|| err_msg!("No callback provided"))?; let profile = profile.into_opt_string().ok_or_else(|| err_msg!("Profile name not provided"))?; let cb = EnsureCallback::new(move |result| match result { - Ok(removed) => cb(cb_id, ErrorCode::Success, removed as i8), - Err(err) => cb(cb_id, set_last_error(Some(err)), 0), + Ok(removed) => cb(cb_id, ErrorHandle::OK, removed as i8), + Err(err) => cb(cb_id, store_error(err), 0), } ); spawn_ok(async move { @@ -367,24 +367,24 @@ pub extern "C" fn askar_store_remove_profile( }.await; cb.resolve(result); }); - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } #[no_mangle] pub extern "C" fn askar_store_get_default_profile( handle: StoreHandle, - cb: Option, + cb: Option, cb_id: CallbackId, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Get default profile"); let cb = cb.ok_or_else(|| err_msg!("No callback provided"))?; let cb = EnsureCallback::new(move |result: Result| match result { - Ok(name) => cb(cb_id, ErrorCode::Success, + Ok(name) => cb(cb_id, ErrorHandle::OK, CString::new(name.as_str()).unwrap().into_raw() as *const c_char), - Err(err) => cb(cb_id, set_last_error(Some(err)), ptr::null()), + Err(err) => cb(cb_id, store_error(err), ptr::null()), } ); spawn_ok(async move { @@ -394,7 +394,7 @@ pub extern "C" fn askar_store_get_default_profile( }.await; cb.resolve(result); }); - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -402,17 +402,17 @@ pub extern "C" fn askar_store_get_default_profile( pub extern "C" fn askar_store_set_default_profile( handle: StoreHandle, profile: FfiStr<'_>, - cb: Option, + cb: Option, cb_id: CallbackId, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Set default profile"); let cb = cb.ok_or_else(|| err_msg!("No callback provided"))?; let profile = profile.into_opt_string().ok_or_else(|| err_msg!("Profile name not provided"))?; let cb = EnsureCallback::new(move |result| match result { - Ok(_) => cb(cb_id, ErrorCode::Success), - Err(err) => cb(cb_id, set_last_error(Some(err))), + Ok(_) => cb(cb_id, ErrorHandle::OK), + Err(err) => cb(cb_id, store_error(err)), } ); spawn_ok(async move { @@ -422,7 +422,7 @@ pub extern "C" fn askar_store_set_default_profile( }.await; cb.resolve(result); }); - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -431,9 +431,9 @@ pub extern "C" fn askar_store_rekey( handle: StoreHandle, key_method: FfiStr<'_>, pass_key: FfiStr<'_>, - cb: Option, + cb: Option, cb_id: CallbackId, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Re-key store"); let cb = cb.ok_or_else(|| err_msg!("No callback provided"))?; @@ -444,8 +444,8 @@ pub extern "C" fn askar_store_rekey( let pass_key = PassKey::from(pass_key.as_opt_str()).into_owned(); let cb = EnsureCallback::new(move |result| match result { - Ok(_) => cb(cb_id, ErrorCode::Success), - Err(err) => cb(cb_id, set_last_error(Some(err))), + Ok(_) => cb(cb_id, ErrorHandle::OK), + Err(err) => cb(cb_id, store_error(err)), } ); spawn_ok(async move { @@ -457,7 +457,7 @@ pub extern "C" fn askar_store_rekey( }.await; cb.resolve(result); }); - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -468,9 +468,9 @@ pub extern "C" fn askar_store_copy( key_method: FfiStr<'_>, pass_key: FfiStr<'_>, recreate: i8, - cb: Option, + cb: Option, cb_id: CallbackId, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Copy store"); let cb = cb.ok_or_else(|| err_msg!("No callback provided"))?; @@ -482,8 +482,8 @@ pub extern "C" fn askar_store_copy( let pass_key = PassKey::from(pass_key.as_opt_str()).into_owned(); let cb = EnsureCallback::new(move |result| match result { - Ok(handle) => cb(cb_id, ErrorCode::Success, handle), - Err(err) => cb(cb_id, set_last_error(Some(err)), StoreHandle::invalid()), + Ok(handle) => cb(cb_id, ErrorHandle::OK, handle), + Err(err) => cb(cb_id, store_error(err), StoreHandle::invalid()), } ); spawn_ok(async move { @@ -495,23 +495,23 @@ pub extern "C" fn askar_store_copy( }.await; cb.resolve(result); }); - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } #[no_mangle] pub extern "C" fn askar_store_close( handle: StoreHandle, - cb: Option, + cb: Option, cb_id: CallbackId, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Close store"); let cb = cb.map(|cb| { EnsureCallback::new(move |result| match result { - Ok(_) => cb(cb_id, ErrorCode::Success), - Err(err) => cb(cb_id, set_last_error(Some(err))), + Ok(_) => cb(cb_id, ErrorHandle::OK), + Err(err) => cb(cb_id, store_error(err)), } ) }); @@ -534,7 +534,7 @@ pub extern "C" fn askar_store_close( error!("{}", err); } }); - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -546,9 +546,9 @@ pub extern "C" fn askar_scan_start( tag_filter: FfiStr<'_>, offset: i64, limit: i64, - cb: Option, + cb: Option, cb_id: CallbackId, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Scan store start"); let cb = cb.ok_or_else(|| err_msg!("No callback provided"))?; @@ -559,9 +559,9 @@ pub extern "C" fn askar_scan_start( match result { Ok(scan_handle) => { debug!("Started scan {} on store {}", scan_handle, handle); - cb(cb_id, ErrorCode::Success, scan_handle) + cb(cb_id, ErrorHandle::OK, scan_handle) } - Err(err) => cb(cb_id, set_last_error(Some(err)), ScanHandle::invalid()), + Err(err) => cb(cb_id, store_error(err), ScanHandle::invalid()), } ); spawn_ok(async move { @@ -572,16 +572,16 @@ pub extern "C" fn askar_scan_start( }.await; cb.resolve(result); }); - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } #[no_mangle] pub extern "C" fn askar_scan_next( handle: ScanHandle, - cb: Option, + cb: Option, cb_id: CallbackId, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Scan store next"); let cb = cb.ok_or_else(|| err_msg!("No callback provided"))?; @@ -589,10 +589,10 @@ pub extern "C" fn askar_scan_next( match result { Ok(Some(entries)) => { let results = EntryListHandle::create(FfiEntryList::from(entries)); - cb(cb_id, ErrorCode::Success, results) + cb(cb_id, ErrorHandle::OK, results) }, - Ok(None) => cb(cb_id, ErrorCode::Success, EntryListHandle::invalid()), - Err(err) => cb(cb_id, set_last_error(Some(err)), EntryListHandle::invalid()), + Ok(None) => cb(cb_id, ErrorHandle::OK, EntryListHandle::invalid()), + Err(err) => cb(cb_id, store_error(err), EntryListHandle::invalid()), } ); spawn_ok(async move { @@ -603,12 +603,12 @@ pub extern "C" fn askar_scan_next( }.await; cb.resolve(result); }); - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } #[no_mangle] -pub extern "C" fn askar_scan_free(handle: ScanHandle) -> ErrorCode { +pub extern "C" fn askar_scan_free(handle: ScanHandle) -> ErrorHandle { catch_err! { trace!("Close scan"); spawn_ok(async move { @@ -620,7 +620,7 @@ pub extern "C" fn askar_scan_free(handle: ScanHandle) -> ErrorCode { debug!("Scan not found for closing: {}", handle); } }); - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -629,9 +629,9 @@ pub extern "C" fn askar_session_start( handle: StoreHandle, profile: FfiStr<'_>, as_transaction: i8, - cb: Option, + cb: Option, cb_id: CallbackId, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Session start"); let profile = profile.into_opt_string(); @@ -640,9 +640,9 @@ pub extern "C" fn askar_session_start( match result { Ok(sess_handle) => { debug!("Started session {} on store {} (txn: {})", sess_handle, handle, as_transaction != 0); - cb(cb_id, ErrorCode::Success, sess_handle) + cb(cb_id, ErrorHandle::OK, sess_handle) } - Err(err) => cb(cb_id, set_last_error(Some(err)), SessionHandle::invalid()), + Err(err) => cb(cb_id, store_error(err), SessionHandle::invalid()), } ); spawn_ok(async move { @@ -657,7 +657,7 @@ pub extern "C" fn askar_session_start( }.await; cb.resolve(result); }); - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -666,9 +666,9 @@ pub extern "C" fn askar_session_count( handle: SessionHandle, category: FfiStr<'_>, tag_filter: FfiStr<'_>, - cb: Option, + cb: Option, cb_id: CallbackId, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Count from store"); let cb = cb.ok_or_else(|| err_msg!("No callback provided"))?; @@ -676,8 +676,8 @@ pub extern "C" fn askar_session_count( let tag_filter = tag_filter.as_opt_str().map(TagFilter::from_str).transpose()?; let cb = EnsureCallback::new(move |result: Result| match result { - Ok(count) => cb(cb_id, ErrorCode::Success, count), - Err(err) => cb(cb_id, set_last_error(Some(err)), 0), + Ok(count) => cb(cb_id, ErrorHandle::OK, count), + Err(err) => cb(cb_id, store_error(err), 0), } ); spawn_ok(async move { @@ -687,7 +687,7 @@ pub extern "C" fn askar_session_count( }.await; cb.resolve(result); }); - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -697,9 +697,9 @@ pub extern "C" fn askar_session_fetch( category: FfiStr<'_>, name: FfiStr<'_>, for_update: i8, - cb: Option, + cb: Option, cb_id: CallbackId, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Fetch from store"); let cb = cb.ok_or_else(|| err_msg!("No callback provided"))?; @@ -709,10 +709,10 @@ pub extern "C" fn askar_session_fetch( match result { Ok(Some(entry)) => { let results = EntryListHandle::create(FfiEntryList::from(entry)); - cb(cb_id, ErrorCode::Success, results) + cb(cb_id, ErrorHandle::OK, results) }, - Ok(None) => cb(cb_id, ErrorCode::Success, EntryListHandle::invalid()), - Err(err) => cb(cb_id, set_last_error(Some(err)), EntryListHandle::invalid()), + Ok(None) => cb(cb_id, ErrorHandle::OK, EntryListHandle::invalid()), + Err(err) => cb(cb_id, store_error(err), EntryListHandle::invalid()), } ); spawn_ok(async move { @@ -722,7 +722,7 @@ pub extern "C" fn askar_session_fetch( }.await; cb.resolve(result); }); - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -733,9 +733,9 @@ pub extern "C" fn askar_session_fetch_all( tag_filter: FfiStr<'_>, limit: i64, for_update: i8, - cb: Option, + cb: Option, cb_id: CallbackId, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Count from store"); let cb = cb.ok_or_else(|| err_msg!("No callback provided"))?; @@ -746,9 +746,9 @@ pub extern "C" fn askar_session_fetch_all( match result { Ok(rows) => { let results = EntryListHandle::create(FfiEntryList::from(rows)); - cb(cb_id, ErrorCode::Success, results) + cb(cb_id, ErrorHandle::OK, results) } - Err(err) => cb(cb_id, set_last_error(Some(err)), EntryListHandle::invalid()), + Err(err) => cb(cb_id, store_error(err), EntryListHandle::invalid()), } ); spawn_ok(async move { @@ -758,7 +758,7 @@ pub extern "C" fn askar_session_fetch_all( }.await; cb.resolve(result); }); - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -767,9 +767,9 @@ pub extern "C" fn askar_session_remove_all( handle: SessionHandle, category: FfiStr<'_>, tag_filter: FfiStr<'_>, - cb: Option, + cb: Option, cb_id: CallbackId, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Count from store"); let cb = cb.ok_or_else(|| err_msg!("No callback provided"))?; @@ -778,9 +778,9 @@ pub extern "C" fn askar_session_remove_all( let cb = EnsureCallback::new(move |result| match result { Ok(removed) => { - cb(cb_id, ErrorCode::Success, removed) + cb(cb_id, ErrorHandle::OK, removed) } - Err(err) => cb(cb_id, set_last_error(Some(err)), 0), + Err(err) => cb(cb_id, store_error(err), 0), } ); spawn_ok(async move { @@ -790,7 +790,7 @@ pub extern "C" fn askar_session_remove_all( }.await; cb.resolve(result); }); - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -803,9 +803,9 @@ pub extern "C" fn askar_session_update( value: ByteBuffer, tags: FfiStr<'_>, expiry_ms: i64, - cb: Option, + cb: Option, cb_id: CallbackId, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Update store"); let cb = cb.ok_or_else(|| err_msg!("No callback provided"))?; @@ -834,8 +834,8 @@ pub extern "C" fn askar_session_update( }; let cb = EnsureCallback::new(move |result| match result { - Ok(_) => cb(cb_id, ErrorCode::Success), - Err(err) => cb(cb_id, set_last_error(Some(err))), + Ok(_) => cb(cb_id, ErrorHandle::OK), + Err(err) => cb(cb_id, store_error(err)), } ); spawn_ok(async move { @@ -845,7 +845,7 @@ pub extern "C" fn askar_session_update( }.await; cb.resolve(result); }); - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -857,9 +857,9 @@ pub extern "C" fn askar_session_insert_key( metadata: FfiStr<'_>, tags: FfiStr<'_>, expiry_ms: i64, - cb: Option, + cb: Option, cb_id: CallbackId, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Insert key"); let cb = cb.ok_or_else(|| err_msg!("No callback provided"))?; @@ -883,9 +883,9 @@ pub extern "C" fn askar_session_insert_key( let cb = EnsureCallback::new(move |result| match result { Ok(_) => { - cb(cb_id, ErrorCode::Success) + cb(cb_id, ErrorHandle::OK) } - Err(err) => cb(cb_id, set_last_error(Some(err))), + Err(err) => cb(cb_id, store_error(err)), } ); @@ -902,7 +902,7 @@ pub extern "C" fn askar_session_insert_key( }.await; cb.resolve(result); }); - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -911,9 +911,9 @@ pub extern "C" fn askar_session_fetch_key( handle: SessionHandle, name: FfiStr<'_>, for_update: i8, - cb: Option, + cb: Option, cb_id: CallbackId, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Fetch key"); let cb = cb.ok_or_else(|| err_msg!("No callback provided"))?; @@ -923,12 +923,12 @@ pub extern "C" fn askar_session_fetch_key( match result { Ok(Some(entry)) => { let results = KeyEntryListHandle::create(FfiKeyEntryList::from(entry)); - cb(cb_id, ErrorCode::Success, results) + cb(cb_id, ErrorHandle::OK, results) } Ok(None) => { - cb(cb_id, ErrorCode::Success, KeyEntryListHandle::invalid()) + cb(cb_id, ErrorHandle::OK, KeyEntryListHandle::invalid()) } - Err(err) => cb(cb_id, set_last_error(Some(err)), KeyEntryListHandle::invalid()), + Err(err) => cb(cb_id, store_error(err), KeyEntryListHandle::invalid()), } ); @@ -942,7 +942,7 @@ pub extern "C" fn askar_session_fetch_key( }.await; cb.resolve(result); }); - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -954,9 +954,9 @@ pub extern "C" fn askar_session_fetch_all_keys( tag_filter: FfiStr<'_>, limit: i64, for_update: i8, - cb: Option, + cb: Option, cb_id: CallbackId, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Fetch all keys"); let cb = cb.ok_or_else(|| err_msg!("No callback provided"))?; @@ -969,9 +969,9 @@ pub extern "C" fn askar_session_fetch_all_keys( match result { Ok(entries) => { let results = KeyEntryListHandle::create(FfiKeyEntryList::from(entries)); - cb(cb_id, ErrorCode::Success, results) + cb(cb_id, ErrorHandle::OK, results) } - Err(err) => cb(cb_id, set_last_error(Some(err)), KeyEntryListHandle::invalid()), + Err(err) => cb(cb_id, store_error(err), KeyEntryListHandle::invalid()), } ); @@ -988,7 +988,7 @@ pub extern "C" fn askar_session_fetch_all_keys( }.await; cb.resolve(result); }); - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -999,9 +999,9 @@ pub extern "C" fn askar_session_update_key( metadata: FfiStr<'_>, tags: FfiStr<'_>, expiry_ms: i64, - cb: Option, + cb: Option, cb_id: CallbackId, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Update key"); let cb = cb.ok_or_else(|| err_msg!("No callback provided"))?; @@ -1024,9 +1024,9 @@ pub extern "C" fn askar_session_update_key( let cb = EnsureCallback::new(move |result| match result { Ok(_) => { - cb(cb_id, ErrorCode::Success) + cb(cb_id, ErrorHandle::OK) } - Err(err) => cb(cb_id, set_last_error(Some(err))), + Err(err) => cb(cb_id, store_error(err)), } ); @@ -1043,7 +1043,7 @@ pub extern "C" fn askar_session_update_key( }.await; cb.resolve(result); }); - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -1051,9 +1051,9 @@ pub extern "C" fn askar_session_update_key( pub extern "C" fn askar_session_remove_key( handle: SessionHandle, name: FfiStr<'_>, - cb: Option, + cb: Option, cb_id: CallbackId, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Remove key"); let cb = cb.ok_or_else(|| err_msg!("No callback provided"))?; @@ -1061,9 +1061,9 @@ pub extern "C" fn askar_session_remove_key( let cb = EnsureCallback::new(move |result| match result { Ok(_) => { - cb(cb_id, ErrorCode::Success) + cb(cb_id, ErrorHandle::OK) } - Err(err) => cb(cb_id, set_last_error(Some(err))), + Err(err) => cb(cb_id, store_error(err)), } ); @@ -1076,7 +1076,7 @@ pub extern "C" fn askar_session_remove_key( }.await; cb.resolve(result); }); - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } @@ -1084,17 +1084,17 @@ pub extern "C" fn askar_session_remove_key( pub extern "C" fn askar_session_close( handle: SessionHandle, commit: i8, - cb: Option, + cb: Option, cb_id: CallbackId, -) -> ErrorCode { +) -> ErrorHandle { catch_err! { trace!("Close session"); let cb = cb.map(|cb| { EnsureCallback::new(move |result| match result { - Ok(_) => cb(cb_id, ErrorCode::Success), + Ok(_) => cb(cb_id, ErrorHandle::OK), Err(err) => { - cb(cb_id, set_last_error(Some(err))) + cb(cb_id, store_error(err)) } } ) @@ -1124,6 +1124,6 @@ pub extern "C" fn askar_session_close( error!("{}", err); } }); - Ok(ErrorCode::Success) + Ok(ErrorHandle::OK) } } From ef13a8ed54e139cfb91a4c86b8edd776face14cf Mon Sep 17 00:00:00 2001 From: Andrew Whitehead Date: Tue, 19 Dec 2023 11:37:40 -0800 Subject: [PATCH 2/4] update error handling in python wrapper Signed-off-by: Andrew Whitehead --- wrappers/python/aries_askar/bindings/lib.py | 53 +++++++++++++-------- 1 file changed, 33 insertions(+), 20 deletions(-) diff --git a/wrappers/python/aries_askar/bindings/lib.py b/wrappers/python/aries_askar/bindings/lib.py index 6c13cfb7..f5030539 100644 --- a/wrappers/python/aries_askar/bindings/lib.py +++ b/wrappers/python/aries_askar/bindings/lib.py @@ -44,6 +44,15 @@ } +class ErrorHandle(Structure): + _fields_ = [ + ("value", c_int64), + ] + + def __bool__(self) -> bool: + return self.value != 0 + + def _convert_log_level(level: Union[str, int, None]): if level is None or level == "-1": return -1 @@ -187,14 +196,15 @@ def _enabled_cb(_context, level: int) -> bool: (c_void_p, c_void_p, c_void_p, c_void_p, c_int32), restype=c_int64, ) - if set_logger( + err = set_logger( None, # context self._log_cb, self._log_enabled_cb, None, # flush level, - ): - raise self.get_current_error(True) + ) + if err: + raise self.fetch_error(err) try: finalize(self, self.method("askar_clear_custom_logger", None, restype=None)) @@ -204,19 +214,19 @@ def _enabled_cb(_context, level: int) -> bool: def invoke(self, name, argtypes, *args): """Perform a synchronous library function call.""" - method = self.method(name, argtypes, restype=c_int64) + method = self.method(name, argtypes, restype=ErrorHandle) if not method: raise ValueError(f"FFI method not found: {name}") args = _load_method_arguments(name, argtypes, args) - result = method(*args) - if result: - raise self.get_current_error(True) + err = method(*args) + if err: + raise self.fetch_error(err) def invoke_async( self, name: str, argtypes, *args, return_type=None ) -> asyncio.Future: """Perform an asynchronous library function call.""" - method = self.method(name, (*argtypes, c_void_p, c_int64), restype=c_int64) + method = self.method(name, (*argtypes, c_void_p, c_int64), restype=ErrorHandle) if not method: raise ValueError(f"FFI method not found: {name}") loop = asyncio.get_event_loop() @@ -225,7 +235,7 @@ def invoke_async( if cb_info: cb = cb_info[1] else: - cb_args = [c_int64, c_int64] + cb_args = [c_int64, ErrorHandle] if return_type: cb_args.append(return_type) cb_type = CFUNCTYPE(None, *cb_args) @@ -236,10 +246,10 @@ def invoke_async( args = _load_method_arguments(name, argtypes, args) cb_id = next(self._cb_id) self._callbacks[cb_id] = (loop, fut, name) - result = method(*args, cb, cb_id) - if result: + err = method(*args, cb, cb_id) + if err: # FFI must not execute the callback if an error is returned - err = self.get_current_error(True) + err = self.fetch_error(err) if self._callbacks.pop(cb_id, None): self._fulfill_future(fut, None, err) return fut @@ -249,8 +259,8 @@ def invoke_dtor(self, name: str, *values, argtypes=None, restype=None): if method: method(*values) - def _handle_callback(self, cb_id: int, err: int, result=None): - exc = self.get_current_error(True) if err else None + def _handle_callback(self, cb_id: int, err: ErrorHandle, result=None): + exc = self.fetch_error(err) if err else None cb = self._callbacks.pop(cb_id, None) if not cb: LOGGER.info("Callback already fulfilled: %s", cb_id) @@ -267,7 +277,7 @@ def _fulfill_future(self, fut: asyncio.Future, result, err: Exception = None): else: fut.set_result(result) - def get_current_error(self, expect: bool = False) -> Optional[AskarError]: + def fetch_error(self, handle: ErrorHandle) -> Optional[AskarError]: """ Get the error result from the previous failed API method. @@ -276,20 +286,23 @@ def get_current_error(self, expect: bool = False) -> Optional[AskarError]: """ err_json = StrBuffer() method = self.method( - "askar_get_current_error", (POINTER(StrBuffer),), restype=c_int64 + "askar_fetch_error", + ( + ErrorHandle, + POINTER(StrBuffer), + ), + restype=c_int64, ) - if not method(byref(err_json)): + if not method(handle, byref(err_json)): try: msg = json.loads(err_json.value) except json.JSONDecodeError: - LOGGER.warning("JSON decode error for askar_get_current_error") + LOGGER.warning("JSON decode error for askar_fetch_error") msg = None if msg and "message" in msg and "code" in msg: return AskarError( AskarErrorCode(msg["code"]), msg["message"], msg.get("extra") ) - if not expect: - return None return AskarError(AskarErrorCode.WRAPPER, "Unknown error") def method(self, name, argtypes, *, restype=None): From ccd8384817a4ac9c28202cb4807f55fc4e4c2408 Mon Sep 17 00:00:00 2001 From: Andrew Whitehead Date: Tue, 19 Dec 2023 12:06:14 -0800 Subject: [PATCH 3/4] use lockfile when installing cross Signed-off-by: Andrew Whitehead --- .github/workflows/build.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 954505ac..bda21e9d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -68,7 +68,7 @@ jobs: - if: ${{ runner.os == 'Linux' }} name: Pre-install cross run: | - cargo install --bins --git https://github.com/rust-embedded/cross --tag v${{ env.CROSS_VERSION }} cross + cargo install --bins --git https://github.com/rust-embedded/cross --locked --tag v${{ env.CROSS_VERSION }} cross tests: name: Run tests @@ -163,7 +163,7 @@ jobs: shell: sh run: | if [ -n "${{ matrix.use_cross }}" ]; then - cargo install --bins --git https://github.com/rust-embedded/cross --tag v${{ env.CROSS_VERSION }} cross + cargo install --bins --git https://github.com/rust-embedded/cross --locked --tag v${{ env.CROSS_VERSION }} cross # Required for compatibility with manylinux2014. # https://github.com/briansmith/ring/issues/1728 if [ "${{ matrix.architecture }}" = "linux-aarch64" ]; then @@ -399,6 +399,7 @@ jobs: build-android: name: Build library (Android) needs: [checks] + # NB: RUST_VERSION must be <1.68 here to support NDK 17 env: RUST_VERSION: "1.67" @@ -431,7 +432,7 @@ jobs: - name: Build run: | - cargo install --bins --git https://github.com/rust-embedded/cross --tag v${{ env.CROSS_VERSION }} cross + cargo install --bins --git https://github.com/rust-embedded/cross --locked --tag v${{ env.CROSS_VERSION }} cross # Required for compatibility with manylinux2014: # https://github.com/briansmith/ring/issues/1728 if [ "${{ matrix.target }}" = "aarch64-linux-android" ]; then From 7cc54aba3b2b8071ac02b7df502e0a2ec5e76b12 Mon Sep 17 00:00:00 2001 From: Andrew Whitehead Date: Tue, 19 Dec 2023 12:37:48 -0800 Subject: [PATCH 4/4] add lockfile Signed-off-by: Andrew Whitehead --- .gitignore | 1 - Cargo.lock | 2952 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 2952 insertions(+), 1 deletion(-) create mode 100644 Cargo.lock diff --git a/.gitignore b/.gitignore index 821b8191..9a26b4c5 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,6 @@ target *.bak.db *.db-shm *.db-wal -Cargo.lock .DS_Store *.tgz *.so diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 00000000..6090ecc1 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,2952 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aead" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common", + "generic-array", +] + +[[package]] +name = "aes" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "aes-gcm" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" +dependencies = [ + "aead", + "aes", + "cipher", + "ctr", + "ghash", + "subtle", +] + +[[package]] +name = "ahash" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +dependencies = [ + "cfg-if", + "getrandom", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anes" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" + +[[package]] +name = "anstyle" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" + +[[package]] +name = "arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +dependencies = [ + "derive_arbitrary", +] + +[[package]] +name = "arc-swap" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" + +[[package]] +name = "argon2" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ba4cac0a46bc1d2912652a751c47f2a9f3a7fe89bcae2275d418f5270402f9" +dependencies = [ + "base64ct", + "blake2", + "cpufeatures", + "password-hash", +] + +[[package]] +name = "aries-askar" +version = "0.3.0" +dependencies = [ + "askar-crypto", + "askar-storage", + "async-lock", + "criterion", + "env_logger", + "ffi-support", + "jemallocator", + "log", + "once_cell", + "rand", + "serde", + "serde_cbor", + "serde_json", + "zeroize", +] + +[[package]] +name = "askar-crypto" +version = "0.3.0" +dependencies = [ + "aead", + "aes", + "aes-gcm", + "arbitrary", + "argon2", + "base64", + "blake2", + "block-modes", + "bls12_381", + "cbc", + "chacha20", + "chacha20poly1305", + "cipher", + "criterion", + "crypto_box", + "curve25519-dalek", + "digest", + "ed25519-dalek", + "elliptic-curve", + "group", + "hex-literal", + "hkdf", + "hmac", + "k256", + "p256", + "p384", + "rand", + "serde", + "serde-json-core", + "serde_cbor", + "sha2", + "subtle", + "x25519-dalek", + "zeroize", +] + +[[package]] +name = "askar-storage" +version = "0.1.0" +dependencies = [ + "arc-swap", + "askar-crypto", + "async-lock", + "async-stream", + "bs58", + "chrono", + "digest", + "env_logger", + "futures-lite", + "hex", + "hex-literal", + "hmac", + "itertools 0.11.0", + "log", + "once_cell", + "percent-encoding", + "rand", + "rmp-serde", + "serde", + "serde_cbor", + "serde_json", + "sha2", + "sqlx", + "tokio", + "url", + "uuid", + "zeroize", +] + +[[package]] +name = "async-lock" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7125e42787d53db9dd54261812ef17e937c95a51e4d291373b670342fa44310c" +dependencies = [ + "event-listener 4.0.1", + "event-listener-strategy", + "pin-project-lite", +] + +[[package]] +name = "async-stream" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.41", +] + +[[package]] +name = "atoi" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" +dependencies = [ + "num-traits", +] + +[[package]] +name = "atomic-write-file" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edcdbedc2236483ab103a53415653d6b4442ea6141baf1ffa85df29635e88436" +dependencies = [ + "nix", + "rand", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +dependencies = [ + "serde", +] + +[[package]] +name = "blake2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" +dependencies = [ + "digest", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-modes" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e2211b0817f061502a8dd9f11a37e879e79763e3c698d2418cf824d8cb2f21e" + +[[package]] +name = "block-padding" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bls12_381" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7bc6d6292be3a19e6379786dac800f551e5865a5bb51ebbe3064ab80433f403" +dependencies = [ + "ff", + "group", + "rand_core", + "subtle", + "zeroize", +] + +[[package]] +name = "bs58" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" + +[[package]] +name = "cast" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" + +[[package]] +name = "cbc" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" +dependencies = [ + "cipher", +] + +[[package]] +name = "cc" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chacha20" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "chacha20poly1305" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" +dependencies = [ + "aead", + "chacha20", + "cipher", + "poly1305", + "zeroize", +] + +[[package]] +name = "chrono" +version = "0.4.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "wasm-bindgen", + "windows-targets 0.48.5", +] + +[[package]] +name = "ciborium" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "effd91f6c78e5a4ace8a5d3c0b6bfaec9e2baaef55f3efc00e45fb2e477ee926" +dependencies = [ + "ciborium-io", + "ciborium-ll", + "serde", +] + +[[package]] +name = "ciborium-io" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdf919175532b369853f5d5e20b26b43112613fd6fe7aee757e35f7a44642656" + +[[package]] +name = "ciborium-ll" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defaa24ecc093c77630e6c15e17c51f5e187bf35ee514f4e2d67baaa96dae22b" +dependencies = [ + "ciborium-io", + "half", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", + "zeroize", +] + +[[package]] +name = "clap" +version = "4.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfaff671f6b22ca62406885ece523383b9b64022e341e53e009a62ebc47a45f2" +dependencies = [ + "clap_builder", +] + +[[package]] +name = "clap_builder" +version = "4.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a216b506622bb1d316cd51328dce24e07bdff4a6128a47c7e7fad11878d5adbb" +dependencies = [ + "anstyle", + "clap_lex", +] + +[[package]] +name = "clap_lex" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" + +[[package]] +name = "concurrent-queue" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "cpufeatures" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +dependencies = [ + "libc", +] + +[[package]] +name = "crc" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + +[[package]] +name = "criterion" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" +dependencies = [ + "anes", + "cast", + "ciborium", + "clap", + "criterion-plot", + "is-terminal", + "itertools 0.10.5", + "num-traits", + "once_cell", + "oorandom", + "plotters", + "rayon", + "regex", + "serde", + "serde_derive", + "serde_json", + "tinytemplate", + "walkdir", +] + +[[package]] +name = "criterion-plot" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" +dependencies = [ + "cast", + "itertools 0.10.5", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fca89a0e215bab21874660c67903c5f143333cab1da83d041c7ded6053774751" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d2fe95351b870527a5d09bf563ed3c97c0cffb87cf1c78a591bf48bb218d9aa" +dependencies = [ + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset", +] + +[[package]] +name = "crossbeam-queue" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9bcf5bdbfdd6030fb4a1c497b5d5fc5921aa2f60d359a17e249c0e6df3de153" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d96137f14f244c37f989d9fff8f95e6c18b918e71f36638f8c49112e4c78f" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "rand_core", + "typenum", +] + +[[package]] +name = "crypto_box" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16182b4f39a82ec8a6851155cc4c0cda3065bb1db33651726a29e1951de0f009" +dependencies = [ + "aead", + "crypto_secretbox", + "curve25519-dalek", + "salsa20", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto_secretbox" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d6cf87adf719ddf43a805e92c6870a531aedda35ff640442cbaf8674e141e1" +dependencies = [ + "aead", + "cipher", + "generic-array", + "poly1305", + "salsa20", + "subtle", + "zeroize", +] + +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher", +] + +[[package]] +name = "curve25519-dalek" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest", + "fiat-crypto", + "platforms", + "rustc_version", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.41", +] + +[[package]] +name = "der" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +dependencies = [ + "const-oid", + "pem-rfc7468", + "zeroize", +] + +[[package]] +name = "derive_arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.41", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "dotenvy" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest", + "elliptic-curve", + "rfc6979", + "signature", +] + +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" +dependencies = [ + "curve25519-dalek", + "ed25519", + "sha2", + "subtle", + "zeroize", +] + +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +dependencies = [ + "serde", +] + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest", + "ff", + "generic-array", + "group", + "hkdf", + "rand_core", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "env_logger" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" +dependencies = [ + "humantime", + "is-terminal", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "etcetera" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" +dependencies = [ + "cfg-if", + "home", + "windows-sys 0.48.0", +] + +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "event-listener" +version = "4.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84f2cdcf274580f2d63697192d744727b3198894b1bf02923643bf59e2c26712" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" +dependencies = [ + "event-listener 4.0.1", + "pin-project-lite", +] + +[[package]] +name = "fastrand" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "rand_core", + "subtle", +] + +[[package]] +name = "ffi-support" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27838c6815cfe9de2d3aeb145ffd19e565f577414b33f3bdbf42fe040e9e0ff6" +dependencies = [ + "lazy_static", + "log", +] + +[[package]] +name = "fiat-crypto" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" + +[[package]] +name = "finl_unicode" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" + +[[package]] +name = "flume" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" +dependencies = [ + "futures-core", + "futures-sink", + "spin 0.9.8", +] + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" + +[[package]] +name = "futures-executor" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-intrusive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" +dependencies = [ + "futures-core", + "lock_api", + "parking_lot", +] + +[[package]] +name = "futures-io" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" + +[[package]] +name = "futures-lite" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aeee267a1883f7ebef3700f262d2d54de95dfaf38189015a74fdc4e0c7ad8143" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + +[[package]] +name = "futures-sink" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" + +[[package]] +name = "futures-task" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" + +[[package]] +name = "futures-util" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +dependencies = [ + "futures-core", + "futures-io", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "ghash" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" +dependencies = [ + "opaque-debug", + "polyval", +] + +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core", + "subtle", +] + +[[package]] +name = "half" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" + +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +dependencies = [ + "ahash", + "allocator-api2", +] + +[[package]] +name = "hashlink" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +dependencies = [ + "hashbrown", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "hermit-abi" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" + +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "home" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +dependencies = [ + "windows-sys 0.48.0", +] + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "iana-time-zone" +version = "0.1.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "indexmap" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "block-padding", + "generic-array", +] + +[[package]] +name = "is-terminal" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +dependencies = [ + "hermit-abi", + "rustix", + "windows-sys 0.48.0", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25db6b064527c5d482d0423354fcd07a89a2dfe07b67892e62411946db7f07b0" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" + +[[package]] +name = "jemalloc-sys" +version = "0.5.4+5.3.0-patched" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac6c1946e1cea1788cbfde01c993b52a10e2da07f4bac608228d1bed20bfebf2" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "jemallocator" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0de374a9f8e63150e6f5e8a60cc14c668226d7a347d8aee1a45766e3c4dd3bc" +dependencies = [ + "jemalloc-sys", + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "k256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f01b677d82ef7a676aa37e099defd83a28e15687112cafdd112d60236b6115b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "sha2", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +dependencies = [ + "spin 0.5.2", +] + +[[package]] +name = "libc" +version = "0.2.151" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" + +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + +[[package]] +name = "libsqlite3-sys" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" + +[[package]] +name = "lock_api" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" + +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest", +] + +[[package]] +name = "memchr" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" + +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.48.0", +] + +[[package]] +name = "nix" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" +dependencies = [ + "bitflags 2.4.1", + "cfg-if", + "libc", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "num-bigint-dig" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" +dependencies = [ + "byteorder", + "lazy_static", + "libm", + "num-integer", + "num-iter", + "num-traits", + "rand", + "smallvec", + "zeroize", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "object" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "oorandom" +version = "11.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "p256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2", +] + +[[package]] +name = "p384" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70786f51bcc69f6a4c0360e063a4cac5419ef7c5cd5b3c99ad70f3be5ba79209" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2", +] + +[[package]] +name = "parking" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.48.5", +] + +[[package]] +name = "password-hash" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" +dependencies = [ + "base64ct", + "rand_core", + "subtle", +] + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pin-project-lite" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs1" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" +dependencies = [ + "der", + "pkcs8", + "spki", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" + +[[package]] +name = "platforms" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" + +[[package]] +name = "plotters" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" +dependencies = [ + "num-traits", + "plotters-backend", + "plotters-svg", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "plotters-backend" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" + +[[package]] +name = "plotters-svg" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" +dependencies = [ + "plotters-backend", +] + +[[package]] +name = "poly1305" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" +dependencies = [ + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "polyval" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", +] + +[[package]] +name = "proc-macro2" +version = "1.0.70" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rayon" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "regex" +version = "1.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "ring" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +dependencies = [ + "cc", + "getrandom", + "libc", + "spin 0.9.8", + "untrusted", + "windows-sys 0.48.0", +] + +[[package]] +name = "rmp" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f9860a6cc38ed1da53456442089b4dfa35e7cedaa326df63017af88385e6b20" +dependencies = [ + "byteorder", + "num-traits", + "paste", +] + +[[package]] +name = "rmp-serde" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bffea85eea980d8a74453e5d02a8d93028f3c34725de143085a844ebe953258a" +dependencies = [ + "byteorder", + "rmp", + "serde", +] + +[[package]] +name = "rsa" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" +dependencies = [ + "const-oid", + "digest", + "num-bigint-dig", + "num-integer", + "num-traits", + "pkcs1", + "pkcs8", + "rand_core", + "signature", + "spki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +dependencies = [ + "bitflags 2.4.1", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.21.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +dependencies = [ + "ring", + "rustls-webpki", + "sct", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "ryu" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" + +[[package]] +name = "salsa20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" +dependencies = [ + "cipher", +] + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "subtle", + "zeroize", +] + +[[package]] +name = "semver" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" + +[[package]] +name = "serde" +version = "1.0.193" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde-json-core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c9e1ab533c0bc414c34920ec7e5f097101d126ed5eac1a1aac711222e0bbb33" +dependencies = [ + "ryu", + "serde", +] + +[[package]] +name = "serde_cbor" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" +dependencies = [ + "half", + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.193" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.41", +] + +[[package]] +name = "serde_json" +version = "1.0.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest", + "rand_core", +] + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" + +[[package]] +name = "socket2" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "sqlformat" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce81b7bd7c4493975347ef60d8c7e8b742d4694f4c49f93e0a12ea263938176c" +dependencies = [ + "itertools 0.12.0", + "nom", + "unicode_categories", +] + +[[package]] +name = "sqlx" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dba03c279da73694ef99763320dea58b51095dfe87d001b1d4b5fe78ba8763cf" +dependencies = [ + "sqlx-core", + "sqlx-macros", + "sqlx-mysql", + "sqlx-postgres", + "sqlx-sqlite", +] + +[[package]] +name = "sqlx-core" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d84b0a3c3739e220d94b3239fd69fb1f74bc36e16643423bd99de3b43c21bfbd" +dependencies = [ + "ahash", + "atoi", + "byteorder", + "bytes", + "chrono", + "crc", + "crossbeam-queue", + "dotenvy", + "either", + "event-listener 2.5.3", + "futures-channel", + "futures-core", + "futures-intrusive", + "futures-io", + "futures-util", + "hashlink", + "hex", + "indexmap", + "log", + "memchr", + "once_cell", + "paste", + "percent-encoding", + "rustls", + "rustls-pemfile", + "serde", + "serde_json", + "sha2", + "smallvec", + "sqlformat", + "thiserror", + "tokio", + "tokio-stream", + "tracing", + "url", + "webpki-roots", +] + +[[package]] +name = "sqlx-macros" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89961c00dc4d7dffb7aee214964b065072bff69e36ddb9e2c107541f75e4f2a5" +dependencies = [ + "proc-macro2", + "quote", + "sqlx-core", + "sqlx-macros-core", + "syn 1.0.109", +] + +[[package]] +name = "sqlx-macros-core" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0bd4519486723648186a08785143599760f7cc81c52334a55d6a83ea1e20841" +dependencies = [ + "atomic-write-file", + "dotenvy", + "either", + "heck", + "hex", + "once_cell", + "proc-macro2", + "quote", + "serde", + "serde_json", + "sha2", + "sqlx-core", + "sqlx-mysql", + "sqlx-postgres", + "sqlx-sqlite", + "syn 1.0.109", + "tempfile", + "tokio", + "url", +] + +[[package]] +name = "sqlx-mysql" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e37195395df71fd068f6e2082247891bc11e3289624bbc776a0cdfa1ca7f1ea4" +dependencies = [ + "atoi", + "base64", + "bitflags 2.4.1", + "byteorder", + "bytes", + "chrono", + "crc", + "digest", + "dotenvy", + "either", + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "generic-array", + "hex", + "hkdf", + "hmac", + "itoa", + "log", + "md-5", + "memchr", + "once_cell", + "percent-encoding", + "rand", + "rsa", + "serde", + "sha1", + "sha2", + "smallvec", + "sqlx-core", + "stringprep", + "thiserror", + "tracing", + "whoami", +] + +[[package]] +name = "sqlx-postgres" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6ac0ac3b7ccd10cc96c7ab29791a7dd236bd94021f31eec7ba3d46a74aa1c24" +dependencies = [ + "atoi", + "base64", + "bitflags 2.4.1", + "byteorder", + "chrono", + "crc", + "dotenvy", + "etcetera", + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "hex", + "hkdf", + "hmac", + "home", + "itoa", + "log", + "md-5", + "memchr", + "once_cell", + "rand", + "serde", + "serde_json", + "sha1", + "sha2", + "smallvec", + "sqlx-core", + "stringprep", + "thiserror", + "tracing", + "whoami", +] + +[[package]] +name = "sqlx-sqlite" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "210976b7d948c7ba9fced8ca835b11cbb2d677c59c79de41ac0d397e14547490" +dependencies = [ + "atoi", + "chrono", + "flume", + "futures-channel", + "futures-core", + "futures-executor", + "futures-intrusive", + "futures-util", + "libsqlite3-sys", + "log", + "percent-encoding", + "serde", + "sqlx-core", + "tracing", + "url", + "urlencoding", +] + +[[package]] +name = "stringprep" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" +dependencies = [ + "finl_unicode", + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c8b28c477cc3bf0e7966561e3460130e1255f7a1cf71931075f1c5e7a7e269" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tempfile" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" +dependencies = [ + "cfg-if", + "fastrand", + "redox_syscall", + "rustix", + "windows-sys 0.48.0", +] + +[[package]] +name = "termcolor" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "thiserror" +version = "1.0.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f11c217e1416d6f036b870f14e0413d480dbf28edbee1f877abaf0206af43bb7" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01742297787513b79cf8e29d1056ede1313e2420b7b3b15d0a768b4921f549df" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.41", +] + +[[package]] +name = "tinytemplate" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.35.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "pin-project-lite", + "socket2", + "windows-sys 0.48.0", +] + +[[package]] +name = "tokio-stream" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.41", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "unicode-bidi" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-segmentation" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" + +[[package]] +name = "unicode_categories" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" + +[[package]] +name = "universal-hash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +dependencies = [ + "crypto-common", + "subtle", +] + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "urlencoding" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" + +[[package]] +name = "uuid" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" +dependencies = [ + "getrandom", +] + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "walkdir" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.41", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.41", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" + +[[package]] +name = "web-sys" +version = "0.3.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" + +[[package]] +name = "whoami" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-core" +version = "0.51.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + +[[package]] +name = "x25519-dalek" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" +dependencies = [ + "curve25519-dalek", + "rand_core", + "zeroize", +] + +[[package]] +name = "zerocopy" +version = "0.7.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c4061bedbb353041c12f413700357bec76df2c7e2ca8e4df8bac24c6bf68e3d" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3c129550b3e6de3fd0ba67ba5c81818f9805e58b8d7fee80a3a59d2c9fc601a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.41", +] + +[[package]] +name = "zeroize" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.41", +]