From 1b1a6e7808abfcc658ce4ff8b344ddcd517cfbd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bodo=20M=C3=B6ller?= Date: Mon, 9 Aug 1999 13:01:48 +0000 Subject: [PATCH] -crlf option. --- CHANGES | 4 ++++ apps/s_client.c | 12 +----------- apps/s_server.c | 12 +----------- 3 files changed, 6 insertions(+), 22 deletions(-) diff --git a/CHANGES b/CHANGES index bf0a36bc1d..300da0d773 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,10 @@ Changes between 0.9.4 and 0.9.5 [xx XXX 1999] + *) -crlf option to s_client and s_server for sending newlines as + CRLF (as required by many protocols). + [Bodo Moeller] + Changes between 0.9.3a and 0.9.4 [09 Aug 1999] *) Install libRSAglue.a when OpenSSL is built with RSAref. diff --git a/apps/s_client.c b/apps/s_client.c index b06104130e..ea3e039e30 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -56,9 +56,7 @@ * [including the GNU Public Licence.] */ -#ifdef APPS_CRLF -# include -#endif +#include #include #include #include @@ -142,9 +140,7 @@ static void sc_usage(void) #ifdef FIONBIO BIO_printf(bio_err," -nbio - Run with non-blocking IO\n"); #endif -#ifdef APPS_CRLF /* won't be #ifdef'd in next release */ BIO_printf(bio_err," -crlf - convert LF from terminal into CRLF\n"); -#endif BIO_printf(bio_err," -quiet - no s_client output\n"); BIO_printf(bio_err," -ssl2 - just use SSLv2\n"); BIO_printf(bio_err," -ssl3 - just use SSLv3\n"); @@ -171,9 +167,7 @@ int MAIN(int argc, char **argv) char *cert_file=NULL,*key_file=NULL; char *CApath=NULL,*CAfile=NULL,*cipher=NULL; int reconnect=0,badop=0,verify=SSL_VERIFY_NONE,bugs=0; -#ifdef APPS_CRLF int crlf=0; -#endif int write_tty,read_tty,write_ssl,read_ssl,tty_on,ssl_pending; SSL_CTX *ctx=NULL; int ret=1,in_init=1,i,nbio_test=0; @@ -244,10 +238,8 @@ int MAIN(int argc, char **argv) if (--argc < 1) goto bad; cert_file= *(++argv); } -#ifdef APPS_CRLF else if (strcmp(*argv,"-crlf") == 0) crlf=1; -#endif else if (strcmp(*argv,"-quiet") == 0) c_quiet=1; else if (strcmp(*argv,"-pause") == 0) @@ -647,7 +639,6 @@ printf("read=%d pending=%d peek=%d\n",k,SSL_pending(con),SSL_peek(con,zbuf,10240 #ifndef WINDOWS else if (FD_ISSET(fileno(stdin),&readfds)) { -#ifdef APPS_CRLF if (crlf) { int j, lf_num; @@ -671,7 +662,6 @@ printf("read=%d pending=%d peek=%d\n",k,SSL_pending(con),SSL_peek(con,zbuf,10240 assert(lf_num == 0); } else -#endif i=read(fileno(stdin),cbuf,BUFSIZZ); if ((!c_quiet) && ((i <= 0) || (cbuf[0] == 'Q'))) diff --git a/apps/s_server.c b/apps/s_server.c index 9a81418cda..afe418211b 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -56,9 +56,7 @@ * [including the GNU Public Licence.] */ -#ifdef APPS_CRLF -# include -#endif +#include #include #include #include @@ -169,9 +167,7 @@ static char *s_dcert_file=NULL,*s_dkey_file=NULL; static int s_nbio=0; #endif static int s_nbio_test=0; -#ifdef APPS_CRLF /* won't be #ifdef'd in next release */ int s_crlf=0; -#endif static SSL_CTX *ctx=NULL; static int www=0; @@ -219,9 +215,7 @@ static void sv_usage(void) BIO_printf(bio_err," -nbio - Run with non-blocking IO\n"); #endif BIO_printf(bio_err," -nbio_test - test with the non-blocking test bio\n"); -#ifdef APPS_CRLF BIO_printf(bio_err," -crlf - convert LF from terminal into CRLF\n"); -#endif BIO_printf(bio_err," -debug - Print more output\n"); BIO_printf(bio_err," -state - Print the SSL states\n"); BIO_printf(bio_err," -CApath arg - PEM format directory of CA's\n"); @@ -525,10 +519,8 @@ int MAIN(int argc, char *argv[]) { hack=1; } else if (strcmp(*argv,"-state") == 0) { state=1; } -#ifdef APPS_CRLF else if (strcmp(*argv,"-crlf") == 0) { s_crlf=1; } -#endif else if (strcmp(*argv,"-quiet") == 0) { s_quiet=1; } else if (strcmp(*argv,"-bugs") == 0) @@ -813,7 +805,6 @@ static int sv_body(char *hostname, int s, unsigned char *context) if (i <= 0) continue; if (FD_ISSET(fileno(stdin),&readfds)) { -#ifdef APPS_CRLF if (s_crlf) { int j, lf_num; @@ -837,7 +828,6 @@ static int sv_body(char *hostname, int s, unsigned char *context) assert(lf_num == 0); } else -#endif i=read(fileno(stdin),buf,bufsize); if (!s_quiet) { -- GitLab