summaryrefslogtreecommitdiffstats
path: root/src/hci/commands/image_trust_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hci/commands/image_trust_cmd.c')
-rw-r--r--src/hci/commands/image_trust_cmd.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/hci/commands/image_trust_cmd.c b/src/hci/commands/image_trust_cmd.c
index ef4bbfa89..ca59a858a 100644
--- a/src/hci/commands/image_trust_cmd.c
+++ b/src/hci/commands/image_trust_cmd.c
@@ -86,6 +86,8 @@ struct imgverify_options {
char *signer;
/** Keep signature after verification */
int keep;
+ /** Download timeout */
+ unsigned long timeout;
};
/** "imgverify" option list */
@@ -94,6 +96,8 @@ static struct option_descriptor imgverify_opts[] = {
struct imgverify_options, signer, parse_string ),
OPTION_DESC ( "keep", 'k', no_argument,
struct imgverify_options, keep, parse_flag ),
+ OPTION_DESC ( "timeout", 't', required_argument,
+ struct imgverify_options, timeout, parse_timeout),
};
/** "imgverify" command descriptor */
@@ -127,11 +131,12 @@ static int imgverify_exec ( int argc, char **argv ) {
signature_name_uri = argv[ optind + 1 ];
/* Acquire the image */
- if ( ( rc = imgacquire ( image_name_uri, &image ) ) != 0 )
+ if ( ( rc = imgacquire ( image_name_uri, opts.timeout, &image ) ) != 0 )
goto err_acquire_image;
/* Acquire the signature image */
- if ( ( rc = imgacquire ( signature_name_uri, &signature ) ) != 0 )
+ if ( ( rc = imgacquire ( signature_name_uri, opts.timeout,
+ &signature ) ) != 0 )
goto err_acquire_signature;
/* Verify image */