joungkyun / lib_mysqludf_aes256 Goto Github PK
View Code? Open in Web Editor NEWSupport AES-256 encrypt and decrypt functions on mysql and mariadb
License: GNU General Public License v2.0
Support AES-256 encrypt and decrypt functions on mysql and mariadb
License: GNU General Public License v2.0
change version 1.0.6 on master tree
test target
change version 1.0.5 on master tree
Hello @Joungkyun,
I had an issue when I'm trying to install this library at the last step :
CREATE FUNCTION aes256_encrypt RETURNS string SONAME 'lib_mysqludf_aes256.so';
ERROR 1126 (HY000): Can't open shared library 'lib_mysqludf_aes256.so' (errno: 11, undefined symbol: rijndaelEncrypt)
I made first steps like this :
cd lib_mysqludf_aes256
./configure --with-mysql=/usr --with-mysql-config=/usr/bin/mysql_config
make
make install
I'm on a Debian server with a MariaDB 10.1.48.
I did not find any error when configuring the lib before these error at the creation of the function.
I don't understand why there is this error while "src/rijndael.c" and "src/rijndael.h" exists.
Do you have any idea where the problem comes from ?
Thanks again for your time
Antoine
change version to 1.0.7 on master tree
If mysql prefix is not /usr, can not found my_global.h
[root@host lib_mysqludf_aes256-1.0.3]$ ./configure --with-mysql=/opt/mysql-5.5.40
...
checking mysql.h usability... yes
checking mysql.h presence... yes
checking for mysql.h... yes
checking my_global.h usability... no
checking my_global.h presence... no
checking for my_global.h... no
configure: error: You must need my_global.h file to build this udf.
This issue is reported at https://oops.org/SERVICE/jsboard/read.php?table=jsboard_oopsQnA&no=53450 by 김대홍 <srpro3 AT paran.com>
mysql_aes256.c: In function 'aes256_encrypt_init':
mysql_aes256.c:140:2: warning: implicit declaration of function 'my_aes256_get_size' [-Wimplicit-function-declaration]
initid->max_length = my_aes256_get_size (args->lengths[0]);
^
mysql_aes256.c: In function 'aes256_encrypt':
mysql_aes256.c:174:2: warning: implicit declaration of function 'my_aes256_encrypt' [-Wimplicit-function-declaration]
len = my_aes256_encrypt (
^
mysql_aes256.c: In function 'aes256_decrypt_init':
mysql_aes256.c:231:4: warning: format '%d' expects argument of type 'int', but argument 6 has type 'long unsigned int' [-Wformat=]
);
^
mysql_aes256.c:257:3: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long unsigned int' [-Wformat=]
);
^
mysql_aes256.c:204:6: warning: unused variable 'blocks' [-Wunused-variable]
int blocks, i;
^
mysql_aes256.c: In function 'aes256_decrypt':
mysql_aes256.c:299:3: warning: format '%d' expects argument of type 'int', but argument 5 has type 'long unsigned int' [-Wformat=]
);
^
mysql_aes256.c:309:2: warning: implicit declaration of function 'my_aes256_decrypt' [-Wimplicit-function-declaration]
len = my_aes256_decrypt (
^
mysql_aes256.c: At top level:
mysql_aes256.c:56:24: warning: 'LOCK_hostname' defined but not used [-Wunused-variable]
static pthread_mutex_t LOCK_hostname;
check support mariadb 10.5 GA version
From mariadb 10.3.24, 10.4.14 or later versions, m_string.h was not found.
[root@host src]# make
... blah blah
In file included from mysql_aes256.c:40:0:
/usr/local/mysql/include/mysql/my_sys.h:3:2: warning: #warning This file should not be included by clients, include only <mysql.h> [-Wcpp]
#warning This file should not be included by clients, include only <mysql.h>
^
mysql_aes256.c:42:47: fatal error: m_string.h: No such file or directory
#include <m_string.h> /* To get strmov() */
^
compilation terminated.
make[2]: *** [lib_mysqludf_aes256_la-mysql_aes256.lo] Error 1
make[2]: Leaving directory `/home/maria/lib_mysqludf_aes256-master/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/maria/lib_mysqludf_aes256-master/src'
make: *** [all-recursive] Error 1
when build with mysql 5.7, follow errors occurs:
In file included from mysql_aes256.c:40:
In file included from /usr/include/mysql/my_sys.h:26:
/usr/include/mysql/mysql/psi/mysql_thread.h:64:10: fatal error: 'pfs_thread_provider.h' file not found
#include "pfs_thread_provider.h"
^
1 error generated.
Remove --mysql-plugins-dir option. And search mysql_config and get mysql plugin dir with --plugindir option.
first, use --with-mysql and if set --with-mysql-config, use value of --with-mysql-config
for i in $MYSQL_PREFIX/bin $MYSQL_PREFIX/sbin /usr/bin /usr/sbin /bin /sbin /usr/local/bin /usr/local/sbin
do
if test -f "$i/mysql_config"; then
MYSQL_CONFIG="$i/mysql_config"
break
fi
done
if test "x$with_mysql_config" != "xno"; then
if test -x "$with_mysql_config"; then
MYSQL_CONFIG="$with_mysql_config"
fi
fi
my_sys.h check fails when executing ./configure in mariadb 10.3 or later versions.
[root@host mysql-aes256]# ./configure --with-mysql-config=/usr/bin/mysql_config
... blah blah
checking for ANSI C header files... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking mysql.h usability... yes
checking mysql.h presence... yes
checking for mysql.h... yes
checking my_global.h usability... yes
checking my_global.h presence... yes
checking for my_global.h... yes
checking my_sys.h usability... no
checking my_sys.h presence... no
checking for my_sys.h... no
configure: error: You must need my_sys.h file to build this udf.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.