Skip to content
Merged
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
14 changes: 14 additions & 0 deletions boring/src/ssl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1779,6 +1779,20 @@ impl ClientHello {
Some(slice::from_raw_parts(ptr, len))
}
}

fn ssl(&self) -> &SslRef {
unsafe { SslRef::from_ptr(self.0.ssl) }
}

/// Returns the servername sent by the client via Server Name Indication (SNI).
pub fn servername(&self, type_: NameType) -> Option<&str> {
self.ssl().servername(type_)
}

/// Returns a string describing the protocol version of the session.
pub fn version_str(&self) -> &'static str {
self.ssl().version_str()
}
}

/// Information about a cipher.
Expand Down