You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
2.1 KiB

  1. create function ed25519_password returns string soname "auth_ed25519.so";
  2. select ed25519_password();
  3. ERROR HY000: Can't initialize function 'ed25519_password'; Wrong arguments to ed25519_password()
  4. select ed25519_password(1);
  5. ERROR HY000: Can't initialize function 'ed25519_password'; Wrong arguments to ed25519_password()
  6. select ed25519_password("foo", "bar");
  7. ERROR HY000: Can't initialize function 'ed25519_password'; Wrong arguments to ed25519_password()
  8. select ed25519_password("foo");
  9. ERROR HY000: Can't initialize function 'ed25519_password'; Authentication plugin ed25519 is not loaded
  10. install soname 'auth_ed25519';
  11. select ed25519_password("foo");
  12. ed25519_password("foo")
  13. NNJledu0Vmk+VAZyz5IvUt3g1lMuNb8GvgE6fFMvIOA
  14. select ed25519_password("foobar");
  15. ed25519_password("foobar")
  16. LgZlMsxPDw66qLCfGWRu4IVKqzyAqlA1aXSZbax5maE
  17. select ed25519_password("foo bar");
  18. ed25519_password("foo bar")
  19. 6EFKeQLw+p5Ovk8tD+tAi3Agyg7ItukdswOBpTB6f40
  20. select ed25519_password(NULL);
  21. ed25519_password(NULL)
  22. NULL
  23. select * from information_schema.plugins where plugin_name='ed25519';
  24. PLUGIN_NAME ed25519
  25. PLUGIN_VERSION 1.0
  26. PLUGIN_STATUS ACTIVE
  27. PLUGIN_TYPE AUTHENTICATION
  28. PLUGIN_TYPE_VERSION 2.1
  29. PLUGIN_LIBRARY auth_ed25519.so
  30. PLUGIN_LIBRARY_VERSION 1.12
  31. PLUGIN_AUTHOR Sergei Golubchik
  32. PLUGIN_DESCRIPTION Elliptic curve ED25519 based authentication
  33. PLUGIN_LICENSE GPL
  34. LOAD_OPTION ON
  35. PLUGIN_MATURITY Beta
  36. PLUGIN_AUTH_VERSION 1.0-alpha
  37. create user test1@localhost identified via ed25519 using 'XQNqhYzon4REkXYuuJ4r+9UKSgoNpljksmKLJbEXrgk';
  38. show grants for test1@localhost;
  39. Grants for test1@localhost
  40. GRANT USAGE ON *.* TO 'test1'@'localhost' IDENTIFIED VIA ed25519 USING 'XQNqhYzon4REkXYuuJ4r+9UKSgoNpljksmKLJbEXrgk'
  41. connect(localhost,test1,public,test,PORT,SOCKET);
  42. ERROR 28000: Access denied for user 'test1'@'localhost' (using password: YES)
  43. select current_user();
  44. current_user()
  45. test1@localhost
  46. drop user test1@localhost;
  47. uninstall plugin ed25519;
  48. select ed25519_password("foo");
  49. ERROR HY000: Can't initialize function 'ed25519_password'; Authentication plugin ed25519 is not loaded
  50. drop function ed25519_password;