Add the possibility (with -ign_eof) to ignore end of file on input but
still not be quiet. Also make it clear that -quiet implicitely means -ign_eof as well.
This commit is contained in:
parent
0dd3989868
commit
ce301b6b0b
@ -117,6 +117,7 @@ static void sc_usage(void);
|
|||||||
static void print_stuff(BIO *berr,SSL *con,int full);
|
static void print_stuff(BIO *berr,SSL *con,int full);
|
||||||
static BIO *bio_c_out=NULL;
|
static BIO *bio_c_out=NULL;
|
||||||
static int c_quiet=0;
|
static int c_quiet=0;
|
||||||
|
static int c_ign_eof=0;
|
||||||
|
|
||||||
static void sc_usage(void)
|
static void sc_usage(void)
|
||||||
{
|
{
|
||||||
@ -143,6 +144,7 @@ static void sc_usage(void)
|
|||||||
#endif
|
#endif
|
||||||
BIO_printf(bio_err," -crlf - convert LF from terminal into CRLF\n");
|
BIO_printf(bio_err," -crlf - convert LF from terminal into CRLF\n");
|
||||||
BIO_printf(bio_err," -quiet - no s_client output\n");
|
BIO_printf(bio_err," -quiet - no s_client output\n");
|
||||||
|
BIO_printf(bio_err," -ign_eof - ignore input eof (default when -quiet)\n");
|
||||||
BIO_printf(bio_err," -ssl2 - just use SSLv2\n");
|
BIO_printf(bio_err," -ssl2 - just use SSLv2\n");
|
||||||
BIO_printf(bio_err," -ssl3 - just use SSLv3\n");
|
BIO_printf(bio_err," -ssl3 - just use SSLv3\n");
|
||||||
BIO_printf(bio_err," -tls1 - just use TLSv1\n");
|
BIO_printf(bio_err," -tls1 - just use TLSv1\n");
|
||||||
@ -192,6 +194,7 @@ int MAIN(int argc, char **argv)
|
|||||||
apps_startup();
|
apps_startup();
|
||||||
c_Pause=0;
|
c_Pause=0;
|
||||||
c_quiet=0;
|
c_quiet=0;
|
||||||
|
c_ign_eof=0;
|
||||||
c_debug=0;
|
c_debug=0;
|
||||||
c_showcerts=0;
|
c_showcerts=0;
|
||||||
|
|
||||||
@ -249,7 +252,12 @@ int MAIN(int argc, char **argv)
|
|||||||
else if (strcmp(*argv,"-crlf") == 0)
|
else if (strcmp(*argv,"-crlf") == 0)
|
||||||
crlf=1;
|
crlf=1;
|
||||||
else if (strcmp(*argv,"-quiet") == 0)
|
else if (strcmp(*argv,"-quiet") == 0)
|
||||||
|
{
|
||||||
c_quiet=1;
|
c_quiet=1;
|
||||||
|
c_ign_eof=1;
|
||||||
|
}
|
||||||
|
else if (strcmp(*argv,"-ign_eof") == 0)
|
||||||
|
c_ign_eof=1;
|
||||||
else if (strcmp(*argv,"-pause") == 0)
|
else if (strcmp(*argv,"-pause") == 0)
|
||||||
c_Pause=1;
|
c_Pause=1;
|
||||||
else if (strcmp(*argv,"-debug") == 0)
|
else if (strcmp(*argv,"-debug") == 0)
|
||||||
@ -711,13 +719,13 @@ printf("read=%d pending=%d peek=%d\n",k,SSL_pending(con),SSL_peek(con,zbuf,10240
|
|||||||
else
|
else
|
||||||
i=read(fileno(stdin),cbuf,BUFSIZZ);
|
i=read(fileno(stdin),cbuf,BUFSIZZ);
|
||||||
|
|
||||||
if ((!c_quiet) && ((i <= 0) || (cbuf[0] == 'Q')))
|
if ((!c_ign_eof) && ((i <= 0) || (cbuf[0] == 'Q')))
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err,"DONE\n");
|
BIO_printf(bio_err,"DONE\n");
|
||||||
goto shut;
|
goto shut;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((!c_quiet) && (cbuf[0] == 'R'))
|
if ((!c_ign_eof) && (cbuf[0] == 'R'))
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err,"RENEGOTIATING\n");
|
BIO_printf(bio_err,"RENEGOTIATING\n");
|
||||||
SSL_renegotiate(con);
|
SSL_renegotiate(con);
|
||||||
|
@ -22,6 +22,7 @@ B<openssl> B<s_client>
|
|||||||
[B<-state>]
|
[B<-state>]
|
||||||
[B<-nbio>]
|
[B<-nbio>]
|
||||||
[B<-crlf>]
|
[B<-crlf>]
|
||||||
|
[B<-ign_eof>]
|
||||||
[B<-quiet>]
|
[B<-quiet>]
|
||||||
[B<-ssl2>]
|
[B<-ssl2>]
|
||||||
[B<-ssl3>]
|
[B<-ssl3>]
|
||||||
@ -122,9 +123,15 @@ turns on non-blocking I/O
|
|||||||
this option translated a line feed from the terminal into CR+LF as required
|
this option translated a line feed from the terminal into CR+LF as required
|
||||||
by some servers.
|
by some servers.
|
||||||
|
|
||||||
|
=item B<-ign_eof>
|
||||||
|
|
||||||
|
inhibit shutting down the connection when end of file is reached in the
|
||||||
|
input.
|
||||||
|
|
||||||
=item B<-quiet>
|
=item B<-quiet>
|
||||||
|
|
||||||
inhibit printing of session and certificate information.
|
inhibit printing of session and certificate information. This implicitely
|
||||||
|
turns on B<-ign_eof> as well.
|
||||||
|
|
||||||
=item B<-ssl2>, B<-ssl3>, B<-tls1>, B<-no_ssl2>, B<-no_ssl3>, B<-no_tls1>
|
=item B<-ssl2>, B<-ssl3>, B<-tls1>, B<-no_ssl2>, B<-no_ssl3>, B<-no_tls1>
|
||||||
|
|
||||||
@ -155,9 +162,10 @@ command for more information.
|
|||||||
|
|
||||||
If a connection is established with an SSL server then any data received
|
If a connection is established with an SSL server then any data received
|
||||||
from the server is displayed and any key presses will be sent to the
|
from the server is displayed and any key presses will be sent to the
|
||||||
server. If the line begins with an B<R> then the session will be
|
server. When used interactively (which means neither B<-quiet> nor B<-ign_eof>
|
||||||
renegotiated. If the line begins with a B<Q> the connection will be closed
|
have been given), the session will be renegociated if the line begins with an
|
||||||
down.
|
B<R>, and if the line begins with a B<Q> or if end of file is reached, the
|
||||||
|
connection will be closed down.
|
||||||
|
|
||||||
=head1 NOTES
|
=head1 NOTES
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user