diff options
author | bcook <> | 2014-10-20 01:58:10 +0000 |
---|---|---|
committer | bcook <> | 2014-10-20 01:58:10 +0000 |
commit | 28930ddf4fd6c1c993650ea60031148dd17e39ef (patch) | |
tree | 60a4fce4c3b4c539b95e9bce4f8ff84fee939932 /src | |
parent | 5961a052ff4e8d579a02b073963a8fb9c1398575 (diff) | |
download | openbsd-28930ddf4fd6c1c993650ea60031148dd17e39ef.tar.gz openbsd-28930ddf4fd6c1c993650ea60031148dd17e39ef.tar.bz2 openbsd-28930ddf4fd6c1c993650ea60031148dd17e39ef.zip |
s_client: don't call shutdown on a non-existent socket descriptor.
from Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
ok beck@, deraadt@
Diffstat (limited to 'src')
-rw-r--r-- | src/usr.bin/openssl/s_client.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/usr.bin/openssl/s_client.c b/src/usr.bin/openssl/s_client.c index dba1336f76..a5f4d4c9c6 100644 --- a/src/usr.bin/openssl/s_client.c +++ b/src/usr.bin/openssl/s_client.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: s_client.c,v 1.3 2014/10/13 02:39:09 bcook Exp $ */ | 1 | /* $OpenBSD: s_client.c,v 1.4 2014/10/20 01:58:10 bcook Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -822,8 +822,6 @@ re_start: | |||
822 | 822 | ||
823 | if (init_client(&s, host, port, socket_type, af) == 0) { | 823 | if (init_client(&s, host, port, socket_type, af) == 0) { |
824 | BIO_printf(bio_err, "connect:errno=%d\n", errno); | 824 | BIO_printf(bio_err, "connect:errno=%d\n", errno); |
825 | shutdown(s, SHUT_RD); | ||
826 | close(s); | ||
827 | goto end; | 825 | goto end; |
828 | } | 826 | } |
829 | BIO_printf(bio_c_out, "CONNECTED(%08X)\n", s); | 827 | BIO_printf(bio_c_out, "CONNECTED(%08X)\n", s); |