Bug 193215

Summary: kssl fails to build with OpenSSL 1.0 betas
Product: [Unmaintained] kio Reporter: Bernhard Rosenkraenzer <bero>
Component: ksslAssignee: Konqueror Bugs <konqueror-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: rdieter
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: patch
Patch for kdelibs/security/crypto/*

Description Bernhard Rosenkraenzer 2009-05-19 11:25:09 UTC
Version:            (using Devel)
Compiler:          gcc 4.4 
OS:                Linux
Installed from:    Compiled sources

After updating to OpenSSL 1.0.0-beta2 (same goes for beta1), kssl fails to compile.

At first, it fails because STACK has been renamed to _STACK (with a comment that STACK_OF should be used instead).

Fixing that, OpenSSL 1.0.0's "safer" typecasting system fails because it passes around more void* pointers where KOpenSSLProxy expects to get STACK* pointers.

I'm attaching a fairly ugly patch that makes it compile, but would like someone with more OpenSSL experience to review it before committing.

The patch breaks binary compatibility for those actually using OpenSSL 1.x, but that shouldn't matter much because OpenSSL's soname has changed as well, so people using 1.x are not binary compatible with those using 0.x in the first place.

The hunk changing kopenssl.cpp is probably a good idea for OpenSSL 0.9.x as well, given the K_SSL_get_ciphers definition doesn't match the prototype earlier in the file.
Comment 1 Bernhard Rosenkraenzer 2009-05-19 11:26:11 UTC
Created attachment 33830 [details]
patch
Comment 2 Bernhard Rosenkraenzer 2009-05-19 11:46:12 UTC
Created attachment 33831 [details]
Patch for kdelibs/security/crypto/*

Later on in the build with OpenSSL 1.0, kdelibs/security/crypto/crypto.cpp fails as well:

kdelibs/security/crypto/crypto.cpp:2297: error: invalid conversion from ‘const SSL_METHOD*’ to ‘SSL_METHOD*’
kdelibs/security/crypto/crypto.cpp:2308: error: invalid conversion from ‘const SSL_CIPHER*’ to ‘SSL_CIPHER*’

Attaching another patch for this; this is probably good to apply either way, some extra const-ness that isn't part of the API can't hurt...
Comment 3 Rex Dieter 2009-12-11 21:53:49 UTC
This should be fixed in both trunk/ and branches/4.3 now.

http://websvn.kde.org/?view=revision&revision=1047549

http://websvn.kde.org/?view=revision&revision=1047595