[Privoxy-devel] building with libressl

Lee ler762 at gmail.com
Sun Dec 6 20:01:58 UTC 2020


On 12/6/20, Fabian Keil  wrote:
> Lee  wrote on 2020-12-06:
>
>> Is it supposed to be possible to build Privoxy using libressl instead
>> of openssl?
>
> Yes.
>
>> I tried building privoxy with openssl and that worked.  But the
>> openssl license isn't compatable with the gpl, so I can't distribute a
>> privoxy binary that include openssl - correct?
>
> That's correct for Privoxy binaries for Windows but the same conflict
> exists with LibreSSL.

So the only library I can use for distributing Privoxy with the tls
intercept function enabled is MbedTLS?

> The LibreSSL support is mainly useful for platforms like OpenBSD which
> ship it as part of the base system so the "special exception" from
> section 3 of the GPLv2 applies.
>
>> So I uninstalled openssl to make _sure_ I don't include it by mistake,
>> build libressl and do the
>>   ./configure --with-openssl  ..etc
>> and configure dies with
>>
>> configure:6768: checking for CRYPTO_new_ex_data in -lcrypto
>> configure:6793: i686-w64-mingw32-gcc -o conftest.exe -pipe -O2
>> -fstack-protector-strong -D_FORTIFY_SOURCE=2 -march=native -Wall
>> -Wshadow -DWINVER=0x501 -mwindows -D__MINGW_USE_VC2005_COMPAT
>> -I/source/libressl-3.3.0/include  -fstack-protector-strong
>> -Wl,--nxcompat -Wl,--dynamicbase,--export-all-symbols
>> -L/source/libressl-3.3.0/crypto/ -L/source/libressl-3.3.0/ssl
>> -L/source/libressl-3.3.0/tls -static conftest.c -lcrypto  -lws2_32
>> -lz 1>&5
>> /usr/lib/gcc/i686-w64-mingw32/9.2.0/../../../../i686-w64-mingw32/bin/ld:
>> cannot find -lcrypto
>> collect2: error: ld returned 1 exit status
>
> Do you have a libcrypto.so in the paths specified with the -L options?

no, but I don't have an <anything>.so when building with mbedtls.  I'm
guessing that on windows I need either .dll or .a -- which are there:

Lee at i3668 /source/libressl-3.3.0
$ find . -name libcrypto\* | grep -v '\.o$' | grep -v '\.lo$' | grep -v '\.Plo$'
./crypto/.libs/libcrypto-46.dll
./crypto/.libs/libcrypto-46.dll.def
./crypto/.libs/libcrypto.a
./crypto/.libs/libcrypto.def
./crypto/.libs/libcrypto.dll.a
./crypto/.libs/libcrypto.la
./crypto/.libs/libcrypto.lai
./crypto/.libs/libcrypto.libcmd
./crypto/libcrypto.la
./crypto/libcrypto_la_objects.mk
./libcrypto.pc
./libcrypto.pc.in


Compare with mbedtls, where I use  LDFLAGS="-L/source/mbedtls-2.16.8/library"

Lee at i3668 /source/mbedtls-2.16.8/library
$ ls -l | grep -v '\.c$' | grep -v '\.o$'
total 6420
-rwxrwxr-x+ 1 Lee None   5322 Aug 27 06:32 CMakeLists.txt
-rwxrwxr-x+ 1 Lee None   5001 Aug 27 06:32 Makefile
-rw-rw-r--+ 1 Lee None 432788 Nov 29 10:09 libmbedcrypto.a
-rwxrwxr-x+ 1 Lee None 643836 Nov 29 10:09 libmbedcrypto.dll
-rw-rw-r--+ 1 Lee None 366406 Nov 29 10:09 libmbedcrypto.dll.a
-rw-rw-r--+ 1 Lee None 206066 Nov 29 10:09 libmbedtls.a
-rwxrwxr-x+ 1 Lee None 441962 Nov 29 10:09 libmbedtls.dll
-rw-rw-r--+ 1 Lee None 125140 Nov 29 10:09 libmbedtls.dll.a
-rw-rw-r--+ 1 Lee None 124220 Nov 29 10:09 libmbedx509.a
-rwxrwxr-x+ 1 Lee None 377688 Nov 29 10:09 libmbedx509.dll
-rw-rw-r--+ 1 Lee None 150662 Nov 29 10:09 libmbedx509.dll.a

> Maybe you need to add another path (if you're still interested in building
> with LibreSSL).

Yes.. still interested in figuring out how to make it work.  If
nothing else, it's a learning experience.  There is so much here that
I don't understand :(

Thanks
Lee


More information about the Privoxy-devel mailing list