[Privoxy-devel] building with libressl

Fabian Keil fk at fabiankeil.de
Mon Dec 7 16:12:08 UTC 2020


Lee <ler762 at gmail.com> wrote on 2020-12-06:

> On 12/6/20, Fabian Keil  wrote:
> > Lee  wrote on 2020-12-06:

> >> 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?

Yes, for Windows that's currently the case.

> > 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

Given the find output above, I'd try adding:
-L/source/libressl-3.3.0/crypto/.libs/

Do you have something like ldd on Windows?

If yes, you could use it to check with libraries are used
when using OpenSSL and maybe use that information to adjust
the paths.

You may have to remove the --enable-static-linking
in windows/MYconfigure first.

Fabian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.privoxy.org/pipermail/privoxy-devel/attachments/20201207/b9b456f7/attachment.bin>


More information about the Privoxy-devel mailing list