Mercurial > dovecot > core-2.2
changeset 13211:eb6d2fcca15b
Fixed compiling without OpenSSL.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 10 Aug 2011 17:02:18 +0300 |
parents | f7b10bfa6bbf |
children | 8095a30c8ee2 |
files | configure.in src/lib-ssl-iostream/Makefile.am src/lib-ssl-iostream/iostream-ssl-none.c |
diffstat | 3 files changed, 72 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.in Wed Aug 10 16:50:19 2011 +0300 +++ b/configure.in Wed Aug 10 17:02:18 2011 +0300 @@ -1704,6 +1704,7 @@ ],, $SSL_LIBS) fi fi +AM_CONDITIONAL(BUILD_OPENSSL, test "$have_openssl" = "yes") if test $want_gnutls != no && test $have_ssl = no; then AC_CHECK_LIB(gnutls, gnutls_global_init, [
--- a/src/lib-ssl-iostream/Makefile.am Wed Aug 10 16:50:19 2011 +0300 +++ b/src/lib-ssl-iostream/Makefile.am Wed Aug 10 17:02:18 2011 +0300 @@ -4,13 +4,20 @@ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib-test -libssl_iostream_la_SOURCES = \ +if BUILD_OPENSSL +ssl_sources = \ iostream-openssl.c \ iostream-openssl-context.c \ iostream-openssl-params.c \ istream-openssl.c \ ostream-openssl.c +else +ssl_sources = \ + iostream-ssl-none.c +endif +libssl_iostream_la_SOURCES = \ + $(ssl_sources) libssl_iostream_la_LIBADD = \ $(SSL_LIBS)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/lib-ssl-iostream/iostream-ssl-none.c Wed Aug 10 17:02:18 2011 +0300 @@ -0,0 +1,63 @@ +/* Copyright (c) 2011 Dovecot authors, see the included COPYING file */ + +#include "lib.h" +#include "iostream-ssl.h" + +int io_stream_create_ssl(struct ssl_iostream_context *ctx ATTR_UNUSED, + const char *source ATTR_UNUSED, + const struct ssl_iostream_settings *set ATTR_UNUSED, + struct istream **input ATTR_UNUSED, + struct ostream **output ATTR_UNUSED, + struct ssl_iostream **iostream_r) +{ + *iostream_r = NULL; + return -1; +} + +void ssl_iostream_unref(struct ssl_iostream **ssl_io ATTR_UNUSED) +{ +} + +int ssl_iostream_handshake(struct ssl_iostream *ssl_io ATTR_UNUSED) +{ + return -1; +} +void ssl_iostream_set_handshake_callback(struct ssl_iostream *ssl_io ATTR_UNUSED, + int (*callback)(void *context) ATTR_UNUSED, + void *context ATTR_UNUSED) {} + +bool ssl_iostream_is_handshaked(const struct ssl_iostream *ssl_io ATTR_UNUSED) { return FALSE; } +bool ssl_iostream_has_valid_client_cert(const struct ssl_iostream *ssl_io ATTR_UNUSED) { return FALSE; } +bool ssl_iostream_has_broken_client_cert(struct ssl_iostream *ssl_io ATTR_UNUSED) { return TRUE; } +const char *ssl_iostream_get_peer_name(struct ssl_iostream *ssl_io ATTR_UNUSED) { return NULL; } +const char *ssl_iostream_get_security_string(struct ssl_iostream *ssl_io ATTR_UNUSED) { return NULL; } +const char *ssl_iostream_get_last_error(struct ssl_iostream *ssl_io ATTR_UNUSED) { return NULL; } + +int ssl_iostream_generate_params(buffer_t *output ATTR_UNUSED) +{ + return -1; +} +int ssl_iostream_context_import_params(struct ssl_iostream_context *ctx ATTR_UNUSED, + const buffer_t *input ATTR_UNUSED) +{ + return -1; +} + +int ssl_iostream_context_init_client(const char *source ATTR_UNUSED, + const struct ssl_iostream_settings *set ATTR_UNUSED, + struct ssl_iostream_context **ctx_r ATTR_UNUSED) +{ + return -1; +} + +int ssl_iostream_context_init_server(const char *source ATTR_UNUSED, + const struct ssl_iostream_settings *set ATTR_UNUSED, + struct ssl_iostream_context **ctx_r) +{ + *ctx_r = NULL; + return -1; +} + +void ssl_iostream_context_deinit(struct ssl_iostream_context **ctx ATTR_UNUSED) +{ +}