From: "Marek Behún" <kabel@kernel.org>
To: Stefan Roese <sr@denx.de>
Cc: u-boot@lists.denx.de
Subject: Re: [PATCH u-boot-mvebu v2 06/18] arm: mvebu: turris_omnia: Print board ECDSA public key if available
Date: Mon, 25 Mar 2024 18:37:35 +0100 [thread overview]
Message-ID: <20240325183735.6cfa2244@dellmb> (raw)
In-Reply-To: <20240323180711.5498-7-kabel@kernel.org>
On Sat, 23 Mar 2024 19:06:59 +0100
Marek Behún <kabel@kernel.org> wrote:
> If MCU supports the FEAT_CRYPTO feature, read board ECDSA public key
> from MCU and print it.
>
> Signed-off-by: Marek Behún <kabel@kernel.org>
> ---
> board/CZ.NIC/turris_omnia/turris_omnia.c | 25 +++++++++++++++++++++++-
> 1 file changed, 24 insertions(+), 1 deletion(-)
>
> diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c
> index f63640ad64..896c14bb99 100644
> --- a/board/CZ.NIC/turris_omnia/turris_omnia.c
> +++ b/board/CZ.NIC/turris_omnia/turris_omnia.c
> @@ -253,6 +253,24 @@ static int omnia_mcu_board_info(char *serial, u8 *mac, char *version)
> return 0;
> }
>
> +static int omnia_mcu_get_board_public_key(char pub_key[static 67])
> +{
> + u8 reply[34];
> + int ret;
> +
> + ret = omnia_mcu_read(CMD_CRYPTO_GET_PUBLIC_KEY, reply, sizeof(reply));
> + if (ret)
> + return ret;
> +
> + if (reply[0] != 33)
> + return -EBADMSG;
> +
> + bin2hex(pub_key, &reply[1], 33);
> + reply[66] = '\0';
Aargh, this should be pub_key[66] = '\0'.
And I noticed once more thing, so I will sent another version.
next prev parent reply other threads:[~2024-03-25 17:37 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-23 18:06 [PATCH u-boot-mvebu v2 00/18] Turris Omnia - New board revision support Marek Behún
2024-03-23 18:06 ` [PATCH u-boot-mvebu v2 01/18] arm: mvebu: turris_omnia: Enable LTO by default on Turris Omnia Marek Behún
2024-03-23 18:06 ` [PATCH u-boot-mvebu v2 02/18] arm: mvebu: turris_omnia: Add header containing MCU command interface and use it Marek Behún
2024-03-23 18:06 ` [PATCH u-boot-mvebu v2 03/18] arm: mvebu: turris_{omnia, mox}: Don't print model two times Marek Behún
2024-03-23 18:06 ` [PATCH u-boot-mvebu v2 04/18] arm: mvebu: turris_omnia: Update MCU status and features reading Marek Behún
2024-03-23 18:06 ` [PATCH u-boot-mvebu v2 05/18] arm: mvebu: turris_omnia: Implement getting board information from MCU Marek Behún
2024-03-23 18:06 ` [PATCH u-boot-mvebu v2 06/18] arm: mvebu: turris_omnia: Print board ECDSA public key if available Marek Behún
2024-03-25 17:37 ` Marek Behún [this message]
2024-03-23 18:07 ` [PATCH u-boot-mvebu v2 07/18] arm: mvebu: turris_omnia: Disable Atmel SHA node if not present Marek Behún
2024-03-23 18:07 ` [PATCH u-boot-mvebu v2 08/18] arm: mvebu: spl: Do not build mvebu-reset in SPL Marek Behún
2024-03-23 18:07 ` [PATCH u-boot-mvebu v2 09/18] arm: mvebu: system-controller: Rework to use UCLASS_SYSCON Marek Behún
2024-03-23 18:07 ` [PATCH u-boot-mvebu v2 10/18] arm: mvebu: system-controller: Select mvebu-reset if DM_RESET && PCI_MVEBU Marek Behún
2024-03-23 18:07 ` [PATCH u-boot-mvebu v2 11/18] arm: mvebu: system-controller: Add support for SYSRESET Marek Behún
2024-03-23 18:07 ` [PATCH u-boot-mvebu v2 12/18] gpio: turris_omnia_mcu: Use byteorder conversion functions Marek Behún
2024-03-23 18:07 ` [PATCH u-boot-mvebu v2 13/18] gpio: turris_omnia_mcu: Update firmware features reading Marek Behún
2024-03-23 18:07 ` [PATCH u-boot-mvebu v2 14/18] gpio: turris_omnia_mcu: Add support for system power off via sysreset Marek Behún
2024-03-23 18:07 ` [PATCH u-boot-mvebu v2 15/18] arm: mvebu: turris_omnia: Enable poweroff command via sysreset in defconfig Marek Behún
2024-03-23 18:07 ` [PATCH u-boot-mvebu v2 16/18] cmd: rng: Print "Abort" on -EINTR Marek Behún
2024-03-23 18:30 ` Heinrich Schuchardt
2024-03-23 18:53 ` Marek Behún
2024-03-23 18:07 ` [PATCH u-boot-mvebu v2 17/18] misc: turris_omnia_mcu: Add support for rng provided by MCU Marek Behún
2024-03-23 18:07 ` [PATCH u-boot-mvebu v2 18/18] arm: mvebu: turris_omnia: Enable rng command in defconfig Marek Behún
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240325183735.6cfa2244@dellmb \
--to=kabel@kernel.org \
--cc=sr@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox