Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: TlsBackend

[13:7] extends: object

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.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • TlsBackend (Handle = null)

    Creates a new TlsBackend by wrapping a native handle or another wrapper.

    • @p Handle is the native handle or another wrapper whose handle to adopt.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • get_default_database ()

    Gets the default #GTlsDatabase used to verify TLS connections.

  • set_default_database (object 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.

    • @p database is the #GTlsDatabase.
    • @r None.
  • supports_dtls ()

    Checks if DTLS is supported. DTLS support may not be available even if TLS support is available, and vice-versa.

  • supports_tls ()

    Checks if TLS is supported; if this returns %FALSE for the default #GTlsBackend, it means no "real" TLS backend is available.