make fails to build squid with openssl (deprecated functions used) - makefile

I'm trying to build squid with openssl, but fail because make threats warnings as errors
An example: gadgets.h -> error 'void RSA_free(RSA*)' is deprecated; Since **Openssl 3.0.0** -Werror=deprecated-declarations ..
I assume that -Werror=deprecated-declarations instructs make to threat these warnings as errors. But in which file is -Werror=deprecated-declarations? How can I suppress this / avoid it?
I need squid with openssl.

france1 answers correct. But maybe "step by step" commands will help to someone. I successfully built Squid 5.5 on Ubuntu 22.04 with Openssl 3.0.2.
Download openssl 1.1.1j:
cd /tmp/
wget https://github.com/openssl/openssl/archive/refs/tags/OpenSSL_1_1_1j.zip
Extract and install openssl to /usr/local/openssl_1_1_1j from source
unzip openssl-OpenSSL_1_1_1j.zip
cd ./openssl-OpenSSL_1_1_1j/
./config --prefix=/usr/local/openssl_1_1_1j --openssldir=/usr/local/openssl_1_1_1j/ssl
make
sudo make install
Export vars
export PATH="/usr/local/openssl_1_1_1j/bin:$PATH" LD_LIBRARY_PATH="/usr/local/openssl_1_1_1j/lib:$LD_LIBRARY_PATH"
export PKG_CONFIG_PATH=/usr/local/openssl_1_1_1j/lib/pkgconfig
Download squid and compile with custom openssl:
wget http://www.squid-cache.org/Versions/v5/squid-5.5.tar.gz
tar -xzvf ./squid-5.5.tar.gz
cd squid-5.5/
./configure --enable-ssl-crtd --with-openssl=/usr/local/openssl_1_1_1j/lib
make
sudo make install
Works!

I can compile the latest version by openssl 3. It should be fixed
check https://github.com/squid-cache/squid/commit/3db8afad158dcdaa9390d8b998239e5763ae2cf4
# squid -v
Squid Cache: Version 5.7-VCS
Service Name: squid
This binary uses OpenSSL 3.0.2 15 Mar 2022.
Ha Ha!

These things are deprecated since Openssl 3.0.0.
I just used Openssl 1.1.1 LTS - and it worked!
But later on I noticed that there's a squid-openssl in the ubuntu 20.10 repository.. so I installed that.
Openssl 1.1.1l: https://www.openssl.org/source/openssl-1.1.1l.tar.gz

Related

Composer uses wrong openssl version

I have installed openssl#1.1 using brew and added the path to my bash-profile. From Terminal I run "which openssl" and it shows the correct location (as in my bash-profile). Also when I run "openssl version" is shows 1.1.0f so that is also correct.
But when I run "composer diagnose" I get the following warning:
The OpenSSL library (0.9.8y) used by PHP does not support TLSv1.2 or TLSv1.1.
If possible you should upgrade OpenSSL to version 1.0.1 or above.
I also ran "composer show --platform" and it shows:
lib-openssl 0.9.8.25 OpenSSL 0.9.8y 5 Feb 2013
What do I need to do to get Composer to use the correct version of OpenSSL?
I'm running:
OSX 10.12.6,
MAMP PHP 7.0.0,
Composer 1.5.2,
Brew 1.3.5
Any help would be appreciated.
UPDATE:
I tried adding symlinks as mentioned in many of the offered threads:
ln -s /usr/local/opt/openssl#1.1/lib/libcrypto.1.1.dyli /usr/local/lib/
ln -s /usr/local/opt/openssl#1.1/lib/libssl.1.1.dylib /usr/local/lib/
It didn't work. PHP still shows:
OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 0.9.8zh 14 Jan 2016
OpenSSL Header Version => OpenSSL 0.9.8y 5 Feb 2013
Openssl default config => /System/Library/OpenSSL/openssl.cnf
I first tried to symlink from /System/Library/OpenSSL but it wasn't permitted. Maybe I need to sudo it. Before I do that, are there any risks I should be aware of? Am I on the right path? It's very frustrating that some commands in Terminal point to the new openssl, while others don't.
This is exactly the issue I had.
I updated my OpenSSL per these instructions(the only way I found that worked on Mac OS High Sierra
Yet still, Composer showed an error
Then, I followed the instructions in this Video
Problem solved (finally, after 3 days of dead ends)
Check PHP version your Mac OS shipping. It should like PHP 5.6.
Try to upgrade your version of PHP to 7.0 or above.
And run command again check version on your current folder.
php -v
php -i | grep OpenSSL
If the output of php -v still doesn’t echoes the version 7, type following command to update your path.
export PATH=/usr/local/php5/bin:$PATH

Fails to configure snmpd with DTLS settings

Clean ubuntu 16.04
OpenSSL 1.0.2g
Downloaded net-snmp5.7.3 and ran ./configure to configure for TLSTCP,DTLSUDP
After generating and moving the necessary files (.crt, .csr and .key) according to this tutorial, I started editing snmpd.conf file. After editing, I restarted the snmpd service and checked the status. So the snmpd was running, but it reported errors and some warnings that it did not recognize the tokens:
So, it complains about the three lines I added to the /etc/snmp/snmpd.conf file at the beginning of the file (does it matter where those lines should go?):
24 [snmp] serverCert <fingerprint>
25 sertName 10 <fingerprint> --cn
26 rwuser -s tsm "username"
Any ideas what's the problem there?
I also faced this issue and here is why this issue can occur.
In my case, I was using debian 9. As the snmp package on debian 9 doesn't comes with the tsm (dtlsudp) support, I downloaded the net-snmp package from its official site and tried compiling it. After I did make install, I too faced the same problem.
The reason for that was some of the libsnmp libraries from official debian's snmp packages was already installed in the system and the compiled snmpd was ending up using those libraries.
Check if snmp packages are already installed, by using
dpkg -l libsnmp*
dpkg -l snmp*
remove them from the system using
dpkg --purge --force-depends libsnmp* snmp*
Now install the compiled version using
make install

Can't run Composer on my Mac Mountain Lion - openssl extension

I installed several CMS that require Composer.
Since 2 days i got error and can't go on.
[RuntimeException] You must enable the openssl extension to download files via https
I check the following:
$ openssl version OpenSSL 1.0.1e 11 Feb 2013
$ which openssl /opt/local/bin/openssl
phpinfo say Phar - Native OpenSSL support enabled and OpenSSL support enabled.
Still if i do
$ php -info| grep openssl OpenSSL support => disabled (install ext/openssl)
Does someone has a clue about what i should do to be able to run Composer ?
In doubt (tks to Sven for pushing me that direction ;) ), I reinstall using port the openssl extension.
sudo port install php5-openssl
It didn't download files but reset something in the preferences and i was able to run Composer install properly on Tiki Wiki CMS (the CMS i'm using most).
which version you install is also important. there is a bug in openssl 0.9.8.
read more here: https://github.com/composer/composer/issues/2021

Installing Apache on a mac (Lion) : "Did not find prce-config script at" error

I am trying to install Apache (by compilation)on my mac Lion.
Every time, I try to compile pcre, I get these two errors :
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
or
"Did not find prce-config script at"
I know I have this pcre-config file.
(I put http-2.4.1 and pcre-8.30 in Documents / Tried another location in MyUsername/Test/ >> same result >> it didn't work either).
Any help would be greatly appreciated.
Thanks.
Edit :
I copied http-2.4.1 and pcre-8.30 in "/"
then I cded to /pcre-8.30
then I issued ./configure >> Got no error.
then I cded /http-2.4.1
then I issued ./configure --prefix=/usr/local/apache_2.2. --with-pcre=/pcre-8.30
Got 1 error configure: error: Did not find pcre-config script at /pcre-8.30
I do not understand what "Install prefix .................. : /usr/local" means (in the pcre-8.30 configuration summary). I can't see any pcre file in this directory.
I got apache 2.4.1 to configure by doing the following (note i am running lion v 10.7.3)
I downloaded pcre and ran (Note: by default pcre will install into /usr/local)
$ ./configure
$ make
$ make install
setup httpd-2.4.1 with the following command
$./configure --prefix=/usr/local --with-pcre=/usr/local
$ make
$ make install
Test
$ usr/local/bin/apachectl start
This appeared to work for me hopefully it works for you
You can also install Homebrew from http://mxcl.github.com/homebrew/, and then
brew install pcre
It does not need root access.
And then run the ./configure.
Maybe you not install PCRE correctly. Please try this:
Install PCRE
Nginx requires PCRE – Perl Compatible Regular Expressions to build, I used PCRE version 8.13. In a Terminal, run:
sudo curl -OL h ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.13.tar.gz > /usr/local/src/pcre-8.13.tar.gz
sudo mkdir -p /usr/local/src
cd /usr/local/src
tar xvzf pcre-8.13.tar.gz
cd pcre-8.13
./configure --prefix=/usr/local
make
sudo make install
cd ..
That is what I am trying...
I still couldn't get it to work using jfleong's answer. I came across fink, which you can download here http://www.finkproject.org/download/srcdist.php
After it was all installed, I ran:
$ fink install pcre
And then continued with installing apache and just using
$ ./configure
Without any flags. After I did all of that it finally was able to finish installing. Hope this helps!

Updating OpenSSL version on OSX

Currently on OSX 10.7 Lion openssl 0.9.8r is installed. This build is from Feb 2011 and I want to update it to the newest version. I can't use the autoupdate because I need the enable-cms option so I built it from the source, run ./Configure darwin64-x86_64-ccand ./config enable-cms --openssldir=~/usr/local/ssl.
Then I made "make" and "make install" without any errors but there is still the old version installed.
> openssl version
OpenSSL 0.9.8r 8 Feb 2011
What am I doing wrong? Maybe it's the folder? I only guessed that the ssl folder in /usr/local/ must be the default open ssl installation directory from Mac OSX?
Okay, I found a solution.
Before starting:
download sources
unpack sources
go into the unpacked source directory
The prefix has to be set on the /usr/ folder.
sudo ./configure --prefix=/usr/ darwin64-x86_64-cc enable-cms
sudo make
sudo make install
Note: To perform just a normal update you can drop the enable-cms option.
brew version (installed in '/usr/local/opt/openssl/bin') has such support for me.
https://formulae.brew.sh/formula/openssl#1.1

Resources