1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
Description: Increase timeout for srp test, fixing build error on mipsel
Author: Andreas Metzler <ametzler@debian.org>
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 <assert.h>
#include <gnutls/gnutls.h>
#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);
|