Skip to content

Commit fd93eb4

Browse files
fixup! feat(e2ei): add PkiEnvironment.fetch_crls()
1 parent aeef9e7 commit fd93eb4

File tree

1 file changed

+4
-3
lines changed
  • e2e-identity/src/pki_env

1 file changed

+4
-3
lines changed

e2e-identity/src/pki_env/crl.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
use std::collections::{HashMap, HashSet};
1+
use std::collections::HashMap;
22

33
use super::{Error, Result};
44
use crate::pki_env::{PkiEnvironment, hooks::HttpMethod};
55

66
impl PkiEnvironment {
77
/// Fetch certificate revocation lists from the given URIs, return a map from the URLs to a DER-encoded certificate
88
/// list.
9-
pub async fn fetch_crls(&self, uris: HashSet<String>) -> Result<HashMap<String, Vec<u8>>> {
10-
let mut crls = HashMap::with_capacity(uris.len());
9+
pub async fn fetch_crls(&self, uris: impl Iterator<Item = &str>) -> Result<HashMap<String, Vec<u8>>> {
10+
let mut crls = HashMap::with_capacity(uris.size_hint().0);
1111

1212
for uri in uris {
13+
let uri = uri.to_owned();
1314
let response = self
1415
.hooks
1516
.http_request(HttpMethod::Get, uri.clone(), vec![], vec![])

0 commit comments

Comments
 (0)