aboutsummaryrefslogtreecommitdiffstats
path: root/src/scepclient/scep.c
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2013-02-08 10:57:25 +0100
committerMartin Willi <martin@revosec.ch>2013-02-08 11:09:33 +0100
commitf476ff84f3ad66097dab720e9e3fb4d687b53951 (patch)
tree1a04453c60434b1f682924d6c7493f0041615d43 /src/scepclient/scep.c
parent763e86c0930efaf00072b055a767c310d239d1f3 (diff)
downloadstrongswan-f476ff84f3ad66097dab720e9e3fb4d687b53951.tar.bz2
strongswan-f476ff84f3ad66097dab720e9e3fb4d687b53951.tar.xz
Add a --httptimeout option to scepclient
Diffstat (limited to 'src/scepclient/scep.c')
-rw-r--r--src/scepclient/scep.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/scepclient/scep.c b/src/scepclient/scep.c
index f2090274c..974eb9862 100644
--- a/src/scepclient/scep.c
+++ b/src/scepclient/scep.c
@@ -333,7 +333,7 @@ static char* escape_http_request(chunk_t req)
* Send a SCEP request via HTTP and wait for a response
*/
bool scep_http_request(const char *url, chunk_t msg, scep_op_t op,
- bool http_get_request, chunk_t *response)
+ bool http_get_request, u_int timeout, chunk_t *response)
{
int len;
status_t status;
@@ -361,6 +361,7 @@ bool scep_http_request(const char *url, chunk_t msg, scep_op_t op,
status = lib->fetcher->fetch(lib->fetcher, complete_url, response,
FETCH_HTTP_VERSION_1_0,
+ FETCH_TIMEOUT, timeout,
FETCH_REQUEST_HEADER, "Pragma:",
FETCH_REQUEST_HEADER, "Host:",
FETCH_REQUEST_HEADER, "Accept:",
@@ -375,6 +376,7 @@ bool scep_http_request(const char *url, chunk_t msg, scep_op_t op,
status = lib->fetcher->fetch(lib->fetcher, complete_url, response,
FETCH_HTTP_VERSION_1_0,
+ FETCH_TIMEOUT, timeout,
FETCH_REQUEST_DATA, msg,
FETCH_REQUEST_TYPE, "",
FETCH_REQUEST_HEADER, "Expect:",
@@ -403,6 +405,7 @@ bool scep_http_request(const char *url, chunk_t msg, scep_op_t op,
status = lib->fetcher->fetch(lib->fetcher, complete_url, response,
FETCH_HTTP_VERSION_1_0,
+ FETCH_TIMEOUT, timeout,
FETCH_END);
}