# 7.1.0RC5 patch

- Thread: https://externals.io/message/96639
- Original archive: https://news-web.php.net/php.internals/96639
- Started by Alice Wonder on 2016-10-30T00:22:54+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #96639 — Alice Wonder — 2016-10-30T00:22:54+00:00

URL: https://externals.io/message/96639#96639

Hi, first post to list.

LibreSSL user.

PHP 7.1.0RC5 just needs one minor patch to work with LibreSSL, attached

Justification -

X509_get_signature_nid() was introduced in OpenSSL 1.0.2 but LibreSSL 
fork is prior to that.

However (and I don't like this) LibreSSL uses a `OPENSSL_VERSION_NUMBER` 
defined as 0x20000000L

So have to check for presence of LIBRESSL_VERSION_NUMBER when using 
functions introduced to OpenSSL after the fork (1.0.1h I think)

Tested building against LibreSSL 2.4.3 on a CentOS 7 system (where 
OpenSSL has been completely removed) - 7.1.0RC5 compiles and works with 
that line changed.

---

## #96659 — Jakub Zelenka — 2016-10-30T19:15:37+00:00

URL: https://externals.io/message/96639#96659 · In reply to: #96639

Hey



> Hi, first post to list.
>
> LibreSSL user.
>
> PHP 7.1.0RC5 just needs one minor patch to work with LibreSSL, attached
>
> Justification -
>
> X509_get_signature_nid() was introduced in OpenSSL 1.0.2 but LibreSSL fork
> is prior to that.
>
> However (and I don't like this) LibreSSL uses a `OPENSSL_VERSION_NUMBER` 
> defined as 0x20000000L
>
> So have to check for presence of LIBRESSL_VERSION_NUMBER when using
> functions introduced to OpenSSL after the fork (1.0.1h I think)
>
> Tested building against LibreSSL 2.4.3 on a CentOS 7 system (where OpenSSL
> has been completely removed) - 7.1.0RC5 compiles and works with that line
> changed.
>

Hopefully fixed in
https://github.com/php/php-src/commit/1a13809bae9d821783380006de315efcd2b60e61
;)

Thanks
