Lines Matching defs:ostream

20 #include "ostream-encrypt.h"
21 #include "ostream-private.h"
33 struct ostream_private ostream;
59 ec = o_stream_send(stream->ostream.parent, data, size);
63 o_stream_copy_error_from_parent(&stream->ostream);
66 io_stream_set_error(&stream->ostream.iostream,
67 "ostream-encrypt: Unexpectedly short write to parent stream");
68 stream->ostream.ostream.stream_errno = EINVAL;
150 io_stream_set_error(&stream->ostream.iostream, "Key hash failed: %s", error);
164 io_stream_set_error(&stream->ostream.iostream, "Cannot perform ECDH: %s", error);
177 io_stream_set_error(&stream->ostream.iostream, "Key encryption error: %s", error);
202 io_stream_set_error(&stream->ostream.iostream, "Key encryption error: %s", error);
212 io_stream_set_error(&stream->ostream.iostream, "Encryption init error: %s", error);
259 io_stream_set_error(&stream->ostream.iostream, "Cannot encrypt key data: %s", error);
268 io_stream_set_error(&stream->ostream.iostream, "Cannot perform ECDH: %s", error);
276 io_stream_set_error(&stream->ostream.iostream, "Cannot perform key encryption: %s", error);
284 io_stream_set_error(&stream->ostream.iostream, "Cannot perform key encryption: %s", error);
299 io_stream_set_error(&stream->ostream.iostream, "Cannot perform key encryption: %s", error);
306 io_stream_set_error(&stream->ostream.iostream, "Unsupported key type");
340 io_stream_set_error(&stream->ostream.iostream,
415 io_stream_set_error(&stream->ostream.iostream, "Encryption init error: %s", error);
482 stream->ostream.offset += total;
504 io_stream_set_error(&estream->ostream.iostream, "Encryption failure: %s", error);
512 io_stream_set_error(&estream->ostream.iostream, "MAC failure: %s", error);
525 io_stream_set_error(&estream->ostream.iostream, "MAC failure: %s", error);
546 if (o_stream_encrypt_finalize(&estream->ostream) < 0)
560 estream->ostream.ostream.stream_errno != 0);
562 o_stream_close(estream->ostream.parent);
577 o_stream_unref(&estream->ostream.parent);
588 io_stream_set_error(&estream->ostream.iostream, "Cannot create ostream-encrypt: %s", error);
599 io_stream_set_error(&estream->ostream.iostream, "Invalid algorithm (must be cipher-mac)");
605 io_stream_set_error(&estream->ostream.iostream, "Cannot create ostream-encrypt: %s", error);
613 io_stream_set_error(&estream->ostream.iostream, "Cannot create ostream-encrypt: %s", error);
620 io_stream_set_error(&estream->ostream.iostream, "Cannot create ostream-encrypt: %s", error);
627 io_stream_set_error(&estream->ostream.iostream, "Cannot create ostream-encrypt: %s", error);
643 estream->ostream.sendv = o_stream_encrypt_sendv;
644 estream->ostream.flush = o_stream_encrypt_flush;
645 estream->ostream.iostream.close = o_stream_encrypt_close;
646 estream->ostream.iostream.destroy = o_stream_encrypt_destroy;
653 struct ostream *
654 o_stream_create_encrypt(struct ostream *output, const char *algorithm,
667 struct ostream *os = o_stream_create(&estream->ostream, output,
677 struct ostream *
678 o_stream_create_sym_encrypt(struct ostream *output, struct dcrypt_context_symmetric *ctx)
691 struct ostream *os = o_stream_create(&estream->ostream, output,
694 io_stream_set_error(&estream->ostream.iostream, "Could not initialize stream: %s", error);