More fixes, from release 1.7.3.0

This commit is contained in:
Gerhard Rieger 2015-04-02 18:11:34 +02:00
parent 6c60d0d66e
commit 8a77b35b87
4 changed files with 17 additions and 13 deletions

View file

@ -87,7 +87,6 @@ TESTFILES = test.sh socks4echo.sh proxyecho.sh gatherinfo.sh readline-test.sh \
OSFILES = Config/Makefile.Linux-2-6-24 Config/config.Linux-2-6-24.h \ OSFILES = Config/Makefile.Linux-2-6-24 Config/config.Linux-2-6-24.h \
Config/Makefile.SunOS-5-10 Config/config.SunOS-5-10.h \ Config/Makefile.SunOS-5-10 Config/config.SunOS-5-10.h \
Config/Makefile.FreeBSD-6-1 Config/config.FreeBSD-6-1.h \ Config/Makefile.FreeBSD-6-1 Config/config.FreeBSD-6-1.h \
Config/Makefile.NetBSD-4-0 Config/config.NetBSD-4-0.h \
Config/Makefile.NetBSD-5-1 Config/config.NetBSD-5-1.h \ Config/Makefile.NetBSD-5-1 Config/config.NetBSD-5-1.h \
Config/Makefile.OpenBSD-4-3 Config/config.OpenBSD-4-3.h \ Config/Makefile.OpenBSD-4-3 Config/config.OpenBSD-4-3.h \
Config/Makefile.AIX-5-3 Config/config.AIX-5-3.h \ Config/Makefile.AIX-5-3 Config/config.AIX-5-3.h \

View file

@ -10,7 +10,7 @@ def(Filan)(0)(bf(Filan))
def(procan)(0)(bf(procan)) def(procan)(0)(bf(procan))
def(Procan)(0)(bf(Procan)) def(Procan)(0)(bf(Procan))
manpage(socat)(1)(Nov 2012)()() manpage(socat)(1)()()()
whenhtml( whenhtml(
label(CONTENTS) label(CONTENTS)
@ -3113,7 +3113,7 @@ label(EXAMPLE_OPTION_ESCAPE)
dit(bf(tt(socat -,escape=0x0f /dev/ttyS0,rawer,crnl))) dit(bf(tt(socat -,escape=0x0f /dev/ttyS0,rawer,crnl)))
opens an interactive connection via the serial line, e.g. for talking with a opens an interactive connection via the serial line, e.g. for talking with a
modem. link(rawer)(OPTION_TERMIOS_RAWER) and link(echo)(OPTION_ECHO) set the console's and modem. link(rawer)(OPTION_TERMIOS_RAWER) sets the console's and
ttyS0's terminal parameters to practicable values, link(crnl)(OPTION_CRNL) ttyS0's terminal parameters to practicable values, link(crnl)(OPTION_CRNL)
converts to correct newline characters. link(escape)(OPTION_ESCAPE) allows to converts to correct newline characters. link(escape)(OPTION_ESCAPE) allows to
terminate the socat() process with character control-O. terminate the socat() process with character control-O.
@ -3248,7 +3248,7 @@ device (link(PTY)(ADDRESS_PTY)) on the client that can be reached under the
symbolic link(link)(OPTION_SYMBOLIC_LINK) file($HOME/dev/vmodem0). symbolic link(link)(OPTION_SYMBOLIC_LINK) file($HOME/dev/vmodem0).
An application that expects a serial line or modem An application that expects a serial line or modem
can be configured to use file($HOME/dev/vmodem0); its traffic will be directed can be configured to use file($HOME/dev/vmodem0); its traffic will be directed
to a modemserver via ssh where another socat() instance links it with to a modemserver via ssh where another socat() instance links it to
file(/dev/ttyS0). file(/dev/ttyS0).

View file

@ -1825,6 +1825,7 @@ runsip4 () {
SunOS) l=$($IFCONFIG -a |grep 'inet ') ;; SunOS) l=$($IFCONFIG -a |grep 'inet ') ;;
Darwin)l=$($IFCONFIG lo0 |fgrep 'inet 127.0.0.1 ') ;; Darwin)l=$($IFCONFIG lo0 |fgrep 'inet 127.0.0.1 ') ;;
DragonFly)l=$($IFCONFIG -a |fgrep 'inet 127.0.0.1 ');; DragonFly)l=$($IFCONFIG -a |fgrep 'inet 127.0.0.1 ');;
CYGWIN*) l=$(ipconfig |grep IPv4);;
*) l=$($IFCONFIG -a |grep ' ::1[^:0-9A-Fa-f]') ;; *) l=$($IFCONFIG -a |grep ' ::1[^:0-9A-Fa-f]') ;;
esac esac
[ -z "$l" ] && return 1 [ -z "$l" ] && return 1
@ -1851,6 +1852,7 @@ runsip6 () {
OSF1) l=$($IFCONFIG -a |grep ' inet6 ') ;; OSF1) l=$($IFCONFIG -a |grep ' inet6 ') ;;
SunOS) l=$($IFCONFIG -a |grep 'inet6 ') ;; SunOS) l=$($IFCONFIG -a |grep 'inet6 ') ;;
Darwin)l=$($IFCONFIG lo0 |grep 'inet6 ::1 ') ;; Darwin)l=$($IFCONFIG lo0 |grep 'inet6 ::1 ') ;;
CYGWIN*) l=$(ipconfig |grep IPv6);;
*) l=$($IFCONFIG -a |grep ' ::1[^:0-9A-Fa-f]') ;; *) l=$($IFCONFIG -a |grep ' ::1[^:0-9A-Fa-f]') ;;
esac esac
[ -z "$l" ] && return 1 [ -z "$l" ] && return 1

View file

@ -940,7 +940,9 @@ int
Error1("openssl-method=\"%s\": method unknown or not provided by library", me_str); Error1("openssl-method=\"%s\": method unknown or not provided by library", me_str);
} }
} else { } else {
#if HAVE_TLSv1_2_client_method #if HAVE_SSLv23_client_method
method = sycSSLv23_client_method();
#elif HAVE_TLSv1_2_client_method
method = sycTLSv1_2_client_method(); method = sycTLSv1_2_client_method();
#elif HAVE_TLSv1_1_client_method #elif HAVE_TLSv1_1_client_method
method = sycTLSv1_1_client_method(); method = sycTLSv1_1_client_method();
@ -948,8 +950,6 @@ int
method = sycTLSv1_client_method(); method = sycTLSv1_client_method();
#elif HAVE_SSLv3_client_method #elif HAVE_SSLv3_client_method
method = sycSSLv3_client_method(); method = sycSSLv3_client_method();
#elif HAVE_SSLv23_client_method
method = sycSSLv23_client_method();
#elif HAVE_SSLv2_client_method #elif HAVE_SSLv2_client_method
method = sycSSLv2_client_method(); method = sycSSLv2_client_method();
#else #else
@ -992,16 +992,16 @@ int
Error1("openssl-method=\"%s\": method unknown or not provided by library", me_str); Error1("openssl-method=\"%s\": method unknown or not provided by library", me_str);
} }
} else { } else {
#if HAVE_TLSv1_2_server_method #if HAVE_SSLv23_server_method
method = sycSSLv23_server_method();
#elif HAVE_TLSv1_2_server_method
method = sycTLSv1_2_server_method(); method = sycTLSv1_2_server_method();
#elif HAVE_TLSv1_1_server_method #elif HAVE_TLSv1_1_server_method
method = sycTLSv1_1_server_method(); method = sycTLSv1_1_server_method();
#elif HAVE_TLSv1_server_method #elif HAVE_TLSv1_server_method
method = sycTLSv1_1_method(); method = sycTLSv1_server_method();
#elif HAVE_SSLv3_server_method #elif HAVE_SSLv3_server_method
method = sycSSLv3_server_method(); method = sycSSLv3_server_method();
#elif HAVE_SSLv23_server_method
method = sycSSLv23_server_method();
#elif HAVE_SSLv2_server_method #elif HAVE_SSLv2_server_method
method = sycSSLv2_server_method(); method = sycSSLv2_server_method();
#else #else
@ -1093,6 +1093,7 @@ int
} }
} }
#if defined(EC_KEY) /* not on Openindiana 5.11 */
{ {
/* see http://openssl.6102.n7.nabble.com/Problem-with-cipher-suite-ECDHE-ECDSA-AES256-SHA384-td42229.html */ /* see http://openssl.6102.n7.nabble.com/Problem-with-cipher-suite-ECDHE-ECDSA-AES256-SHA384-td42229.html */
int nid; int nid;
@ -1114,6 +1115,7 @@ int
SSL_CTX_set_tmp_ecdh(*ctx, ecdh); SSL_CTX_set_tmp_ecdh(*ctx, ecdh);
} }
#endif /* !defined(EC_KEY) */
#if OPENSSL_VERSION_NUMBER >= 0x00908000L #if OPENSSL_VERSION_NUMBER >= 0x00908000L
if (opt_compress) { if (opt_compress) {
@ -1412,9 +1414,10 @@ static int openssl_setenv_cert_name(const char *field, X509_NAME *name) {
BIO_free(bio); BIO_free(bio);
return -1; return -1;
} }
memcpy(str, buf, len);
str[len] = '\0'; str[len] = '\0';
Info2("SSL peer cert %s: \"%s\"", field, buf); Info2("SSL peer cert %s: \"%s\"", field, buf);
xiosetenv2("OPENSSL_X509", field, buf, 1, NULL); xiosetenv2("OPENSSL_X509", field, str, 1, NULL);
free(str); free(str);
BIO_free(bio); BIO_free(bio);
return 0; return 0;