Skip to content

Commit 7e44671

Browse files
committed
Attempting a smaller diff
1 parent 71bd2df commit 7e44671

4 files changed

Lines changed: 6 additions & 17 deletions

File tree

include/target.h.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,11 @@
3737
#ifdef WOLFBOOT_FIXED_PARTITIONS
3838

3939
#if defined(ARCH_SIM) && !defined(WOLFBOOT_PARTITION_FILENAME)
40-
#ifndef __ASSEMBLER__
4140
#include <stdint.h>
4241
/* use runtime ram base for simulator */
4342
extern uint8_t *sim_ram_base;
4443
#undef ARCH_FLASH_OFFSET
4544
#define ARCH_FLASH_OFFSET ((size_t)sim_ram_base)
46-
#endif /* !__ASSEMBLER__ */
4745
#define WOLFBOOT_PART_USE_ARCH_OFFSET
4846
#endif
4947

include/user_settings.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
/* Stdlib Types */
4747
#define CTYPE_USER /* don't let wolfCrypt types.h include ctype.h */
4848

49-
#if !defined(WOLFSSL_ARMASM) && !defined(__ASSEMBLER__)
49+
#ifndef WOLFSSL_ARMASM
5050
#ifndef toupper
5151
extern int toupper(int c);
5252
#endif
@@ -353,13 +353,6 @@ extern int tolower(int c);
353353
# endif
354354
# else
355355
# define SP_WORD_SIZE 32
356-
# endif
357-
358-
/* x86_64 ASM 4096-bit routines use 2048-bit helpers internally,
359-
* so ensure 2048-bit asm is not excluded when 4096-bit is needed */
360-
# if defined(WOLFSSL_SP_X86_64_ASM) && defined(WOLFSSL_SP_4096) && \
361-
defined(WOLFSSL_SP_NO_2048)
362-
# undef WOLFSSL_SP_NO_2048
363356
# endif
364357

365358
/* SP Math needs to understand long long */

src/image.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -816,10 +816,9 @@ static void wolfBoot_verify_signature_ml_dsa(uint8_t key_slot,
816816
ML_DSA_LEVEL);
817817

818818
/* Finally verify signature. */
819-
ret = wc_MlDsaKey_VerifyCtx(&ml_dsa, sig, ML_DSA_IMAGE_SIGNATURE_SIZE,
820-
NULL, 0,
821-
img->sha_hash, WOLFBOOT_SHA_DIGEST_SIZE,
822-
&verify_res);
819+
ret = wc_MlDsaKey_Verify(&ml_dsa, sig, ML_DSA_IMAGE_SIGNATURE_SIZE,
820+
img->sha_hash, WOLFBOOT_SHA_DIGEST_SIZE,
821+
&verify_res);
823822

824823
#ifdef WOLFBOOT_ARMORED
825824
if (ret == 0) {

tools/keytools/sign.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,9 +1088,8 @@ static int sign_digest(int sign, int hash_algo,
10881088
if (sign == SIGN_ML_DSA) {
10891089
/* Nothing else to do, ready to sign. */
10901090
if (ret == 0) {
1091-
ret = wc_MlDsaKey_SignCtx(&key.ml_dsa, NULL, 0,
1092-
signature, signature_sz,
1093-
digest, digest_sz, &rng);
1091+
ret = wc_MlDsaKey_Sign(&key.ml_dsa, signature, signature_sz,
1092+
digest, digest_sz, &rng);
10941093
}
10951094
if (ret != 0) {
10961095
fprintf(stderr, "error signing with ML-DSA: %d\n", ret);

0 commit comments

Comments
 (0)