Bug 213301 - security/xmlsec1: Fix libxmlsec-openssl when building with LibreSSL
Summary: security/xmlsec1: Fix libxmlsec-openssl when building with LibreSSL
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Johan van Selst
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2016-10-08 00:42 UTC by Michael Gmelin
Modified: 2016-10-08 11:24 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (johans)


Attachments
Simple patch to stop configure detecting libressl as openssl 1.1.0 (1.34 KB, patch)
2016-10-08 00:42 UTC, Michael Gmelin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Gmelin freebsd_committer freebsd_triage 2016-10-08 00:42:28 UTC
Created attachment 175523 [details]
Simple patch to stop configure detecting libressl as openssl 1.1.0

The configure script determines the OpenSSL version used based on OPENSSL_VERSION >= X. In case of LibreSSL, X is 0x20000000L, so configure assumes the OPENSSL_VERSION to be 1.10 and then makes assumptions about the existence of various functions like X509_REVOKED_get0_serialNumber and EVP_CIPHER_CTX_encrypting.

This only hits one when linking against libxmlsec1-openssl.so, in which case you'll see errors like this one:
/usr/local/lib/libxmlsec1-openssl.so: undefined reference to `EVP_CIPHER_CTX_encrypting'

The attached patch is checks if libressl is used and if yes, fall through to openssl 1.0.0 detection, which makes sure that xmlsec puts proper macros in place.

(it's not clear why the library builds in the first place, it's probably pulling in headers from base OpenSSL. I didn't investigate this any further, as the result seemed to work ok).
Comment 1 commit-hook freebsd_committer freebsd_triage 2016-10-08 11:21:40 UTC
A commit references this bug:

Author: brnrd
Date: Sat Oct  8 11:21:03 UTC 2016
New revision: 423502
URL: https://svnweb.freebsd.org/changeset/ports/423502

Log:
  security/xmlsec1: Fix build with LibreSSL

    - Fix build with LibreSSL
    - USE_OPENSSL -> USES= ssl

  PR:		213301
  Submitted by:	grembo
  Reported by:	grembo
  Approved by:	ssl blanket

Changes:
  head/security/xmlsec1/Makefile
  head/security/xmlsec1/files/patch-configure