From 2aa7bfb7c2713a52b5cec1a684ffa2a7801fcead Mon Sep 17 00:00:00 2001 From: Andrew Kozlik Date: Tue, 26 Sep 2023 17:42:21 +0200 Subject: [PATCH] fixup! feat(core): Integrate Optiga into PIN verification. --- core/.changelog.d/3296.added | 1 + core/embed/trezorhal/unix/optiga.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 core/.changelog.d/3296.added diff --git a/core/.changelog.d/3296.added b/core/.changelog.d/3296.added new file mode 100644 index 00000000000..b67fca3cb5c --- /dev/null +++ b/core/.changelog.d/3296.added @@ -0,0 +1 @@ +Integrate Optiga into PIN verification for Model R. diff --git a/core/embed/trezorhal/unix/optiga.c b/core/embed/trezorhal/unix/optiga.c index 90bff693fc7..ae68296d04f 100644 --- a/core/embed/trezorhal/unix/optiga.c +++ b/core/embed/trezorhal/unix/optiga.c @@ -155,12 +155,12 @@ bool optiga_random_buffer(uint8_t *dest, size_t size) { bool optiga_pin_set(const uint8_t pin_secret[OPTIGA_PIN_SECRET_SIZE], uint8_t out_secret[OPTIGA_PIN_SECRET_SIZE]) { - memcpy(out_secret, OPTIGA_PIN_SECRET_SIZE, pin_secret); + memcpy(out_secret, pin_secret, OPTIGA_PIN_SECRET_SIZE); return true; } bool optiga_pin_verify(const uint8_t pin_secret[OPTIGA_PIN_SECRET_SIZE], uint8_t out_secret[OPTIGA_PIN_SECRET_SIZE]) { - memcpy(out_secret, OPTIGA_PIN_SECRET_SIZE, pin_secret); + memcpy(out_secret, pin_secret, OPTIGA_PIN_SECRET_SIZE); return true; }