Mercurial > dovecot > core-2.2
changeset 20596:9a2ac2a69648
lib-dcrypt: add dcrypt-iostream.h
Move everything from dcrypt-iostream-private.h and enum
io_stream_encrypt_flags to the new dcrypt-iostream.h file.
author | Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
---|---|
date | Sat, 06 Aug 2016 22:07:00 +0300 |
parents | 40ce04c672a4 |
children | 261d2ff2e173 |
files | src/lib-dcrypt/Makefile.am src/lib-dcrypt/dcrypt-iostream-private.h src/lib-dcrypt/dcrypt-iostream.h src/lib-dcrypt/istream-decrypt.c src/lib-dcrypt/ostream-encrypt.c src/lib-dcrypt/ostream-encrypt.h src/lib-dcrypt/test-crypto.c src/lib-dcrypt/test-stream.c |
diffstat | 8 files changed, 20 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-dcrypt/Makefile.am Fri Aug 05 15:21:29 2016 +0300 +++ b/src/lib-dcrypt/Makefile.am Sat Aug 06 22:07:00 2016 +0300 @@ -28,7 +28,7 @@ headers = \ dcrypt.h \ - dcrypt-iostream-private.h \ + dcrypt-iostream.h \ dcrypt-private.h \ ostream-encrypt.h \ istream-decrypt.h
--- a/src/lib-dcrypt/dcrypt-iostream-private.h Fri Aug 05 15:21:29 2016 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -#ifndef DCRYPT_IOSTREAM_PRIVATE_H -#define DCRYPT_IOSTREAM_PRIVATE 1 - -static const unsigned char IOSTREAM_CRYPT_MAGIC[] = {'C','R','Y','P','T','E','D','\x03','\x07'}; -#define IOSTREAM_CRYPT_VERSION 2 -#define IOSTREAM_TAG_SIZE 16 - -#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/lib-dcrypt/dcrypt-iostream.h Sat Aug 06 22:07:00 2016 +0300 @@ -0,0 +1,15 @@ +#ifndef DCRYPT_IOSTREAM_H +#define DCRYPT_IOSTREAM_H 1 + +static const unsigned char IOSTREAM_CRYPT_MAGIC[] = {'C','R','Y','P','T','E','D','\x03','\x07'}; +#define IOSTREAM_CRYPT_VERSION 2 +#define IOSTREAM_TAG_SIZE 16 + +enum io_stream_encrypt_flags { + IO_STREAM_ENC_INTEGRITY_HMAC = 0x1, + IO_STREAM_ENC_INTEGRITY_AEAD = 0x2, + IO_STREAM_ENC_INTEGRITY_NONE = 0x4, + IO_STREAM_ENC_VERSION_1 = 0x8, +}; + +#endif
--- a/src/lib-dcrypt/istream-decrypt.c Fri Aug 05 15:21:29 2016 +0300 +++ b/src/lib-dcrypt/istream-decrypt.c Sat Aug 06 22:07:00 2016 +0300 @@ -8,7 +8,7 @@ #include "istream.h" #include "istream-decrypt.h" #include "istream-private.h" -#include "dcrypt-iostream-private.h" +#include "dcrypt-iostream.h" #include "hex-binary.h" @@ -16,13 +16,6 @@ #define ISTREAM_DECRYPT_READ_FIRST 15 -enum io_stream_encrypt_flags { - IO_STREAM_ENC_INTEGRITY_HMAC = 0x1, - IO_STREAM_ENC_INTEGRITY_AEAD = 0x2, - IO_STREAM_ENC_INTEGRITY_NONE = 0x4, - IO_STREAM_ENC_VERSION_1 = 0x8, -}; - struct decrypt_istream { struct istream_private istream; buffer_t *buf;
--- a/src/lib-dcrypt/ostream-encrypt.c Fri Aug 05 15:21:29 2016 +0300 +++ b/src/lib-dcrypt/ostream-encrypt.c Sat Aug 06 22:07:00 2016 +0300 @@ -16,13 +16,13 @@ #include "lib.h" #include "buffer.h" #include "randgen.h" +#include "dcrypt-iostream.h" #include "ostream-encrypt.h" #include "ostream-private.h" #include "hash-method.h" #include "sha2.h" #include "safe-memset.h" #include "dcrypt.h" -#include "dcrypt-iostream-private.h" #include <arpa/inet.h>
--- a/src/lib-dcrypt/ostream-encrypt.h Fri Aug 05 15:21:29 2016 +0300 +++ b/src/lib-dcrypt/ostream-encrypt.h Sat Aug 06 22:07:00 2016 +0300 @@ -12,13 +12,6 @@ * */ -enum io_stream_encrypt_flags { - IO_STREAM_ENC_INTEGRITY_HMAC = 0x1, - IO_STREAM_ENC_INTEGRITY_AEAD = 0x2, - IO_STREAM_ENC_INTEGRITY_NONE = 0x4, - IO_STREAM_ENC_VERSION_1 = 0x8, -}; - struct ostream * o_stream_create_encrypt(struct ostream *output, const char *algorithm,
--- a/src/lib-dcrypt/test-crypto.c Fri Aug 05 15:21:29 2016 +0300 +++ b/src/lib-dcrypt/test-crypto.c Sat Aug 06 22:07:00 2016 +0300 @@ -2,10 +2,10 @@ #include "buffer.h" #include "str.h" #include "dcrypt.h" +#include "dcrypt-iostream.h" #include "ostream.h" #include "ostream-encrypt.h" #include "istream.h" -#include "istream-decrypt.h" #include "iostream-temp.h" #include "randgen.h" #include "test-common.h"
--- a/src/lib-dcrypt/test-stream.c Fri Aug 05 15:21:29 2016 +0300 +++ b/src/lib-dcrypt/test-stream.c Sat Aug 06 22:07:00 2016 +0300 @@ -2,6 +2,7 @@ #include "buffer.h" #include "str.h" #include "dcrypt.h" +#include "dcrypt-iostream.h" #include "ostream.h" #include "ostream-encrypt.h" #include "istream.h"