Interface TlsBackend

All Superinterfaces:
Proxy
All Known Implementing Classes:
TlsBackend.TlsBackend$Impl

@Generated("org.javagi.JavaGI") public interface TlsBackend extends Proxy
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.
Since:
2.28
  • Method Details

    • getType

      static @Nullable Type getType()
      Get the GType of the TlsBackend class.
      Returns:
      the GType
    • getDefault

      static TlsBackend getDefault()
      Gets the default GTlsBackend for the system.
      Returns:
      a GTlsBackend, which will be a dummy object if no TLS backend is available
      Since:
      2.28
    • getCertificateType

      default Type getCertificateType()
      Gets the GType of backend's GTlsCertificate implementation.
      Returns:
      the GType of backend's GTlsCertificate implementation.
      Since:
      2.28
    • getClientConnectionType

      default Type getClientConnectionType()
      Gets the GType of backend's GTlsClientConnection implementation.
      Returns:
      the GType of backend's GTlsClientConnection implementation.
      Since:
      2.28
    • getDefaultDatabase

      default TlsDatabase getDefaultDatabase()
      Gets the default GTlsDatabase used to verify TLS connections.
      Returns:
      the default database, which should be unreffed when done.
      Since:
      2.30
    • getDtlsClientConnectionType

      default Type getDtlsClientConnectionType()
      Gets the GType of backend’s GDtlsClientConnection implementation.
      Returns:
      the GType of backend’s GDtlsClientConnection implementation, or G_TYPE_INVALID if this backend doesn’t support DTLS.
      Since:
      2.48
    • getDtlsServerConnectionType

      default Type getDtlsServerConnectionType()
      Gets the GType of backend’s GDtlsServerConnection implementation.
      Returns:
      the GType of backend’s GDtlsServerConnection implementation, or G_TYPE_INVALID if this backend doesn’t support DTLS.
      Since:
      2.48
    • getFileDatabaseType

      default Type getFileDatabaseType()
      Gets the GType of backend's GTlsFileDatabase implementation.
      Returns:
      the GType of backend's GTlsFileDatabase implementation.
      Since:
      2.30
    • getServerConnectionType

      default Type getServerConnectionType()
      Gets the GType of backend's GTlsServerConnection implementation.
      Returns:
      the GType of backend's GTlsServerConnection implementation.
      Since:
      2.28
    • setDefaultDatabase

      default void setDefaultDatabase(@Nullable TlsDatabase database)

      Set the default GTlsDatabase used to verify TLS connections

      Any 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 - the GTlsDatabase
      Since:
      2.60
    • 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
      Since:
      2.48
    • supportsTls

      default boolean supportsTls()
      Checks if TLS is supported; if this returns false for the default GTlsBackend, it means no "real" TLS backend is available.
      Returns:
      whether or not TLS is supported
      Since:
      2.28