Bug 216763 - net/haproxy: fix build with libressl-devel
Summary: net/haproxy: fix build with libressl-devel
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dmitry Sivachenko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-03 21:55 UTC by Piotr Kubaj
Modified: 2017-03-28 09:02 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (demon)


Attachments
patch (2.09 KB, patch)
2017-02-03 21:55 UTC, Piotr Kubaj
no flags Details | Diff
patch (2.80 KB, patch)
2017-02-04 16:37 UTC, Piotr Kubaj
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer freebsd_triage 2017-02-03 21:55:33 UTC
Created attachment 179579 [details]
patch

This patch fixes build with libressl-devel. I've also tested building with base OpenSSL 1.0.1 on FreeBSD 10.3.
Comment 1 Dmitry Sivachenko freebsd_committer freebsd_triage 2017-02-04 06:31:24 UTC
Can you please send your patch to author? <haproxy@formilux.org>
Comment 2 Piotr Kubaj freebsd_committer freebsd_triage 2017-02-04 10:33:40 UTC
(In reply to Dmitry Sivachenko from comment #1)
I already did, although the version in this PR is slighly better:
https://www.mail-archive.com/haproxy@formilux.org/msg24835.html
Comment 3 Dmitry Sivachenko freebsd_committer freebsd_triage 2017-02-04 12:35:49 UTC
Ah, sorry, I missed it.  Let's see which version Willy will include upstream and I can add that patch to ports so we have it before next haproxy version is rolled out.
Comment 4 Piotr Kubaj freebsd_committer freebsd_triage 2017-02-04 16:37:44 UTC
Created attachment 179603 [details]
patch

Corrected to define SSL_CTX_get_tlsext_status_cb macro.
Comment 5 Piotr Kubaj freebsd_committer freebsd_triage 2017-03-12 17:11:34 UTC
Willy has given his opinion:
https://www.mail-archive.com/haproxy@formilux.org/msg25179.html

Could you now commit my patch?
Comment 6 Dmitry Sivachenko freebsd_committer freebsd_triage 2017-03-13 10:35:13 UTC
Your patch produces a compile warning on FreeBSD-10 with base OpenSSL:

src/ssl_sock.c:801:9: warning: incompatible integer to pointer conversion
      assigning to 'void (*)(void)' from 'long' [-Wint-conversion]
        SSL_CTX_get_tlsext_status_cb(ctx, &callback);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ssl_sock.c:799:13: note: expanded from macro 'SSL_CTX_get_tlsext_status_cb'
  ...= SSL_CTX_ctrl(ctx,SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB,0, (void (**)(void))cb)
     ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

Can this be addressed?

PS: I am not *SSL guru or fan, so given that there are a number of implementations and incompatible version around, I would prefer you to spent this energy enhancing your patch so Willy can apply it without modification (and do it faster than now providing it required a manual tweaking).
Comment 7 Dmitry Sivachenko freebsd_committer freebsd_triage 2017-03-28 09:02:36 UTC
Port updated to version 1.7.4 with your patch included upstream.