php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21240 --with-openssl and openssl 0.95 does not buid: ERR_error_string_n missing.
Submitted: 2002-12-28 07:07 UTC Modified: 2003-01-02 14:35 UTC
From: bob at xware dot it Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.3.0 OS: redhat 6.2 i386
Private report: No CVE-ID: None
 [2002-12-28 07:07 UTC] bob at xware dot it
not really important, just in case somebody else has the
same trouble.
compiling 4.3.0 with openssl < 0.96 leads to an undefined
reference to ERR_error_string_n, here is the small fix.

--- main/network.c.orig Sat Dec 28 00:15:15 2002
+++ main/network.c      Sat Dec 28 00:14:34 2002
@@ -50,6 +50,7 @@
 #endif
 
 #ifdef HAVE_OPENSSL_EXT
+#include <openssl/crypto.h>
 #include <openssl/err.h>
 #endif
 
@@ -809,10 +810,18 @@
                                if (ebuf) {
                                        esbuf[0] = '\n';
                                        esbuf[1] = '\0';
+#if OPENSSL_VERSION_NUMBER < 0x0090600fL
+                                       ERR_error_string(code, esbuf + 1);
+#else
                                        ERR_error_string_n(code, esbuf + 1, sizeof(esbuf) - 2);
+#endif
                                } else {
                                        esbuf[0] = '\0';
+#if OPENSSL_VERSION_NUMBER < 0x0090600fL
+                                       ERR_error_string(code, esbuf);
+#else
                                        ERR_error_string_n(code, esbuf, sizeof(esbuf) - 1);
+#endif
                                }
                                code = strlen(esbuf);
                                esbuf[code] = '\0';

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-02 12:35 UTC] iliaa@php.net
Please use openssl 0.96 and higher, 0.95 has a number of security issues and should not be used.
 [2003-01-02 12:36 UTC] wez@php.net
There are security issues with older versions of OpenSSL, so we will not support this in our distribution, in order to encourage people to run with more secure systems.
As a side effect, we don't have to clutter up the code with #ifdefs, making it more maintainable for us in the long run.
 [2003-01-02 14:35 UTC] bob at xware dot it
this comes when generating .rpm for old (but still supported) redhat distributions, where security patches are applied
on original revisions of the libraries.
anyway, as i said, it's not a problem. just to let you know,
the configure (acinclude.m4 ?) checks for >= 0.95.

thanks!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 13:01:33 2024 UTC