Trait gio::prelude::TlsConnectionExtManual
source · pub trait TlsConnectionExtManual: Sealed + IsA<TlsConnection> {
// Provided methods
fn channel_binding_data(
&self,
type_: TlsChannelBindingType
) -> Result<ByteArray, Error> { ... }
fn set_advertised_protocols(&self, protocols: impl IntoStrV) { ... }
}
Provided Methods§
sourcefn channel_binding_data(
&self,
type_: TlsChannelBindingType
) -> Result<ByteArray, Error>
fn channel_binding_data( &self, type_: TlsChannelBindingType ) -> Result<ByteArray, Error>
v2_66
only.Query the TLS backend for TLS channel binding data of type_
for self
.
This call retrieves TLS channel binding data as specified in RFC
5056, RFC
5929, and related RFCs. The
binding data is returned in data
. The data
is resized by the callee
using glib::ByteArray
buffer management and will be freed when the data
is destroyed by g_byte_array_unref()
. If data
is None
, it will only
check whether TLS backend is able to fetch the data (e.g. whether type_
is supported by the TLS backend). It does not guarantee that the data
will be available though. That could happen if TLS connection does not
support type_
or the binding data is not available yet due to additional
negotiation or input required.
type_
TlsChannelBindingType
type of data to fetch
Returns
true
on success, false
otherwise
data
glib::ByteArray
is
filled with the binding data, or None
sourcefn set_advertised_protocols(&self, protocols: impl IntoStrV)
fn set_advertised_protocols(&self, protocols: impl IntoStrV)
v2_60
only.Sets the list of application-layer protocols to advertise that the
caller is willing to speak on this connection. The
Application-Layer Protocol Negotiation (ALPN) extension will be
used to negotiate a compatible protocol with the peer; use
TlsConnectionExt::negotiated_protocol()
to find the negotiated
protocol after the handshake. Specifying None
for the the value
of protocols
will disable ALPN negotiation.
See IANA TLS ALPN Protocol IDs for a list of registered protocol IDs.
protocols
a None
-terminated
array of ALPN protocol names (eg, “http/1.1”, “h2”), or None