pub fn verify_certificate(&self) -> Result<(), Error> {
        eprintln!("Verifying certificate...");

        let status =
            CertNonceStatus::from_str(&self.env.cert_nonce_status.clone().unwrap_or_default())?;
        match status {
            // If we receive "OK", the certificate is verified using GPG.
            CertNonceStatus::OK => return Ok(()),
            // Received an invalid certificate status
            CertNonceStatus::UNKNOWN => {
                eprintln!("Invalid request, please sign push, i.e. `git push --sign ...`");
            }
            CertNonceStatus::SLOP => {
                eprintln!("Received `SLOP` certificate status, please re-submit signed push to request new certificate");
            }
            _ => {
                eprintln!("Received invalid certificate nonce status: {:?}", status);
            }
        }

        Err(Error::FailedCertificateVerification)
    }
/// This method will succeed iff the cert status is "OK"
This method will succeed iff the cert status is "OK"
This method will succeed iff the cert status is " OK "
pub fn verify_certificate(&self) -> Result<(), Error> {
        eprintln!("Verifying certificate...");
        let status =
            CertNonceStatus::from_str(&self.env.cert_nonce_status.clone().unwrap_or_default())?;
        match status {
            // If we receive "OK", the certificate is verified using GPG.
            CertNonceStatus::OK => return Ok(()),
            // Received an invalid certificate status
            CertNonceStatus::UNKNOWN => {
                eprintln!("Invalid request, please sign push, i.e. `git push --sign ...`");
            }
            CertNonceStatus::SLOP => {
                eprintln!("Received `SLOP` certificate status, please re-submit signed push to request new certificate");
            }
            _ => {
                eprintln!("Received invalid certificate nonce status: {:?}", status);
            }
        }
        Err(Error::FailedCertificateVerification)
    }
pub fn verify_certificate ( & self ) -> Result < ( ) , Error > { eprintln ! ( " " ) ; let status = CertNonceStatus :: from_str ( & self . env . cert_nonce_status . clone ( ) . unwrap_or_default ( ) ) ? ; match status { // If we receive "OK", the certificate is verified using GPG. CertNonceStatus :: OK => return Ok ( ( ) ) , // Received an invalid certificate status CertNonceStatus :: UNKNOWN => { eprintln ! ( " " ) ; } CertNonceStatus :: SLOP => { eprintln ! ( " " ) ; } _ => { eprintln ! ( " " status ) ; } } Err ( Error :: FailedCertificateVerification ) }
This method will succeed iff the cert status is "OK"
This method will succeed iff the cert status is " OK "
&self
&self