fix constant panics when keystore is weird (pt2)

This commit is contained in:
core 2023-08-03 11:35:46 -04:00
parent afbd1d2ba0
commit b60c7a5bb0
Signed by: core
GPG Key ID: FDBF740DADDCEECF
1 changed files with 5 additions and 0 deletions

View File

@ -91,15 +91,18 @@ pub async fn dnclient(
};
let mut valid = false;
let mut valid_key;
if let Some(client_keys) = client_keys {
if client_keys.ed_pub.verify(req.message.as_bytes(), &signature).is_ok() {
valid = true;
valid_key = client_keys;
}
}
if let Some(client_keys_2) = client_keys_2 {
if client_keys_2.ed_pub.verify(req.message.as_bytes(), &signature).is_ok() {
valid = true;
valid_key = client_keys_2;
}
}
@ -114,6 +117,8 @@ pub async fn dnclient(
}]);
}
let client_keys = valid_key;
// Sig OK
// Decode the message from base64