I have a case that needs zlib statically in openssl.
But I can't seem to make that. Only dynamic is made.

For testing I put zlib125 in its own <dir>.
Then for openssl...

./config
--prefix=<path>
--with-zlib-include=<dir>/include
--with-zlib-lib=<dir>/lib
shared
zlib

make
make install

This gives...

LD_LIBRARY_PATH=../zlib125/lib ldd bin/openssl
bin/openssl:
   libssl.so.1.0.0 => /.../openssl100e/lib/libssl.so.1.0.0 (0x28102000)
   libcrypto.so.1.0.0 => /.../openssl100e/lib/libcrypto.so.1.0.0 (0x28151000)
=> libz.so.1 => ../zlib125/lib/libz.so.1 (0x282bd000)
   libthr.so.3 => /lib/libthr.so.3 (0x282d3000)
   libc.so.7 => /lib/libc.so.7 (0x282e8000)

As far as I understand things...
'zlib-dynamic' is to include zlib dynamically.
'zlib' is to include zlib statically.
But as shown above, 'zlib' is not doing that.

So I think this is a bug, is that correct?
If it is my configuration usage, how do I make zlib static?


Also, is 'enc -z' the standard zlib testing method?
Why am I getting such a poor compression ratio?
The hashes are md5 in place of wc.
I did check that adding the final reverse '-d' pipe does yield 1MiB
zeros.

dd if=/dev/zero bs=1m count=1 | LD_LIBRARY_PATH=../zlib125/lib
bin/openssl enc -aes128 -a -k 0 -S 0 -e | wc -c
1419990 f8a4638a913dedd984f987767a24796c
dd if=/dev/zero bs=1m count=1 | LD_LIBRARY_PATH=../zlib125/lib
bin/openssl enc -aes128 -a -k 0 -S 0 -e -z | wc -c
1080369 a48155fc72d937c4cfdc609e18b470ac
dd if=/dev/zero bs=1m count=1 | LD_LIBRARY_PATH=../zlib125/lib
bin/openssl zlib -aes128 -a -k 0 -S 0 -e | wc -c
1080369 a48155fc72d937c4cfdc609e18b470ac
dd if=/dev/zero bs=1m count=1 | LD_LIBRARY_PATH=../zlib125/lib
bin/openssl zlib -e | wc -c
1039 cfd12ca5dd18c8cd22cc34bb757c8b9f
dd if=/dev/zero bs=1m count=1 | gzip -n |
LD_LIBRARY_PATH=../zlib125/lib bin/openssl enc -aes128 -a -k 0 -S 0 -e
| wc -c
1455 08d52ad99d2f6edf344ef735ad62150c


There are some documentation bugs...
enc.1: -z should read: 'was compiled'.
'openssl zlib' does not appear to be documented.

Thanks.


FreeBSD RELENG_8 i386
OpenSSL 1.0.0e 6 Sep 2011
platform: BSD-x86-elf
options: bn(64,32) rc4(4x,int) des(ptr,risc1,16,long) idea(int)
 blowfish(idx)
compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -pthread
 -D_THREAD_SAFE -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack
 -DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -Wall
 -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT -DSHA1_ASM
 -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to