InfGtkCertificateDialog

InfGtkCertificateDialog — A dialog warning the user about a server's certificate

Stability Level

Unstable, unless otherwise indicated

Synopsis

#include <libinfgtk/inf-gtk-certificate-dialog.h>

                    InfGtkCertificateDialog;
struct              InfGtkCertificateDialogClass;
enum                InfGtkCertificateDialogFlags;
InfGtkCertificateDialog * inf_gtk_certificate_dialog_new
                                                        (GtkWindow *parent,
                                                         GtkDialogFlags dialog_flags,
                                                         InfGtkCertificateDialogFlags certificate_flags,
                                                         const gchar *hostname,
                                                         InfCertificateChain *certificate_chain);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBin
                                 +----GtkWindow
                                       +----GtkDialog
                                             +----InfGtkCertificateDialog
  GFlags
   +----InfGtkCertificateDialogFlags

Implemented Interfaces

InfGtkCertificateDialog implements AtkImplementorIface and GtkBuildable.

Properties

  "certificate-chain"        InfCertificateChain*  : Read / Write
  "certificate-flags"        InfGtkCertificateDialogFlags  : Read / Write
  "hostname"                 gchar*                : Read / Write

Description

InfGtkCertificateDialog is a dialog that can be shown to a user if the validation of the server's certificate fails. The dialog will present to the user the reason(s) of the validation failure and might ask whether to fully establish the connection to the server or not.

Details

InfGtkCertificateDialog

typedef struct _InfGtkCertificateDialog InfGtkCertificateDialog;

InfGtkCertificateDialog is an opaque data type. You should only access it via the public API functions.


struct InfGtkCertificateDialogClass

struct InfGtkCertificateDialogClass {
};

This structure does not contain any public fields.


enum InfGtkCertificateDialogFlags

typedef enum {
  INF_GTK_CERTIFICATE_DIALOG_CERT_HOSTNAME_MISMATCH  = 1 << 0,
  INF_GTK_CERTIFICATE_DIALOG_CERT_ISSUER_NOT_KNOWN   = 1 << 1,
  INF_GTK_CERTIFICATE_DIALOG_CERT_UNEXPECTED         = 1 << 2,
  INF_GTK_CERTIFICATE_DIALOG_CERT_OLD_EXPIRED        = 1 << 3
} InfGtkCertificateDialogFlags;

Various flags for why a certificate is not trusted. InfGtkCertificateDialog uses this information to show a corresponding warning message to the user.

INF_GTK_CERTIFICATE_DIALOG_CERT_HOSTNAME_MISMATCH

The hostname of the machine connected to does not match the one from the certificate.

INF_GTK_CERTIFICATE_DIALOG_CERT_ISSUER_NOT_KNOWN

The issuer of the certificate is not trusted, i.e. is not in the list of trusted CAs.

INF_GTK_CERTIFICATE_DIALOG_CERT_UNEXPECTED

For this host we expected a different certificate. Maybe someone is eavesdropping on the connection.

INF_GTK_CERTIFICATE_DIALOG_CERT_OLD_EXPIRED

If set, the previously pinned certificate has expired.

inf_gtk_certificate_dialog_new ()

InfGtkCertificateDialog * inf_gtk_certificate_dialog_new
                                                        (GtkWindow *parent,
                                                         GtkDialogFlags dialog_flags,
                                                         InfGtkCertificateDialogFlags certificate_flags,
                                                         const gchar *hostname,
                                                         InfCertificateChain *certificate_chain);

Creates a new InfGtkCertificateDialog. A InfGtkCertificateDialog shows warnings about a server's certificate to a user, for example when the issuer is not trusted or the certificate is expired.

parent :

Parent GtkWindow of the dialog.

dialog_flags :

Flags for the dialog, see GtkDialogFlags.

certificate_flags :

What certificate warnings to show, see InfGtkCertificateDialogFlags.

hostname :

The host name of the server that provides the certificate.

certificate_chain :

The certificate chain provided by the server.

Returns :

A New InfGtkCertificateDialog.

Property Details

The "certificate-chain" property

  "certificate-chain"        InfCertificateChain*  : Read / Write

The certificate chain to show in the dialog.


The "certificate-flags" property

  "certificate-flags"        InfGtkCertificateDialogFlags  : Read / Write

What warnings about the certificate to display.


The "hostname" property

  "hostname"                 gchar*                : Read / Write

Host name of the server from which the certificate is.

Default value: NULL