diff --git a/rustls-libssl/MATRIX.md b/rustls-libssl/MATRIX.md index 8a0ad77..950adf5 100644 --- a/rustls-libssl/MATRIX.md +++ b/rustls-libssl/MATRIX.md @@ -379,7 +379,7 @@ | `SSL_get_state` | | | :white_check_mark: | | `SSL_get_verify_callback` | | | | | `SSL_get_verify_depth` | | | :white_check_mark: | -| `SSL_get_verify_mode` | | | | +| `SSL_get_verify_mode` | | | :white_check_mark: | | `SSL_get_verify_result` | :white_check_mark: | :white_check_mark: | :white_check_mark: | | `SSL_get_version` | :white_check_mark: | :white_check_mark: | :white_check_mark: | | `SSL_get_wbio` | | :white_check_mark: | :white_check_mark: | diff --git a/rustls-libssl/build.rs b/rustls-libssl/build.rs index 20670c0..3f44ac0 100644 --- a/rustls-libssl/build.rs +++ b/rustls-libssl/build.rs @@ -156,6 +156,7 @@ const ENTRYPOINTS: &[&str] = &[ "SSL_get_SSL_CTX", "SSL_get_state", "SSL_get_verify_depth", + "SSL_get_verify_mode", "SSL_get_verify_result", "SSL_get_version", "SSL_get_wbio", diff --git a/rustls-libssl/src/entry.rs b/rustls-libssl/src/entry.rs index 4a372e6..fe67600 100644 --- a/rustls-libssl/src/entry.rs +++ b/rustls-libssl/src/entry.rs @@ -1362,6 +1362,12 @@ entry! { } } +entry! { + pub fn _SSL_get_verify_mode(ssl: *const SSL) -> c_int { + try_clone_arc!(ssl).get().get_verify_mode().into() + } +} + entry! { pub fn _SSL_set_verify_depth(ssl: *mut SSL, depth: c_int) { try_clone_arc!(ssl).get_mut().set_verify_depth(depth) diff --git a/rustls-libssl/src/lib.rs b/rustls-libssl/src/lib.rs index ccc4046..3a8ede3 100644 --- a/rustls-libssl/src/lib.rs +++ b/rustls-libssl/src/lib.rs @@ -890,6 +890,10 @@ impl Ssl { self.verify_mode = mode; } + fn get_verify_mode(&self) -> VerifyMode { + self.verify_mode + } + fn set_verify_depth(&mut self, depth: c_int) { self.verify_depth = depth; }