<div dir="ltr"><div dir="ltr"><div dir="ltr">Thanks, Eric<div><br></div><div>But I did not put it on /usr/local/opensl or /usr/local/stunnel</div><div><br></div><div><br></div><div>Below is my configuration log</div><div><br></div><div><br></div><div><div>[root@Stunnel-Fedora stunnel-5.49]# ./configure  --enable-static  --with-ssl=/root/stunnel/openssl-1.1.0i  </div><div>configure: **************************************** initialization</div><div>checking for a BSD-compatible install... /usr/bin/install -c</div><div>checking whether build environment is sane... yes</div><div>checking for a thread-safe mkdir -p... /usr/bin/mkdir -p</div><div>checking for gawk... gawk</div><div>checking whether make sets $(MAKE)... yes</div><div>checking whether make supports nested variables... yes</div><div>checking build system type... i686-pc-linux-gnu</div><div>checking host system type... i686-pc-linux-gnu</div><div>checking for gcc... gcc</div><div>checking whether the C compiler works... yes</div><div>checking for C compiler default output file name... a.out</div><div>checking for suffix of executables... </div><div>checking whether we are cross compiling... no</div><div>checking for suffix of object files... o</div><div>checking whether we are using the GNU C compiler... yes</div><div>checking whether gcc accepts -g... yes</div><div>checking for gcc option to accept ISO C89... none needed</div><div>checking whether gcc understands -c and -o together... yes</div><div>checking for style of include used by make... GNU</div><div>checking dependency style of gcc... gcc3</div><div>checking whether make sets $(MAKE)... (cached) yes</div><div>checking whether make supports nested variables... (cached) yes</div><div>configure: **************************************** thread model</div><div>checking for a sed that does not truncate output... /usr/bin/sed</div><div>checking how to run the C preprocessor... gcc -E</div><div>checking for grep that handles long lines and -e... /usr/bin/grep</div><div>checking for egrep... /usr/bin/grep -E</div><div>checking whether gcc is Clang... no</div><div>checking whether pthreads work with -pthread... yes</div><div>checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE</div><div>checking whether more special flags are required for pthreads... no</div><div>checking for PTHREAD_PRIO_INHERIT... yes</div><div>configure: PTHREAD thread model detected</div><div>configure: **************************************** compiler/linker flags</div><div>checking whether C compiler accepts -Wall... yes</div><div>checking whether C compiler accepts -Wextra... yes</div><div>checking whether C compiler accepts -Wpedantic... yes</div><div>checking whether C compiler accepts -Wformat=2... yes</div><div>checking whether C compiler accepts -Wconversion... yes</div><div>checking whether C compiler accepts -Wno-long-long... yes</div><div>checking whether C compiler accepts -Wno-deprecated-declarations... yes</div><div>checking whether C compiler accepts -fPIE... yes</div><div>checking whether C compiler accepts -fstack-protector... yes</div><div>checking whether the linker accepts -fPIE... yes</div><div>checking whether the linker accepts -pie... yes</div><div>checking whether the linker accepts -Wl,-z,relro... yes</div><div>checking whether the linker accepts -Wl,-z,now... yes</div><div>checking whether the linker accepts -Wl,-z,noexecstack... yes</div><div>checking whether C compiler accepts -D_FORTIFY_SOURCE=2... yes</div><div>configure: **************************************** libtool</div><div>checking how to print strings... printf</div><div>checking for a sed that does not truncate output... (cached) /usr/bin/sed</div><div>checking for fgrep... /usr/bin/grep -F</div><div>checking for ld used by gcc... /usr/bin/ld</div><div>checking if the linker (/usr/bin/ld) is GNU ld... yes</div><div>checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B</div><div>checking the name lister (/usr/bin/nm -B) interface... BSD nm</div><div>checking whether ln -s works... yes</div><div>checking the maximum length of command line arguments... 1572864</div><div>checking how to convert i686-pc-linux-gnu file names to i686-pc-linux-gnu format... func_convert_file_noop</div><div>checking how to convert i686-pc-linux-gnu file names to toolchain format... func_convert_file_noop</div><div>checking for /usr/bin/ld option to reload object files... -r</div><div>checking for objdump... objdump</div><div>checking how to recognize dependent libraries... pass_all</div><div>checking for dlltool... no</div><div>checking how to associate runtime and link libraries... printf %s\n</div><div>checking for ar... ar</div><div>checking for archiver @FILE support... @</div><div>checking for strip... strip</div><div>checking for ranlib... ranlib</div><div>checking command to parse /usr/bin/nm -B output from gcc object... ok</div><div>checking for sysroot... no</div><div>checking for a working dd... /usr/bin/dd</div><div>checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1</div><div>checking for mt... no</div><div>checking if : is a manifest tool... no</div><div>checking for ANSI C header files... yes</div><div>checking for sys/types.h... yes</div><div>checking for sys/stat.h... yes</div><div>checking for stdlib.h... yes</div><div>checking for string.h... yes</div><div>checking for memory.h... yes</div><div>checking for strings.h... yes</div><div>checking for inttypes.h... yes</div><div>checking for stdint.h... yes</div><div>checking for unistd.h... yes</div><div>checking for dlfcn.h... yes</div><div>checking for objdir... .libs</div><div>checking if gcc supports -fno-rtti -fno-exceptions... no</div><div>checking for gcc option to produce PIC... -fPIC -DPIC</div><div>checking if gcc PIC flag -fPIC -DPIC works... yes</div><div>checking if gcc static flag -static works... yes</div><div>checking if gcc supports -c -o file.o... yes</div><div>checking if gcc supports -c -o file.o... (cached) yes</div><div>checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes</div><div>checking whether -lc should be explicitly linked in... no</div><div>checking dynamic linker characteristics... GNU/Linux ld.so</div><div>checking how to hardcode library paths into programs... immediate</div><div>checking whether stripping libraries is possible... yes</div><div>checking if libtool supports shared libraries... yes</div><div>checking whether to build shared libraries... yes</div><div>checking whether to build static libraries... yes</div><div>configure: **************************************** types</div><div>checking for int8_t... yes</div><div>checking for int16_t... yes</div><div>checking for int32_t... yes</div><div>checking for int64_t... yes</div><div>checking for uint8_t... yes</div><div>checking for uint16_t... yes</div><div>checking for uint32_t... yes</div><div>checking for uint64_t... yes</div><div>checking for size_t... yes</div><div>checking for ssize_t... yes</div><div>checking for uid_t in sys/types.h... yes</div><div>checking for socklen_t... yes</div><div>checking for struct sockaddr_un... yes</div><div>checking for struct addrinfo... yes</div><div>configure: **************************************** PTY device files</div><div>checking for "/dev/ptmx"... yes</div><div>checking for "/dev/ptc"... no</div><div>configure: **************************************** entropy sources</div><div>checking for "/dev/urandom"... yes</div><div>configure: **************************************** default group</div><div>checking for default group... nobody</div><div>checking for special C compiler options needed for large files... no</div><div>checking for _FILE_OFFSET_BITS value needed for large files... 64</div><div>configure: **************************************** header files</div><div>checking for stdint.h... (cached) yes</div><div>checking for inttypes.h... (cached) yes</div><div>checking malloc.h usability... yes</div><div>checking malloc.h presence... yes</div><div>checking for malloc.h... yes</div><div>checking ucontext.h usability... yes</div><div>checking ucontext.h presence... yes</div><div>checking for ucontext.h... yes</div><div>checking pthread.h usability... yes</div><div>checking pthread.h presence... yes</div><div>checking for pthread.h... yes</div><div>checking poll.h usability... yes</div><div>checking poll.h presence... yes</div><div>checking for poll.h... yes</div><div>checking tcpd.h usability... no</div><div>checking tcpd.h presence... no</div><div>checking for tcpd.h... no</div><div>checking stropts.h usability... no</div><div>checking stropts.h presence... no</div><div>checking for stropts.h... no</div><div>checking grp.h usability... yes</div><div>checking grp.h presence... yes</div><div>checking for grp.h... yes</div><div>checking for unistd.h... (cached) yes</div><div>checking util.h usability... no</div><div>checking util.h presence... no</div><div>checking for util.h... no</div><div>checking libutil.h usability... no</div><div>checking libutil.h presence... no</div><div>checking for libutil.h... no</div><div>checking pty.h usability... yes</div><div>checking pty.h presence... yes</div><div>checking for pty.h... yes</div><div>checking limits.h usability... yes</div><div>checking limits.h presence... yes</div><div>checking for limits.h... yes</div><div>checking for sys/types.h... (cached) yes</div><div>checking sys/select.h usability... yes</div><div>checking sys/select.h presence... yes</div><div>checking for sys/select.h... yes</div><div>checking sys/poll.h usability... yes</div><div>checking sys/poll.h presence... yes</div><div>checking for sys/poll.h... yes</div><div>checking sys/socket.h usability... yes</div><div>checking sys/socket.h presence... yes</div><div>checking for sys/socket.h... yes</div><div>checking sys/un.h usability... yes</div><div>checking sys/un.h presence... yes</div><div>checking for sys/un.h... yes</div><div>checking sys/ioctl.h usability... yes</div><div>checking sys/ioctl.h presence... yes</div><div>checking for sys/ioctl.h... yes</div><div>checking sys/filio.h usability... no</div><div>checking sys/filio.h presence... no</div><div>checking for sys/filio.h... no</div><div>checking sys/resource.h usability... yes</div><div>checking sys/resource.h presence... yes</div><div>checking for sys/resource.h... yes</div><div>checking sys/uio.h usability... yes</div><div>checking sys/uio.h presence... yes</div><div>checking for sys/uio.h... yes</div><div>checking sys/syscall.h usability... yes</div><div>checking sys/syscall.h presence... yes</div><div>checking for sys/syscall.h... yes</div><div>checking linux/sched.h usability... yes</div><div>checking linux/sched.h presence... yes</div><div>checking for linux/sched.h... yes</div><div>checking for struct msghdr.msg_control... yes</div><div>checking for linux/netfilter_ipv4.h... yes</div><div>configure: **************************************** libraries</div><div>checking for library containing gethostbyname... none required</div><div>checking for library containing yp_get_default_domain... -lnsl</div><div>checking for library containing socket... none required</div><div>checking for library containing openpty... -lutil</div><div>checking for library containing dlopen... -ldl</div><div>checking for library containing shl_load... no</div><div>configure: **************************************** library functions</div><div>checking for snprintf... yes</div><div>checking for vsnprintf... yes</div><div>checking for openpty... yes</div><div>checking for _getpty... no</div><div>checking for daemon... yes</div><div>checking for waitpid... yes</div><div>checking for wait4... yes</div><div>checking for setsid... yes</div><div>checking for setgroups... yes</div><div>checking for chroot... yes</div><div>checking for realpath... yes</div><div>checking for sysconf... yes</div><div>checking for getrlimit... yes</div><div>checking for pthread_sigmask... yes</div><div>checking for localtime_r... yes</div><div>checking for getcontext... yes</div><div>checking for __makecontext_v2... no</div><div>checking for poll... yes</div><div>checking for gethostbyname2... yes</div><div>checking for endhostent... yes</div><div>checking for getnameinfo... yes</div><div>checking for getaddrinfo... yes</div><div>checking for broken poll() implementation... no</div><div>checking for pipe2... yes</div><div>checking for accept4... yes</div><div>configure: **************************************** optional features</div><div>checking whether to enable IPv6 support... yes (default)</div><div>checking whether to enable FIPS support... autodetecting</div><div>checking whether to enable systemd socket activation support... autodetecting</div><div>checking for library containing sd_listen_fds... no</div><div>configure: systemd library not found</div><div>checking whether to enable TCP wrappers support... autodetecting</div><div>checking for hosts_access in -lwrap... no</div><div>configure: libwrap library not found</div><div>configure: **************************************** TLS</div><div>checking for compiler sysroot... /</div><div>checking for TLS directory... /root/stunnel/openssl-1.1.0i</div><div>checking for FIPS_mode_set... yes</div><div>configure: FIPS support enabled</div><div>configure: **************************************** write the results</div><div>checking that generated files are newer than configure... done</div><div>configure: creating ./config.status</div><div>config.status: creating Makefile</div><div>config.status: creating src/Makefile</div><div>config.status: creating doc/Makefile</div><div>config.status: creating tools/Makefile</div><div>config.status: creating tests/Makefile</div><div>config.status: creating tests/certs/Makefile</div><div>config.status: creating src/config.h</div><div>config.status: src/config.h is unchanged</div><div>config.status: executing depfiles commands</div><div>config.status: executing libtool commands</div><div>configure: **************************************** success</div></div><div><br></div><div><br></div><div><br></div><div>I tested on ubuntu14.04, 16.04   64bit and fedora 32bit,  all of them are them are not include opennssl.</div><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">Eric Eberhard <<a href="mailto:flash@vicsmba.com">flash@vicsmba.com</a>> 於 2018年10月6日 週六 上午8:41寫道:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="#0563C1" vlink="#954F72"><div class="m_2613954461260334611WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Make openssl and stunnel static.  That is what I do and I consider it MUCH smarter than dynamic.  I got tired of getting support calls because stunnel stopped working because the user installed a new openssl.  Static will always work.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Another piece of advice – do NOT put it on /usr/local/opensl or /usr/local/stunnel (or whatever the defaults are).  Before building make your OWN directories.  Our short name for our product is “met” so we use /usr/local/met/obj and /usr/local/met/bin for the object and binary files, respectively.  This ensures nobody will install over you.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">This is also a real security issue mostly ignored.  Most people have heard of SQL injection (where SQL is modified to do what the developer never intended).  However, DLL injection (e.g. dynamic library injection) is a real problem.  I could easily install an openssl DLL that does exactly what it should do … and sends the same data in clear text (or with my own encryption) to my machine.  A thief could simply install one dynamic library and then OWN your data.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">E<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> stunnel-users [mailto:<a href="mailto:stunnel-users-bounces@stunnel.org" target="_blank">stunnel-users-bounces@stunnel.org</a>] <b>On Behalf Of </b>White Little<br><b>Sent:</b> Sunday, September 30, 2018 11:33 PM<br><b>To:</b> <a href="mailto:stunnel-users@stunnel.org" target="_blank">stunnel-users@stunnel.org</a><br><b>Subject:</b> [stunnel-users] build static stunnel with openssl<u></u><u></u></span></p><p class="MsoNormal"><u></u> <u></u></p><div><div><div><div><p class="MsoNormal">Hi All <u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I try to build a static (portable) stunnel that contain opensll.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I know there are some similar questions long ago, but I still fail on how to build it.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I try to link the stunnel to latest openssl,  so I download the openssl-1.0.2p and make it.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">And then I type  <b>./configure --enable-static --with-ssl= <span class="m_2613954461260334611gmail-gr">openssl</span>-1.0.2p_dir</b><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">And typing  make,  I found there is a stunnel binary under /src folder,  but it still not include the openssl.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Do I miss something that I did not notice?<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Thanks<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div></div></div></div></div></div></div></blockquote></div>