Redis with TLS - Regarding libssl.so & libcrypto.so self bundling behaviour difference between CentOS 7.6 (OpenSSL 1.1.1k) & Debian 11 (OpenSSL 1.1.1k)

293 views
Skip to first unread message

gkkum...@gmail.com

unread,
Feb 15, 2022, 1:14:33 AM2/15/22
to Redis DB
When we tried compiling the redis source in CentOS 7.6 (OpenSSL 1.0.2k - default) & CentOS 7.6 (OpenSSL 1.1.1k). Noticed the following difference in the generated binary.

Redis Version - 6.2.5
GCC - 4.9.2
  • File Size
    • 1.0.2k - redis-cli (4.8 MB), redis-server (9.1 MB)
    • 1.1.1k - redis-cli (8.1 MB), redis-server (13 MB)
  • Shared Object Dependencies (ldd redis-server)
    • 1.0.2k - has external dependency with
      libssl.so.10 & libcrypto.so.10
      • linux-vdso.so.1 =>  (0x00007fff49332000)
      • libm.so.6 => /lib64/libm.so.6 (0x00007f6e2d280000)
      • libdl.so.2 => /lib64/libdl.so.2 (0x00007f6e2d07c000)
      • librt.so.1 => /lib64/librt.so.1 (0x00007f6e2ce73000)
      • libssl.so.10 => /lib64/libssl.so.10 (0x00007f6e2cc01000)
      • libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00007f6e2c7a0000)
      • libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f6e2c583000)
      • libc.so.6 => /lib64/libc.so.6 (0x00007f6e2c1c0000)
      • /lib64/ld-linux-x86-64.so.2 (0x00005623afe3c000)
    • 1.1.1k - No dependency (w.r.t libssl & libcrypto)
      • linux-vdso.so.1 =>  (0x00007fff033d6000)
      • libm.so.6 => /lib64/libm.so.6 (0x00007ff010be9000)
      • libdl.so.2 => /lib64/libdl.so.2 (0x00007ff0109e5000)
      • librt.so.1 => /lib64/librt.so.1 (0x00007ff0107dd000)
      • libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ff0105c1000)
      • libc.so.6 => /lib64/libc.so.6 (0x00007ff0101f4000)
      • /lib64/ld-linux-x86-64.so.2 (0x00007ff010eeb000)
    The redis binary compiled in CentOS 7.6 (with OpenSSL 1.1.1k) didn't have any dependency with libssl & libcrypto. Whereas the Redis binary compiled in Debian 11 with OpenSSL 1.1.1k (default) had the dependency with libssl.so.10, libcrypto.so.10. Seems the OpenSSL self bundling behaviour is only applicable to CentOS 7.6 & OpenSSL 1.1.1k combination.
    • Debian 11 (with OpenSSL 1.1.1k)
      • File Size - redis-cli (4.8 MB), redis-server (9.1 MB)
      • Shared Object Dependencies (ldd redis-server)
        • linux-vdso.so.1 (0x00007ffdd3913000)
        • libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8627286000)
        • libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f8627280000)
        • librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f8627275000)
        • libssl.so.1.1 => /lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007f86271e2000)
        • libcrypto.so.1.1 => /lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007f8626eee000)
        • libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8626eca000)
        • libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8626d05000)
        • /lib64/ld-linux-x86-64.so.2 (0x00007f86273d5000)

    Would like to know the reason for libssl.so & libcrypto.so self bundling behaviour difference between CentOS 7.6 (with OpenSSL 1.1.1k) and Debian 11 (with OpenSSL 1.1.1k). Please let me know if you need any clarifications.

    Reply all
    Reply to author
    Forward
    0 new messages