Skip to content

Commit 5c9dc05

Browse files
authored
Merge pull request #373 from padelsbach/wp-aarch64-compile
Fix compile issue with aarch64
2 parents 9db008a + f1cb25c commit 5c9dc05

File tree

5 files changed

+9
-29
lines changed

5 files changed

+9
-29
lines changed

.github/workflows/build-wolfprovider.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,21 +151,13 @@ jobs:
151151
uses: actions/checkout@v4
152152
with:
153153
fetch-depth: 1
154-
fetch-tags: true
155154

156155
# Avoid "detected dubious ownership" warning
157156
- name: Ensure the working directory safe
158157
if: steps.check_artifact.outcome != 'success'
159158
run: |
160159
git config --global --add safe.directory "$GITHUB_WORKSPACE"
161160
162-
# When running on a fork the upstream tags are not present, so fetch them explicitly
163-
- name: Fetch tags from upstream(for Debian versioning)
164-
if: steps.check_artifact.outcome != 'success'
165-
run: |
166-
git remote add upstream https://github.com/wolfSSL/wolfProvider.git || true
167-
git fetch upstream --tags --no-recurse-submodules
168-
169161
- name: Install wolfProvider
170162
if: steps.check_artifact.outcome != 'success'
171163
run: |

include/wolfprovider/internal.h

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,7 @@
3939
#include "wp_params.h"
4040

4141
#ifndef AES_BLOCK_SIZE
42-
#include <openssl/aes.h>
43-
#ifndef AES_BLOCK_SIZE
44-
#ifdef WC_NO_COMPAT_AES_BLOCK_SIZE
45-
#define AES_BLOCK_SIZE WC_AES_BLOCK_SIZE
46-
#else
47-
#error AES_BLOCK_SIZE not defined when it should be
48-
#endif
49-
#endif
42+
#define AES_BLOCK_SIZE 16
5043
#endif
5144

5245
#ifndef WP_INTERNAL_H
@@ -257,4 +250,3 @@ byte wp_ct_int_mask_lt(int a, int b);
257250
byte wp_ct_byte_mask_sel(byte mask, byte a, byte b);
258251

259252
#endif /* WP_INTERNAL_H */
260-

test/test_cmac.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
#include <openssl/core_names.h>
2323

2424
#include "unit.h"
25-
#undef AES_BLOCK_SIZE
26-
#include <wolfssl/options.h>
27-
#include <wolfssl/wolfcrypt/cmac.h>
2825

2926
#ifdef WP_HAVE_CMAC
3027

@@ -262,4 +259,3 @@ int test_cmac_create(void *data)
262259

263260
#endif /* WP_HAVE_CMAC */
264261

265-

test/test_gmac.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
#include <openssl/core_names.h>
2323

2424
#include "unit.h"
25-
#undef AES_BLOCK_SIZE
26-
#include <wolfssl/options.h>
27-
#include <wolfssl/wolfcrypt/aes.h>
2825

2926
#ifdef WP_HAVE_GMAC
3027

@@ -195,10 +192,10 @@ int test_gmac_dup(void *data)
195192
(void)data;
196193

197194
/* Build full messages used for one-shot expected MAC calculations. */
198-
XMEMCPY(msgA, prefix, sizeof(prefix));
199-
XMEMCPY(msgA + sizeof(prefix), tailA, sizeof(tailA));
200-
XMEMCPY(msgB, prefix, sizeof(prefix));
201-
XMEMCPY(msgB + sizeof(prefix), tailB, sizeof(tailB));
195+
memcpy(msgA, prefix, sizeof(prefix));
196+
memcpy(msgA + sizeof(prefix), tailA, sizeof(tailA));
197+
memcpy(msgB, prefix, sizeof(prefix));
198+
memcpy(msgB + sizeof(prefix), tailB, sizeof(tailB));
202199

203200
/* Compute expected MACs for each post-duplication branch. */
204201
ret = test_gmac_gen_mac(wpLibCtx, cipher, iv, (int)sizeof(iv), key,

test/unit.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,17 @@
3737
#include <openssl/evp.h>
3838
#include <openssl/ec.h>
3939
#include <openssl/ssl.h>
40-
#include <openssl/aes.h>
4140
#include <openssl/rand.h>
4241
#include <openssl/kdf.h>
4342
#include <openssl/core_names.h>
4443

4544
#include <wolfprovider/settings.h>
4645
#include <wolfprovider/wp_logging.h>
4746

47+
#ifndef AES_BLOCK_SIZE
48+
#define AES_BLOCK_SIZE 16
49+
#endif
50+
4851
#ifdef TEST_MULTITHREADED
4952
#define PRINT_MSG(str)
5053
#define PRINT_ERR_MSG(str)

0 commit comments

Comments
 (0)