Tarantool development patches archive
 help / color / mirror / Atom feed
* [tarantool-patches] [PATCH] lua: remove digest.sha() and digest.sha_hex()
@ 2019-03-18 22:49 Alexander Turenko
  2019-03-19 11:39 ` [tarantool-patches] " Kirill Yukhin
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Turenko @ 2019-03-18 22:49 UTC (permalink / raw)
  To: Kirill Yukhin; +Cc: Alexander Turenko, tarantool-patches

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [tarantool-patches] Re: [PATCH] lua: remove digest.sha() and digest.sha_hex()
  2019-03-18 22:49 [tarantool-patches] [PATCH] lua: remove digest.sha() and digest.sha_hex() Alexander Turenko
@ 2019-03-19 11:39 ` Kirill Yukhin
  0 siblings, 0 replies; 2+ messages in thread
From: Kirill Yukhin @ 2019-03-19 11:39 UTC (permalink / raw)
  To: Alexander Turenko; +Cc: tarantool-patches

Hello,

On 19 Mar 01:49, Alexander Turenko wrote:
> 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

I've checked your patch into 2.1 branch.

--
Regards, Kirill Yukhin

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-03-19 11:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-18 22:49 [tarantool-patches] [PATCH] lua: remove digest.sha() and digest.sha_hex() Alexander Turenko
2019-03-19 11:39 ` [tarantool-patches] " Kirill Yukhin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox