1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Merge branch '10.2' into 10.3

This commit is contained in:
Sergei Golubchik
2019-03-17 13:06:41 +01:00
147 changed files with 1449 additions and 781 deletions

View File

@ -25,6 +25,10 @@ struct encryption_service_st encryption_handler;
extern "C" {
uint no_get_key(uint, uint, uchar*, uint*)
{
return ENCRYPTION_KEY_VERSION_INVALID;
}
uint no_key(uint)
{
return ENCRYPTION_KEY_VERSION_INVALID;
@ -47,6 +51,11 @@ static unsigned int get_length(unsigned int slen, unsigned int key_id,
return my_aes_get_size(MY_AES_CBC, slen);
}
uint ctx_size(unsigned int, unsigned int)
{
return MY_AES_CTX_SIZE;
}
} /* extern "C" */
int initialize_encryption_plugin(st_plugin_int *plugin)
@ -72,8 +81,7 @@ int initialize_encryption_plugin(st_plugin_int *plugin)
if (handle->crypt_ctx_size)
encryption_handler.encryption_ctx_size_func= handle->crypt_ctx_size;
else
encryption_handler.encryption_ctx_size_func=
(uint (*)(unsigned int, unsigned int))my_aes_ctx_size;
encryption_handler.encryption_ctx_size_func= ctx_size;
encryption_handler.encryption_ctx_init_func=
handle->crypt_ctx_init ? handle->crypt_ctx_init : ctx_init;
@ -102,8 +110,7 @@ int finalize_encryption_plugin(st_plugin_int *plugin)
if (used)
{
encryption_handler.encryption_key_get_func=
(uint (*)(uint, uint, uchar*, uint*))no_key;
encryption_handler.encryption_key_get_func= no_get_key;
encryption_handler.encryption_key_get_latest_version_func= no_key;
encryption_handler.encryption_ctx_size_func= zero_size;
}