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
int printf(const char *fmt,...)
Write a formatted string to the console.
int optind
Current option index.
int keep
Keep envelope after decryption.
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.
unsigned long timeout
Download timeout.
COMMAND(imgdecrypt, imgdecrypt_exec)
Image encryption management commands.
Parse command-line options.
int parse_string(char *text, char **value)
Parse string value.
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.
static struct option_descriptor imgdecrypt_opts[]
"imgdecrypt" option list
int parse_flag(char *text __unused, int *flag)
Parse flag.
char * strerror(int errno)
Retrieve string representation of error number.
Command line option parsing.
Option does not take an argument.
char * name
Decrypted image name.
void unregister_image(struct image *image)
Unregister executable image.
static struct command_descriptor imgdecrypt_cmd
"imgdecrypt" command descriptor
#define OPTION_DESC(_longopt, _shortopt, _has_arg, _struct, _field, _parse)
Construct option descriptor.
Option requires an argument.
A command-line option descriptor.
static union @447 opts
"cert<xxx>" option list
#define COMMAND_DESC(_struct, _options, _min_args, _max_args, _usage)
Construct command descriptor.
Image encryption management.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
int imgacquire(const char *name_uri, unsigned long timeout, struct image **image)
Acquire an image.