summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-03-27 09:45:22 +0100
committerSergei Golubchik <serg@mariadb.org>2015-04-09 18:42:43 +0200
commit9ccafffc29526ea30151eb3e62901bfdb77aaf84 (patch)
treeeaece68c95f89b79898c903340948b968c479035
parent6d3dace7d95bfa9627e524787d076124afc7e773 (diff)
downloadmariadb-git-9ccafffc29526ea30151eb3e62901bfdb77aaf84.tar.gz
rename "encryption key management plugin" to "encryption plugin"
because it's going to do more than just key management
-rw-r--r--cmake/abi_check.cmake2
-rw-r--r--include/mysql/plugin.h2
-rw-r--r--include/mysql/plugin_encryption.h (renamed from include/mysql/plugin_encryption_key_management.h)12
-rw-r--r--include/mysql/plugin_encryption.h.pp (renamed from include/mysql/plugin_encryption_key_management.h.pp)2
-rw-r--r--include/mysql/service_encryption_keys.h2
-rw-r--r--mysql-test/suite/plugins/r/show_all_plugins.result2
-rw-r--r--plugin/debug_key_management/debug_key_management_plugin.cc8
-rw-r--r--plugin/example_key_management/example_key_management_plugin.cc8
-rw-r--r--plugin/file_key_management/file_key_management_plugin.cc8
-rw-r--r--sql/encryption_keys.cc12
-rw-r--r--sql/sql_plugin.cc18
-rw-r--r--storage/innobase/log/log0crypt.cc2
-rw-r--r--storage/xtradb/log/log0crypt.cc2
13 files changed, 40 insertions, 40 deletions
diff --git a/cmake/abi_check.cmake b/cmake/abi_check.cmake
index aff6c437c3b..8a7e14b6f2d 100644
--- a/cmake/abi_check.cmake
+++ b/cmake/abi_check.cmake
@@ -44,7 +44,7 @@ IF(CMAKE_COMPILER_IS_GNUCC AND RUN_ABI_CHECK)
${CMAKE_SOURCE_DIR}/include/mysql/client_plugin.h
${CMAKE_SOURCE_DIR}/include/mysql/plugin_auth.h
${CMAKE_SOURCE_DIR}/include/mysql/plugin_password_validation.h
- ${CMAKE_SOURCE_DIR}/include/mysql/plugin_encryption_key_management.h
+ ${CMAKE_SOURCE_DIR}/include/mysql/plugin_encryption.h
)
ADD_CUSTOM_TARGET(abi_check ALL
diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h
index 6a4e5448fa9..09026514a88 100644
--- a/include/mysql/plugin.h
+++ b/include/mysql/plugin.h
@@ -92,7 +92,7 @@ typedef struct st_mysql_xid MYSQL_XID;
/* MariaDB plugin types */
#define MariaDB_PASSWORD_VALIDATION_PLUGIN 8
-#define MariaDB_ENCRYPTION_KEY_MANAGEMENT_PLUGIN 9
+#define MariaDB_ENCRYPTION_PLUGIN 9
/* We use the following strings to define licenses for plugins */
#define PLUGIN_LICENSE_PROPRIETARY 0
diff --git a/include/mysql/plugin_encryption_key_management.h b/include/mysql/plugin_encryption.h
index a7fc379962b..43697096f04 100644
--- a/include/mysql/plugin_encryption_key_management.h
+++ b/include/mysql/plugin_encryption.h
@@ -1,4 +1,4 @@
-#ifndef MYSQL_PLUGIN_ENCRYPTION_KEY_MANAGEMENT_INCLUDED
+#ifndef MYSQL_PLUGIN_ENCRYPTION_INCLUDED
/* Copyright (C) 2014 Sergei Golubchik and MariaDB
This program is free software; you can redistribute it and/or modify
@@ -17,25 +17,25 @@
/**
@file
- Encryption key Management Plugin API.
+ Encryption Plugin API.
This file defines the API for server plugins that manage encryption
keys for MariaDB on-disk data encryption.
*/
-#define MYSQL_PLUGIN_ENCRYPTION_KEY_MANAGEMENT_INCLUDED
+#define MYSQL_PLUGIN_ENCRYPTION_INCLUDED
#include <mysql/plugin.h>
-#define MariaDB_ENCRYPTION_KEY_MANAGEMENT_INTERFACE_VERSION 0x0200
+#define MariaDB_ENCRYPTION_INTERFACE_VERSION 0x0200
#define BAD_ENCRYPTION_KEY_VERSION (~(unsigned int)0)
#define KEY_BUFFER_TOO_SMALL (100)
/**
- Encryption key management plugin descriptor
+ Encryption plugin descriptor
*/
-struct st_mariadb_encryption_key_management
+struct st_mariadb_encryption
{
int interface_version; /**< version plugin uses */
diff --git a/include/mysql/plugin_encryption_key_management.h.pp b/include/mysql/plugin_encryption.h.pp
index fb39b807d1c..a09e0e0543b 100644
--- a/include/mysql/plugin_encryption_key_management.h.pp
+++ b/include/mysql/plugin_encryption.h.pp
@@ -362,7 +362,7 @@ void *thd_get_ha_data(const void* thd, const struct handlerton *hton);
void thd_set_ha_data(void* thd, const struct handlerton *hton,
const void *ha_data);
void thd_wakeup_subsequent_commits(void* thd, int wakeup_error);
-struct st_mariadb_encryption_key_management
+struct st_mariadb_encryption
{
int interface_version;
unsigned int (*get_latest_key_version)();
diff --git a/include/mysql/service_encryption_keys.h b/include/mysql/service_encryption_keys.h
index 69304899405..f162bba3cff 100644
--- a/include/mysql/service_encryption_keys.h
+++ b/include/mysql/service_encryption_keys.h
@@ -18,7 +18,7 @@
@file
encryption keys service
- Functions to get encryption keys and IV from the encryption key management plugin
+ Functions to get encryption keys from the encryption plugin
*/
#ifdef __cplusplus
diff --git a/mysql-test/suite/plugins/r/show_all_plugins.result b/mysql-test/suite/plugins/r/show_all_plugins.result
index f656811674e..f07bafe3536 100644
--- a/mysql-test/suite/plugins/r/show_all_plugins.result
+++ b/mysql-test/suite/plugins/r/show_all_plugins.result
@@ -21,7 +21,7 @@ Name Status Type Library License
EXAMPLE NOT INSTALLED STORAGE ENGINE ha_example.so GPL
UNUSABLE NOT INSTALLED DAEMON ha_example.so GPL
daemon_example NOT INSTALLED DAEMON libdaemon_example.so GPL
-example_key_management NOT INSTALLED ENCRYPTION KEY MANAGEMENT example_key_management.so GPL
+example_key_management NOT INSTALLED ENCRYPTION example_key_management.so GPL
three_attempts NOT INSTALLED AUTHENTICATION dialog_examples.so GPL
two_questions NOT INSTALLED AUTHENTICATION dialog_examples.so GPL
show status like '%libraries%';
diff --git a/plugin/debug_key_management/debug_key_management_plugin.cc b/plugin/debug_key_management/debug_key_management_plugin.cc
index 7ade1b8fde7..9843c08d8bf 100644
--- a/plugin/debug_key_management/debug_key_management_plugin.cc
+++ b/plugin/debug_key_management/debug_key_management_plugin.cc
@@ -24,7 +24,7 @@
*/
#include <my_global.h>
-#include <mysql/plugin_encryption_key_management.h>
+#include <mysql/plugin_encryption.h>
#include <string.h>
#include <myisampack.h>
@@ -61,8 +61,8 @@ static unsigned int get_key(unsigned int version, unsigned char* dstbuf, unsigne
return 0;
}
-struct st_mariadb_encryption_key_management debug_key_management_plugin= {
- MariaDB_ENCRYPTION_KEY_MANAGEMENT_INTERFACE_VERSION,
+struct st_mariadb_encryption debug_key_management_plugin= {
+ MariaDB_ENCRYPTION_INTERFACE_VERSION,
get_latest_key_version,
get_key
};
@@ -72,7 +72,7 @@ struct st_mariadb_encryption_key_management debug_key_management_plugin= {
*/
maria_declare_plugin(debug_key_management)
{
- MariaDB_ENCRYPTION_KEY_MANAGEMENT_PLUGIN,
+ MariaDB_ENCRYPTION_PLUGIN,
&debug_key_management_plugin,
"debug_key_management",
"Sergei Golubchik",
diff --git a/plugin/example_key_management/example_key_management_plugin.cc b/plugin/example_key_management/example_key_management_plugin.cc
index 28cae3c311e..5ced65a7088 100644
--- a/plugin/example_key_management/example_key_management_plugin.cc
+++ b/plugin/example_key_management/example_key_management_plugin.cc
@@ -28,7 +28,7 @@
#include <my_global.h>
#include <my_pthread.h>
#include <my_aes.h>
-#include <mysql/plugin_encryption_key_management.h>
+#include <mysql/plugin_encryption.h>
#include <my_md5.h>
#include <my_rnd.h>
#include "sql_class.h"
@@ -101,8 +101,8 @@ static int example_key_management_plugin_deinit(void *p)
return 0;
}
-struct st_mariadb_encryption_key_management example_key_management_plugin= {
- MariaDB_ENCRYPTION_KEY_MANAGEMENT_INTERFACE_VERSION,
+struct st_mariadb_encryption example_key_management_plugin= {
+ MariaDB_ENCRYPTION_INTERFACE_VERSION,
get_latest_key_version,
get_key
};
@@ -112,7 +112,7 @@ struct st_mariadb_encryption_key_management example_key_management_plugin= {
*/
maria_declare_plugin(example_key_management)
{
- MariaDB_ENCRYPTION_KEY_MANAGEMENT_PLUGIN,
+ MariaDB_ENCRYPTION_PLUGIN,
&example_key_management_plugin,
"example_key_management",
"Jonas Oreland",
diff --git a/plugin/file_key_management/file_key_management_plugin.cc b/plugin/file_key_management/file_key_management_plugin.cc
index 60007e4487d..be623706051 100644
--- a/plugin/file_key_management/file_key_management_plugin.cc
+++ b/plugin/file_key_management/file_key_management_plugin.cc
@@ -16,7 +16,7 @@
#include "parser.h"
#include <mysql_version.h>
-#include <mysql/plugin_encryption_key_management.h>
+#include <mysql/plugin_encryption.h>
#include <string.h>
static char* filename;
@@ -94,8 +94,8 @@ static int file_key_management_plugin_init(void *p)
return parser.parse(&keys);
}
-struct st_mariadb_encryption_key_management file_key_management_plugin= {
- MariaDB_ENCRYPTION_KEY_MANAGEMENT_INTERFACE_VERSION,
+struct st_mariadb_encryption file_key_management_plugin= {
+ MariaDB_ENCRYPTION_INTERFACE_VERSION,
get_highest_key_used_in_key_file,
get_key_from_key_file
};
@@ -105,7 +105,7 @@ struct st_mariadb_encryption_key_management file_key_management_plugin= {
*/
maria_declare_plugin(file_key_management)
{
- MariaDB_ENCRYPTION_KEY_MANAGEMENT_PLUGIN,
+ MariaDB_ENCRYPTION_PLUGIN,
&file_key_management_plugin,
"file_key_management",
"Denis Endro eperi GmbH",
diff --git a/sql/encryption_keys.cc b/sql/encryption_keys.cc
index 7a07581722b..b31ec270a8f 100644
--- a/sql/encryption_keys.cc
+++ b/sql/encryption_keys.cc
@@ -1,11 +1,11 @@
#include <my_global.h>
-#include <mysql/plugin_encryption_key_management.h>
+#include <mysql/plugin_encryption.h>
#include "log.h"
#include "sql_plugin.h"
-/* there can be only one encryption key management plugin enabled */
+/* there can be only one encryption plugin enabled */
static plugin_ref encryption_key_manager= 0;
-static struct st_mariadb_encryption_key_management *handle;
+static struct st_mariadb_encryption *handle;
unsigned int get_latest_encryption_key_version()
{
@@ -34,7 +34,7 @@ uint get_encryption_key(uint version, uchar* key, uint *size)
return BAD_ENCRYPTION_KEY_VERSION;
}
-int initialize_encryption_key_management_plugin(st_plugin_int *plugin)
+int initialize_encryption_plugin(st_plugin_int *plugin)
{
if (encryption_key_manager)
return 1;
@@ -47,12 +47,12 @@ int initialize_encryption_key_management_plugin(st_plugin_int *plugin)
}
encryption_key_manager= plugin_lock(NULL, plugin_int_to_ref(plugin));
- handle= (struct st_mariadb_encryption_key_management*)
+ handle= (struct st_mariadb_encryption*)
plugin->plugin->info;
return 0;
}
-int finalize_encryption_key_management_plugin(st_plugin_int *plugin)
+int finalize_encryption_plugin(st_plugin_int *plugin)
{
if (plugin->plugin->deinit && plugin->plugin->deinit(NULL))
{
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc
index 5c4a7b5af97..0c9ac6b6cb8 100644
--- a/sql/sql_plugin.cc
+++ b/sql/sql_plugin.cc
@@ -37,7 +37,7 @@
#include "lock.h" // MYSQL_LOCK_IGNORE_TIMEOUT
#include <mysql/plugin_auth.h>
#include <mysql/plugin_password_validation.h>
-#include <mysql/plugin_encryption_key_management.h>
+#include <mysql/plugin_encryption.h>
#include "sql_plugin_compat.h"
#define REPORT_TO_LOG 1
@@ -91,7 +91,7 @@ const LEX_STRING plugin_type_names[MYSQL_MAX_PLUGIN_TYPE_NUM]=
{ C_STRING_WITH_LEN("REPLICATION") },
{ C_STRING_WITH_LEN("AUTHENTICATION") },
{ C_STRING_WITH_LEN("PASSWORD VALIDATION") },
- { C_STRING_WITH_LEN("ENCRYPTION KEY MANAGEMENT") }
+ { C_STRING_WITH_LEN("ENCRYPTION") }
};
extern int initialize_schema_table(st_plugin_int *plugin);
@@ -100,8 +100,8 @@ extern int finalize_schema_table(st_plugin_int *plugin);
extern int initialize_audit_plugin(st_plugin_int *plugin);
extern int finalize_audit_plugin(st_plugin_int *plugin);
-extern int initialize_encryption_key_management_plugin(st_plugin_int *plugin);
-extern int finalize_encryption_key_management_plugin(st_plugin_int *plugin);
+extern int initialize_encryption_plugin(st_plugin_int *plugin);
+extern int finalize_encryption_plugin(st_plugin_int *plugin);
/*
The number of elements in both plugin_type_initialize and
@@ -111,13 +111,13 @@ extern int finalize_encryption_key_management_plugin(st_plugin_int *plugin);
plugin_type_init plugin_type_initialize[MYSQL_MAX_PLUGIN_TYPE_NUM]=
{
0, ha_initialize_handlerton, 0, 0,initialize_schema_table,
- initialize_audit_plugin, 0, 0, 0, initialize_encryption_key_management_plugin
+ initialize_audit_plugin, 0, 0, 0, initialize_encryption_plugin
};
plugin_type_init plugin_type_deinitialize[MYSQL_MAX_PLUGIN_TYPE_NUM]=
{
0, ha_finalize_handlerton, 0, 0, finalize_schema_table,
- finalize_audit_plugin, 0, 0, 0, finalize_encryption_key_management_plugin
+ finalize_audit_plugin, 0, 0, 0, finalize_encryption_plugin
};
/*
@@ -128,7 +128,7 @@ plugin_type_init plugin_type_deinitialize[MYSQL_MAX_PLUGIN_TYPE_NUM]=
static int plugin_type_initialization_order[MYSQL_MAX_PLUGIN_TYPE_NUM]=
{
MYSQL_DAEMON_PLUGIN,
- MariaDB_ENCRYPTION_KEY_MANAGEMENT_PLUGIN,
+ MariaDB_ENCRYPTION_PLUGIN,
MYSQL_STORAGE_ENGINE_PLUGIN,
MYSQL_INFORMATION_SCHEMA_PLUGIN,
MYSQL_FTPARSER_PLUGIN,
@@ -170,7 +170,7 @@ static int min_plugin_info_interface_version[MYSQL_MAX_PLUGIN_TYPE_NUM]=
MYSQL_REPLICATION_INTERFACE_VERSION,
MIN_AUTHENTICATION_INTERFACE_VERSION,
MariaDB_PASSWORD_VALIDATION_INTERFACE_VERSION,
- MariaDB_ENCRYPTION_KEY_MANAGEMENT_INTERFACE_VERSION
+ MariaDB_ENCRYPTION_INTERFACE_VERSION
};
static int cur_plugin_info_interface_version[MYSQL_MAX_PLUGIN_TYPE_NUM]=
{
@@ -183,7 +183,7 @@ static int cur_plugin_info_interface_version[MYSQL_MAX_PLUGIN_TYPE_NUM]=
MYSQL_REPLICATION_INTERFACE_VERSION,
MYSQL_AUTHENTICATION_INTERFACE_VERSION,
MariaDB_PASSWORD_VALIDATION_INTERFACE_VERSION,
- MariaDB_ENCRYPTION_KEY_MANAGEMENT_INTERFACE_VERSION
+ MariaDB_ENCRYPTION_INTERFACE_VERSION
};
static struct
diff --git a/storage/innobase/log/log0crypt.cc b/storage/innobase/log/log0crypt.cc
index 2aaa0aa4550..4a7474761a3 100644
--- a/storage/innobase/log/log0crypt.cc
+++ b/storage/innobase/log/log0crypt.cc
@@ -32,7 +32,7 @@ Modified Jan Lindström jan.lindstrom@mariadb.com
#include "srv0start.h" // for srv_start_lsn
#include "log0recv.h" // for recv_sys
-#include "mysql/plugin_encryption_key_management.h" // for BAD_ENCRYPTION_KEY_VERSION
+#include "mysql/plugin_encryption.h" // for BAD_ENCRYPTION_KEY_VERSION
#include "ha_prototypes.h" // IB_LOG_
/* If true, enable redo log encryption. */
diff --git a/storage/xtradb/log/log0crypt.cc b/storage/xtradb/log/log0crypt.cc
index 2aaa0aa4550..4a7474761a3 100644
--- a/storage/xtradb/log/log0crypt.cc
+++ b/storage/xtradb/log/log0crypt.cc
@@ -32,7 +32,7 @@ Modified Jan Lindström jan.lindstrom@mariadb.com
#include "srv0start.h" // for srv_start_lsn
#include "log0recv.h" // for recv_sys
-#include "mysql/plugin_encryption_key_management.h" // for BAD_ENCRYPTION_KEY_VERSION
+#include "mysql/plugin_encryption.h" // for BAD_ENCRYPTION_KEY_VERSION
#include "ha_prototypes.h" // IB_LOG_
/* If true, enable redo log encryption. */