summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorGeorgi Kodinov <joro@sun.com>2009-03-09 20:57:03 +0200
committerGeorgi Kodinov <joro@sun.com>2009-03-09 20:57:03 +0200
commit3033ea85a20fb5afd4cab8a816ff72fd4d784778 (patch)
tree00e35a3675d99f6ecdede0e62ce24e379186aed2 /client
parent6a99d1d4fbb6a05734f8c2cc6305a0d61efdc883 (diff)
downloadmariadb-git-3033ea85a20fb5afd4cab8a816ff72fd4d784778.tar.gz
Bug #42434: license of mysys MD5 implementation is not GPL-compatible
Took the Xfree implementation (based on the same rewrite as the NDB one) and added it instead of the current implementation. Added a macro to make the calls to MD5 more streamlined. client/mysqlmanager-pwgen.c: Bug #42434: changed to call the macro include/my_md5.h: Bug #42434: use the Xfree implementation mysys/md5.c: Bug #42434: use the Xfree implementation sql/item_strfunc.cc: Bug #42434: changed to call the macro sql/table.cc: Bug #42434: changed to call the macro tools/mysqlmanager.c: Bug #42434: changed to call the macro
Diffstat (limited to 'client')
-rw-r--r--client/mysqlmanager-pwgen.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/client/mysqlmanager-pwgen.c b/client/mysqlmanager-pwgen.c
index 7a857c59743..568358b1cda 100644
--- a/client/mysqlmanager-pwgen.c
+++ b/client/mysqlmanager-pwgen.c
@@ -134,7 +134,6 @@ void get_pass(char* pw, int len)
int main(int argc, char** argv)
{
FILE* fp;
- my_MD5_CTX context;
uchar digest[16];
char pw[17];
uint i;
@@ -147,9 +146,7 @@ int main(int argc, char** argv)
if (!(fp=fopen(outfile,"w")))
die("Could not open '%s'(errno=%d)",outfile,errno);
get_pass(pw,sizeof(pw)-1);
- my_MD5Init(&context);
- my_MD5Update(&context,(uchar*) pw,sizeof(pw)-1);
- my_MD5Final(digest,&context);
+ MY_MD5_HASH(digest,(uchar*) pw,sizeof(pw)-1);
fprintf(fp,"%s:",user);
for (i=0;i<sizeof(digest);i++)
fprintf(fp,"%02x",digest[i]);