Skip to content

Commit fcb0c28

Browse files
committed
SSL_SESSION_get0_hostname: stub that returns null
Due to CVE-2025-23419 fedora's nginx now calls this to learn the session's original SNI value. For more faithful keeping with the OpenSSL API, we could also store this for TLS1.2 and return it here, but we don't do that currently so pretend there is no SNI for TLS1.2 sessions.
1 parent 36b2813 commit fcb0c28

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ const ENTRYPOINTS: &[&str] = &[
178178
"SSL_select_next_proto",
179179
"SSL_sendfile",
180180
"SSL_SESSION_free",
181+
"SSL_SESSION_get0_hostname",
181182
"SSL_SESSION_get_id",
182183
"SSL_SESSION_get_time",
183184
"SSL_SESSION_get_timeout",

src/entry.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1702,6 +1702,12 @@ entry! {
17021702
}
17031703
}
17041704

1705+
entry! {
1706+
pub fn _SSL_SESSION_get0_hostname(_sess: *const SSL_SESSION) -> *const c_char {
1707+
ptr::null()
1708+
}
1709+
}
1710+
17051711
entry! {
17061712
pub fn _d2i_SSL_SESSION(
17071713
a: *mut *mut SSL_SESSION,

0 commit comments

Comments
 (0)