iPXE
|
Certificate management commands. More...
#include <stdio.h>
#include <errno.h>
#include <getopt.h>
#include <ipxe/x509.h>
#include <ipxe/certstore.h>
#include <ipxe/image.h>
#include <ipxe/command.h>
#include <ipxe/parseopt.h>
#include <usr/imgmgmt.h>
#include <usr/certmgmt.h>
Go to the source code of this file.
Data Structures | |
struct | cert_options |
"cert<xxx>" options More... | |
struct | cert_command_descriptor |
A "cert<xxx>" command descriptor. More... | |
Macros | |
#define | CERT_COMMAND_DESC(_struct, _options, _min_args, _max_args, _usage, _payload) |
Construct "cert<xxx>" command descriptor. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static int | cert_exec (int argc, char **argv, struct cert_command_descriptor *certcmd) |
Execute "cert<xxx>" command. More... | |
static int | certstat_payload (struct x509_certificate *cert) |
"certstat" payload More... | |
static int | certstat_exec (int argc, char **argv) |
The "certstat" command. More... | |
static int | certstore_payload (struct x509_certificate *cert) |
"certstore" payload More... | |
static int | certstore_exec (int argc, char **argv) |
The "certstore" command. More... | |
static int | certfree_payload (struct x509_certificate *cert) |
"certfree" payload More... | |
static int | certfree_exec (int argc, char **argv) |
The "certfree" command. More... | |
Variables | |
union { | |
struct option_descriptor certstore [2] | |
struct option_descriptor certstat [1] | |
struct option_descriptor certfree [1] | |
} | opts |
"cert<xxx>" option list More... | |
static struct cert_command_descriptor | certstat_cmd |
"certstat" command descriptor More... | |
static struct cert_command_descriptor | certstore_cmd |
"certstore" command descriptor More... | |
static struct cert_command_descriptor | certfree_cmd |
"certfree" command descriptor More... | |
struct command certmgmt_commands [] | __command |
Certificate management commands. More... | |
Certificate management commands.
Definition in file cert_cmd.c.
#define CERT_COMMAND_DESC | ( | _struct, | |
_options, | |||
_min_args, | |||
_max_args, | |||
_usage, | |||
_payload | |||
) |
Construct "cert<xxx>" command descriptor.
_struct | Options structure type |
_options | Option descriptor array |
_min_args | Minimum number of non-option arguments |
_max_args | Maximum number of non-option arguments |
_usage | Command usage |
_payload | Payload method |
_command | Command descriptor |
Definition at line 91 of file cert_cmd.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Execute "cert<xxx>" command.
argc | Argument count |
argv | Argument list |
certcmd | Command descriptor |
rc | Return status code |
Definition at line 107 of file cert_cmd.c.
References certstore, cmd, cert_command_descriptor::cmd, count, ENOENT, image_x509(), imgacquire(), image::len, x509_link::list, list_first_entry, list_next_entry, next, NULL, offset, optind, opts, parse_options(), cert_command_descriptor::payload, printf(), rc, x509_certificate::store, strerror(), tmp, unregister_image(), x509_check_name(), x509_get(), and x509_put().
Referenced by certfree_exec(), certstat_exec(), and certstore_exec().
|
static |
"certstat" payload
cert | X.509 certificate |
rc | Return status code |
Definition at line 205 of file cert_cmd.c.
References certstat.
|
static |
The "certstat" command.
argc | Argument count |
argv | Argument list |
rc | Return status code |
Definition at line 223 of file cert_cmd.c.
References cert_exec(), and certstat_cmd.
|
static |
"certstore" payload
cert | X.509 certificate |
rc | Return status code |
Definition at line 234 of file cert_cmd.c.
References x509_certificate::flags, and X509_FL_EXPLICIT.
|
static |
The "certstore" command.
argc | Argument count |
argv | Argument list |
rc | Return status code |
Definition at line 254 of file cert_cmd.c.
References cert_exec(), and certstore_cmd.
|
static |
"certfree" payload
cert | X.509 certificate |
rc | Return status code |
Definition at line 265 of file cert_cmd.c.
References certstore_del().
|
static |
The "certfree" command.
argc | Argument count |
argv | Argument list |
rc | Return status code |
Definition at line 285 of file cert_cmd.c.
References cert_exec(), and certfree_cmd.
struct option_descriptor certstore[2] |
struct option_descriptor certstat[1] |
Definition at line 56 of file cert_cmd.c.
Referenced by certstat_payload().
struct option_descriptor certfree[1] |
Definition at line 58 of file cert_cmd.c.
union { ... } opts |
"cert<xxx>" option list
Referenced by attr_get(), attr_off(), attr_on(), attr_set(), cert_exec(), choose_exec(), colour_exec(), colour_set(), config_exec(), console_exec(), cpair_exec(), cpuid_exec(), digest_exec(), dynui_exec(), echo_exec(), exit_exec(), fcels_exec(), fcstat_exec(), gdbstub_exec(), goto_exec(), ibstat_exec(), ifcommon_exec(), ifconf_payload(), iflinkwait_payload(), imgdecrypt_exec(), imgextract_exec(), imgmem_exec(), imgtrust_exec(), imgverify_exec(), inc_exec(), ipstat_exec(), iseq_exec(), isset_exec(), item_exec(), login_exec(), lotest_exec(), nslookup_exec(), nstat_exec(), ntp_exec(), param_exec(), params_exec(), parse_options(), pciscan_exec(), ping_exec(), poweroff_exec(), present_exec(), profstat_exec(), prompt_exec(), pxebs_exec(), read_value(), reboot_exec(), reparse_options(), route_exec(), set_core_exec(), shell_exec(), shim_exec(), show_exec(), sleep_exec(), stoppxe_exec(), sync_exec(), time_exec(), usbscan_exec(), vcreate_exec(), and vdestroy_exec().
|
static |
"certstat" command descriptor
Definition at line 212 of file cert_cmd.c.
Referenced by certstat_exec().
|
static |
"certstore" command descriptor
Definition at line 243 of file cert_cmd.c.
Referenced by certstore_exec().
|
static |
"certfree" command descriptor
Definition at line 274 of file cert_cmd.c.
Referenced by certfree_exec().
struct command certmgmt_commands [] __command |
Certificate management commands.
Definition at line 291 of file cert_cmd.c.