iostream-ssl.c revision 814bf67459ad405a157af0b8940602024d7fadfe
/* Copyright (c) 2009-2015 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "module-dir.h"
#include "iostream-ssl-private.h"
static bool ssl_module_loaded = FALSE;
#ifdef HAVE_SSL
#endif
#ifdef HAVE_SSL
static void ssl_module_unload(void)
{
}
#endif
static int ssl_module_load(const char **error_r)
{
#ifdef HAVE_SSL
const char *plugin_name = "ssl_iostream_openssl";
struct module_dir_load_settings mod_set;
if (ssl_vfuncs == NULL) {
"ssl_vfuncs symbol not found", plugin_name);
return -1;
}
/* Destroy SSL module after (most of) the others. Especially lib-fs
backends may still want to access SSL module in their own
atexit-callbacks. */
return 0;
#else
*error_r = "SSL support not compiled in";
return -1;
#endif
}
struct ssl_iostream_context **ctx_r,
const char **error_r)
{
if (!ssl_module_loaded) {
if (ssl_module_load(error_r) < 0)
return -1;
}
}
struct ssl_iostream_context **ctx_r,
const char **error_r)
{
if (!ssl_module_loaded) {
if (ssl_module_load(error_r) < 0)
return -1;
}
}
{
}
const char **error_r)
{
if (!ssl_module_loaded) {
if (ssl_module_load(error_r) < 0)
return -1;
}
}
{
}
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)
{
}
{
}
{
}
const char *prefix)
{
}
{
}
void *context)
{
}
{
}
{
}
{
}
{
}
{
}
{
if (!ssl_iostream_has_valid_client_cert(ssl_io)) {
*error_r = "SSL certificate not received";
else {
*error_r = "Received invalid SSL certificate";
}
return -1;
"SSL certificate doesn't match expected host name %s",
host);
return -1;
}
return 0;
}
{
}
{
}
{
}
{
}