iostream-ssl.h revision 997b30e4099704d2dbe3402b890a892b71b1d640
#ifndef IOSTREAM_SSL_H
#define IOSTREAM_SSL_H
struct ssl_iostream;
struct ssl_iostream_context;
struct ssl_iostream_cert {
const char *cert;
const char *key;
const char *key_password;
};
struct ssl_iostream_settings {
const char *protocols;
const char *cipher_list;
const char *curve_list;
/* alternative cert is for providing certificate using
different key algorithm */
struct ssl_iostream_cert alt_cert;
const char *dh;
const char *cert_username_field;
const char *crypto_device; /* context-only */
bool skip_crl_check;
bool verify_remote_cert; /* neither/both */
bool allow_invalid_cert; /* stream-only */
bool prefer_server_ciphers;
bool compression;
bool tickets;
};
/* Load SSL module */
int ssl_module_load(const char **error_r);
/* 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);
/* Returns TRUE if the remote cert is invalid, or handshake callback returned
failure. */
struct ssl_iostream_context **ctx_r,
const char **error_r);
struct ssl_iostream_context **ctx_r,
const char **error_r);
const struct ssl_iostream_settings *old_set);
#endif