From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 5A3CC297BC for ; Mon, 18 Mar 2019 18:49:30 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RV_u6k5jiy_8 for ; Mon, 18 Mar 2019 18:49:30 -0400 (EDT) Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id ACA712A12D for ; Mon, 18 Mar 2019 18:49:29 -0400 (EDT) From: Alexander Turenko Subject: [tarantool-patches] [PATCH] lua: remove digest.sha() and digest.sha_hex() Date: Tue, 19 Mar 2019 01:49:22 +0300 Message-Id: <6c81abf4ab1cca5f599153553a1b28f3fac89115.1552949246.git.alexander.turenko@tarantool.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: Kirill Yukhin Cc: Alexander Turenko , tarantool-patches@freelists.org SHA-0 is considered weak for years and was removed in OpenSSL since 1.1.0. These Lua functions did not work since 15ed10e4, but give 'Digest method "sha" is not supported' error for any input. Removed them to don't confuse a user with a Tab completion. Follow up #1722. Fixes #4028. --- issue: https://github.com/tarantool/tarantool/issues/4028 branch: https://github.com/tarantool/tarantool/tree/Totktonada/gh-4028-remove-digest-sha-0 src/lua/crypto.lua | 2 +- src/lua/digest.lua | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lua/crypto.lua b/src/lua/crypto.lua index b6b2d6540..e76370517 100644 --- a/src/lua/crypto.lua +++ b/src/lua/crypto.lua @@ -58,7 +58,7 @@ end local digests = {} for class, name in pairs({ md2 = 'MD2', md4 = 'MD4', md5 = 'MD5', - sha = 'SHA', sha1 = 'SHA1', sha224 = 'SHA224', + sha1 = 'SHA1', sha224 = 'SHA224', sha256 = 'SHA256', sha384 = 'SHA384', sha512 = 'SHA512', dss = 'DSS', dss1 = 'DSS1', mdc2 = 'MDC2', ripemd160 = 'RIPEMD160'}) do local digest = ffi.C.EVP_get_digestbyname(class) diff --git a/src/lua/digest.lua b/src/lua/digest.lua index 314ede1ed..8f199c0af 100644 --- a/src/lua/digest.lua +++ b/src/lua/digest.lua @@ -36,7 +36,6 @@ local BASE64_NOWRAP = 2 local BASE64_URLSAFE = 7 local digest_shortcuts = { - sha = 'SHA', sha224 = 'SHA224', sha256 = 'SHA256', sha384 = 'SHA384', -- 2.20.1