Class TlsBackend

All Implemented Interfaces:
PointerInterface

public class TlsBackend extends Interface
TLS (Transport Layer Security, aka SSL) and DTLS backend.

https://docs.gtk.org/gio/iface.TlsBackend.html

  • Constructor Details

  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • getCertificateType

      public long getCertificateType()
      Gets the #GType of @backend's #GTlsCertificate implementation.
      Returns:
      the #GType of @backend's #GTlsCertificate implementation.
    • getClientConnectionType

      public long getClientConnectionType()
      Gets the #GType of @backend's #GTlsClientConnection implementation.
      Returns:
      the #GType of @backend's #GTlsClientConnection implementation.
    • getDefaultDatabase

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

      public long 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.
    • getDtlsServerConnectionType

      public long 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.
    • getFileDatabaseType

      public long getFileDatabaseType()
      Gets the #GType of @backend's #GTlsFileDatabase implementation.
      Returns:
      the #GType of backend's #GTlsFileDatabase implementation.
    • getServerConnectionType

      public long getServerConnectionType()
      Gets the #GType of @backend's #GTlsServerConnection implementation.
      Returns:
      the #GType of @backend's #GTlsServerConnection implementation.
    • setDefaultDatabase

      public 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
    • supportsDtls

      public 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

      public 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
    • getDefault

      public 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
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()