summaryrefslogtreecommitdiff
path: root/lib/includes/gnutls/xssl.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/includes/gnutls/xssl.h')
-rw-r--r--lib/includes/gnutls/xssl.h116
1 files changed, 54 insertions, 62 deletions
diff --git a/lib/includes/gnutls/xssl.h b/lib/includes/gnutls/xssl.h
index 0afe88dc26..578eca6e08 100644
--- a/lib/includes/gnutls/xssl.h
+++ b/lib/includes/gnutls/xssl.h
@@ -27,95 +27,87 @@
typedef struct xssl_st *xssl_t;
typedef struct xssl_cred_st *xssl_cred_t;
-ssize_t xssl_printf (xssl_t sb, const char *fmt, ...)
+ssize_t xssl_printf(xssl_t sb, const char *fmt, ...)
#ifdef __GNUC__
- __attribute__ ((format (printf, 2, 3)))
+ __attribute__ ((format(printf, 2, 3)))
#endif
-;
+ ;
-ssize_t xssl_write (xssl_t sb, const void *data,
- size_t data_size);
+ssize_t xssl_write(xssl_t sb, const void *data, size_t data_size);
-ssize_t xssl_flush (xssl_t sb);
+ssize_t xssl_flush(xssl_t sb);
-ssize_t xssl_read(xssl_t sb, void* data, size_t data_size);
+ssize_t xssl_read(xssl_t sb, void *data, size_t data_size);
ssize_t
-xssl_getdelim (xssl_t sbuf, char **lineptr, size_t *n, int delimiter);
+xssl_getdelim(xssl_t sbuf, char **lineptr, size_t * n, int delimiter);
#define xssl_getline(sbuf, ptr, n) xssl_getdelim(sbuf, ptr, n, '\n')
void xssl_deinit(xssl_t sb);
#define GNUTLS_SBUF_WRITE_FLUSHES (1<<0)
-int xssl_sinit (xssl_t * isb, gnutls_session_t session,
- unsigned int flags);
+int xssl_sinit(xssl_t * isb, gnutls_session_t session, unsigned int flags);
gnutls_session_t xssl_get_session(xssl_t sb);
-int xssl_client_init (xssl_t * isb, const char* hostname,
- const char* service,
- gnutls_transport_ptr fd,
- const char* priority, xssl_cred_t cred,
- unsigned int *status,
- unsigned int flags);
+int xssl_client_init(xssl_t * isb, const char *hostname,
+ const char *service,
+ gnutls_transport_ptr fd,
+ const char *priority, xssl_cred_t cred,
+ unsigned int *status, unsigned int flags);
-int xssl_server_init (xssl_t * isb,
- gnutls_transport_ptr fd,
- const char* priority, xssl_cred_t cred,
- unsigned int *status,
- unsigned int flags);
+int xssl_server_init(xssl_t * isb,
+ gnutls_transport_ptr fd,
+ const char *priority, xssl_cred_t cred,
+ unsigned int *status, unsigned int flags);
/* High level credential structures */
-typedef enum
-{
- GNUTLS_VMETHOD_NO_AUTH = 0,
- GNUTLS_VMETHOD_TOFU = 1<<0,
- GNUTLS_VMETHOD_GIVEN_CAS = 1<<1,
- GNUTLS_VMETHOD_SYSTEM_CAS = 1<<2
+typedef enum {
+ GNUTLS_VMETHOD_NO_AUTH = 0,
+ GNUTLS_VMETHOD_TOFU = 1 << 0,
+ GNUTLS_VMETHOD_GIVEN_CAS = 1 << 1,
+ GNUTLS_VMETHOD_SYSTEM_CAS = 1 << 2
} gnutls_vmethod_t;
-typedef enum
-{
- GNUTLS_CINPUT_TYPE_FILE = 0,
- GNUTLS_CINPUT_TYPE_MEM = 1,
- GNUTLS_CINPUT_TYPE_PIN_FUNC = 2,
+typedef enum {
+ GNUTLS_CINPUT_TYPE_FILE = 0,
+ GNUTLS_CINPUT_TYPE_MEM = 1,
+ GNUTLS_CINPUT_TYPE_PIN_FUNC = 2,
} gnutls_cinput_type_t;
-typedef enum
-{
- GNUTLS_CINPUT_CAS = 1, /* i1 contains the CAs */
- GNUTLS_CINPUT_CRLS = 2,/* i1 contains the CRLs */
- GNUTLS_CINPUT_TOFU_DB = 3, /* i1 contains the DB filename */
- GNUTLS_CINPUT_KEYPAIR = 4, /* i1 contains the certificate, i2 the key
- * or i1.pin_fn contains the pin function,
- * and i2.udata the user pointer */
+typedef enum {
+ GNUTLS_CINPUT_CAS = 1, /* i1 contains the CAs */
+ GNUTLS_CINPUT_CRLS = 2, /* i1 contains the CRLs */
+ GNUTLS_CINPUT_TOFU_DB = 3, /* i1 contains the DB filename */
+ GNUTLS_CINPUT_KEYPAIR = 4, /* i1 contains the certificate, i2 the key
+ * or i1.pin_fn contains the pin function,
+ * and i2.udata the user pointer */
} gnutls_cinput_contents_t;
typedef struct gnutls_cinput_st {
- gnutls_cinput_type_t type;
- gnutls_cinput_contents_t contents;
- gnutls_x509_crt_fmt_t fmt; /* if applicable */
-
- union {
- gnutls_pin_callback_t pin_fn;
- const char* file;
- gnutls_datum_t mem;
- } i1;
-
- union {
- void* udata;
- const char* file;
- gnutls_datum_t mem;
- } i2;
-
- unsigned long future_pad[8];
+ gnutls_cinput_type_t type;
+ gnutls_cinput_contents_t contents;
+ gnutls_x509_crt_fmt_t fmt; /* if applicable */
+
+ union {
+ gnutls_pin_callback_t pin_fn;
+ const char *file;
+ gnutls_datum_t mem;
+ } i1;
+
+ union {
+ void *udata;
+ const char *file;
+ gnutls_datum_t mem;
+ } i2;
+
+ unsigned long future_pad[8];
} gnutls_cinput_st;
-int xssl_cred_init (xssl_cred_t *c, unsigned vflags,
- gnutls_cinput_st* aux,
- unsigned aux_size);
-void xssl_cred_deinit (xssl_cred_t cred);
+int xssl_cred_init(xssl_cred_t * c, unsigned vflags,
+ gnutls_cinput_st * aux, unsigned aux_size);
+void xssl_cred_deinit(xssl_cred_t cred);
-#endif /* GNUTLS_SBUF_H */
+#endif /* GNUTLS_SBUF_H */