Package org.gnome.gio
Interface TlsBackend
- All Superinterfaces:
Proxy
- All Known Implementing Classes:
TlsBackend.TlsBackendImpl
TLS (Transport Layer Security, aka SSL) and DTLS backend. This is an
internal type used to coordinate the different classes implemented
by a TLS backend.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
The TlsBackendImpl type represents a native instance of the TlsBackend interface.static class
Provides an interface for describing TLS-related types. -
Method Summary
Modifier and TypeMethodDescriptiondefault Type
Gets theGType
of this TlsBackend'sGTlsCertificate
implementation.default Type
Gets theGType
of this TlsBackend'sGTlsClientConnection
implementation.static TlsBackend
Gets the defaultGTlsBackend
for the system.default TlsDatabase
Gets the defaultGTlsDatabase
used to verify TLS connections.default Type
Gets theGType
of this TlsBackend’sGDtlsClientConnection
implementation.default Type
Gets theGType
of this TlsBackend’sGDtlsServerConnection
implementation.default Type
Gets theGType
of this TlsBackend'sGTlsFileDatabase
implementation.default Type
Gets theGType
of this TlsBackend'sGTlsServerConnection
implementation.static Type
getType()
Get the GType of the TlsBackend classdefault void
setDefaultDatabase
(@Nullable TlsDatabase database) Set the defaultGTlsDatabase
used to verify TLS connectionsdefault boolean
Checks if DTLS is supported.default boolean
Checks if TLS is supported; if this returnsfalse
for the defaultGTlsBackend
, it means no "real" TLS backend is available.
-
Method Details
-
getType
-
getDefault
Gets the defaultGTlsBackend
for the system.- Returns:
- a
GTlsBackend
, which will be a dummy object if no TLS backend is available
-
getCertificateType
Gets theGType
of this TlsBackend'sGTlsCertificate
implementation.- Returns:
- the
GType
of this TlsBackend'sGTlsCertificate
implementation.
-
getClientConnectionType
Gets theGType
of this TlsBackend'sGTlsClientConnection
implementation.- Returns:
- the
GType
of this TlsBackend'sGTlsClientConnection
implementation.
-
getDefaultDatabase
Gets the defaultGTlsDatabase
used to verify TLS connections.- Returns:
- the default database, which should be unreffed when done.
-
getDtlsClientConnectionType
Gets theGType
of this TlsBackend’sGDtlsClientConnection
implementation.- Returns:
- the
GType
of this TlsBackend’sGDtlsClientConnection
implementation, orG_TYPE_INVALID
if this backend doesn’t support DTLS.
-
getDtlsServerConnectionType
Gets theGType
of this TlsBackend’sGDtlsServerConnection
implementation.- Returns:
- the
GType
of this TlsBackend’sGDtlsServerConnection
implementation, orG_TYPE_INVALID
if this backend doesn’t support DTLS.
-
getFileDatabaseType
Gets theGType
of this TlsBackend'sGTlsFileDatabase
implementation.- Returns:
- the
GType
of backend'sGTlsFileDatabase
implementation.
-
getServerConnectionType
Gets theGType
of this TlsBackend'sGTlsServerConnection
implementation.- Returns:
- the
GType
of this TlsBackend'sGTlsServerConnection
implementation.
-
setDefaultDatabase
Set the defaultGTlsDatabase
used to verify TLS connectionsAny subsequent call to g_tls_backend_get_default_database() will return the database set in this call. Existing databases and connections are not modified.
Setting a
null
default database will reset to using the system default database as if g_tls_backend_set_default_database() had never been called.- Parameters:
database
- theGTlsDatabase
-
supportsDtls
default boolean supportsDtls()Checks if DTLS is supported. DTLS support may not be available even if TLS support is available, and vice-versa.- Returns:
- whether DTLS is supported
-
supportsTls
default boolean supportsTls()Checks if TLS is supported; if this returnsfalse
for the defaultGTlsBackend
, it means no "real" TLS backend is available.- Returns:
- whether or not TLS is supported
-