Bug 370223 - kdelibs4support 5.27.0 fails to compile with OpenSSL 1.1
Summary: kdelibs4support 5.27.0 fails to compile with OpenSSL 1.1
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kdelibs4support
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
: 382696 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-10-06 22:40 UTC by Bernhard Rosenkränzer
Modified: 2017-12-20 09:30 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.40.0gitk &
Sentry Crash Report:


Attachments
fix-build-with-libressl.patch (6.93 KB, patch)
2017-10-20 21:10 UTC, Johannes Hirte
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Rosenkränzer 2016-10-06 22:40:38 UTC
kdelibs4support uses a number of structures that have been made opaque in OpenSSL 1.1, causing compile time failures.

Reproducible: Always

Steps to Reproduce:
1. Install OpenSSL 1.1.0 or higher
2. Rebuild kdelibs4support 5.27.0


Actual Results:  
Build fails

Expected Results:  
Build succeeds
Comment 1 Daniel Vrátil 2017-10-17 07:43:26 UTC
Git commit 9a990c69c606126bcd60cd7718462aec2a92460d by Daniel Vrátil.
Committed on 17/10/2017 at 07:43.
Pushed by dvratil into branch 'master'.

Make kssl compile against OpenSSL 1.1.0

Summary:
OpenSSL 1.1.0 contains some source-incompatible changes, most notably making most of the
structures opaque and introducing new getter/setter functions to modify the structures. This
patch adds some of the newly introduced functions to the KOpenSSL class and modifies the code to call them. The implementation of those newly introduced methods contains both OpenSSL < 1.1 compatible code (direct structure member access) and calls to real functions resolved from OpenSSL>= 1.1 library. Which implementation is used is decided at compile time. Some of the existing methods were renamed to match the OpenSSL 1.1 naming and to avoid conflicts with backward-compatibility names provided by OpenSSL 1.1.

KSSLCertificate::toNetscape() returns empty result when built against OpenSSL 1.1 since I wasn't able to find a proper equivalent in OpenSSL 1.1 API (and there does not seem to be any).

Test Plan: The code compiles under both OpenSSL 1.1 and OpenSSL 1.0.x. I did not test the actual functionality.

Reviewers: #frameworks, dfaure

Reviewed By: dfaure

Subscribers: aacid, arojas, fvogt, ltoscano, rdieter, #frameworks

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D6665

M  +271  -35   src/kssl/kopenssl.cpp
M  +63   -13   src/kssl/kopenssl.h
M  +0    -4    src/kssl/kssl.cpp
M  +2    -2    src/kssl/ksslcallback.c
M  +15   -36   src/kssl/ksslcertchain.cpp
M  +40   -28   src/kssl/ksslcertificate.cpp

https://commits.kde.org/kdelibs4support/9a990c69c606126bcd60cd7718462aec2a92460d
Comment 2 Johannes Hirte 2017-10-20 21:10:21 UTC
Created attachment 108483 [details]
fix-build-with-libressl.patch

commit 9a990c69c606126bcd60cd7718462aec2a92460d with the OpenSSL-1.1.0 patch breaks build with libressl. Attached patch fixes this.
Comment 3 Ralf Habacker 2017-12-20 09:30:53 UTC
*** Bug 382696 has been marked as a duplicate of this bug. ***