Don't forget to check the credential against the seen list

This commit is contained in:
Ian Goldberg 2021-04-30 16:44:53 -04:00
parent 83b12ff6f6
commit 7f07951668
1 changed files with 7 additions and 0 deletions

View File

@ -41,6 +41,7 @@ use zkp::ProofError;
use zkp::Transcript;
use super::cred;
use super::dup_filter::SeenType;
use super::{BridgeAuth, IssuerPubKey};
use super::{CMZ_A, CMZ_A_TABLE, CMZ_B, CMZ_B_TABLE};
@ -387,6 +388,12 @@ impl BridgeAuth {
},
)?;
// Ensure the id has not been seen before, and add it to the
// seen list.
if self.id_filter.filter(&req.id) == SeenType::Seen {
return Err(ProofError::VerificationFailure);
}
// Blind issuing of the new Lox credential
// Choose a random server id component to add to the client's