-no_dhe option for ssltest.c
This commit is contained in:
parent
497cc4b35e
commit
77fa04a9bc
@ -122,6 +122,9 @@ static void sv_usage(void)
|
|||||||
#if !defined NO_DH && !defined NO_DSA
|
#if !defined NO_DH && !defined NO_DSA
|
||||||
fprintf(stderr," -dhe1024 - generate 1024 bit key for DHE\n");
|
fprintf(stderr," -dhe1024 - generate 1024 bit key for DHE\n");
|
||||||
#endif
|
#endif
|
||||||
|
#if !defined NO_DH
|
||||||
|
fprintf(stderr," -no_dhe - disable DHE\n");
|
||||||
|
#endif
|
||||||
#ifndef NO_SSL2
|
#ifndef NO_SSL2
|
||||||
fprintf(stderr," -ssl2 - use SSLv2\n");
|
fprintf(stderr," -ssl2 - use SSLv2\n");
|
||||||
#endif
|
#endif
|
||||||
@ -159,7 +162,7 @@ int main(int argc, char *argv[])
|
|||||||
int number=1,reuse=0;
|
int number=1,reuse=0;
|
||||||
long bytes=1L;
|
long bytes=1L;
|
||||||
SSL_CIPHER *ciph;
|
SSL_CIPHER *ciph;
|
||||||
int dhe1024 = 0;
|
int dhe1024 = 0, no_dhe = 0;
|
||||||
#ifndef NO_DH
|
#ifndef NO_DH
|
||||||
DH *dh;
|
DH *dh;
|
||||||
#endif
|
#endif
|
||||||
@ -186,6 +189,8 @@ int main(int argc, char *argv[])
|
|||||||
reuse=1;
|
reuse=1;
|
||||||
else if (strcmp(*argv,"-dhe1024") == 0)
|
else if (strcmp(*argv,"-dhe1024") == 0)
|
||||||
dhe1024=1;
|
dhe1024=1;
|
||||||
|
else if (strcmp(*argv,"-no_dhe") == 0)
|
||||||
|
no_dhe=1;
|
||||||
else if (strcmp(*argv,"-ssl2") == 0)
|
else if (strcmp(*argv,"-ssl2") == 0)
|
||||||
ssl2=1;
|
ssl2=1;
|
||||||
else if (strcmp(*argv,"-tls1") == 0)
|
else if (strcmp(*argv,"-tls1") == 0)
|
||||||
@ -311,6 +316,8 @@ bad:
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NO_DH
|
#ifndef NO_DH
|
||||||
|
if (!no_dhe)
|
||||||
|
{
|
||||||
# ifndef NO_DSA
|
# ifndef NO_DSA
|
||||||
if (dhe1024)
|
if (dhe1024)
|
||||||
{
|
{
|
||||||
@ -338,6 +345,7 @@ bad:
|
|||||||
dh=get_dh512();
|
dh=get_dh512();
|
||||||
SSL_CTX_set_tmp_dh(s_ctx,dh);
|
SSL_CTX_set_tmp_dh(s_ctx,dh);
|
||||||
DH_free(dh);
|
DH_free(dh);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NO_RSA
|
#ifndef NO_RSA
|
||||||
|
@ -63,6 +63,9 @@ echo test sslv3 with both client and server authentication via BIO pair
|
|||||||
echo test sslv2/sslv3 via BIO pair
|
echo test sslv2/sslv3 via BIO pair
|
||||||
./ssltest || exit 1
|
./ssltest || exit 1
|
||||||
|
|
||||||
|
echo test sslv2/sslv3 w/o DHE via BIO pair
|
||||||
|
./ssltest -no_dhe || exit 1
|
||||||
|
|
||||||
echo test sslv2/sslv3 with server authentication
|
echo test sslv2/sslv3 with server authentication
|
||||||
./ssltest -bio_pair -server_auth -CApath ../certs || exit 1
|
./ssltest -bio_pair -server_auth -CApath ../certs || exit 1
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user