Apply the input lints to all certs.

- Fixes ebef0cf9eed674a07ee32339935e5436036a4fad.

  - See #501.
This commit is contained in:
Justus Winter 2024-12-12 13:19:43 +01:00
parent ca3b953bd3
commit f7eade37c8
No known key found for this signature in database
GPG Key ID: 686F55B4AB2B3386

View File

@ -170,7 +170,7 @@ pub fn authenticate<'store, 'rstore>(
.into_iter()
.map(|fpr| (fpr, UserID::from(userid)))
.collect();
} else if let Some(certs) = certs {
} else if let Some(certs) = &certs {
// List all certs.
t!("Authenticating given certs");
bindings = certs.iter().flat_map(|cert| {
@ -273,7 +273,7 @@ pub fn authenticate<'store, 'rstore>(
// We didn't show anything. Try to figure out what was wrong.
if lint_input {
// See if the target certificate exists.
if let Some(cert) = certificate {
for cert in certificate.iter().cloned().chain(certs.iter().flatten()) {
match cert.with_policy(sq.policy, sq.time) {
Ok(vc) => {
// The certificate is valid under the current