Bug 162194 - kdelibs fails to build with openssl 0.9.9 snapshot
Summary: kdelibs fails to build with openssl 0.9.9 snapshot
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: kssl (show other bugs)
Version: unspecified
Platform: NetBSD pkgsrc NetBSD
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-17 05:00 UTC by Mark Davies
Modified: 2010-08-04 00:45 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
patch against 3.5.9 release (3.99 KB, patch)
2008-05-17 05:02 UTC, Mark Davies
Details
patch against 4.0.4 release (4.24 KB, patch)
2008-05-17 05:03 UTC, Mark Davies
Details
corrected patch against 4.0.4 release (4.26 KB, patch)
2008-05-17 05:35 UTC, Mark Davies
Details
Further 4.0.4 required patch (373 bytes, patch)
2008-05-17 05:57 UTC, Mark Davies
Details
Further 3.5.9 (kdebase) required patch (362 bytes, patch)
2008-05-18 14:26 UTC, Mark Davies
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Davies 2008-05-17 05:00:59 UTC
Version:            (using KDE 4.0.4)
Installed from:    NetBSD pkgsrc
Compiler:          gcc4 
OS:                NetBSD

If using a snapshot of the yet to be released openssl 0.9.9, kdelibs fails to build as it tries to use ASN1_METHOD, which has been removed.

This is true of the 3.5 branch, the 4.0 branch and the trunk as the code is essentially unchanged in all these.  I will attach patches that should fix for 3.5.9 and 4.0.4 (trunk should be same as the 4.0.4 patch)

cheers
mark
Comment 1 Mark Davies 2008-05-17 05:02:20 UTC
Created attachment 24800 [details]
patch against 3.5.9 release
Comment 2 Mark Davies 2008-05-17 05:03:08 UTC
Created attachment 24801 [details]
patch against 4.0.4 release
Comment 3 Mark Davies 2008-05-17 05:35:39 UTC
Created attachment 24803 [details]
corrected patch against 4.0.4 release
Comment 4 Mark Davies 2008-05-17 05:57:15 UTC
Created attachment 24804 [details]
Further 4.0.4 required patch

4.0.4 (and presumably trunk) also require this patch for other openssl-0.9.9
changes.
Comment 5 Mark Davies 2008-05-18 14:26:54 UTC
Created attachment 24821 [details]
Further 3.5.9 (kdebase) required patch

Additional patch required to build kdebase-3.5.9 with current openssl,
equivalent to attachment 24804 [details] for 4.0.4.
Comment 6 Dirk Mueller 2008-05-20 11:06:09 UTC
SVN commit 810213 by mueller:

use a different method for generating Netscape X509 certificates,
as the old hook we used disappeared with openssl 0.9.9. The newly
used function seems to be available since 0.9.7a, which is the oldest
openssl version anyone should run anyway. Patch by Mark Davies
CCBUG: 162194


 M  +7 -15     kopenssl.cpp  
 M  +0 -7      kopenssl.h  
 M  +7 -8      ksslcertificate.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=810213
Comment 7 Bernhard Rosenkraenzer 2008-05-20 12:02:54 UTC
The fix for this breaks the build here with openssl 0.9.8g...

/usr/src/ark/BUILD/kdelibs/kio/kssl/ksslcertificate.cpp: In member function 'QByteArray KSSLCertificate::toNetscape()':
/usr/src/ark/BUILD/kdelibs/kio/kssl/ksslcertificate.cpp:1202: error: 'NETSCAPE_X509' was not declared in this scope
/usr/src/ark/BUILD/kdelibs/kio/kssl/ksslcertificate.cpp:1202: error: expected `;' before 'nx'
/usr/src/ark/BUILD/kdelibs/kio/kssl/ksslcertificate.cpp:1210: error: 'nx' was not declared in this scope

# grep -r NETSCAPE_X509 /usr/include/openssl
# rpm -qf /usr/include/openssl/x509.h
openssl-devel-0.9.8g-1ark.i586
Comment 8 Bernhard Rosenkraenzer 2008-05-20 12:04:18 UTC
NETSCAPE_X509 isn't defined anywhere in stock openssl 0.9.8g sources either
Comment 9 Bernhard Rosenkraenzer 2008-05-20 12:13:59 UTC
The NETSCAPE_X509 typedef is all that is missing to get the new ksslcertificate.cpp to compile with openssl 0.9.8g again:

typedef struct NETSCAPE_X509_st
{
    ASN1_OCTET_STRING *header;
    X509 *cert;
} NETSCAPE_X509;

kopenssl.cpp still barfs after adding that, though:

/usr/src/ark/BUILD/kdelibs/kio/kssl/kopenssl.cpp: In member function 'int KOpenSSLProxy::ASN1_i2d_fp(FILE*, unsigned char*)':
/usr/src/ark/BUILD/kdelibs/kio/kssl/kopenssl.cpp:1000: error: 'K_ASN1_i2d_fp' was not declared in this scope
Comment 10 FiNeX 2010-08-03 17:47:50 UTC
Hi! Is this bug still valid on more recent KDE 4 versions?
Comment 11 Tommi Tervo 2010-08-03 18:29:46 UTC
Dirk fixed this just after Bero's comment.

------------------------------------------------------------------------
r810254 | mueller | 2008-05-20 13:15:20 +0300 (Tue, 20 May 2008) | 2 lines

compile again for older openssl versions
Comment 12 Mark Davies 2010-08-04 00:45:18 UTC
On Wednesday 04 August 2010 04:29:47 Tommi Tervo wrote:
> --- Comment #11 from Tommi Tervo <tommi tervo gmail com>  2010-08-03
> 18:29:46 --- Dirk fixed this just after Bero's comment.

The original issue was fixed but the patch in the "Further 4.0.4 required 
patch" attachment, we are still applying against 4.4.5.

cheers
mark