-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LMS support: simplify hash-sigs build.
- Loading branch information
Showing
4 changed files
with
91 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
From 3819e0676bab0d91465c94c2602fc887d49f6230 Mon Sep 17 00:00:00 2001 | ||
From: jordan <jordan@wolfssl.com> | ||
Date: Wed, 30 Aug 2023 21:16:25 -0500 | ||
Subject: [PATCH 1/1] Patch to support wolfBoot LMS build. | ||
|
||
--- | ||
endian.c | 2 +- | ||
lm_ots_verify.c | 2 +- | ||
sha256.h | 2 +- | ||
3 files changed, 3 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/endian.c b/endian.c | ||
index acd2d36..29e5f6d 100644 | ||
--- a/endian.c | ||
+++ b/endian.c | ||
@@ -13,7 +13,7 @@ void put_bigendian( void *target, unsigned long long value, size_t bytes ) { | ||
unsigned long long get_bigendian( const void *target, size_t bytes ) { | ||
const unsigned char *b = target; | ||
unsigned long long result = 0; | ||
- int i; | ||
+ size_t i; | ||
|
||
for (i=0; i<bytes; i++) { | ||
result = 256 * result + (b[i] & 0xff); | ||
diff --git a/lm_ots_verify.c b/lm_ots_verify.c | ||
index 9706edd..1c79659 100644 | ||
--- a/lm_ots_verify.c | ||
+++ b/lm_ots_verify.c | ||
@@ -89,7 +89,7 @@ bool lm_ots_validate_signature_compute( | ||
PBLC_PREFIX_LEN ); | ||
} | ||
|
||
- int i; | ||
+ size_t i; | ||
unsigned char tmp[ITER_MAX_LEN]; | ||
|
||
/* Preset the parts of tmp that don't change */ | ||
diff --git a/sha256.h b/sha256.h | ||
index e4c8a9c..3282c90 100644 | ||
--- a/sha256.h | ||
+++ b/sha256.h | ||
@@ -5,7 +5,7 @@ | ||
#include EXT_SHA256_H | ||
#else | ||
|
||
-#define USE_OPENSSL 1 /* We use the OpenSSL implementation for SHA-256 */ | ||
+#define USE_OPENSSL 0 /* We use the OpenSSL implementation for SHA-256 */ | ||
/* (which is quite a bit faster than our portable */ | ||
/* C version) */ | ||
|
||
-- | ||
2.40.0 | ||
|