From eca5c2fd447acebd518ab6f8c0f2124fe79e09f4 Mon Sep 17 00:00:00 2001 From: Emii Tatsuo Date: Sat, 28 Nov 2020 14:23:39 -0500 Subject: [PATCH] Add a couple logging messages --- src/user_management/user.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/user_management/user.rs b/src/user_management/user.rs index d3c333e..0b96f77 100644 --- a/src/user_management/user.rs +++ b/src/user_management/user.rs @@ -116,6 +116,8 @@ impl NotSignedInUser { if self.manager.users.contains_key(username.as_str())? { Err(super::UserManagerError::UsernameNotUnique) } else { + info!("User {} registered!", username); + let mut newser = RegisteredUser::new( username, Some(self.certificate.clone()), @@ -177,6 +179,8 @@ impl NotSignedInUser { } } + let certhash = UserManager::hash_certificate(&self.certificate); + info!("User {} attached certificate with hash {:x}", username, certhash); user.add_certificate(self.certificate.clone())?; user.active_certificate = Some(self.certificate); Ok(Some(user))