WockyTLSHandler

## WockyTLSHandler WockyTLSHandler |

## Synopsis

                        WockyTLSHandler;
                        WockyTLSHandlerClass;
                        WockyTLSHandlerPrivate;
    void                (*WockyTLSHandlerVerifyAsyncFunc)   (WockyTLSHandler *self,
                                                             WockyTLSSession *tls_session,
                                                             const gchar *peername,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            (*WockyTLSHandlerVerifyFinishFunc)  (WockyTLSHandler *self,
                                                             GAsyncResult *res,
                                                             GError **error);
    WockyTLSHandler *   wocky_tls_handler_new               (gboolean ignore_ssl_errors);
    void                wocky_tls_handler_verify_async      (WockyTLSHandler *self,
                                                             WockyTLSSession *tls_session,
                                                             const gchar *peername,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            wocky_tls_handler_verify_finish     (WockyTLSHandler *self,
                                                             GAsyncResult *result,
                                                             GError **error);
    gboolean            wocky_tls_handler_add_ca            (WockyTLSHandler *self,
                                                             const gchar *path);
    gboolean            wocky_tls_handler_add_crl           (WockyTLSHandler *self,
                                                             const gchar *path);
    GSList *            wocky_tls_handler_get_cas           (WockyTLSHandler *self);
    GSList *            wocky_tls_handler_get_crls          (WockyTLSHandler *self);

## Object Hierarchy

      GObject
       +----WockyTLSHandler

## Properties

      "ignore-ssl-errors"        gboolean              : Read / Write / Construct

## Description

## Details

### WockyTLSHandler

    typedef struct _WockyTLSHandler WockyTLSHandler;

### WockyTLSHandlerClass

    typedef struct {
      WockyTLSHandlerVerifyAsyncFunc verify_async_func;
      WockyTLSHandlerVerifyFinishFunc verify_finish_func;
    } WockyTLSHandlerClass;

The class of a WockyTLSHandler.

WockyTLSHandlerVerifyAsyncFunc `verify_async_func`; | a function to call to start an asychronous verify operation; see `wocky_tls_handler_verify_async()` for more details
WockyTLSHandlerVerifyFinishFunc `verify_finish_func`; | a function to call to finish an asychronous verify operation; see `wocky_tls_handler_verify_finish()` for more details

### WockyTLSHandlerPrivate

    typedef struct _WockyTLSHandlerPrivate WockyTLSHandlerPrivate;

### WockyTLSHandlerVerifyAsyncFunc ()

    void                (*WockyTLSHandlerVerifyAsyncFunc)   (WockyTLSHandler *self,
                                                             WockyTLSSession *tls_session,
                                                             const gchar *peername,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

`self` : |
`tls_session` : |
`peername` : |
`callback` : |
`user_data` : |

### WockyTLSHandlerVerifyFinishFunc ()

    gboolean            (*WockyTLSHandlerVerifyFinishFunc)  (WockyTLSHandler *self,
                                                             GAsyncResult *res,
                                                             GError **error);

`self` : |
`res` : |
`error` : |
Returns : |

### wocky_tls_handler_new ()

    WockyTLSHandler *   wocky_tls_handler_new               (gboolean ignore_ssl_errors);

`ignore_ssl_errors` : |
Returns : |

### wocky_tls_handler_verify_async ()

    void                wocky_tls_handler_verify_async      (WockyTLSHandler *self,
                                                             WockyTLSSession *tls_session,
                                                             const gchar *peername,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

`self` : |
`tls_session` : |
`peername` : |
`callback` : |
`user_data` : |

### wocky_tls_handler_verify_finish ()

    gboolean            wocky_tls_handler_verify_finish     (WockyTLSHandler *self,
                                                             GAsyncResult *result,
                                                             GError **error);

`self` : |
`result` : |
`error` : |
Returns : |

### wocky_tls_handler_add_ca ()

    gboolean            wocky_tls_handler_add_ca            (WockyTLSHandler *self,
                                                             const gchar *path);

Sensible default paths (under Debian derived distributions) are:

* for gnutls: /etc/ssl/certs/ca-certificates.crt * for openssl: /etc/ssl/certs

Certificates my also be found under /usr/share/ca-certificates/... if the user wishes to pick and choose which CAs to use.

`self` : | a WockyTLSHandler instance
`path` : | a path to a directory or file containing PEM encoded CA certificates
Returns : | a gboolean indicating whether the path was resolved. Does not indicate that there was actually a file or directory there or that any CAs were actually found. The CAs won't actually be loaded until just before the TLS session setup is attempted.

### wocky_tls_handler_add_crl ()

    gboolean            wocky_tls_handler_add_crl           (WockyTLSHandler *self,
                                                             const gchar *path);

This function does not descend subdirectories automatically.

`self` : | a WockyTLSHandler instance
`path` : | a path to a directory or file containing PEM encoded CRLs
Returns : | a gboolean indicating whether the path was resolved. Does not indicate that there was actually a file or directory there or that any CRLs were actually found. The CRLs won't actually be loaded until just before the TLS session setup is attempted.

### wocky_tls_handler_get_cas ()

    GSList *            wocky_tls_handler_get_cas           (WockyTLSHandler *self);

`self` : |
Returns : |

### wocky_tls_handler_get_crls ()

    GSList *            wocky_tls_handler_get_crls          (WockyTLSHandler *self);

`self` : |
Returns : |

## Property Details

### The `"ignore-ssl-errors"` property

      "ignore-ssl-errors"        gboolean              : Read / Write / Construct

Whether to ignore recoverable SSL errors (certificate insecurity/expiry etc).

Default value: TRUE