Skip to content

Commit 29ee4f8

Browse files
committed
Stub out SSL_CTX_set_tmp_dh_callback
This is needed by ubuntu-22 haproxy.
1 parent 81c85de commit 29ee4f8

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

MATRIX.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@
195195
| `SSL_CTX_set_tlsext_max_fragment_length` | | | | |
196196
| `SSL_CTX_set_tlsext_ticket_key_evp_cb` | | | :white_check_mark: | :exclamation: [^stub] |
197197
| `SSL_CTX_set_tlsext_use_srtp` [^srtp] | | | | |
198-
| `SSL_CTX_set_tmp_dh_callback` [^deprecatedin_3_0] [^dh] | | | | |
198+
| `SSL_CTX_set_tmp_dh_callback` [^deprecatedin_3_0] [^dh] | | | | :exclamation: [^stub] |
199199
| `SSL_CTX_set_trust` | | | | |
200200
| `SSL_CTX_set_verify` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
201201
| `SSL_CTX_set_verify_depth` | | :white_check_mark: | | :white_check_mark: |

build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ const ENTRYPOINTS: &[&str] = &[
139139
"SSL_CTX_set_srp_username_callback",
140140
"SSL_CTX_set_timeout",
141141
"SSL_CTX_set_tlsext_ticket_key_evp_cb",
142+
"SSL_CTX_set_tmp_dh_callback",
142143
"SSL_CTX_set_verify",
143144
"SSL_CTX_set_verify_depth",
144145
"SSL_CTX_up_ref",

src/entry.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2462,12 +2462,19 @@ entry_stub! {
24622462
pub fn _SSL_get_srp_userinfo(_ssl: *mut SSL) -> *mut c_char;
24632463
}
24642464

2465-
// no DH ciphersuites
2465+
// no DH ciphersuites or DH KX reuse
24662466

24672467
entry_stub! {
24682468
pub fn _SSL_CTX_set0_tmp_dh_pkey(_ctx: *mut SSL_CTX, _dhpkey: *mut EVP_PKEY) -> c_int;
24692469
}
24702470

2471+
entry_stub! {
2472+
pub fn _SSL_CTX_set_tmp_dh_callback(_ctx: *mut SSL_CTX, _dh: SSL_CTX_tmp_dh_callback);
2473+
}
2474+
2475+
type SSL_CTX_tmp_dh_callback =
2476+
Option<unsafe extern "C" fn(ssl: *mut SSL, is_export: c_int, keylength: c_int) -> *mut c_void>;
2477+
24712478
// no post-handshake auth
24722479

24732480
entry_stub! {

0 commit comments

Comments
 (0)