~ubuntu-branches/ubuntu/wily/dovecot/wily-proposed

« back to all changes in this revision

Viewing changes to src/lib-ssl-iostream/istream-openssl.c

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2015-09-14 13:58:42 UTC
  • mfrom: (4.1.54 sid)
  • Revision ID: package-import@ubuntu.com-20150914135842-jhpp689shskxt0hu
Tags: 1:2.2.18-2ubuntu1
* Merge with Debian (after 552 days); remaining changes:
  + Add mail-stack-delivery package:
    - Update d/rules
    - d/control: convert existing dovecot-postfix package to a dummy
      package and add new mail-stack-delivery package.
    - Update maintainer scripts.
    - Rename d/dovecot-postfix.* to debian/mail-stack-delivery.*
    - d/mail-stack-delivery.preinst: Move previously installed backups and
      config files to a new package namespace.
    - d/mail-stack-delivery.prerm: Added to handle downgrades.
  + Use Snakeoil SSL certificates by default:
    - d/control: Depend on ssl-cert.
  + Add autopkgtest to debian/tests/*.
  + Add ufw integration:
    - d/dovecot-core.ufw.profile: new ufw profile.
    - d/rules: install profile in dovecot-core.
    - d/control: dovecot-core - suggest ufw.
  + d/dovecot-core.dirs: Added usr/share/doc/dovecot-core
  + Add apport hook:
    - d/rules, d/source_dovecot.py
  + Add upstart job:
    - d/rules, d/dovecot-core.dovecot.upstart, d/control,
      d/dovecot-core.dirs, dovecot-imapd.{postrm, postinst, prerm},
      d/dovecot-pop3d.{postinst, postrm, prerm}.
      d/mail-stack-deliver.postinst: Convert init script to upstart.
* d/control: Drop dovecot-postfix package as its no longer required.
* Rename init.d script to work with the dh_installinit --name option, so
  that it comes back. (LP: #1323274)
* d/dovecot-core.config: Drop db_input for ssl-cert-exists; this message
  not actually an error, is documented in the README.Debian, and blocks
  automated upgrades (LP: #1278897).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (c) 2009-2013 Dovecot authors, see the included COPYING file */
 
1
/* Copyright (c) 2009-2015 Dovecot authors, see the included COPYING file */
2
2
 
3
3
#include "lib.h"
4
4
#include "istream-private.h"
24
24
        struct ssl_istream *sstream = (struct ssl_istream *)stream;
25
25
 
26
26
        i_free(sstream->istream.w_buffer);
 
27
        sstream->ssl_io->ssl_input = NULL;
27
28
        ssl_iostream_unref(&sstream->ssl_io);
28
29
}
29
30
 
71
72
                /* failed to read anything */
72
73
                ret = openssl_iostream_handle_error(ssl_io, ret, "SSL_read");
73
74
                if (ret <= 0) {
74
 
                        if (ret < 0) {
 
75
                        if (ret == 0)
 
76
                                return 0;
 
77
                        if (ssl_io->last_error != NULL) {
75
78
                                io_stream_set_error(&stream->iostream,
76
79
                                                    "%s", ssl_io->last_error);
 
80
                        }
 
81
                        if (errno != EPIPE)
77
82
                                stream->istream.stream_errno = errno;
78
 
                                stream->istream.eof = TRUE;
79
 
                                sstream->seen_eof = TRUE;
80
 
                        }
81
 
                        return ret;
 
83
                        stream->istream.eof = TRUE;
 
84
                        sstream->seen_eof = TRUE;
 
85
                        return -1;
82
86
                }
83
87
                /* we did some BIO I/O, try reading again */
84
88
        }