summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/utils/tcp_connection/src/instance_challenge.rs16
-rw-r--r--crates/vcs_actions/src/registry/client_registry.rs12
-rw-r--r--crates/vcs_actions/src/registry/server_registry.rs11
3 files changed, 34 insertions, 5 deletions
diff --git a/crates/utils/tcp_connection/src/instance_challenge.rs b/crates/utils/tcp_connection/src/instance_challenge.rs
index c4ea6a8..3a7f6a3 100644
--- a/crates/utils/tcp_connection/src/instance_challenge.rs
+++ b/crates/utils/tcp_connection/src/instance_challenge.rs
@@ -132,7 +132,21 @@ impl ConnectionInstance {
self.stream.read_exact(&mut challenge).await?;
// Load private key
- let private_key_pem = tokio::fs::read_to_string(&private_key_file).await?;
+ let private_key_pem = tokio::fs::read_to_string(&private_key_file)
+ .await
+ .map_err(|e| {
+ TcpTargetError::NotFound(format!(
+ "Read private key \"{}\" failed: \"{}\"",
+ private_key_file
+ .as_ref()
+ .display()
+ .to_string()
+ .split("/")
+ .last()
+ .unwrap_or("UNKNOWN"),
+ e
+ ))
+ })?;
// Sign the challenge with supported key types
let signature = if let Ok(rsa_key) = RsaPrivateKey::from_pkcs1_pem(&private_key_pem) {
diff --git a/crates/vcs_actions/src/registry/client_registry.rs b/crates/vcs_actions/src/registry/client_registry.rs
index c7d6eb9..a0b87a6 100644
--- a/crates/vcs_actions/src/registry/client_registry.rs
+++ b/crates/vcs_actions/src/registry/client_registry.rs
@@ -9,16 +9,24 @@ use vcs_data::data::{
};
use crate::{
- actions::local_actions::{
- register_set_upstream_vault_action, register_update_to_latest_info_action,
+ actions::{
+ local_actions::{
+ register_set_upstream_vault_action, register_update_to_latest_info_action,
+ },
+ sheet_actions::register_make_sheet_action,
},
connection::protocol::RemoteActionInvoke,
};
fn register_actions(pool: &mut ActionPool) {
// Pool register here
+
+ // Local Actions
register_set_upstream_vault_action(pool);
register_update_to_latest_info_action(pool);
+
+ // Sheet Actions
+ register_make_sheet_action(pool);
}
pub fn client_action_pool() -> ActionPool {
diff --git a/crates/vcs_actions/src/registry/server_registry.rs b/crates/vcs_actions/src/registry/server_registry.rs
index 3b6ab17..eade391 100644
--- a/crates/vcs_actions/src/registry/server_registry.rs
+++ b/crates/vcs_actions/src/registry/server_registry.rs
@@ -1,12 +1,19 @@
use action_system::action_pool::ActionPool;
-use crate::actions::local_actions::{
- register_set_upstream_vault_action, register_update_to_latest_info_action,
+use crate::actions::{
+ local_actions::{register_set_upstream_vault_action, register_update_to_latest_info_action},
+ sheet_actions::register_make_sheet_action,
};
pub fn server_action_pool() -> ActionPool {
let mut pool = ActionPool::new();
+
+ // Local Actions
register_set_upstream_vault_action(&mut pool);
register_update_to_latest_info_action(&mut pool);
+
+ // Sheet Actions
+ register_make_sheet_action(&mut pool);
+
pool
}