[Tarantool-patches] [PATCH 26/43] build: export src/lib/crypto/crypto.c symbols
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Sun Apr 12 03:13:07 MSK 2020
Exports functions used by src/lua/crypto.lua via FFI.
Part of #2971
---
extra/exports | 10 ----------
src/exports.c | 2 ++
src/lib/crypto/crypto.c | 17 +++++++++++++++++
3 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/extra/exports b/extra/exports
index 111dad57e..cc7aa4f11 100644
--- a/extra/exports
+++ b/extra/exports
@@ -7,16 +7,6 @@ ibuf_reinit
ibuf_destroy
ibuf_reserve_slow
-crypto_EVP_MD_CTX_new
-crypto_EVP_MD_CTX_free
-crypto_HMAC_CTX_new
-crypto_HMAC_CTX_free
-crypto_stream_new
-crypto_stream_begin
-crypto_stream_append
-crypto_stream_commit
-crypto_stream_delete
-
lua_static_aligned_alloc
swim_is_configured
diff --git a/src/exports.c b/src/exports.c
index a939954c7..db77955ed 100644
--- a/src/exports.c
+++ b/src/exports.c
@@ -53,6 +53,7 @@ EXPORT(box_schema_export_syms);
EXPORT(box_space_export_syms);
EXPORT(clock_export_syms);
EXPORT(crc32_export_syms);
+EXPORT(crypto_export_syms);
EXPORT(csv_export_syms);
EXPORT(exception_export_syms);
EXPORT(fiber_export_syms);
@@ -77,6 +78,7 @@ export_syms(void)
box_space_export_syms,
clock_export_syms,
crc32_export_syms,
+ crypto_export_syms,
csv_export_syms,
exception_export_syms,
fiber_export_syms,
diff --git a/src/lib/crypto/crypto.c b/src/lib/crypto/crypto.c
index bbdc02836..96653356a 100644
--- a/src/lib/crypto/crypto.c
+++ b/src/lib/crypto/crypto.c
@@ -390,3 +390,20 @@ crypto_HMAC_CTX_free(HMAC_CTX *ctx)
HMAC_CTX_free(ctx);
#endif
}
+
+void **
+crypto_export_syms(void)
+{
+ static void *syms[] = {
+ (void *)crypto_EVP_MD_CTX_free,
+ (void *)crypto_EVP_MD_CTX_new,
+ (void *)crypto_HMAC_CTX_free,
+ (void *)crypto_HMAC_CTX_new,
+ (void *)crypto_stream_append,
+ (void *)crypto_stream_begin,
+ (void *)crypto_stream_commit,
+ (void *)crypto_stream_delete,
+ (void *)crypto_stream_new,
+ };
+ return syms;
+}
--
2.21.1 (Apple Git-122.3)
More information about the Tarantool-patches
mailing list