summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/apps/s_client.c
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2000-11-13 01:03:58 +0000
committerkris <kris@FreeBSD.org>2000-11-13 01:03:58 +0000
commit539b977eff7c71f628cb2a407543a51070b14763 (patch)
tree258f64877cac3711a3434257baddcbae72af2af3 /crypto/openssl/apps/s_client.c
parent893841d237b49d10e810e8b130839b4b63fd5ab4 (diff)
downloadFreeBSD-src-539b977eff7c71f628cb2a407543a51070b14763.zip
FreeBSD-src-539b977eff7c71f628cb2a407543a51070b14763.tar.gz
Initial import of OpenSSL 0.9.6
Diffstat (limited to 'crypto/openssl/apps/s_client.c')
-rw-r--r--crypto/openssl/apps/s_client.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/openssl/apps/s_client.c b/crypto/openssl/apps/s_client.c
index e629f8e..c935317 100644
--- a/crypto/openssl/apps/s_client.c
+++ b/crypto/openssl/apps/s_client.c
@@ -201,8 +201,8 @@ int MAIN(int argc, char **argv)
if (bio_err == NULL)
bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
- if ( ((cbuf=Malloc(BUFSIZZ)) == NULL) ||
- ((sbuf=Malloc(BUFSIZZ)) == NULL))
+ if ( ((cbuf=OPENSSL_malloc(BUFSIZZ)) == NULL) ||
+ ((sbuf=OPENSSL_malloc(BUFSIZZ)) == NULL))
{
BIO_printf(bio_err,"out of memory\n");
goto end;
@@ -523,7 +523,7 @@ re_start:
tv.tv_usec = 0;
i=select(width,(void *)&readfds,(void *)&writefds,
NULL,&tv);
- if(!i && (!_kbhit() || !read_tty) ) continue;
+ if(!i && (!((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0))) || !read_tty) ) continue;
} else i=select(width,(void *)&readfds,(void *)&writefds,
NULL,NULL);
}
@@ -689,7 +689,7 @@ printf("read=%d pending=%d peek=%d\n",k,SSL_pending(con),SSL_peek(con,zbuf,10240
}
#ifdef WINDOWS
- else if (_kbhit())
+ else if ((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0)))
#else
else if (FD_ISSET(fileno(stdin),&readfds))
#endif
@@ -753,8 +753,8 @@ end:
if (con != NULL) SSL_free(con);
if (con2 != NULL) SSL_free(con2);
if (ctx != NULL) SSL_CTX_free(ctx);
- if (cbuf != NULL) { memset(cbuf,0,BUFSIZZ); Free(cbuf); }
- if (sbuf != NULL) { memset(sbuf,0,BUFSIZZ); Free(sbuf); }
+ if (cbuf != NULL) { memset(cbuf,0,BUFSIZZ); OPENSSL_free(cbuf); }
+ if (sbuf != NULL) { memset(sbuf,0,BUFSIZZ); OPENSSL_free(sbuf); }
if (bio_c_out != NULL)
{
BIO_free(bio_c_out);
OpenPOWER on IntegriCloud