Bug 272280 - security/libpki: fix build with OpenSSL 3.0
Summary: security/libpki: fix build with OpenSSL 3.0
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: Muhammad Moinur Rahman
URL: https://github.com/openca/libpki/pull/74
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-29 09:53 UTC by Bruno Damour
Modified: 2023-08-07 15:27 UTC (History)
4 users (show)

See Also:
bruno: maintainer-feedback+


Attachments
Patch to fix build against OpenSSL 3.0 in 14.0-CURRENT (14.41 KB, patch)
2023-06-29 09:53 UTC, Bruno Damour
no flags Details | Diff
git diff from ports tree root (13.87 KB, patch)
2023-08-07 14:04 UTC, Bruno Damour
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bruno Damour 2023-06-29 09:53:12 UTC
Created attachment 243071 [details]
Patch to fix build against OpenSSL 3.0 in 14.0-CURRENT

Patch to allow building in FreeBSD 14.0-CURRENT (OpenSSL 3.0.9).

Fixes :
- detection of OpenSSL version (a bit hacky IMHO)
- changes breaking compilation

Doesn't cover the replacement of obsoleted functions (specially the move from engines to providers) which is way above my paygrade.

I submitted the patch upstream as a PR (https://github.com/openca/libpki/pull/74).

Builds with poudriere on FreeBSD 13.2-p1 and 14.0-CURRENT (arch  x86_64).
Comment 1 Bruno Damour 2023-08-07 13:28:02 UTC
Hello,
I'm getting a lot of (negative) feedback from pkg-fallout asking for a PR... is there something I should do ?
Bruno
Comment 2 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2023-08-07 13:34:49 UTC
Hi,

Can you send me a git formatted patch please?

This patch does not apply cleanly.
Comment 3 Bruno Damour 2023-08-07 14:04:45 UTC
Created attachment 243924 [details]
git diff from ports tree root

Hello,
Thanks for quick answer !
I made a git diff from the ports tree root, could this be better ?
Bruno
Comment 4 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2023-08-07 14:20:16 UTC
Perfect. Will land in my next batch of commits.
Comment 5 commit-hook freebsd_committer freebsd_triage 2023-08-07 15:25:30 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a07283aae1c15d460641ec311f4e5a3c6c122151

commit a07283aae1c15d460641ec311f4e5a3c6c122151
Author:     Bruno Damour <bruno@ruomad.net>
AuthorDate: 2023-08-07 14:15:13 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-08-07 15:24:45 +0000

    security/libpki: Fix build with openssl3

    Fixes :
    - detection of OpenSSL version (a bit hacky IMHO)
    - changes breaking compilation

    Doesn't cover the replacement of obsoleted functions (specially the move
    from engines to providers) which is way above my paygrade.

    This patch has been upstream as a PR
    (https://github.com/openca/libpki/pull/74).

    PR:             272280
    Approved by:    bruno@ruomad.net (submitter is maintainer)

 security/libpki/Makefile                           |  7 +-
 security/libpki/distinfo                           |  2 +-
 security/libpki/files/patch-acinclude.m4 (new)     | 16 ++++
 .../patch-src-drivers-engine-engine_hsm.c (new)    | 12 +++
 ...ch-src-drivers-openssl-openssl_hsm_pkey.c (new) | 59 ++++++++++++++
 .../files/patch-src-libpki-prqp-prqp_asn1.h (new)  | 53 +++++++++++++
 .../files/patch-src-openssl-pki_ocsp_resp.c (new)  | 14 ++++
 .../files/patch-src-openssl-pki_x509_cert.c (new)  | 26 ++++++
 .../files/patch-src-openssl-pki_x509_req.c (new)   | 14 ++++
 security/libpki/files/patch-src-pki_init.c (new)   | 13 +++
 security/libpki/files/patch-src-pki_x509.c (new)   | 92 ++++++++++++++++++++++
 11 files changed, 304 insertions(+), 4 deletions(-)