Bug 232309 - [PATCH] net/socketw : Fix build on OpenSSL > 1.1
Summary: [PATCH] net/socketw : Fix build on OpenSSL > 1.1
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: Koichiro Iwao
URL:
Keywords: patch-ready
Depends on:
Blocks: 231931
  Show dependency treegraph
 
Reported: 2018-10-16 08:00 UTC by Thibault Payet
Modified: 2019-03-12 09:25 UTC (History)
2 users (show)

See Also:
monwarez: maintainer-feedback+
koobs: merge-quarterly?


Attachments
Mark as broken for OpenSSL > 1.1 (692 bytes, patch)
2018-12-15 17:17 UTC, Thibault Payet
monwarez: maintainer-approval+
Details | Diff
fix build with openssl (2.51 KB, patch)
2019-01-18 16:02 UTC, Thibault Payet
monwarez: maintainer-approval+
Details | Diff
patch (3.11 KB, patch)
2019-01-18 23:43 UTC, Thibault Payet
monwarez: maintainer-approval+
Details | Diff
patch (3.11 KB, patch)
2019-01-18 23:46 UTC, Thibault Payet
no flags Details | Diff
patch (3.11 KB, patch)
2019-01-22 15:48 UTC, Thibault Payet
monwarez: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thibault Payet 2018-10-16 08:00:23 UTC
socketw cannot build with OpenSSL 1.1.1, it build on 1.0.2p
See https://github.com/RigsOfRods/socketw/issues/2
Comment 1 Thibault Payet 2018-12-15 17:17:28 UTC
Created attachment 200135 [details]
Mark as broken for OpenSSL > 1.1

Let's mark this broken when OpenSSL is not older than 1.1
also it may fail on recent LibreSSL too.
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2018-12-17 03:47:23 UTC
After marking BROKEN, needs patch to fix with OpenSSL 1.1.x
Comment 3 Thibault Payet 2019-01-18 16:02:12 UTC
Created attachment 201240 [details]
fix build with openssl

I made a patch to make it build with openssl > 1.1
Comment 4 Thibault Payet 2019-01-18 16:55:34 UTC
For the moment this patches may fail on openssl < 1.1 .
The patch files should be applied only when openssl >= 1.1
Comment 5 Thibault Payet 2019-01-18 23:43:42 UTC
Created attachment 201257 [details]
patch

This should add a compatibility layer for older version of openssl
Comment 6 Thibault Payet 2019-01-18 23:46:49 UTC
Created attachment 201258 [details]
patch

use auto for certificate type
Comment 7 Thibault Payet 2019-01-22 15:48:29 UTC
Created attachment 201335 [details]
patch

OBJ_nid2sn should be made exterior of X509_certificate_type so that the function will always return an int that will be translated to the correct string
Comment 8 Thibault Payet 2019-01-22 17:17:31 UTC
it pass qa on 12.0, and still works on OpenSSL < 1.1 

https://github.com/RigsOfRods/socketw/pull/10
Comment 9 Koichiro Iwao freebsd_committer freebsd_triage 2019-03-12 00:39:52 UTC
testbuild@work on current with
- base OpenSSL
- security/openssl
- security/openssl111
- security/libressl
- security/libressl-devel
Comment 10 Koichiro Iwao freebsd_committer freebsd_triage 2019-03-12 07:07:45 UTC
Everything looks fine.
Comment 11 commit-hook freebsd_committer freebsd_triage 2019-03-12 07:52:32 UTC
A commit references this bug:

Author: meta
Date: Tue Mar 12 07:52:23 UTC 2019
New revision: 495446
URL: https://svnweb.freebsd.org/changeset/ports/495446

Log:
  net/socketw: Fix build with OpenSSL > 1.1

  PR:		232309
  Reviewed by:	Thibault Payet <monwarez@mailoo.org> (maintainer)
  MFH:		2019Q1
  Sponsored by:	HAW International, Inc.

Changes:
  head/net/socketw/files/
  head/net/socketw/files/patch-src_sw__ssl.cxx
Comment 12 commit-hook freebsd_committer freebsd_triage 2019-03-12 09:20:46 UTC
A commit references this bug:

Author: meta
Date: Tue Mar 12 09:20:13 UTC 2019
New revision: 495448
URL: https://svnweb.freebsd.org/changeset/ports/495448

Log:
  MFH: r495446

  net/socketw: Fix build with OpenSSL > 1.1

  PR:		232309
  Reviewed by:	Thibault Payet <monwarez@mailoo.org> (maintainer)
  Sponsored by:	HAW International, Inc.

  Approved by:	portmgr (joneum)

Changes:
_U  branches/2019Q1/
  branches/2019Q1/net/socketw/files/
Comment 13 Koichiro Iwao freebsd_committer freebsd_triage 2019-03-12 09:25:32 UTC
Committed, thanks.