Skip to content

Commit

Permalink
Handle the case GNUTLS_E_DH_PRIME_UNACCEPTABLE error. Retry with a lo…
Browse files Browse the repository at this point in the history
…wer prime bits number. For this, use the new bit flag variable.
  • Loading branch information
jjnicola authored and ArnoStiefvater committed Feb 8, 2022
1 parent 1279e91 commit 4947e4e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion nasl/nasl_builtin_find_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -1607,7 +1607,16 @@ plugin_do_run (struct script_infos *desc, GSList *h, int test_ssl)
trp = OPENVAS_ENCAPS_IP;
gettimeofday (&tv1, NULL);
cnx = open_stream_connection (desc, port, trp, cnx_timeout);
if (cnx < 0 && test_ssl)
if (cnx == -2 && test_ssl)
{
unsigned int flags = INSECURE_DH_PRIME_BITS;

gettimeofday (&tv1, NULL);
cnx = open_stream_connection_ext (
desc, port, trp, cnx_timeout, "NORMAL:+ARCFOUR-128:%COMPAT",
flags);
}
else if (cnx < 0 && test_ssl)
{
trp = OPENVAS_ENCAPS_IP;
gettimeofday (&tv1, NULL);
Expand Down

0 comments on commit 4947e4e

Please sign in to comment.