Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions app/src/autoupdate/linux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,26 @@ fn is_pacman_signing_key_installed() -> bool {
return false;
};

// After parsing the pub: line, also check validity field (index 1 = validity)
let fields: Vec<&str> = stdout
.lines()
.find(|line| line.starts_with("pub:"))
.map(|line| line.split(':').collect())
.unwrap_or_default();

// Field index 1 = validity: 'f' (full), 'u' (ultimate) are valid;
// 'e' (expired), 'r' (revoked), '-', 'q' = invalid
let validity = fields
.get(1)
.and_then(|field| field.chars().next())
.unwrap_or('\0');
Comment thread
Naveen-Boddepalli marked this conversation as resolved.
if !matches!(validity, 'f' | 'u') {
return false; // Force key reconfiguration
}
if !matches!(validity, 'f' | 'u') {
return false; // Force key reconfiguration
}

// Parse the expiry timestamp from the pub: line (field 7, 1-indexed).
let Some(expiry_field) = stdout
.lines()
Expand Down