Skip to content

Commit 95e92fe

Browse files
committed
Fix ssl.enum_certificates
1 parent 6281f9c commit 95e92fe

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

vm/src/stdlib/ssl.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,8 @@ fn ssl_enum_certificates(store_name: PyStringRef, vm: &VirtualMachine) -> PyResu
172172
let open_fns = [CertStore::open_current_user, CertStore::open_local_machine];
173173
let stores = open_fns
174174
.iter()
175-
.map(|open| open(store_name.as_str()))
176-
.collect::<Result<Vec<_>, _>>()
177-
.map_err(|e| super::os::convert_io_error(vm, e))?;
175+
.filter_map(|open| open(store_name.as_str()).ok())
176+
.collect::<Vec<_>>();
178177
let certs = stores.iter().map(|s| s.certs()).flatten().map(|c| {
179178
let cert = vm.ctx.new_bytes(c.to_der().to_owned());
180179
let enc_type = unsafe {

0 commit comments

Comments
 (0)