sal-modular/vault_crypto_debug.log
Sameh Abouelsaad cea2d7e655 feat: Refactor kvstore and vault to use features and logging
- Remove hardcoded dependencies in kvstore Cargo.toml; use features
  instead. This allows for more flexible compilation for different
  targets (native vs. WASM).
- Improve logging in vault crate using the `log` crate. This makes
  debugging easier and provides more informative output during
  execution.  Native tests use `env_logger`, WASM tests use
  `console_log`.
- Update README to reflect new logging best practices.
- Add cfg attributes to native and wasm modules to improve clarity.
- Update traits.rs to specify Send + Sync behavior expectations.
2025-05-15 16:42:19 +03:00

157 lines
9.2 KiB
Plaintext

Compiling vault v0.1.0 (/home/sameh/sal-modular/vault)
warning: unused import: `KeyInit`
--> vault/src/crypto.rs:5:26
|
5 | use aes_gcm::{Aes256Gcm, KeyInit as AesKeyInit};
| ^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused import: `signature::SignatureEncoding`
--> vault/src/lib.rs:130:13
|
130 | use signature::SignatureEncoding;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: unused import: `k256::elliptic_curve::sec1::ToEncodedPoint`
--> vault/src/lib.rs:148:21
|
148 | use k256::elliptic_curve::sec1::ToEncodedPoint;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: enum `KdfType` is never used
--> vault/src/crypto.rs:14:14
|
14 | pub enum KdfType {
| ^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: enum `CipherType` is never used
--> vault/src/crypto.rs:36:14
|
36 | pub enum CipherType {
| ^^^^^^^^^^
warning: struct `SessionManager` is never constructed
--> vault/src/session.rs:6:12
|
6 | pub struct SessionManager {
| ^^^^^^^^^^^^^^
warning: associated function `new` is never used
--> vault/src/session.rs:14:12
|
13 | impl SessionManager {
| ------------------- associated function in this implementation
14 | pub fn new() -> Self {
| ^^^
warning: `vault` (lib) generated 7 warnings
warning: unused import: `async_trait::async_trait`
--> vault/tests/mock_store.rs:2:5
|
2 | use async_trait::async_trait;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: `vault` (test "keypair_management") generated 1 warning (run `cargo fix --test "keypair_management"` to apply 1 suggestion)
Finished `test` profile [unoptimized + debuginfo] target(s) in 1.87s
Running tests/keypair_management.rs (target/debug/deps/keypair_management-96fd8e08e64dfc60)
running 1 test
thread 'test_keypair_management_and_crypto' panicked at vault/tests/keypair_management.rs:21:160:
called `Result::unwrap()` on an `Err` value: Crypto("decryption error: aead::Error")
stack backtrace:
0: rust_begin_unwind
at /rustc/05f9846f893b09a1be1fc8560e33fc3c815cfecb/library/std/src/panicking.rs:695:5
1: core::panicking::panic_fmt
at /rustc/05f9846f893b09a1be1fc8560e33fc3c815cfecb/library/core/src/panicking.rs:75:14
2: core::result::unwrap_failed
at /rustc/05f9846f893b09a1be1fc8560e33fc3c815cfecb/library/core/src/result.rs:1704:5
3: core::result::Result<T,E>::unwrap
at /home/sameh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:1109:23
4: keypair_management::test_keypair_management_and_crypto::{{closure}}
at ./tests/keypair_management.rs:21:18
5: <async_std::task::builder::SupportTaskLocals<F> as core::future::future::Future>::poll::{{closure}}
at /home/sameh/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/async-std-1.13.1/src/task/builder.rs:199:17
6: async_std::task::task_locals_wrapper::TaskLocalsWrapper::set_current::{{closure}}
at /home/sameh/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/async-std-1.13.1/src/task/task_locals_wrapper.rs:60:13
7: std::thread::local::LocalKey<T>::try_with
at /home/sameh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:310:12
8: std::thread::local::LocalKey<T>::with
at /home/sameh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:274:15
9: async_std::task::task_locals_wrapper::TaskLocalsWrapper::set_current
at /home/sameh/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/async-std-1.13.1/src/task/task_locals_wrapper.rs:55:9
10: <async_std::task::builder::SupportTaskLocals<F> as core::future::future::Future>::poll
at /home/sameh/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/async-std-1.13.1/src/task/builder.rs:197:13
11: <futures_lite::future::Or<F1,F2> as core::future::future::Future>::poll
at /home/sameh/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/futures-lite-2.6.0/src/future.rs:454:33
12: async_executor::State::run::{{closure}}
at /home/sameh/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/async-executor-1.13.2/src/lib.rs:752:32
13: async_executor::Executor::run::{{closure}}
at /home/sameh/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/async-executor-1.13.2/src/lib.rs:343:34
14: async_executor::LocalExecutor::run::{{closure}}
at /home/sameh/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/async-executor-1.13.2/src/lib.rs:647:34
15: async_io::driver::block_on::{{closure}}
at /home/sameh/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/async-io-2.4.0/src/driver.rs:199:37
16: std::thread::local::LocalKey<T>::try_with
at /home/sameh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:310:12
17: std::thread::local::LocalKey<T>::with
at /home/sameh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:274:15
18: async_io::driver::block_on
at /home/sameh/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/async-io-2.4.0/src/driver.rs:175:5
19: async_global_executor::reactor::block_on::{{closure}}
at /home/sameh/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/async-global-executor-2.4.1/src/reactor.rs:3:18
20: async_global_executor::reactor::block_on
at /home/sameh/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/async-global-executor-2.4.1/src/reactor.rs:12:5
21: async_global_executor::executor::block_on::{{closure}}
at /home/sameh/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/async-global-executor-2.4.1/src/executor.rs:26:36
22: std::thread::local::LocalKey<T>::try_with
at /home/sameh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:310:12
23: std::thread::local::LocalKey<T>::with
at /home/sameh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:274:15
24: async_global_executor::executor::block_on
at /home/sameh/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/async-global-executor-2.4.1/src/executor.rs:26:5
25: async_std::task::builder::Builder::blocking::{{closure}}::{{closure}}
at /home/sameh/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/async-std-1.13.1/src/task/builder.rs:171:25
26: async_std::task::task_locals_wrapper::TaskLocalsWrapper::set_current::{{closure}}
at /home/sameh/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/async-std-1.13.1/src/task/task_locals_wrapper.rs:60:13
27: std::thread::local::LocalKey<T>::try_with
at /home/sameh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:310:12
28: std::thread::local::LocalKey<T>::with
at /home/sameh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:274:15
29: async_std::task::task_locals_wrapper::TaskLocalsWrapper::set_current
at /home/sameh/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/async-std-1.13.1/src/task/task_locals_wrapper.rs:55:9
30: async_std::task::builder::Builder::blocking::{{closure}}
at /home/sameh/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/async-std-1.13.1/src/task/builder.rs:168:17
31: std::thread::local::LocalKey<T>::try_with
at /home/sameh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:310:12
32: std::thread::local::LocalKey<T>::with
at /home/sameh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:274:15
33: async_std::task::builder::Builder::blocking
at /home/sameh/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/async-std-1.13.1/src/task/builder.rs:161:9
34: async_std::task::block_on::block_on
at /home/sameh/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/async-std-1.13.1/src/task/block_on.rs:31:5
35: keypair_management::test_keypair_management_and_crypto
at ./tests/keypair_management.rs:9:1
36: keypair_management::test_keypair_management_and_crypto::{{closure}}
at ./tests/keypair_management.rs:9:19
37: core::ops::function::FnOnce::call_once
at /home/sameh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
38: core::ops::function::FnOnce::call_once
at /rustc/05f9846f893b09a1be1fc8560e33fc3c815cfecb/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
test test_keypair_management_and_crypto ... FAILED
failures:
failures:
test_keypair_management_and_crypto
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 32.97s
error: test failed, to rerun pass `-p vault --test keypair_management`