Explain why provenance is untrusted, when it is.
(&self)
| 118 | impl BindingTrustEvaluation { |
| 119 | /// Explain why provenance is untrusted, when it is. |
| 120 | pub fn untrusted_reason(&self) -> Option<UntrustedReason> { |
| 121 | if self.provenance_trusted() { |
| 122 | return None; |
| 123 | } |
| 124 | if !self.signature_valid { |
| 125 | return Some(UntrustedReason::SignatureInvalid); |
| 126 | } |
| 127 | match self.signer_trust { |
| 128 | SignerTrust::Revoked => Some(UntrustedReason::SignerRevoked), |
| 129 | SignerTrust::Unknown => Some(UntrustedReason::SignerUnknown), |
| 130 | SignerTrust::Trusted => Some(UntrustedReason::ContentUnverified), |
| 131 | } |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | #[cfg(test)] |
nothing calls this directly
no test coverage detected