Description: Increase timeout for srp test, fixing build error on mipsel Author: Andreas Metzler Origin: vendor Bug: https://gitlab.com/gnutls/gnutls/-/issues/1354 Last-Update: 2022-04-13 --- a/tests/srp.c +++ b/tests/srp.c @@ -46,10 +46,12 @@ #include #include #include "utils.h" +#define SRPTIMEOUTMULTIPLIER 2 + static void terminate(void); /* This program tests the SRP and SRP-RSA ciphersuites. */ @@ -129,11 +131,11 @@ */ gnutls_init(&session, GNUTLS_CLIENT); /* Use default priorities */ assert(gnutls_priority_set_direct(session, prio, NULL)>=0); - gnutls_handshake_set_timeout(session, get_timeout()); + gnutls_handshake_set_timeout(session, get_timeout() * SRPTIMEOUTMULTIPLIER ); /* put the anonymous credentials to the current session */ gnutls_credentials_set(session, GNUTLS_CRD_SRP, srp_cred); gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, x509_cred); @@ -227,11 +229,11 @@ gnutls_credentials_set(session, GNUTLS_CRD_SRP, s_srp_cred); gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, s_x509_cred); gnutls_transport_set_int(session, fd); - gnutls_handshake_set_timeout(session, get_timeout()); + gnutls_handshake_set_timeout(session, get_timeout() * SRPTIMEOUTMULTIPLIER ); do { ret = gnutls_handshake(session); } while (ret < 0 && gnutls_error_is_fatal(ret) == 0);