Merge branch 'develop' into large-blobs

This commit is contained in:
kaczmarczyck
2021-01-25 18:20:01 +01:00
committed by GitHub

View File

@@ -271,11 +271,11 @@ impl PersistentStore {
/// Returns the number of credentials. /// Returns the number of credentials.
pub fn count_credentials(&self) -> Result<usize, Ctap2StatusCode> { pub fn count_credentials(&self) -> Result<usize, Ctap2StatusCode> {
let mut iter_result = Ok(()); let mut count = 0;
let iter = self.iter_credentials(&mut iter_result)?; for handle in self.store.iter()? {
let result = iter.count(); count += key::CREDENTIALS.contains(&handle?.get_key()) as usize;
iter_result?; }
Ok(result) Ok(count)
} }
/// Returns the estimated number of credentials that can still be stored. /// Returns the estimated number of credentials that can still be stored.