Bug 226202

Summary: sysutils/synergy fails after update to 2.2.0 with libressl
Product: Ports & Packages Reporter: Walter Schwarzenfeld <w.schwarzenfeld>
Component: Individual Port(s)Assignee: Yuri Victorovich <yuri>
Status: Closed FIXED    
Severity: Affects Only Me CC: brnrd, yuri
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
possible-patch-synergy-SecureSocket.cpp
none
patch-src_lib_net_SecureSocket.cpp none

Description Walter Schwarzenfeld freebsd_triage 2018-02-25 16:33:37 UTC
synergy fails with libressl with:
/usr/ports/sysutils/synergy/work/synergy-core-2.0.0-stable/src/lib/net/SecureSocket.cpp:816:34: error: use of undeclared identifier 'SSL_get_client_ciphers'; did you mean 'SSL_get_current_cipher'?
        STACK_OF(SSL_CIPHER) * cStack = SSL_get_client_ciphers(m_ssl->m_ssl);
                                        ^~~~~~~~~~~~~~~~~~~~~~
                                        SSL_get_current_cipher
/usr/local/include/openssl/ssl.h:1220:19: note: 'SSL_get_current_cipher' declared here
const SSL_CIPHER *SSL_get_current_cipher(const SSL *s);
                  ^
/ram/usr/ports/sysutils/synergy/work/synergy-core-2.0.0-stable/src/lib/net/SecureSocket.cpp:816:25: error: cannot initialize a variable of type 'struct stack_st_SSL_CIPHER *' with an rvalue of type 'const SSL_CIPHER *' (aka 'const ssl_cipher_st *')
        STACK_OF(SSL_CIPHER) * cStack = SSL_get_client_ciphers(m_ssl->m_ssl);
                               ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
ninja: build stopped: subcommand failed.
Comment 1 Walter Schwarzenfeld freebsd_triage 2018-02-25 17:08:11 UTC
Created attachment 190996 [details]
possible-patch-synergy-SecureSocket.cpp

I have a patch which it builds. But I am not sure, if it is right.
Comment 2 Yuri Victorovich freebsd_committer 2018-02-25 19:38:14 UTC
(In reply to w.schwarzenfeld from comment #1)

I am also not sure if it is right.
You need to consult with somebody who is an expert in differences between ssl implementations.
Comment 3 Yuri Victorovich freebsd_committer 2018-02-25 19:40:51 UTC
(In reply to Yuri Victorovich from comment #2)

Aren't they supposed to all have the same interface? It actually looks like a bug in libressl that it doesn't have some functions that openssl has.

You also might want to ask on libressl ML.
Comment 4 Walter Schwarzenfeld freebsd_triage 2018-02-25 19:44:30 UTC
Bernard Spill is cc'd.
Comment 5 Yuri Victorovich freebsd_committer 2018-02-27 22:13:31 UTC
I'm now a maintainer.
Comment 6 Walter Schwarzenfeld freebsd_triage 2018-03-01 17:08:24 UTC
Comment on attachment 190996 [details]
possible-patch-synergy-SecureSocket.cpp

Obsolete patch, had issues with synergy.
Comment 7 Walter Schwarzenfeld freebsd_triage 2018-03-01 17:43:05 UTC
Created attachment 191111 [details]
patch-src_lib_net_SecureSocket.cpp

This should the right patch.
Comment 8 Yuri Victorovich freebsd_committer 2018-03-01 20:18:23 UTC
Committed, thanks!
Comment 9 commit-hook freebsd_committer 2018-03-01 20:19:04 UTC
A commit references this bug:

Author: yuri
Date: Thu Mar  1 20:18:15 UTC 2018
New revision: 463351
URL: https://svnweb.freebsd.org/changeset/ports/463351

Log:
  sysutils/synergy: Unbreak with libressl.

  New patch does it.

  PR:		226202
  Submitted by:	w.schwarzenfeld@utanet.at
  Approved by:	tcberner (mentor, implicit)

Changes:
  head/sysutils/synergy/files/patch-src_lib_net_SecureSocket.cpp