Bug 234772 - net/x11vnc: ssl option gives "openssl_init: not compiled with libssl OpenSSL support"
Summary: net/x11vnc: ssl option gives "openssl_init: not compiled with libssl OpenSSL ...
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Marcelo Araujo
Depends on:
Reported: 2019-01-09 01:02 UTC by robert.ayrapetyan
Modified: 2019-01-10 06:47 UTC (History)
0 users

See Also:
dinoex: maintainer-feedback+

suggested patch (3.55 KB, patch)
2019-01-10 06:30 UTC, Dirk Meyer
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description robert.ayrapetyan 2019-01-09 01:02:06 UTC
After upgrading to 12.0, running:

x11vnc -ssl whatever...

ends with:

08/01/2019 16:32:15 Read initial data from X display into framebuffer.
08/01/2019 16:32:15 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/7680
08/01/2019 16:32:15 ** openssl_init: not compiled with libssl OpenSSL support **

Without -ssl option it works fine.
Comment 1 Dirk Meyer freebsd_committer 2019-01-10 05:47:00 UTC
x11vnc is build with SSL.

$ ldd /usr/local/bin/x11vnc
        libvncserver.so.1 => /usr/local/lib/libvncserver.so.1
        libvncclient.so.1 => /usr/local/lib/libvncclient.so.1
        libssl.so.111 => /usr/lib/libssl.so.111
        libcrypto.so.111 => /lib/libcrypto.so.111

The problem is libvncserver:

$ ldd /usr/local/lib/libvncserver.so
        libthr.so.3 => /lib/libthr.so.3 (0x8006c7000)
        libz.so.6 => /lib/libz.so.6 (0x8006f2000)
        libpng16.so.16 => /usr/local/lib/libpng16.so.16 (0x80070c000)
        libjpeg.so.8 => /usr/local/lib/libjpeg.so.8 (0x800749000)
        libc.so.7 => /lib/libc.so.7 (0x800248000)
        libm.so.5 => /lib/libm.so.5 (0x800e00000)

$ ldd /usr/local/lib/libvncserver.so
        libcrypt.so.5 => /lib/libcrypt.so.5 (0x801264000)
        libthr.so.3 => /lib/libthr.so.3 (0x801483000)
        libz.so.6 => /lib/libz.so.6 (0x8016ab000)
        libpng16.so.16 => /usr/local/lib/libpng16.so.16 (0x8018c3000)
        libjpeg.so.8 => /usr/local/lib/libjpeg.so.8 (0x801afe000)
        libssl.so.8 => /usr/lib/libssl.so.8 (0x801d91000)
        libcrypto.so.8 => /lib/libcrypto.so.8 (0x802200000)
        libc.so.7 => /lib/libc.so.7 (0x800823000)
        libm.so.5 => /lib/libm.so.5 (0x80266f000)

The buildlog on FreeBSD 12.0-RELEASE tells:
checking for SSL_library_init in -lssl... no
A libvncserver/libvncclient built this way will not support SSL encryption.
Warning: you may not need USES=ssl

Suggested fix: configure for libvncserver needs to be patched or updated.
Comment 2 Dirk Meyer freebsd_committer 2019-01-10 06:30:22 UTC
Created attachment 200976 [details]
suggested patch

SSL_library_init is obsolete.

TLSv1_server_method is obsolete.

no direct access to ssl->ctx.
Comment 3 Dirk Meyer freebsd_committer 2019-01-10 06:37:09 UTC
Please try suggested patch and pump portrevision.

Newer upstream version 0.9.12 at https://github.com/LibVNC/libvncserver
Comment 4 Marcelo Araujo freebsd_committer 2019-01-10 06:47:33 UTC
(In reply to Dirk Meyer from comment #3)

I'm working on that right now!