Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails due to openSSL's RSA_SSLV23_PADDING deprecation #5

Open
andsmedeiros opened this issue Feb 18, 2024 · 8 comments
Open

Build fails due to openSSL's RSA_SSLV23_PADDING deprecation #5

andsmedeiros opened this issue Feb 18, 2024 · 8 comments

Comments

@andsmedeiros
Copy link

Attempting to build with recent OpenSSL versions results in an error.

In file included from quickbms.c:653:
perform.c: In function ‘perform_encryption’:
perform.c:1544:99: error: ‘RSA_SSLV23_PADDING’ undeclared (first use in this function); did you mean ‘RSA_NO_PADDING’?
 1544 |             if(!rsa_ctx->openssl_rsa || RSA_##X##_##Y (datalen, data, data, rsa_ctx->openssl_rsa, RSA_SSLV23_PADDING) < 0) \
      |                                                                                                   ^~~~~~~~~~~~~~~~~~
perform.c:1555:13: note: in expansion of macro ‘QUICKBMS_OPENSSL_RSA’
 1555 |             QUICKBMS_OPENSSL_RSA(public,  decrypt)
      |             ^~~~~~~~~~~~~~~~~~~~
perform.c:1544:99: note: each undeclared identifier is reported only once for each function it appears in
 1544 |             if(!rsa_ctx->openssl_rsa || RSA_##X##_##Y (datalen, data, data, rsa_ctx->openssl_rsa, RSA_SSLV23_PADDING) < 0) \
      |                                                                                                   ^~~~~~~~~~~~~~~~~~
perform.c:1555:13: note: in expansion of macro ‘QUICKBMS_OPENSSL_RSA’
 1555 |             QUICKBMS_OPENSSL_RSA(public,  decrypt)
      |             ^~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:57: all] Error 1
$ dpkg -l libssl-dev:i386
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name            Version           Architecture Description
+++-===============-=================-============-================================================
ii  libssl-dev:i386 3.0.10-1ubuntu2.2 i386         Secure Sockets Layer toolkit - development files
$ uname -a
Linux xxxxx 6.5.0-17-generic #17-Ubuntu SMP PREEMPT_DYNAMIC Thu Jan 11 14:01:59 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Related: openssl/openssl#14216

@cyberfoxmeow
Copy link

How to solve this issue? By using old version openssl? ?

@rbrasga
Copy link

rbrasga commented Aug 27, 2024

I worked around this by compiling from source:

wget https://www.openssl.org/source/openssl-1.1.1q.tar.gz
tar -xvzf openssl-1.1.1q.tar.gz
cd openssl-1.1.1q
setarch i386 ./config -m32
make -j`nproc`
make install

It seems there may be a few other small issues with quickbms further down the line before it full compiles. Like LUA is outdated.

@Nukiver
Copy link

Nukiver commented Oct 10, 2024

@LittleBigBug this issue is still persistent.

Linux HOSTNAME 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

@silverhikari
Copy link

silverhikari commented Dec 22, 2024

you might want to use this patch to get it to work with newer version of openssl https://aur.archlinux.org/cgit/aur.git/plain/0001-Fix-OpenSSL-V21-padding-deprecation.patch?h=quickbms

@Nukiver
Copy link

Nukiver commented Dec 25, 2024

you might want to use this patch to get it to work with newer version of openssl https://aur.archlinux.org/cgit/aur.git/plain/0001-Fix-OpenSSL-V21-padding-deprecation.patch?h=quickbms

Because of your comment, I tried to do my project again and found the already built executables on quickbms.com , that work on:

Linux Hostname 6.8.0-51-generic #52-Ubuntu SMP PREEMPT_DYNAMIC Thu Dec  5 13:09:44 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

@Nukiver
Copy link

Nukiver commented Dec 25, 2024

@silverhikari
so after finding out some stuff missing on my ubuntu install, I got some errors, that I can't fix:

$ make
cc quickbms.c -m32 -s -O2 -fstack-protector-all -fno-unit-at-a-time -fno-omit-frame-pointer -fno-pie -fPIC -w -o quickbms \
\
-D_7ZIP_ST -DE_INVALIDARG=-1 \
\
-Ilibs/zlib libs/zlib/*.c compression/*.c* encryption/*.c* libs/lzma/LzmaDec.c libs/lzma/Lzma2Dec.c libs/lzma/Bra86.c libs/lzma/LzFind.c libs/lzma/LzmaEnc.c libs/lzma/Lzma2Enc.c libs/mspack/*.c libs/ppmd_7zip/*.c libs/ppmd/*.cpp libs/aplib/src/depacks.c libs/aplib/lib/coff/aplib.lib -Ilibs/brieflz/include libs/brieflz/src/depacks.c libs/brieflz/src/brieflz.c compression/jcalg1_static.lib libs/zziplib/*.c libs/bcl/*.c libs/szip/*.c libs/lzhl/*.cpp libs/tdcb/*.c extra/mem2mem.c libs/libkirk/*.c libs/7z_advancecomp/*.cc libs/iris/*.cpp libs/old_cabextract/lzx.c libs/mrci/*.cpp libs/lz4/*.c libs/snappy/snappy.cc libs/snappy/snappy-c.cc libs/snappy/snappy-stubs-internal.cc libs/snappy/snappy-sinksource.cc libs/mmini/mmini_huffman.c libs/mmini/mmini_lzl.c libs/clzw/lzw-dec.c libs/clzw/lzw-enc.c libs/lzlib/lzlib.c libs/blosc/blosclz.c libs/blosc/fastcopy.c libs/gipfeli/*.cc libs/liblzg/src/lib/decode.c libs/liblzg/src/lib/encode.c libs/liblzg/src/lib/checksum.c libs/doboz/*.cpp libs/sphlib/c/*.c libs/shadowforce/*.cpp libs/zstd_aluigi/common/*.c libs/zstd_aluigi/compress/*.c libs/zstd_aluigi/decompress/*.c libs/zstd_aluigi/dictBuilder/*.c libs/zstd_aluigi/legacy/*.c -Ilibs/zstd_aluigi -Ilibs/zstd_aluigi/common -Ilibs/zstd_aluigi/legacy libs/azo/unAZO.cpp libs/azo/Decoder/MainCodeD.cpp libs/azo/Common/x86Filter.cpp libs/nintendo_ds/*.c libs/ctw/*.c libs/grzip/libgrzip.c libs/heatshrink/heatshrink_decoder.c libs/heatshrink/heatshrink_encoder.c libs/libzling/*.cpp -Ilibs/ecrypt/include -Ilibs/libcsc -D_7Z_TYPES_ libs/libcsc/csc_dec.cpp libs/libcsc/csc_default_alloc.cpp libs/libcsc/csc_filters.cpp libs/libcsc/csc_memio.cpp -DDENSITY_FORCE_INLINE=inline -Drestrict=__restrict__ libs/density/src/*.c libs/density/src/algorithms/*.c libs/density/src/algorithms/chameleon/core/*.c libs/density/src/algorithms/cheetah/core/*.c libs/density/src/algorithms/lion/core/*.c libs/density/src/algorithms/lion/forms/*.c libs/density/src/buffers/*.c libs/density/src/structure/*.c libs/spookyhash/*.c -Ilibs/brotli/include libs/brotli/dec/*.c libs/brotli/enc/*.c libs/brotli/common/*.c libs/libbsc/adler32/adler32.cpp libs/libbsc/bwt/bwt.cpp libs/libbsc/coder/coder.cpp libs/libbsc/coder/qlfc/qlfc.cpp libs/libbsc/coder/qlfc/qlfc_model.cpp libs/libbsc/filters/detectors.cpp libs/libbsc/filters/preprocessing.cpp libs/libbsc/libbsc/libbsc.cpp libs/libbsc/lzp/lzp.cpp libs/libbsc/platform/platform.cpp libs/libbsc/st/st.cpp libs/shoco/shoco.c libs/ms-compress/src/*.cpp libs/lzjody/lzjody.c libs/lzjody/byteplane_xfrm.c disasm/disasm.c disasm/cmdlist.c disasm/assembl/assembl.c -DMYDOWN_SSL -DMYDOWN_GLOBAL_COOKIE libs/mydownlib/mydownlib.c libs/TurboRLE/trlec.c libs/TurboRLE/trled.c libs/TurboRLE/ext/mrle.c libs/lhasa/lib/*_decoder.c libs/lhasa/lib/crc16.c libs/dipperstein/*.c libs/liblzf/lzf_d.c libs/liblzf/lzf_c_best.c libs/zopfli/*.c libs/lzham_codec/lzhamcomp/*.cpp libs/lzham_codec/lzhamdecomp/*.cpp libs/lzham_codec/lzhamlib/*.cpp -Ilibs/lzham_codec/include -Ilibs/lzham_codec/lzhamcomp -Ilibs/lzham_codec/lzhamdecomp -DLZHAM_ANSI_CPLUSPLUS libs/dmsdos/*.c libs/tornado/Tornado.cpp libs/tornado/Common.cpp libs/PKLib/*.c extra/mybits.c libs/lz5/lz5*.c libs/lizard/*.c libs/ppmz2/*.c* libs/libdivsufsort/*.c libs/xxhash/*.c extra/xalloc.c libs/lzfse/src/*.c libs/hsel/myhsel.cpp libs/hsel/HSEL.cpp libs/glza/GLZAmodel.c -Ilibs/lzo/include libs/lzo/src/*.c -Ilibs/ucl -Ilibs/ucl/include libs/ucl/src/n*.c libs/ucl/src/alloc.c libs/liblzs/lzs-compression.c libs/liblzs/lzs-decompression.c libs/bzip2/*.c libs/zlib/contrib/infback9/*.c libs/lzw-ab/lzw-lib.c libs/cryptohash-sha1/*.c -Ilibs/capstone/include libs/capstone/*.c -DCAPSTONE_X86_ATT_DISABLE -DCAPSTONE_USE_SYS_DYN_MEM -DCAPSTONE_HAS_ARM -DCAPSTONE_HAS_ARM64 -DCAPSTONE_HAS_MIPS -DCAPSTONE_HAS_X86 -DCAPSTONE_HAS_POWERPC -DCAPSTONE_HAS_SPARC -DCAPSTONE_HAS_SYSZ -DCAPSTONE_HAS_XCORE libs/capstone/arch/AArch64/*.c libs/capstone/arch/ARM/*.c libs/capstone/arch/Mips/*.c libs/capstone/arch/PowerPC/*.c libs/capstone/arch/Sparc/*.c libs/capstone/arch/SystemZ/*.c libs/capstone/arch/X86/*.c libs/capstone/arch/XCore/*.c libs/lua/src/*.c extra/quickrva.c libs/tiny-regex-c/re.c libs/exodecrunch/*.c \
\
 \
\
-static-libstdc++ -lstdc++ -lm -lpthread -static-libgcc -lssl -lcrypto -DDISABLE_MCRYPT -DDISABLE_TOMCRYPT -ldl -DZSTD_DISABLE_ASM
  

/usr/bin/ld: /tmp/cchL3t04.o: in function `os_tmpname':
loslib.c:(.text+0x217): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `_OodleLZ_Decompress':
quickbms.c:(.text+0x1aa7a): undefined reference to `Kraken_Decompress'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `amiga_unsquash':
quickbms.c:(.text+0x2caea): undefined reference to `UnSquash'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22642':
quickbms.c:(.text+0x6d0d1): undefined reference to `packfire'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22643':
quickbms.c:(.text+0x6d142): undefined reference to `DMSUNP'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22644':
quickbms.c:(.text+0x6d197): undefined reference to `LhDecode'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22645':
quickbms.c:(.text+0x6d1f6): undefined reference to `UTSQ80'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22646':
quickbms.c:(.text+0x6d255): undefined reference to `UTSQ61'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22647':
quickbms.c:(.text+0x6d2a7): undefined reference to `UTUC'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22648':
quickbms.c:(.text+0x6d2f4): undefined reference to `TRY101'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22649':
quickbms.c:(.text+0x6d341): undefined reference to `time_decrunch'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22650':
quickbms.c:(.text+0x6d39c): undefined reference to `UTETR'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22651':
quickbms.c:(.text+0x6d3f3): undefined reference to `USPIKE'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22652':
quickbms.c:(.text+0x6d449): undefined reference to `PACIT'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22653':
quickbms.c:(.text+0x6d4a4): undefined reference to `UMEGA'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22654':
quickbms.c:(.text+0x6d4f1): undefined reference to `MAX12'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22655':
quickbms.c:(.text+0x6d53e): undefined reference to `UMAST31'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22656':
quickbms.c:(.text+0x6d590): undefined reference to `LIGHT15'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22657':
quickbms.c:(.text+0x6d5fb): undefined reference to `UNDIMP'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22658':
quickbms.c:(.text+0x6d673): undefined reference to `UCMAT'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22659':
quickbms.c:(.text+0x6d6ca): undefined reference to `crunchmania_FastDecruncherHuff'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22660':
quickbms.c:(.text+0x6d721): undefined reference to `crunchmania_FastDecruncher'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22661':
quickbms.c:(.text+0x6d773): undefined reference to `UCRMAS'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22662':
quickbms.c:(.text+0x6d7c2): undefined reference to `stonecracker403'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22663':
quickbms.c:(.text+0x6d825): undefined reference to `stonecracker3'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22664':
quickbms.c:(.text+0x6d880): undefined reference to `stonecracker2'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22665':
quickbms.c:(.text+0x6d8ea): undefined reference to `pp_DecrunchBuffer'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22666':
quickbms.c:(.text+0x6d941): undefined reference to `crunchmania_17b'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22667':
quickbms.c:(.text+0x6d9a4): undefined reference to `ByteKiller2'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22668':
quickbms.c:(.text+0x6da15): undefined reference to `DeCr00'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22669':
quickbms.c:(.text+0x6da86): undefined reference to `UPHD'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22670':
quickbms.c:(.text+0x6daeb): undefined reference to `UPCOMP'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22671':
quickbms.c:(.text+0x6db43): undefined reference to `ISC3P'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22672':
quickbms.c:(.text+0x6db94): undefined reference to `ISC2P'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22673':
quickbms.c:(.text+0x6dbe5): undefined reference to `ISC1P'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22674':
quickbms.c:(.text+0x6dc52): undefined reference to `IAMATM'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22675':
quickbms.c:(.text+0x6dcbd): undefined reference to `IAMICE'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22676':
quickbms.c:(.text+0x6dd0b): undefined reference to `UFLSP'
/usr/bin/ld: /tmp/cc2n3tWJ.o: in function `.L22677':
quickbms.c:(.text+0x6dd6c): undefined reference to `BYTUNP'
/usr/bin/ld: /tmp/ccHJs2wU.o: in function `LzFindPrepare':
LzFind.c:(.text+0x2c3e): undefined reference to `CPU_IsSupported_SSE41'
/usr/bin/ld: LzFind.c:(.text+0x2c69): undefined reference to `CPU_IsSupported_AVX2'
collect2: error: ld returned 1 exit status
make: *** [Makefile:57: all] Error 1

Steps to reproduce:
Get a fresh ubuntu 24.04 install
Download the src version of quickbms from quickbms.com
Install all needed programs (to fix all includes that don't work)
make

unzip quickbms-src-0.12.0.zip
cd src
wget -O diff.diff https://aur.archlinux.org/cgit/aur.git/plain/0001-Fix-OpenSSL-V21-padding-deprecation.patch?h=quickbms
patch -i diff.diff 
sudo apt install make gcc g++ gcc-multilib g++-multilib libssl-dev libssl-dev:i386
make

I doubt that this can't be fixed without an intervention of @LittleBigBug (or someone changing the source code I suppose?)

@silverhikari
Copy link

silverhikari commented Dec 26, 2024

@Nukiver you could try and see if this patch https://aur.archlinux.org/cgit/aur.git/plain/0002-fix-compile-x86.patch?h=quickbms fixes that

@LittleBigBug
Copy link
Owner

LittleBigBug commented Jan 17, 2025

FYI I did not write this. This is a mirror of the source from https://aluigi.altervista.org/quickbms.htm
I do not provide support for this repo, I just don't have the time.
Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants