From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp50.i.mail.ru (smtp50.i.mail.ru [94.100.177.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id CF5FD452565 for ; Sun, 12 Apr 2020 03:14:04 +0300 (MSK) Received: by smtp50.i.mail.ru with esmtpa (envelope-from ) id 1jNQGC-0005lJ-E0 for tarantool-patches@dev.tarantool.org; Sun, 12 Apr 2020 03:14:04 +0300 From: Vladislav Shpilevoy Date: Sun, 12 Apr 2020 02:13:07 +0200 Message-Id: <338cbc01706c875aa2eec5c3d69ebc420f8b9064.1586650014.git.v.shpilevoy@tarantool.org> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 26/43] build: export src/lib/crypto/crypto.c symbols List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org 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)