1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-09-11 08:30:59 +03:00
Commit Graph

14 Commits

Author SHA1 Message Date
Georg Richter
0b57bd225a Replaced _Thread_local by __thread
Following Wlad's suggestion we use __thread instead of
_Thread_local (see also server/include/my_compiler.h)
2024-09-03 07:33:57 +02:00
Georg Richter
a19895efff CONC-717: Added parsec support for Windows
Parsec support for Windows uses bcrypt for deriving key from
hash value (using PBKDF2) and ma_crypto_sign from bundled ed25519
ref10 implementation for signing.

ed25519 ref10 implementation is now built as a separate object
library. Depending on the plugin configuration (dynamic or static)
it will be linked against plugin or against libmariadb.

This commit also fixes CONC-723 (CMake error when disabling
client_ed25519 plugin) and static build of client_ed25519
plugin.
2024-08-30 13:22:23 +02:00
Nikita Malyavin
dddcf400af fix MDEV-34424 for ed255129
realloc can't be done for mysql->passwd. There's also no pretty way to
pass the ext-salt into hash_password, so let's use thread_local instead.

For GCC < 4.9 (SLES 12, CentOS 7), which don't support _Thread_local,
pk will be recalculated instead
2024-06-28 16:18:35 +02:00
Sergei Golubchik
1e2968ade7 Windows compilation warning
plugins\auth\ed25519.c(120): warning C4244: 'function': conversion from 'unsigned __int64' to 'size_t', possible loss of data
2024-02-14 15:01:29 +01:00
Sergei Golubchik
fcef411ecb MDEV-31855 hash_password_bin for native_password and ed25519 2024-02-04 22:17:25 +01:00
Sergei Golubchik
a99570c118 MDEV-31855 SSL cert validation protocol extension
* extend the client auth plugin API with a new callback
* relax the plugin version check to allow load a plugin with the
  same major version, even if the minor versions differ
* implement the protocol extension:
  - don't abort at once if the certificate is self signed and
    no CA was explicitly specified
  - allow it if it passes fingerprint check
  - allow it if plugin has hash_password_bin callback, password was
    non-empty and the control hash matches server's
2024-02-04 22:17:25 +01:00
Georg Richter
4e3905c20a Fix for bcrypt hash functions:
Using a global crypt provider is not thread safe, so we need to load
provider via BCryptOpenProvider in ma_hash_new().
2023-08-23 16:18:50 +02:00
Georg Richter
7fdb3eab66 Windows build error:
Since HAVE_WINCRYPT was already defined in CMakeLists.txt, it doesn't
need to be redefined in ed25519.c
2022-07-29 13:35:44 +02:00
Georg Richter
b973c75c27 CONC-580: Fixed license header
Moved ref10/common.h to plugins/auth/ed25519_common.h and fixed
license header
2022-04-20 18:46:15 +02:00
Georg Richter
180c543704 Fix for CONC-548: Symbol conflict with libsodium
To avoid conflicts (and possible crashes) by duplicate symbols the function
crypto_sign was renamed to ma_crypto_sign.

Kudos to Peter van Dijk for reporting this issue.
2021-05-03 13:58:17 +02:00
Georg Richter
1fed6c3184 Build fix:
declared deinit function of plugins as deinit(void) instead
of deinit().
2020-10-21 07:23:50 +02:00
Vladislav Vaintroub
ce011210d1 small cleanups
remove MSVC specific #pragma comment(lib)
TARGET_LINK_LIBRARIES is good enough
2020-05-27 20:32:56 +02:00
Georg Richter
11a2d035dd CONC-431: Use windows crypto libraries on Windows platforms
By default Windows builds now use the native system crypto libraries used
by ed25519, caching_sha2_password and sha256_password authentication plugins.
Even if configuration option WITH_SSL=OFF was specified (or no TLS library was found) authentication plugins using crypto will be available.
2019-08-01 14:02:04 +02:00
Georg Richter
b87845b18d CONC-366: Implementation of ed25519 authentication plugin 2018-12-02 16:58:30 +01:00