Commit c3ed3b6e authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

Add -prexit command to s_client and patch some BIO

functions so it doesn't crash. Document s_client.
parent c7083025
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -176,6 +176,7 @@ int MAIN(int argc, char **argv)
	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;
	int prexit = 0;
	SSL_METHOD *meth=NULL;
	BIO *sbio;
#ifdef WINDOWS
@@ -245,6 +246,8 @@ int MAIN(int argc, char **argv)
			if (--argc < 1) goto bad;
			cert_file= *(++argv);
			}
		else if	(strcmp(*argv,"-prexit") == 0)
			prexit=1;
		else if	(strcmp(*argv,"-crlf") == 0)
			crlf=1;
		else if	(strcmp(*argv,"-quiet") == 0)
@@ -735,6 +738,7 @@ shut:
	SHUTDOWN(SSL_get_fd(con));
	ret=0;
end:
	if(prexit) print_stuff(bio_c_out,con,1);
	if (con != NULL) SSL_free(con);
	if (con2 != NULL) SSL_free(con2);
	if (ctx != NULL) SSL_CTX_free(ctx);
+2 −3
Original line number Diff line number Diff line
@@ -283,9 +283,6 @@ typedef struct bio_f_buffer_ctx_struct
#define BIO_CONN_S_NBIO			8
/*#define BIO_CONN_get_param_hostname	BIO_ctrl */

#define BIO_number_read(b)	((b)->num_read)
#define BIO_number_written(b)	((b)->num_write)

#define BIO_C_SET_CONNECT			100
#define BIO_C_DO_STATE_MACHINE			101
#define BIO_C_SET_NBIO				102
@@ -485,6 +482,8 @@ int BIO_set_ex_data(BIO *bio,int idx,char *data);
char *BIO_get_ex_data(BIO *bio,int idx);
int BIO_get_ex_new_index(long argl, char *argp, int (*new_func)(),
	int (*dup_func)(), void (*free_func)());
unsigned long BIO_number_read(BIO *bio);
unsigned long BIO_number_written(BIO *bio);

#  if defined(WIN16) && defined(_WINDLL)
BIO_METHOD *BIO_s_file_internal(void);
+11 −0
Original line number Diff line number Diff line
@@ -494,3 +494,14 @@ char *BIO_get_ex_data(BIO *bio, int idx)
	return(CRYPTO_get_ex_data(&(bio->ex_data),idx));
	}

unsigned long BIO_number_read(BIO *bio)
{
	if(bio) return bio->num_read;
	return 0;
}

unsigned long BIO_number_written(BIO *bio)
{
	if(bio) return bio->num_write;
	return 0;
}
+29 −29
Original line number Diff line number Diff line
@@ -8,35 +8,35 @@ pkcs12 - PKCS#12 file utility
=head1 SYNOPSIS

B<openssl> B<pkcs12>
B<-export>
B<-chain>
B<-inkey file>
B<-certfile f>
B<-name name>
B<-caname name>
B<-in  infile>
B<-out outfile>
B<-noout>
B<-nomacver>
B<-nocerts>
B<-clcerts>
B<-cacerts>
B<-nokeys>
B<-info>
B<-des>
B<-des3>
B<-idea>
B<-nodes>
B<-noiter>
B<-maciter>
B<-twopass>
B<-descert>
B<-certpbe>
B<-keypbe>
B<-keyex>
B<-keysig>
B<-password pass>
B<-envpass pass>
[B<-export>]
[B<-chain>]
[B<-inkey filename>]
[B<-certfile filename>]
[B<-name name>]
[B<-caname name>]
[B<-in filename>]
[B<-out filename>]
[B<-noout>]
[B<-nomacver>]
[B<-nocerts>]
[B<-clcerts>]
[B<-cacerts>]
[B<-nokeys>]
[B<-info>]
[B<-des>]
[B<-des3>]
[B<-idea>]
[B<-nodes>]
[B<-noiter>]
[B<-maciter>]
[B<-twopass>]
[B<-descert>]
[B<-certpbe>]
[B<-keypbe>]
[B<-keyex>]
[B<-keysig>]
[B<-password password>]
[B<-envpass var>]

=head1 DESCRIPTION

+1 −1
Original line number Diff line number Diff line
@@ -165,7 +165,7 @@ They only offer 56 bits of protection since they both use DES.

These algorithms are not mentioned in the original PKCS#5 v1.5 specification
but they use the same key derivation algorithm and are supported by some
software. They are mentioned in PKCS#5 v1.5. They use either 64 bit RC2 or
software. They are mentioned in PKCS#5 v2.0. They use either 64 bit RC2 or
56 bit DES.

=item B<PBE-SHA1-RC4-128 PBE-SHA1-RC4-40 PBE-SHA1-3DES PBE-SHA1-2DES PBE-SHA1-RC2-128 PBE-SHA1-RC2-40>
Loading