]> git.notmuchmail.org Git - notmuch/blobdiff - util/zlib-extra.c
crypto: handle PKCS#7 envelopedData in _notmuch_crypto_decrypt
[notmuch] / util / zlib-extra.c
index 623f6d62d1e4fc13331e9c5a56d8b005287df0bd..3a75e50434b92b4ca1dd7d2fffed14e26fde40b8 100644 (file)
@@ -47,6 +47,7 @@ gz_getline (void *talloc_ctx, char **bufptr, ssize_t *bytes_read, gzFile stream)
            int zlib_status = 0;
            (void) gzerror (stream, &zlib_status);
            switch (zlib_status) {
+           case Z_STREAM_END:
            case Z_OK:
                /* no data read before EOF */
                if (offset == 0)
@@ -84,3 +85,10 @@ gz_error_string (util_status_t status, gzFile file)
     else
        return util_error_string (status);
 }
+
+const char *
+gzerror_str(gzFile file)
+{
+    int dummy;
+    return gzerror (file, &dummy);
+}