mirror of
				https://github.com/pcvolkmer/cert-tools.git
				synced 2025-10-29 20:36:11 +00:00 
			
		
		
		
	fix: only the last cert can have an empty authority key
This commit is contained in:
		| @@ -317,7 +317,11 @@ impl Chain { | |||||||
|     pub fn is_valid(&self) -> bool { |     pub fn is_valid(&self) -> bool { | ||||||
|         let mut x: Option<PKey<Public>> = None; |         let mut x: Option<PKey<Public>> = None; | ||||||
|         let mut time_issue = false; |         let mut time_issue = false; | ||||||
|         for cert in self.certs.iter().rev() { |  | ||||||
|  |         for (idx, cert) in self.certs.iter().rev().enumerate() { | ||||||
|  |             if cert.authority_key_id().to_string() == "*Empty*" && idx > 0 { | ||||||
|  |                 return false; | ||||||
|  |             } | ||||||
|             if !cert.within_timerange(&SystemTime::now()) { |             if !cert.within_timerange(&SystemTime::now()) { | ||||||
|                 time_issue = true; |                 time_issue = true; | ||||||
|             } |             } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user