summaryrefslogtreecommitdiff
path: root/mysys/mysys_priv.h
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-05-27 00:18:20 +0200
committerSergei Golubchik <serg@mariadb.org>2015-06-02 18:53:37 +0200
commitd9340d6c8e1b227044fc90bc40c5da1d1f6b0dcc (patch)
tree30659a043a61b91001148bcefe9284a5a9468af7 /mysys/mysys_priv.h
parent318c826e932af69a864726efd24819d1cfa8dc8a (diff)
downloadmariadb-git-d9340d6c8e1b227044fc90bc40c5da1d1f6b0dcc.tar.gz
MDEV-8126 encryption for temp files
IO_CACHE tempfiles encryption
Diffstat (limited to 'mysys/mysys_priv.h')
-rw-r--r--mysys/mysys_priv.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/mysys/mysys_priv.h b/mysys/mysys_priv.h
index 4ea6d081107..d080aca7404 100644
--- a/mysys/mysys_priv.h
+++ b/mysys/mysys_priv.h
@@ -13,8 +13,14 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+#ifndef MYSYS_PRIV_INCLUDED
+#define MYSYS_PRIV_INCLUDED
+
#include <my_global.h>
#include <my_sys.h>
+#include <my_crypt.h>
+
+C_MODE_START
#ifdef USE_SYSTEM_WRAPPERS
#include "system_wrappers.h"
@@ -71,6 +77,16 @@ extern PSI_file_key key_file_proc_meminfo;
extern PSI_file_key key_file_charset, key_file_cnf;
#endif /* HAVE_PSI_INTERFACE */
+typedef struct {
+ ulonglong counter;
+ uint block_length, last_block_length;
+ uchar key[MY_AES_BLOCK_SIZE];
+ ulonglong inbuf_counter;
+} IO_CACHE_CRYPT;
+
+extern int (*_my_b_encr_read)(IO_CACHE *info,uchar *Buffer,size_t Count);
+extern int (*_my_b_encr_write)(IO_CACHE *info,const uchar *Buffer,size_t Count);
+
#ifdef SAFEMALLOC
void *sf_malloc(size_t size, myf my_flags);
void *sf_realloc(void *ptr, size_t size, myf my_flags);
@@ -116,3 +132,7 @@ extern File my_win_dup(File fd);
extern File my_win_sopen(const char *path, int oflag, int shflag, int perm);
extern File my_open_osfhandle(HANDLE handle, int oflag);
#endif
+
+C_MODE_END
+
+#endif