mkottman / luacrypto

Fork of LuaCrypto, which enables encryption and decryption through OpenSSL
http://mkottman.github.com/luacrypto/
MIT License
100 stars 70 forks source link

how to set up on windows? #53

Open dasmeer opened 2 years ago

dasmeer commented 2 years ago

could you please clarify how to proceed with installation?

  1. running make doesn't work for me c:\Program Files (x86)\LuaRocks\luacrypto-0.3.2-2\luacrypto>make make: *** No targets specified and no makefile found. Stop.

OR

c:\Program Files (x86)\LuaRocks\luacrypto-0.3.2-2\luacrypto>nmake Microsoft (R) Program Maintenance Utility Version 14.31.31105.0 Copyright (C) Microsoft Corporation. All rights reserved. NMAKE : fatal error U1064: MAKEFILE not found and no target specified Stop.

  1. setting lib directly doesn't work due to errors below(

luarocks install luacrypto OPENSSL_DIR="c:/Program Files (x86)/OpenSSL" GNU Wget 1.19.4 built on mingw32.

-cares +digest +gpgme +https +ipv6 +iri +large-file +metalink -nls +ntlm +opie -psl +ssl/openssl

Wgetrc: /win32dev/misc/wget/out32/etc/wgetrc (system) Compile: i586-w64-mingw32-gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/win32dev/misc/wget/out32/etc/wgetrc" -DLOCALEDIR="/win32dev/misc/wget/out32/share/locale" -I. -I../lib -I../lib -I/win32dev/misc/wget/out32/include -I/win32dev/misc/wget/out32/include -I/win32dev/misc/wget/out32/include -I/win32dev/misc/wget/out32/include -DHAVE_LIBSSL -I/win32dev/misc/wget/out32/include -DNDEBUG Link: i586-w64-mingw32-gcc -I/win32dev/misc/wget/out32/include -I/win32dev/misc/wget/out32/include -I/win32dev/misc/wget/out32/include -DHAVE_LIBSSL -I/win32dev/misc/wget/out32/include -DNDEBUG -L/win32dev/misc/wget/out32/lib -lidn2 -L/win32dev/misc/wget/out32/lib -lgpgme -lassuan -lws2_32 -lgpg-error -L/win32dev/misc/wget/out32/lib -lmetalink -lunistring -liconv -L/win32dev/misc/wget/out32/lib -lssl -lcrypto -L/win32dev/misc/wget/out32/lib -lz -lws2_32 -lole32 -lcrypt32 -lexpat ftp-opie.o mswindows.o openssl.o http-ntlm.o ../lib/libgnu.a -lws2_32 -lws2_32 -lws2_32 -lws2_32 /win32dev/misc/wget/out32/lib/libiconv.a /win32dev/misc/wget/out32/lib/libunistring.a -lws2_32

Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://www.gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Originally written by Hrvoje Niksic hniksic@xemacs.org. Please send bug reports and questions to bug-wget@gnu.org. Could Not Find C:\Users\Andrew\AppData\Local\LuaRocks\Cache\https___luarocks.org\manifest-5.1.zip.unixtime

7-Zip 18.01 (x86) : Copyright (c) 1999-2018 Igor Pavlov : 2018-01-28

Scanning the drive for archives: 1 file, 52123 bytes (51 KiB)

Extracting archive: C:\Users\Andrew\AppData\Local\LuaRocks\Cache\https___luarocks.org\manifest-5.1.zip

Path = C:\Users\Andrew\AppData\Local\LuaRocks\Cache\https___luarocks.org\manifest-5.1.zip Type = zip Physical Size = 52123

Everything is Ok

Size: 1237488 Compressed: 52123 Installing https://luarocks.org/luacrypto-0.3.2-2.src.rock Could Not Find C:\Users\Andrew\AppData\Local\LuaRocks\Cache\https___luarocks.org\luacrypto-0.3.2-2.src.rock.unixtime

7-Zip 18.01 (x86) : Copyright (c) 1999-2018 Igor Pavlov : 2018-01-28

Scanning the drive for archives: 1 file, 393601 bytes (385 KiB)

Extracting archive: C:\Users\Andrew\AppData\Local\Temp\luarocks_luarocks-rock-luacrypto-0.3.2-2-1087\luacrypto-0.3.2-2.src.rock

Path = C:\Users\Andrew\AppData\Local\Temp\luarocks_luarocks-rock-luacrypto-0.3.2-2-1087\luacrypto-0.3.2-2.src.rock Type = zip Physical Size = 393601

Everything is Ok

Folders: 8 Files: 59 Size: 1440496 Compressed: 393601

luacrypto 0.3.2-2 depends on lua >= 5.1 (5.1-1 provided by VM) cl /nologo /MD /O2 -c -Fosrc/lcrypto.obj -IC:\Program Files (x86)\Lua\5.1\include src/lcrypto.c -Ic:/Program Files (x86)/OpenSSL/include lcrypto.c src/lcrypto.c(81): error C2027: use of undefined type 'evp_md_ctx_st' c:/Program Files (x86)/OpenSSL/include\openssl/types.h(104): note: see declaration of 'evp_md_ctx_st' src/lcrypto.c(331): error C2027: use of undefined type 'evp_cipher_ctx_st' c:/Program Files (x86)/OpenSSL/include\openssl/types.h(102): note: see declaration of 'evp_cipher_ctx_st' src/lcrypto.c(425): error C2079: 'c' uses undefined struct 'evp_cipher_ctx_st' src/lcrypto.c(437): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_CIPHER_CTX ' src/lcrypto.c(443): warning C4133: 'function': incompatible types - from 'int ' to 'const EVP_CIPHER_CTX ' src/lcrypto.c(445): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_CIPHER_CTX ' src/lcrypto.c(447): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_CIPHER_CTX ' src/lcrypto.c(452): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_CIPHER_CTX ' src/lcrypto.c(454): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_CIPHER_CTX ' src/lcrypto.c(462): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_CIPHER_CTX ' src/lcrypto.c(470): error C2027: use of undefined type 'evp_cipher_ctx_st' c:/Program Files (x86)/OpenSSL/include\openssl/types.h(102): note: see declaration of 'evp_cipher_ctx_st' src/lcrypto.c(561): error C2079: 'c' uses undefined struct 'evp_cipher_ctx_st' src/lcrypto.c(573): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_CIPHER_CTX ' src/lcrypto.c(578): warning C4133: 'function': incompatible types - from 'int ' to 'const EVP_CIPHER_CTX ' src/lcrypto.c(579): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_CIPHER_CTX ' src/lcrypto.c(581): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_CIPHER_CTX ' src/lcrypto.c(586): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_CIPHER_CTX ' src/lcrypto.c(588): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_CIPHER_CTX ' src/lcrypto.c(596): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_CIPHER_CTX ' src/lcrypto.c(604): error C2027: use of undefined type 'hmac_ctx_st' c:/Program Files (x86)/OpenSSL/include\openssl/types.h(132): note: see declaration of 'hmac_ctx_st' src/lcrypto.c(711): error C2079: 'c' uses undefined struct 'hmac_ctx_st' src/lcrypto.c(724): warning C4133: 'function': incompatible types - from 'int ' to 'HMAC_CTX ' src/lcrypto.c(725): warning C4133: 'function': incompatible types - from 'int ' to 'HMAC_CTX ' src/lcrypto.c(726): warning C4133: 'function': incompatible types - from 'int ' to 'HMAC_CTX ' src/lcrypto.c(747): error C2027: use of undefined type 'evp_md_ctx_st' c:/Program Files (x86)/OpenSSL/include\openssl/types.h(104): note: see declaration of 'evp_md_ctx_st' src/lcrypto.c(828): error C2079: 'c' uses undefined struct 'evp_md_ctx_st' src/lcrypto.c(835): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_MD_CTX ' src/lcrypto.c(836): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_MD_CTX ' src/lcrypto.c(838): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_MD_CTX ' src/lcrypto.c(839): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_MD_CTX ' src/lcrypto.c(857): error C2027: use of undefined type 'evp_md_ctx_st' c:/Program Files (x86)/OpenSSL/include\openssl/types.h(104): note: see declaration of 'evp_md_ctx_st' src/lcrypto.c(940): error C2079: 'c' uses undefined struct 'evp_md_ctx_st' src/lcrypto.c(948): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_MD_CTX ' src/lcrypto.c(949): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_MD_CTX ' src/lcrypto.c(952): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_MD_CTX ' src/lcrypto.c(955): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_MD_CTX ' src/lcrypto.c(1164): error C2037: left of 'type' specifies undefined struct/union 'evp_pkey_st' src/lcrypto.c(1165): error C2037: left of 'pkey' specifies undefined struct/union 'evp_pkey_st' src/lcrypto.c(1165): warning C4047: 'function': 'int' differs in levels of indirection from 'void ' src/lcrypto.c(1165): warning C4024: 'PEM_write_bio_DSAPrivateKey': different types for formal and actual parameter 5 src/lcrypto.c(1165): error C2198: 'PEM_write_bio_DSAPrivateKey': too few arguments for call src/lcrypto.c(1166): error C2037: left of 'type' specifies undefined struct/union 'evp_pkey_st' src/lcrypto.c(1167): error C2037: left of 'pkey' specifies undefined struct/union 'evp_pkey_st' src/lcrypto.c(1167): warning C4047: 'function': 'int' differs in levels of indirection from 'void ' src/lcrypto.c(1167): warning C4024: 'PEM_write_bio_RSAPrivateKey': different types for formal and actual parameter 5 src/lcrypto.c(1167): error C2198: 'PEM_write_bio_RSAPrivateKey': too few arguments for call src/lcrypto.c(1277): error C2037: left of 'type' specifies undefined struct/union 'evp_pkey_st' src/lcrypto.c(1277): warning C4477: 'sprintf' : format string '%s' requires an argument of type 'char *', but variadic argument 2 has type 'int' src/lcrypto.c(1277): warning C4477: 'sprintf' : format string '%d' requires an argument of type 'int', but variadic argument 3 has type 'EVP_PKEY *' src/lcrypto.c(1277): warning C4473: 'sprintf' : not enough arguments passed for format string src/lcrypto.c(1277): note: placeholders and their parameters expect 4 variadic arguments, but 3 were provided src/lcrypto.c(1277): note: the missing variadic argument 4 is required by format string '%p' src/lcrypto.c(1299): error C2027: use of undefined type 'evp_cipher_ctx_st' c:/Program Files (x86)/OpenSSL/include\openssl/types.h(102): note: see declaration of 'evp_cipher_ctx_st' src/lcrypto.c(1320): error C2037: left of 'cipher' specifies undefined struct/union 'evp_cipher_ctx_st' src/lcrypto.c(1320): error C2198: 'EVP_CIPHER_get0_name': too few arguments for call src/lcrypto.c(1379): error C2037: left of 'cipher' specifies undefined struct/union 'evp_cipher_ctx_st' src/lcrypto.c(1379): error C2198: 'EVP_CIPHER_get_iv_length': too few arguments for call src/lcrypto.c(1400): error C2079: 'ctx' uses undefined struct 'evp_cipher_ctx_st' src/lcrypto.c(1418): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_CIPHER_CTX ' src/lcrypto.c(1420): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_CIPHER_CTX ' src/lcrypto.c(1423): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_CIPHER_CTX ' src/lcrypto.c(1436): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_CIPHER_CTX ' src/lcrypto.c(1439): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_CIPHER_CTX ' src/lcrypto.c(1448): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_CIPHER_CTX ' src/lcrypto.c(1451): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_CIPHER_CTX ' src/lcrypto.c(1461): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_CIPHER_CTX ' src/lcrypto.c(1483): error C2027: use of undefined type 'evp_cipher_ctx_st' c:/Program Files (x86)/OpenSSL/include\openssl/types.h(102): note: see declaration of 'evp_cipher_ctx_st' src/lcrypto.c(1509): error C2037: left of 'type' specifies undefined struct/union 'evp_pkey_st' src/lcrypto.c(1508): warning C4477: 'sprintf' : format string '%s' requires an argument of type 'char ', but variadic argument 4 has type 'int' src/lcrypto.c(1508): warning C4477: 'sprintf' : format string '%d' requires an argument of type 'int', but variadic argument 5 has type 'EVP_PKEY *' src/lcrypto.c(1508): warning C4473: 'sprintf' : not enough arguments passed for format string src/lcrypto.c(1508): note: placeholders and their parameters expect 6 variadic arguments, but 5 were provided src/lcrypto.c(1508): note: the missing variadic argument 6 is required by format string '%p' src/lcrypto.c(1602): error C2079: 'ctx' uses undefined struct 'evp_cipher_ctx_st' src/lcrypto.c(1628): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_CIPHER_CTX ' src/lcrypto.c(1632): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_CIPHER_CTX ' src/lcrypto.c(1634): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_CIPHER_CTX ' src/lcrypto.c(1644): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_CIPHER_CTX ' src/lcrypto.c(1646): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_CIPHER_CTX ' src/lcrypto.c(1656): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_CIPHER_CTX ' src/lcrypto.c(1658): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_CIPHER_CTX ' src/lcrypto.c(1664): warning C4133: 'function': incompatible types - from 'int ' to 'EVP_CIPHER_CTX *'

Error: Build error: Failed compiling object src/lcrypto.obj C:\Program Files (x86)\LuaRocks/tools/rmdir.exe: `C:\Program Files (x86)\Lua\5.1\systree\lib\luarocks\rocks-5.1\luacrypto': Directory not empty

dasmeer commented 2 years ago

LuaRocks 3.8.0, the Lua package manager

Configuration: Lua: Version : 5.1 Interpreter: C:\Program Files (x86)\Lua\5.1/lua.exe (ok) LUA_DIR : C:\Program Files (x86)\Lua\5.1 (ok) LUA_BINDIR : C:\Program Files (x86)\Lua\5.1 (ok) LUA_INCDIR : C:\Program Files (x86)\Lua\5.1\include (ok) LUA_LIBDIR : C:\Program Files (x86)\Lua\5.1 (ok)

Configuration files: System : C:/Program Files (x86)/LuaRocks/config-5.1.lua (ok) User : C:/Users/Andrew/AppData/Roaming/luarocks/config-5.1.lua (not found)

Rocks trees in use: C:\Users\Andrew\AppData\Roaming/luarocks ("user") C:\Program Files (x86)\Lua\5.1\systree ("system")