Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove INVALID_CALL from mid-handshake error message #291

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
5 changes: 4 additions & 1 deletion boring/src/ssl/error.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use crate::ffi;
use crate::x509::X509VerifyError;
use libc::c_int;
use std::error;
use std::error::Error as StdError;
Expand Down Expand Up @@ -206,7 +207,9 @@ fn fmt_mid_handshake_error(
}

match s.ssl().verify_result() {
Ok(()) => write!(f, "{}", prefix)?,
// INVALID_CALL is returned if no verification took place,
// such as before a cert is sent.
Ok(()) | Err(X509VerifyError::INVALID_CALL) => write!(f, "{}", prefix)?,
Err(verify) => write!(f, "{}: cert verification failed - {}", prefix, verify)?,
}

Expand Down