Skip to content

Commit 72e55cb

Browse files
committed
bin2hex/hex2bin: fix compilation
Signed-off-by: Stephan Mueller <smueller@chronox.de>
1 parent c3e7ec2 commit 72e55cb

19 files changed

+183
-122
lines changed

.github/workflows/asan-address-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Install meson
1717
run: |
1818
sudo apt-get update
19-
sudo apt-get install -y meson
19+
sudo apt-get install -y meson gnu-efi
2020
- name: Meson setup build
2121
run: meson setup build -Db_sanitize=address -Dslh_dsa_ascon_128s=enabled -Dslh_dsa_ascon_128f=enabled
2222
- name: Meson compile

.github/workflows/clang-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Install meson
1717
run: |
1818
sudo apt-get update
19-
sudo apt-get install -y meson clang clang-tools
19+
sudo apt-get install -y meson clang clang-tools gnu-efi
2020
- name: Meson setup
2121
run: CC=clang meson setup build -Dslh_dsa_ascon_128s=enabled -Dslh_dsa_ascon_128f=enabled
2222
- name: Clang Scanner

.github/workflows/fips-negative-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Install meson
1717
run: |
1818
sudo apt-get update
19-
sudo apt-get install -y meson
19+
sudo apt-get install -y meson gnu-efi
2020
- name: Meson setup
2121
run: meson setup build -Dfips140_negative=enabled
2222
- name: Meson compile

.github/workflows/macos-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Install meson
1717
run: brew install meson
1818
- name: Meson setup
19-
run: meson setup build -Dslh_dsa_ascon_128s=enabled -Dslh_dsa_ascon_128f=enabled
19+
run: meson setup build -Dslh_dsa_ascon_128s=enabled -Dslh_dsa_ascon_128f=enabled -Dsbsigntools=disabled
2020
- name: Meson compile
2121
run: meson compile -C build
2222
- name: Meson test

.github/workflows/rust.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
sudo apt-get update
2626
sudo apt-get install -y meson
2727
- name: Meson setup
28-
run: meson setup build -Dtests=disabled -Dslh_dsa_ascon_128s=enabled -Dslh_dsa_ascon_128f=enabled
28+
run: meson setup build -Dtests=disabled -Dslh_dsa_ascon_128s=enabled -Dslh_dsa_ascon_128f=enabled -Dsbsigntools=disabled
2929
- name: Meson compile
3030
run: meson compile -C build
3131
- name: Meson install

.github/workflows/small-stack-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Install meson
1717
run: |
1818
sudo apt-get update
19-
sudo apt-get install -y meson
19+
sudo apt-get install -y meson gnu-efi
2020
- name: Meson setup
2121
run: meson setup build -Dsmall_stack=enabled -Dslh_dsa_ascon_128s=enabled -Dslh_dsa_ascon_128f=enabled
2222
- name: Meson compile

.github/workflows/timecop.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
sudo apt-get update
1919
sudo apt-get install -y meson
2020
sudo apt-get install -y valgrind
21+
sudo apt-get install -y gnu-efi
2122
- name: Meson setup build
2223
run: meson setup build -Dtimecop=enabled -Dslh_dsa_ascon_128s=enabled -Dslh_dsa_ascon_128f=enabled
2324
- name: Meson compile

.github/workflows/userspace-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Install meson
1717
run: |
1818
sudo apt-get update
19-
sudo apt-get install -y meson gcovr doxygen graphviz
19+
sudo apt-get install -y meson gcovr doxygen graphviz gnu-efi
2020
- name: Meson setup
2121
run: meson setup build -Db_coverage=true -Dslh_dsa_ascon_128s=enabled -Dslh_dsa_ascon_128f=enabled -Dsecure_execution=enabled
2222
- name: Meson compile

.github/workflows/windows-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
update: true
2828
install: git meson mingw-w64-${{matrix.env}}-meson mingw-w64-${{matrix.env}}-gcc
2929
- name: Meson setup
30-
run: msys2 -c 'meson setup build -Dslh_dsa_ascon_128s=enabled -Dslh_dsa_ascon_128f=enabled'
30+
run: msys2 -c 'meson setup build -Dslh_dsa_ascon_128s=enabled -Dslh_dsa_ascon_128f=enabled' -Dsbsigntools=disabled
3131
- name: Meson compile
3232
run: msys2 -c 'meson compile -C build'
3333
- name: Meson test

apps/src/hasher_app.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ static void hasher_bin2print(const uint8_t *bin, size_t binlen,
160160
hex = calloc(1, hexlen);
161161
if (!hex)
162162
return;
163-
bin2hex(bin, binlen, hex, hexlen - 1, 0);
163+
lc_bin2hex(bin, binlen, hex, hexlen - 1, 0);
164164
/* fipshmac does not want the file name :-( */
165165
if (outfile != stdout)
166166
fprintf(outfile, "%s", hex);
@@ -288,7 +288,7 @@ static int hasher(struct lc_hash_ctx *hash_ctx,
288288
uint8_t compmd[64];
289289

290290
memset(compmd, 0, sizeof(compmd));
291-
hex2bin(comphash, comphashlen, compmd, sizeof(compmd));
291+
lc_hex2bin(comphash, comphashlen, compmd, sizeof(compmd));
292292
if ((comphashlen != hashlen * 2) ||
293293
memcmp(compmd, md, hashlen)) {
294294
ret = -EBADMSG;

0 commit comments

Comments
 (0)