iostream-ssl.h revision 3b4bd183cc469f70eb91d82a7f01f60ffc24ca5b
#ifndef IOSTREAM_SSL_H
#define IOSTREAM_SSL_H
struct ssl_iostream;
struct ssl_iostream_context;
struct ssl_iostream_settings {
const char *protocols;
const char *cipher_list;
const char *cert;
const char *key;
const char *key_password;
const char *cert_username_field;
const char *crypto_device; /* context-only */
bool verify_remote_cert; /* neither/both */
bool require_valid_cert; /* stream-only */
};
/* Returns 0 if ok, -1 and sets error_r if failed. The returned error string
becomes available via ssl_iostream_get_last_error() */
typedef int
const struct ssl_iostream_settings *set,
struct ssl_iostream **iostream_r,
const char **error_r);
const struct ssl_iostream_settings *set,
struct ssl_iostream **iostream_r,
const char **error_r);
/* returned input and output streams must also be unreferenced */
/* shutdown SSL connection and unreference ssl iostream */
/* If verbose logging is enabled, use the specified log prefix */
const char *prefix);
void *context);
struct ssl_iostream_context **ctx_r,
const char **error_r);
struct ssl_iostream_context **ctx_r,
const char **error_r);
#endif