Bug 239491 - security/strongswan: Fails to build with libressl: error: use of undeclared identifier 'EVP_PKEY_*'
Summary: security/strongswan: Fails to build with libressl: error: use of undeclared i...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2019-07-28 11:36 UTC by igor.polovykh
Modified: 2021-01-04 13:56 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (strongswan)
koobs: merge-quarterly?


Attachments
build log (10.38 KB, text/plain)
2019-07-28 11:36 UTC, igor.polovykh
no flags Details
Patch to exclude openssl functions not supported by LibreSSL (5.42 KB, patch)
2019-08-01 07:10 UTC, Francois ten Krooden
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description igor.polovykh 2019-07-28 11:36:49 UTC
Created attachment 206113 [details]
build log

FreeBSD 12.0-RELEASE-p2 FreeBSD 12.0-RELEASE-p2 c3ec797e4c1(releng/12.0)  amd64

openssl is not installed on system, installed libressl.


libtool: compile:  cc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../src/libstrongswan -DFIPS_MODE=0 -I/usr/local/include -O2 -pipe -fstack-pro$
--- openssl_plugin.lo ---
openssl_plugin.c:315:10: error: use of undeclared identifier 'EVP_PKEY_ED448'
                                case EVP_PKEY_ED448:
                                     ^
openssl_plugin.c:466:8: error: use of undeclared identifier 'EVP_PKEY_ED25519'; did you mean 'KEY_ED25519'?
                case EVP_PKEY_ED25519:
                     ^~~~~~~~~~~~~~~~
                     KEY_ED25519
../../../../src/libstrongswan/credentials/keys/public_key.h:47:2: note: 'KEY_ED25519' declared here
        KEY_ED25519 = 4,
        ^
openssl_plugin.c:467:8: error: use of undeclared identifier 'EVP_PKEY_ED448'
                case EVP_PKEY_ED448:
                     ^
1 warning and 4 errors generated.
*** [openssl_plugin.lo] Error code 1

make[7]: stopped in /usr/ports/security/strongswan/work/strongswan-5.8.0/src/libstrongswan/plugins/openssl
--- openssl_crl.lo ---
1 warning generated.
1 error
Comment 1 Francois ten Krooden 2019-08-01 07:10:32 UTC
Created attachment 206186 [details]
Patch to exclude openssl functions not supported by LibreSSL

Hi,
Please check if this patch solves your issue.
I added some patches for the openssl plugin to exclude some features not supported by LibreSSL
Comment 2 igor.polovykh 2019-08-10 12:36:08 UTC
thank you. works very well.
Comment 3 sohaib khan 2020-12-31 20:13:34 UTC
(In reply to igor.polovykh from comment #2)
hi 

Can you tell how did you actually apply this patch.

I am facing the same error Strowgswan5.9.0 and freebsd 12.1

I tried the same patch but did not succeeded. Can you tell me please how did you actually apply this patch


thanks,
Comment 4 Francois ten Krooden 2021-01-04 13:53:22 UTC
(In reply to sohaib khan from comment #3)

- Download the patch file and save it (e.g. libressl.patch)
- Copy the patch file to the strongswan port directory (/usr/ports/security/strongswan)
- Change to the strongswan port directory (cd /usr/ports/security/strongswan)
- patch -p 0 < libressl.patch

patch will apply the patch the the strongswan port in the directory and it can then be compiled.
It creates a number of extra files in the files directory in the strongSwan port to patch the libressl fixes.
Comment 5 sohaib khan 2021-01-04 13:56:06 UTC
thanks alot. i will try it.
thank you so much for helping me.
so nice of you :-)