Skip to content

Commit 67360da

Browse files
committed
Add SW-only RSA PSS
1 parent e30ca2d commit 67360da

File tree

9 files changed

+365
-32
lines changed

9 files changed

+365
-32
lines changed

include/image.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ extern "C" {
6868
defined (WOLFBOOT_SIGN_RSA4096ENC)
6969
#define wolfBoot_verify_signature_primary wolfBoot_verify_signature_rsa
7070
#endif
71+
#if defined (WOLFBOOT_SIGN_RSAPSS2048) || \
72+
defined (WOLFBOOT_SIGN_RSAPSS3072) || \
73+
defined (WOLFBOOT_SIGN_RSAPSS4096)
74+
#define wolfBoot_verify_signature_primary wolfBoot_verify_signature_rsa_pss
75+
#endif
7176
#if defined (WOLFBOOT_SIGN_ECC256) || \
7277
defined (WOLFBOOT_SIGN_ECC384) || \
7378
defined (WOLFBOOT_SIGN_ECC521)
@@ -97,6 +102,11 @@ extern "C" {
97102
defined (WOLFBOOT_SIGN_SECONDARY_RSA4096ENC)
98103
#define wolfBoot_verify_signature_secondary wolfBoot_verify_signature_rsa
99104
#endif
105+
#if defined (WOLFBOOT_SIGN_SECONDARY_RSAPSS2048) || \
106+
defined (WOLFBOOT_SIGN_SECONDARY_RSAPSS3072) || \
107+
defined (WOLFBOOT_SIGN_SECONDARY_RSAPSS4096)
108+
#define wolfBoot_verify_signature_secondary wolfBoot_verify_signature_rsa_pss
109+
#endif
100110
#if defined (WOLFBOOT_SIGN_SECONDARY_ECC256) || \
101111
defined (WOLFBOOT_SIGN_SECONDARY_ECC384) || \
102112
defined (WOLFBOOT_SIGN_SECONDARY_ECC521)

include/loader.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,14 @@ extern "C" {
4040
#define ECC_IMAGE_SIGNATURE_SIZE (132)
4141
#endif
4242

43-
#if defined(WOLFBOOT_SIGN_RSA2048) || defined(WOLFBOOT_SIGN_SECONDARY_RSA2048)
43+
#if defined(WOLFBOOT_SIGN_RSA2048) || defined(WOLFBOOT_SIGN_SECONDARY_RSA2048) || \
44+
defined(WOLFBOOT_SIGN_RSAPSS2048) || defined(WOLFBOOT_SIGN_SECONDARY_RSAPSS2048)
4445
#define RSA_IMAGE_SIGNATURE_SIZE (256)
45-
#elif defined(WOLFBOOT_SIGN_RSA3072) || defined(WOLFBOOT_SIGN_SECONDARY_RSA3072)
46+
#elif defined(WOLFBOOT_SIGN_RSA3072) || defined(WOLFBOOT_SIGN_SECONDARY_RSA3072) || \
47+
defined(WOLFBOOT_SIGN_RSAPSS3072) || defined(WOLFBOOT_SIGN_SECONDARY_RSAPSS3072)
4648
#define RSA_IMAGE_SIGNATURE_SIZE (384)
47-
#elif defined(WOLFBOOT_SIGN_RSA4096) || defined(WOLFBOOT_SIGN_SECONDARY_RSA4096)
49+
#elif defined(WOLFBOOT_SIGN_RSA4096) || defined(WOLFBOOT_SIGN_SECONDARY_RSA4096) || \
50+
defined(WOLFBOOT_SIGN_RSAPSS4096) || defined(WOLFBOOT_SIGN_SECONDARY_RSAPSS4096)
4851
#define RSA_IMAGE_SIGNATURE_SIZE (512)
4952
#endif
5053

include/user_settings.h

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,20 +222,35 @@ extern int tolower(int c);
222222
defined(WOLFBOOT_SIGN_SECONDARY_RSA2048) || \
223223
defined(WOLFBOOT_SIGN_SECONDARY_RSA3072) || \
224224
defined(WOLFBOOT_SIGN_SECONDARY_RSA4096) || \
225+
defined(WOLFBOOT_SIGN_RSAPSS2048) || \
226+
defined(WOLFBOOT_SIGN_RSAPSS3072) || \
227+
defined(WOLFBOOT_SIGN_RSAPSS4096) || \
228+
defined(WOLFBOOT_SIGN_SECONDARY_RSAPSS2048) || \
229+
defined(WOLFBOOT_SIGN_SECONDARY_RSAPSS3072) || \
230+
defined(WOLFBOOT_SIGN_SECONDARY_RSAPSS4096) || \
225231
(defined(WOLFCRYPT_SECURE_MODE) && (!defined(PKCS11_SMALL)))
226232

227233
# define WC_RSA_BLINDING
228234
# define WC_RSA_DIRECT
229235
# define RSA_LOW_MEM
230236
# define WC_ASN_HASH_SHA256
237+
# if defined(WOLFBOOT_SIGN_RSAPSS2048) || defined(WOLFBOOT_SIGN_RSAPSS3072) || \
238+
defined(WOLFBOOT_SIGN_RSAPSS4096) || \
239+
defined(WOLFBOOT_SIGN_SECONDARY_RSAPSS2048) || \
240+
defined(WOLFBOOT_SIGN_SECONDARY_RSAPSS3072) || \
241+
defined(WOLFBOOT_SIGN_SECONDARY_RSAPSS4096)
242+
# define WC_RSA_PSS
243+
# endif
231244
# if !defined(WOLFBOOT_TPM) && !defined(WOLFCRYPT_SECURE_MODE) && \
232245
!defined(WOLFCRYPT_TEST) && !defined(WOLFCRYPT_BENCHMARK) && \
233246
!defined(WOLFBOOT_ENABLE_WOLFHSM_CLIENT) && \
234247
!defined(WOLFBOOT_ENABLE_WOLFHSM_SERVER)
235248
# define WOLFSSL_RSA_VERIFY_INLINE
236249
# define WOLFSSL_RSA_VERIFY_ONLY
237250
# define WOLFSSL_RSA_PUBLIC_ONLY
238-
# define WC_NO_RSA_OAEP
251+
# if !defined(WC_RSA_PSS)
252+
# define WC_NO_RSA_OAEP
253+
# endif
239254
# define NO_RSA_BOUNDS_CHECK
240255
# endif
241256
# if !defined(USE_FAST_MATH) && !defined(WOLFSSL_SP_MATH_ALL)
@@ -244,7 +259,8 @@ extern int tolower(int c);
244259
# define WOLFSSL_SP_SMALL
245260
# define WOLFSSL_SP_MATH
246261
# endif
247-
# if defined(WOLFBOOT_SIGN_RSA2048) || defined(WOLFBOOT_SIGN_SECONDARY_RSA2048)
262+
# if defined(WOLFBOOT_SIGN_RSA2048) || defined(WOLFBOOT_SIGN_SECONDARY_RSA2048) || \
263+
defined(WOLFBOOT_SIGN_RSAPSS2048) || defined(WOLFBOOT_SIGN_SECONDARY_RSAPSS2048)
248264
# define FP_MAX_BITS (2048 * 2)
249265
# define SP_INT_BITS 2048
250266
# define WOLFSSL_SP_NO_3072
@@ -253,7 +269,8 @@ extern int tolower(int c);
253269
# define RSA_MIN_SIZE 2048
254270
# define RSA_MAX_SIZE 2048
255271
# endif
256-
# if defined(WOLFBOOT_SIGN_RSA3072) || defined(WOLFBOOT_SIGN_SECONDARY_RSA3072)
272+
# if defined(WOLFBOOT_SIGN_RSA3072) || defined(WOLFBOOT_SIGN_SECONDARY_RSA3072) || \
273+
defined(WOLFBOOT_SIGN_RSAPSS3072) || defined(WOLFBOOT_SIGN_SECONDARY_RSAPSS3072)
257274
# define FP_MAX_BITS (3072 * 2)
258275
# define SP_INT_BITS 3072
259276
# define WOLFSSL_SP_NO_2048
@@ -263,7 +280,8 @@ extern int tolower(int c);
263280
# define RSA_MAX_SIZE 3072
264281
# endif
265282

266-
# if defined(WOLFBOOT_SIGN_RSA4096) || defined(WOLFBOOT_SIGN_SECONDARY_RSA4096)
283+
# if defined(WOLFBOOT_SIGN_RSA4096) || defined(WOLFBOOT_SIGN_SECONDARY_RSA4096) || \
284+
defined(WOLFBOOT_SIGN_RSAPSS4096) || defined(WOLFBOOT_SIGN_SECONDARY_RSAPSS4096)
267285
# define FP_MAX_BITS (4096 * 2)
268286
# define SP_INT_BITS 4096
269287
# define WOLFSSL_SP_NO_2048

include/wolfboot/wolfboot.h

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,16 @@ extern "C" {
112112

113113
#ifndef IMAGE_HEADER_SIZE
114114
/* Largest cases first */
115-
# if defined(WOLFBOOT_SIGN_RSA4096)
115+
# if defined(WOLFBOOT_SIGN_RSA4096) || defined(WOLFBOOT_SIGN_RSAPSS4096)
116116
# define IMAGE_HEADER_SIZE 1024
117117

118-
/* RSA3072 + strong hash */
119-
# elif (defined(WOLFBOOT_SIGN_RSA3072) && \
118+
/* RSA3072/RSAPSS3072 + strong hash */
119+
# elif ((defined(WOLFBOOT_SIGN_RSA3072) || defined(WOLFBOOT_SIGN_RSAPSS3072)) && \
120120
(defined(WOLFBOOT_HASH_SHA384) || defined(WOLFBOOT_HASH_SHA3_384)))
121121
# define IMAGE_HEADER_SIZE 1024
122122

123-
/* RSA2048 + SHA256 */
124-
# elif defined(WOLFBOOT_SIGN_RSA2048) && defined(WOLFBOOT_HASH_SHA256)
123+
/* RSA2048/RSAPSS2048 + SHA256 */
124+
# elif (defined(WOLFBOOT_SIGN_RSA2048) || defined(WOLFBOOT_SIGN_RSAPSS2048)) && defined(WOLFBOOT_HASH_SHA256)
125125
# define IMAGE_HEADER_SIZE 512
126126

127127
/* ECC384 requires 512 with SHA256 */
@@ -141,7 +141,7 @@ extern "C" {
141141
# define IMAGE_HEADER_SIZE 256
142142

143143
/* Secondary 512-byte fallbacks */
144-
# elif defined(WOLFBOOT_SIGN_RSA3072) || \
144+
# elif defined(WOLFBOOT_SIGN_RSA3072) || defined(WOLFBOOT_SIGN_RSAPSS3072) || \
145145
defined(WOLFBOOT_SIGN_ECC521) || \
146146
defined(WOLFBOOT_SIGN_ED448) || \
147147
defined(WOLFBOOT_HASH_SHA384) || \
@@ -224,7 +224,10 @@ extern "C" {
224224
#define AUTH_KEY_ECC521 0x07
225225
#define AUTH_KEY_RSA3072 0x08
226226
#define AUTH_KEY_LMS 0x09
227-
/* 0x0A...0x0F reserved */
227+
#define AUTH_KEY_RSAPSS2048 0x0A
228+
#define AUTH_KEY_RSAPSS3072 0x0B
229+
#define AUTH_KEY_RSAPSS4096 0x0C
230+
/* 0x0D...0x0F reserved */
228231
#define AUTH_KEY_XMSS 0x10
229232
#define AUTH_KEY_ML_DSA 0x11
230233

@@ -245,6 +248,9 @@ extern "C" {
245248
#define HDR_IMG_TYPE_AUTH_ECC521 (AUTH_KEY_ECC521 << 8)
246249
#define HDR_IMG_TYPE_AUTH_RSA3072 (AUTH_KEY_RSA3072 << 8)
247250
#define HDR_IMG_TYPE_AUTH_LMS (AUTH_KEY_LMS << 8)
251+
#define HDR_IMG_TYPE_AUTH_RSAPSS2048 (AUTH_KEY_RSAPSS2048 << 8)
252+
#define HDR_IMG_TYPE_AUTH_RSAPSS3072 (AUTH_KEY_RSAPSS3072 << 8)
253+
#define HDR_IMG_TYPE_AUTH_RSAPSS4096 (AUTH_KEY_RSAPSS4096 << 8)
248254
#define HDR_IMG_TYPE_AUTH_XMSS (AUTH_KEY_XMSS << 8)
249255
#define HDR_IMG_TYPE_AUTH_ML_DSA (AUTH_KEY_ML_DSA << 8)
250256

@@ -265,6 +271,9 @@ extern "C" {
265271
#define KEYSTORE_PUBKEY_SIZE_RSA2048 320
266272
#define KEYSTORE_PUBKEY_SIZE_RSA3072 448
267273
#define KEYSTORE_PUBKEY_SIZE_RSA4096 576
274+
#define KEYSTORE_PUBKEY_SIZE_RSAPSS2048 KEYSTORE_PUBKEY_SIZE_RSA2048
275+
#define KEYSTORE_PUBKEY_SIZE_RSAPSS3072 KEYSTORE_PUBKEY_SIZE_RSA3072
276+
#define KEYSTORE_PUBKEY_SIZE_RSAPSS4096 KEYSTORE_PUBKEY_SIZE_RSA4096
268277
#define KEYSTORE_PUBKEY_SIZE_LMS 60
269278
#define KEYSTORE_PUBKEY_SIZE_XMSS 68
270279

@@ -439,6 +448,21 @@ extern "C" {
439448
# ifndef WOLFBOOT_UNIVERSAL_KEYSTORE
440449
# define KEYSTORE_PUBKEY_SIZE KEYSTORE_PUBKEY_SIZE_RSA4096
441450
# endif
451+
#elif defined(WOLFBOOT_SIGN_RSAPSS2048)
452+
# define HDR_IMG_TYPE_AUTH HDR_IMG_TYPE_AUTH_RSAPSS2048
453+
# ifndef WOLFBOOT_UNIVERSAL_KEYSTORE
454+
# define KEYSTORE_PUBKEY_SIZE KEYSTORE_PUBKEY_SIZE_RSA2048
455+
# endif
456+
#elif defined(WOLFBOOT_SIGN_RSAPSS3072)
457+
# define HDR_IMG_TYPE_AUTH HDR_IMG_TYPE_AUTH_RSAPSS3072
458+
# ifndef WOLFBOOT_UNIVERSAL_KEYSTORE
459+
# define KEYSTORE_PUBKEY_SIZE KEYSTORE_PUBKEY_SIZE_RSA3072
460+
# endif
461+
#elif defined(WOLFBOOT_SIGN_RSAPSS4096)
462+
# define HDR_IMG_TYPE_AUTH HDR_IMG_TYPE_AUTH_RSAPSS4096
463+
# ifndef WOLFBOOT_UNIVERSAL_KEYSTORE
464+
# define KEYSTORE_PUBKEY_SIZE KEYSTORE_PUBKEY_SIZE_RSA4096
465+
# endif
442466
#elif defined(WOLFBOOT_SIGN_LMS)
443467
# define HDR_IMG_TYPE_AUTH HDR_IMG_TYPE_AUTH_LMS
444468
# ifndef WOLFBOOT_UNIVERSAL_KEYSTORE

options.mk

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,84 @@ ifeq ($(SIGN),ED448)
298298
endif
299299
endif
300300

301+
ifeq ($(SIGN),RSAPSS2048)
302+
KEYGEN_OPTIONS+=--rsapss2048
303+
SIGN_OPTIONS+=--rsapss2048
304+
SIGN_ALG=RSAPSS2048
305+
WOLFCRYPT_OBJS+= $(RSA_OBJS)
306+
WOLFCRYPT_OBJS+=$(MATH_OBJS)
307+
CFLAGS+=-D"WOLFBOOT_SIGN_RSAPSS2048" $(RSA_EXTRA_CFLAGS)
308+
ifeq ($(WOLFBOOT_SMALL_STACK),1)
309+
ifneq ($(SPMATH),1)
310+
STACK_USAGE=5008
311+
else
312+
STACK_USAGE=4096
313+
endif
314+
else
315+
ifneq ($(SPMATH),1)
316+
STACK_USAGE=35952
317+
else
318+
STACK_USAGE=17568
319+
endif
320+
endif
321+
ifeq ($(shell test $(IMAGE_HEADER_SIZE) -lt 512; echo $$?),0)
322+
IMAGE_HEADER_SIZE=512
323+
endif
324+
endif
325+
326+
ifeq ($(SIGN),RSAPSS3072)
327+
KEYGEN_OPTIONS+=--rsapss3072
328+
SIGN_OPTIONS+=--rsapss3072
329+
SIGN_ALG=RSAPSS3072
330+
WOLFCRYPT_OBJS+= $(RSA_OBJS)
331+
WOLFCRYPT_OBJS+=$(MATH_OBJS)
332+
CFLAGS+=-D"WOLFBOOT_SIGN_RSAPSS3072" $(RSA_EXTRA_CFLAGS)
333+
ifeq ($(WOLFBOOT_SMALL_STACK),1)
334+
ifneq ($(SPMATH),1)
335+
STACK_USAGE=5008
336+
else
337+
STACK_USAGE=4364
338+
endif
339+
else
340+
ifneq ($(SPMATH),1)
341+
STACK_USAGE=52592
342+
else
343+
STACK_USAGE=12288
344+
endif
345+
endif
346+
ifneq ($(HASH),SHA256)
347+
IMAGE_HEADER_SIZE=1024
348+
endif
349+
ifeq ($(shell test $(IMAGE_HEADER_SIZE) -lt 512; echo $$?),0)
350+
IMAGE_HEADER_SIZE=512
351+
endif
352+
endif
353+
354+
ifeq ($(SIGN),RSAPSS4096)
355+
KEYGEN_OPTIONS+=--rsapss4096
356+
SIGN_OPTIONS+=--rsapss4096
357+
SIGN_ALG=RSAPSS4096
358+
WOLFCRYPT_OBJS+= $(RSA_OBJS)
359+
WOLFCRYPT_OBJS+=$(MATH_OBJS)
360+
CFLAGS+=-D"WOLFBOOT_SIGN_RSAPSS4096" $(RSA_EXTRA_CFLAGS)
361+
ifeq ($(WOLFBOOT_SMALL_STACK),1)
362+
ifneq ($(SPMATH),1)
363+
STACK_USAGE=5888
364+
else
365+
STACK_USAGE=5768
366+
endif
367+
else
368+
ifneq ($(SPMATH),1)
369+
STACK_USAGE=69232
370+
else
371+
STACK_USAGE=18064
372+
endif
373+
endif
374+
ifeq ($(shell test $(IMAGE_HEADER_SIZE) -lt 1024; echo $$?),0)
375+
IMAGE_HEADER_SIZE=1024
376+
endif
377+
endif
378+
301379
ifneq ($(findstring RSA2048,$(SIGN)),)
302380
KEYGEN_OPTIONS+=--rsa2048
303381
ifeq ($(SIGN),RSA2048ENC)

src/image.c

Lines changed: 70 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,13 @@ static void wolfBoot_verify_signature_ecc(uint8_t key_slot,
364364
defined(WOLFBOOT_SIGN_RSA4096) || \
365365
defined(WOLFBOOT_SIGN_SECONDARY_RSA2048) || \
366366
defined(WOLFBOOT_SIGN_SECONDARY_RSA3072) || \
367-
defined(WOLFBOOT_SIGN_SECONDARY_RSA4096)
367+
defined(WOLFBOOT_SIGN_SECONDARY_RSA4096) || \
368+
defined(WOLFBOOT_SIGN_RSAPSS2048) || \
369+
defined(WOLFBOOT_SIGN_RSAPSS3072) || \
370+
defined(WOLFBOOT_SIGN_RSAPSS4096) || \
371+
defined(WOLFBOOT_SIGN_SECONDARY_RSAPSS2048) || \
372+
defined(WOLFBOOT_SIGN_SECONDARY_RSAPSS3072) || \
373+
defined(WOLFBOOT_SIGN_SECONDARY_RSAPSS4096)
368374

369375
#include <wolfssl/wolfcrypt/asn.h>
370376
#include <wolfssl/wolfcrypt/rsa.h>
@@ -562,6 +568,65 @@ static void wolfBoot_verify_signature_rsa(uint8_t key_slot,
562568
* WOLFBOOT_SIGN_RSA4096 || WOLFBOOT_SIGN_SECONDARY_RSA2048 ||
563569
* WOLFBOOT_SIGN_SECONDARY_RSA3072 || WOLFBOOT_SIGN_SECONDARY_RSA4096 */
564570

571+
#if defined(WOLFBOOT_SIGN_RSAPSS2048) || \
572+
defined(WOLFBOOT_SIGN_RSAPSS3072) || \
573+
defined(WOLFBOOT_SIGN_RSAPSS4096) || \
574+
defined(WOLFBOOT_SIGN_SECONDARY_RSAPSS2048) || \
575+
defined(WOLFBOOT_SIGN_SECONDARY_RSAPSS3072) || \
576+
defined(WOLFBOOT_SIGN_SECONDARY_RSAPSS4096)
577+
578+
static void wolfBoot_verify_signature_rsa_pss(uint8_t key_slot,
579+
struct wolfBoot_image *img, uint8_t *sig)
580+
{
581+
int ret;
582+
uint8_t output[RSA_IMAGE_SIGNATURE_SIZE];
583+
uint8_t* digest_out = NULL;
584+
word32 inOutIdx = 0;
585+
struct RsaKey rsa;
586+
587+
#if defined(WOLFBOOT_HASH_SHA256)
588+
enum wc_HashType hash_type = WC_HASH_TYPE_SHA256;
589+
int mgf = WC_MGF1SHA256;
590+
#elif defined(WOLFBOOT_HASH_SHA384)
591+
enum wc_HashType hash_type = WC_HASH_TYPE_SHA384;
592+
int mgf = WC_MGF1SHA384;
593+
#else
594+
#error "RSA-PSS requires SHA-256 or SHA-384"
595+
#endif
596+
597+
uint8_t *pubkey = keystore_get_buffer(key_slot);
598+
int pubkey_sz = keystore_get_size(key_slot);
599+
600+
if (pubkey == NULL || pubkey_sz < 0) {
601+
return;
602+
}
603+
604+
/* wolfCrypt software RSA-PSS verify */
605+
ret = wc_InitRsaKey(&rsa, NULL);
606+
if (ret == 0) {
607+
/* Import public key */
608+
ret = wc_RsaPublicKeyDecode((byte*)pubkey, &inOutIdx, &rsa, pubkey_sz);
609+
if (ret >= 0) {
610+
XMEMCPY(output, sig, RSA_IMAGE_SIGNATURE_SIZE);
611+
RSA_VERIFY_FN(ret,
612+
wc_RsaPSS_VerifyCheckInline, output, RSA_IMAGE_SIGNATURE_SIZE,
613+
&digest_out, img->sha_hash, WOLFBOOT_SHA_DIGEST_SIZE,
614+
hash_type, mgf, &rsa);
615+
}
616+
}
617+
wc_FreeRsaKey(&rsa);
618+
/* wc_RsaPSS_VerifyCheckInline returns the PSS-verified data length on
619+
* success (>= digest size), or a negative error code on failure.
620+
* The hash comparison is performed internally by the function. */
621+
if (ret >= WOLFBOOT_SHA_DIGEST_SIZE && img) {
622+
wolfBoot_image_confirm_signature_ok(img);
623+
}
624+
}
625+
626+
#endif /* WOLFBOOT_SIGN_RSAPSS2048 || WOLFBOOT_SIGN_RSAPSS3072 || \
627+
* WOLFBOOT_SIGN_RSAPSS4096 || WOLFBOOT_SIGN_SECONDARY_RSAPSS2048 || \
628+
* WOLFBOOT_SIGN_SECONDARY_RSAPSS3072 || WOLFBOOT_SIGN_SECONDARY_RSAPSS4096 */
629+
565630
#ifdef WOLFBOOT_SIGN_LMS
566631
#include <wolfssl/wolfcrypt/lms.h>
567632
#ifdef HAVE_LIBLMS
@@ -2272,7 +2337,10 @@ int wolfBoot_verify_authenticity(struct wolfBoot_image *img)
22722337
defined (WOLFBOOT_SIGN_RSA4096) || \
22732338
defined (WOLFBOOT_SIGN_RSA2048ENC) || \
22742339
defined (WOLFBOOT_SIGN_RSA3072ENC) || \
2275-
defined (WOLFBOOT_SIGN_RSA4096ENC)
2340+
defined (WOLFBOOT_SIGN_RSA4096ENC) || \
2341+
defined (WOLFBOOT_SIGN_RSAPSS2048) || \
2342+
defined (WOLFBOOT_SIGN_RSAPSS3072) || \
2343+
defined (WOLFBOOT_SIGN_RSAPSS4096)
22762344
if (stored_signature_size != RSA_IMAGE_SIGNATURE_SIZE)
22772345
return -1;
22782346
#elif defined (WOLFBOOT_SIGN_ECC256) || \

0 commit comments

Comments
 (0)