Skip to content

Instantly share code, notes, and snippets.

@reid
Created April 9, 2014 02:12
Show Gist options
  • Select an option

  • Save reid/10219512 to your computer and use it in GitHub Desktop.

Select an option

Save reid/10219512 to your computer and use it in GitHub Desktop.
Synology DS412+ OpenSSL patch

SSH into the box as root.

cd /volume1/@tmp
wget http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/unstable/syno-i686-bootstrap_1.2-7_i686.xsh
chmod +x syno-i686-bootstrap_1.2-7_i686.xsh
./syno-i686-bootstrap_1.2-7_i686.xsh
ipkg update

Add this to /etc/profile

PATH=/opt/bin:/opt/sbin:$PATH

Remove these lines from /root/.profile

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin
export PATH

Continue with installing OpenSSL 1.0.1g.

ipkg install perl
ipkg install gcc
ipkg install make
wget http://www.openssl.org/source/openssl-1.0.1g.tar.gz
tar zxvf openssl-1.0.1g.tar.gz
cd openssl-1.0.1g
MACHINE=i686 ./config
make install
@piotrkochan
Copy link
Copy Markdown

piotrkochan commented Jul 23, 2018

does not work for me

......
make[2]: Entering directory `/volume1/homes/kochan/openssl-1.0.1g/apps'
( :; LIBDEPS="${LIBDEPS:--L.. -lssl  -L.. -lcrypto -ldl}"; LDCMD="${LDCMD:-gcc}"; LDFLAGS="${LDFLAGS:--DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -DTERMIO -O3 -fomit-frame-pointer -Wall}"; LIBPATH=`for x in $LIBDEPS; do echo $x; done | sed -e 's/^ *-L//;t' -e d | uniq`; LIBPATH=`echo $LIBPATH | sed -e 's/ /:/g'`; LD_LIBRARY_PATH=$LIBPATH:$LD_LIBRARY_PATH ${LDCMD} ${LDFLAGS} -o ${APPNAME:=openssl} openssl.o verify.o asn1pars.o req.o dgst.o dh.o dhparam.o enc.o passwd.o gendh.o errstr.o ca.o pkcs7.o crl2p7.o crl.o rsa.o rsautl.o dsa.o dsaparam.o ec.o ecparam.o x509.o genrsa.o gendsa.o genpkey.o s_server.o s_client.o speed.o s_time.o apps.o s_cb.o s_socket.o app_rand.o version.o sess_id.o ciphers.o nseq.o pkcs12.o pkcs8.o pkey.o pkeyparam.o pkeyutl.o spkac.o smime.o cms.o rand.o engine.o ocsp.o prime.o ts.o srp.o ${LIBDEPS} )
/lib/libc.so.6: file not recognized: File format not recognized
collect2: ld returned 1 exit status
make[2]: *** [link_app.] Error 1
make[2]: Leaving directory `/volume1/homes/kochan/openssl-1.0.1g/apps'
make[1]: *** [openssl] Error 2
make[1]: Leaving directory `/volume1/homes/kochan/openssl-1.0.1g/apps'
make: *** [build_apps] Error 1

edit:
I've moved from ipkg to opkg (entware) and installed "OpenSSL 1.0.2n-fips 7 Dec 2017" using one command.

@iamsee
Copy link
Copy Markdown

iamsee commented Aug 19, 2020

does not work for me

......
make[2]: Entering directory `/volume1/homes/kochan/openssl-1.0.1g/apps'
( :; LIBDEPS="${LIBDEPS:--L.. -lssl  -L.. -lcrypto -ldl}"; LDCMD="${LDCMD:-gcc}"; LDFLAGS="${LDFLAGS:--DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -DTERMIO -O3 -fomit-frame-pointer -Wall}"; LIBPATH=`for x in $LIBDEPS; do echo $x; done | sed -e 's/^ *-L//;t' -e d | uniq`; LIBPATH=`echo $LIBPATH | sed -e 's/ /:/g'`; LD_LIBRARY_PATH=$LIBPATH:$LD_LIBRARY_PATH ${LDCMD} ${LDFLAGS} -o ${APPNAME:=openssl} openssl.o verify.o asn1pars.o req.o dgst.o dh.o dhparam.o enc.o passwd.o gendh.o errstr.o ca.o pkcs7.o crl2p7.o crl.o rsa.o rsautl.o dsa.o dsaparam.o ec.o ecparam.o x509.o genrsa.o gendsa.o genpkey.o s_server.o s_client.o speed.o s_time.o apps.o s_cb.o s_socket.o app_rand.o version.o sess_id.o ciphers.o nseq.o pkcs12.o pkcs8.o pkey.o pkeyparam.o pkeyutl.o spkac.o smime.o cms.o rand.o engine.o ocsp.o prime.o ts.o srp.o ${LIBDEPS} )
/lib/libc.so.6: file not recognized: File format not recognized
collect2: ld returned 1 exit status
make[2]: *** [link_app.] Error 1
make[2]: Leaving directory `/volume1/homes/kochan/openssl-1.0.1g/apps'
make[1]: *** [openssl] Error 2
make[1]: Leaving directory `/volume1/homes/kochan/openssl-1.0.1g/apps'
make: *** [build_apps] Error 1

edit:
I've moved from ipkg to opkg (entware) and installed "OpenSSL 1.0.2n-fips 7 Dec 2017" using one command.

how to install opkg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment