CycloneBOOT 2.6.6
Secure Bootloader for ARM Cortex-M MCU
Loading...
Searching...
No Matches
cli.c File Reference

Front-end to the CLI to fetch user parameters. More...

#include <errno.h>
#include <stdio.h>
#include "inc/cli.h"
#include "ImageBuilderConfig.h"

Functions

int ends_with_pem (const char *filename)
 
int check_constraints_encryption (const char *encryption_algo, const uint8_t *encryption_key, size_t encryption_key_len)
 
int check_constraints_authentication (const char *authentication_algo, const char *authentication_key, size_t authentication_key_len)
 
int check_constraints_signature (const char *signature_algo, const char *signature_key)
 
int check_constraints_keygen (const char *key_type, const char *pub_key_path, const char *priv_key_path)
 
int check_constraints_firmware_version (const char *firmware_version)
 
int check_constraints_header_version (const char *header_version)
 
void print_cli_help_message ()
 
int parse_options (int argc, char **argv, struct builder_cli_configuration *cli_options)
 Parse the CLI options provided by the user.
 

Detailed Description

Front-end to the CLI to fetch user parameters.

License

SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2021-2026 Oryx Embedded SARL. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
2.6.6

Function Documentation

◆ parse_options()

int parse_options ( int  argc,
char **  argv,
struct builder_cli_configuration *  cli_options 
)

Parse the CLI options provided by the user.

This is the main configuration of all CLI options available.

Parameters
[in]argcArgument count
[in]argvArgument vector
[in]cli_optionsStruct to store the user arguments
Returns
Status code