Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 674460 - net-vpn/ipsec-tools-0.8.2-r5 : eaytest.c:106:41: error: dereferencing pointer to incomplete type EVP_PKEY {aka struct evp_pkey_st }
Summary: net-vpn/ipsec-tools-0.8.2-r5 : eaytest.c:106:41: error: dereferencing pointer...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords: PATCH
: 696926 697626 (view as bug list)
Depends on:
Blocks: openssl-1.1
  Show dependency tree
 
Reported: 2019-01-03 22:21 UTC by Toralf Förster
Modified: 2019-10-20 23:05 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,17.30 KB, text/plain)
2019-01-03 22:21 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,258.81 KB, text/plain)
2019-01-03 22:21 UTC, Toralf Förster
Details
environment (environment,142.96 KB, text/plain)
2019-01-03 22:22 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,19.04 KB, application/x-bzip)
2019-01-03 22:22 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,23.43 KB, application/x-bzip)
2019-01-03 22:22 UTC, Toralf Förster
Details
net-vpn:ipsec-tools-0.8.2-r5:20190103-220156.log (net-vpn:ipsec-tools-0.8.2-r5:20190103-220156.log,34.18 KB, text/plain)
2019-01-03 22:22 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,40.13 KB, application/x-bzip)
2019-01-03 22:22 UTC, Toralf Förster
Details
Add openssl-1.1.x support to ipsec-tools (ipsec-tools-openssl-1.1.patch,31.31 KB, patch)
2019-01-18 01:38 UTC, Hank Leininger
Details | Diff
ebuild for ipsec-tools (ipsec-tools-0.8.2-r5.ebuild,7.72 KB, text/plain)
2019-10-15 21:56 UTC, cilly
Details
diff of ebuild (ipsec-tools-ebuild.diff,456 bytes, patch)
2019-10-15 21:57 UTC, cilly
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2019-01-03 22:21:52 UTC
   ^~~~~~~
eaytest.c: In function ‘rsa_verify_with_pubkey’:
eaytest.c:106:41: error: dereferencing pointer to incomplete type ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
  error = eay_check_rsasign(src, sig, evp->pkey.rsa);
                                         ^~
make[4]: *** [Makefile:937: eaytest.o] Error 1

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0-developer_20181229-151642

  -------------------------------------------------------------------

  Please see the tracker bug for details.

gcc-config -l:
 [1] x86_64-pc-linux-gnu-7.3.1
 [2] x86_64-pc-linux-gnu-8.2.0 *

Available Python interpreters, in order of preference:
  [1]   python3.6
  [2]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems)
  [3]   ruby26 (with Rubygems) *
Available Rust versions:
  [1]   rust-1.31.1 *
java-config:
The following VMs are available for generation-2:
*)	IcedTea JDK 3.9.0 [icedtea-bin-8]
Available Java Virtual Machines:
  [1]   icedtea-bin-8  system-vm

emerge -qpvO net-vpn/ipsec-tools
[ebuild  N    ] net-vpn/ipsec-tools-0.8.2-r5  USE="ipv6 ldap pam readline -hybrid -idea -kerberos -libressl -nat -rc5 (-selinux) -stats"
Comment 1 Toralf Förster gentoo-dev 2019-01-03 22:21:55 UTC
Created attachment 559724 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2019-01-03 22:21:58 UTC
Created attachment 559726 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2019-01-03 22:22:01 UTC
Created attachment 559728 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2019-01-03 22:22:03 UTC
Created attachment 559730 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2019-01-03 22:22:06 UTC
Created attachment 559732 [details]
logs.tbz2
Comment 6 Toralf Förster gentoo-dev 2019-01-03 22:22:09 UTC
Created attachment 559734 [details]
net-vpn:ipsec-tools-0.8.2-r5:20190103-220156.log
Comment 7 Toralf Förster gentoo-dev 2019-01-03 22:22:12 UTC
Created attachment 559736 [details]
temp.tbz2
Comment 8 Hank Leininger 2019-01-18 01:36:36 UTC
Same, ipsec-tools-0.8.2-r5 is not compatible with OpenSSL 1.1.x.

I found a patch which was mailed to the mostly-dead ipsec-tools mailing list and also picked up by the openwrt folks, it compiles successfully, although I did not test more than racoon -h / racoon -V afterwards.  Will attach to this bug.
Comment 9 Hank Leininger 2019-01-18 01:38:10 UTC
Created attachment 561902 [details, diff]
Add openssl-1.1.x support to ipsec-tools

Cherry-picked from https://github.com/openwrt/packages/blob/master/net/ipsec-tools/patches/015-openssl-1.1.patch
Comment 10 Andreas Sturmlechner gentoo-dev 2019-04-28 21:27:29 UTC
That patch looks huge. @blueness, can we pick it up, considering openwrt seem to use it too?
Comment 11 Hans de Graaff gentoo-dev Security 2019-07-14 08:05:16 UTC
Given the stern warning on the ipsec HOMEPAGE I think this package should be masked for removal: http://ipsec-tools.sourceforge.net/
Comment 12 Maciej S. Szmigiero 2019-07-14 12:29:12 UTC
SF homepage have been abandoned, NetBSD is the new upstream for this package,
see: https://github.com/NetBSD/src/blob/trunk/crypto/dist/ipsec-tools/README

Debian also maintains its own fork, which synchronizes with NetBSD changes,
but contains few extra local patches:
https://salsa.debian.org/debian/ipsec-tools

And yes, this package is in active use.
Comment 13 Jeroen Roovers (RETIRED) gentoo-dev 2019-10-08 03:13:38 UTC
*** Bug 696926 has been marked as a duplicate of this bug. ***
Comment 14 Anthony Basile gentoo-dev 2019-10-08 15:16:25 UTC
(In reply to Maciej S. Szmigiero from comment #12)
> SF homepage have been abandoned, NetBSD is the new upstream for this package,
> see: https://github.com/NetBSD/src/blob/trunk/crypto/dist/ipsec-tools/README
> 
> Debian also maintains its own fork, which synchronizes with NetBSD changes,
> but contains few extra local patches:
> https://salsa.debian.org/debian/ipsec-tools
> 
> And yes, this package is in active use.

I just tried the debian build and its looking for the linux 2.6 kernel headers.  Even the debian version is very old.
Comment 15 cilly 2019-10-08 15:29:47 UTC
(In reply to Anthony Basile from comment #14)
> (In reply to Maciej S. Szmigiero from comment #12)
> > SF homepage have been abandoned, NetBSD is the new upstream for this package,
> > see: https://github.com/NetBSD/src/blob/trunk/crypto/dist/ipsec-tools/README
> > 
> > Debian also maintains its own fork, which synchronizes with NetBSD changes,
> > but contains few extra local patches:
> > https://salsa.debian.org/debian/ipsec-tools
> > 
> > And yes, this package is in active use.
> 
> I just tried the debian build and its looking for the linux 2.6 kernel
> headers.  Even the debian version is very old.

The latest ipsec-tools with the above patch work fine with linux-headers-4.14.x and kernel-4.14.x. The patch applies fine, if placed into /etc/portage/patches/…
Comment 16 Maciej S. Szmigiero 2019-10-08 15:32:49 UTC
Hmm, I have actually submitted few patches to this package to NetBSD in February
and no one has responded yet.

The upstream (NetBSD) code doesn't even currently build on Linux and frees an
uninitialized pointer on an error path so the quality of this package maintenance
is also a bit questionable.

That's why I start to lean towards Hans position that this package should simply
be removed.

The possible replacements are probably net-vpn/libreswan and net-vpn/strongswan.
Comment 17 cilly 2019-10-08 15:37:33 UTC
(In reply to Maciej S. Szmigiero from comment #16)
> Hmm, I have actually submitted few patches to this package to NetBSD in
> February
> and no one has responded yet.
> 
> The upstream (NetBSD) code doesn't even currently build on Linux and frees an
> uninitialized pointer on an error path so the quality of this package
> maintenance
> is also a bit questionable.
> 
> That's why I start to lean towards Hans position that this package should
> simply
> be removed.
> 
> The possible replacements are probably net-vpn/libreswan and
> net-vpn/strongswan.

It works fine here with ipsec or ipsec & l2tp. It builds with all tests and without errors. Tested with macOS & iOS clients. Performance is perfect, reliable and rock solid.
Comment 18 Tomáš Mózes 2019-10-14 03:34:32 UTC
*** Bug 697626 has been marked as a duplicate of this bug. ***
Comment 19 Anthony Basile gentoo-dev 2019-10-15 13:06:37 UTC
(In reply to cilly from comment #17)
> (In reply to Maciej S. Szmigiero from comment #16)
> > Hmm, I have actually submitted few patches to this package to NetBSD in
> > February
> > and no one has responded yet.
> > 
> > The upstream (NetBSD) code doesn't even currently build on Linux and frees an
> > uninitialized pointer on an error path so the quality of this package
> > maintenance
> > is also a bit questionable.
> > 
> > That's why I start to lean towards Hans position that this package should
> > simply
> > be removed.
> > 
> > The possible replacements are probably net-vpn/libreswan and
> > net-vpn/strongswan.
> 
> It works fine here with ipsec or ipsec & l2tp. It builds with all tests and
> without errors. Tested with macOS & iOS clients. Performance is perfect,
> reliable and rock solid.

cilly, do you mind preparing for me a ebuild and patch here.  I'm not sure what you did, but if it works and is secure, then that's good enough for me.
Comment 20 cilly 2019-10-15 21:55:18 UTC
(In reply to Anthony Basile from comment #19)
> (In reply to cilly from comment #17)
> 
> cilly, do you mind preparing for me a ebuild and patch here.  I'm not sure
> what you did, but if it works and is secure, then that's good enough for me.

What I did:

I added the above patch: https://674460.bugs.gentoo.org/attachment.cgi?id=561902 to userpatches /etc/patches/<ipsectoolspath>.

So simply adding a line like:

eapply "${FILESDIR}"/${PN}-<above_patchname>.patch

would do it. Namce the patch accordingly to:
eapply "${FILESDIR}"/${PN}-add-openssl-1.1.x-support.patch
and place it into files.

Then try my attached ebuild.
Comment 21 cilly 2019-10-15 21:56:36 UTC
Created attachment 592830 [details]
ebuild for ipsec-tools
Comment 22 cilly 2019-10-15 21:57:01 UTC
Created attachment 592832 [details, diff]
diff of ebuild
Comment 23 Anthony Basile gentoo-dev 2019-10-20 23:05:14 UTC
(In reply to cilly from comment #22)
> Created attachment 592832 [details, diff] [details, diff]
> diff of ebuild

Thanks cilly.  I've just tested and pushed.  Let me know if there are any issues and reopen this bug if there are.