65 "<uri|image> <envelope uri|image>" );
76 const char *image_name_uri;
77 const char *envelope_name_uri;
79 struct image *envelope;
87 image_name_uri = argv[
optind];
90 envelope_name_uri = argv[
optind + 1 ];
94 goto err_acquire_image;
99 goto err_acquire_envelope;
114 err_acquire_envelope:
struct arbelprm_rc_send_wqe rc
static union @024010030001061367220137227263210031030210157031 opts
"cert<xxx>" option list
#define COMMAND(name, exec)
int optind
Current option index.
Parse command-line options.
@ required_argument
Option requires an argument.
@ no_argument
Option does not take an argument.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
void unregister_image(struct image *image)
Unregister executable image.
static struct option_descriptor imgdecrypt_opts[]
"imgdecrypt" option list
static struct command_descriptor imgdecrypt_cmd
"imgdecrypt" command descriptor
static int imgdecrypt_exec(int argc, char **argv)
The "imgdecrypt" command.
int imgdecrypt(struct image *image, struct image *envelope, const char *name)
Decrypt image using downloaded envelope.
Image encryption management.
int imgacquire(const char *name_uri, unsigned long timeout, struct image **image)
Acquire an image.
int parse_flag(char *text __unused, int *flag)
Parse flag.
int parse_string(char *text, char **value)
Parse string value.
int parse_timeout(char *text, unsigned long *value)
Parse timeout value (in ms)
int parse_options(int argc, char **argv, struct command_descriptor *cmd, void *opts)
Parse command-line options.
Command line option parsing.
#define COMMAND_DESC(_struct, _options, _min_args, _max_args, _usage)
Construct command descriptor.
#define OPTION_DESC(_longopt, _shortopt, _has_arg, _struct, _field, _parse)
Construct option descriptor.
char * strerror(int errno)
Retrieve string representation of error number.
int keep
Keep envelope after decryption.
char * name
Decrypted image name.
unsigned long timeout
Download timeout.
A command-line option descriptor.
int printf(const char *fmt,...)
Write a formatted string to the console.