Skip to content

Commit ca5d06b

Browse files
committed
Updated submodules
1 parent 5222385 commit ca5d06b

File tree

11 files changed

+26
-11
lines changed

11 files changed

+26
-11
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,7 @@ if(ARCH STREQUAL "ARM")
713713

714714
list(APPEND WOLFBOOT_DEFS
715715
SECURE_PKCS11
716+
WOLFPKCS11_USER_SETTINGS
716717
WOLFSSL_PKCS11_RW_TOKENS
717718
WP11_HASH_PIN_COST=3)
718719
list(APPEND WOLFBOOT_DEFS "CK_CALLABLE=__attribute__\\(\\(cmse_nonsecure_entry\\)\\)")

hal/sim.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include <stdio.h>
3030
#include <sys/mman.h>
3131
#include <sys/stat.h>
32+
#include <sys/syscall.h>
3233
#include <fcntl.h>
3334
#include <unistd.h>
3435
#include <errno.h>
@@ -87,6 +88,18 @@ uint32_t hal_sim_get_dualbank_state(void);
8788
char **main_argv;
8889
int main_argc;
8990

91+
static int sim_memfd_create(const char *name, unsigned int flags)
92+
{
93+
#if defined(__linux__) && defined(SYS_memfd_create)
94+
return (int)syscall(SYS_memfd_create, name, flags);
95+
#else
96+
(void)name;
97+
(void)flags;
98+
errno = ENOSYS;
99+
return -1;
100+
#endif
101+
}
102+
90103
#ifdef WOLFBOOT_ENABLE_WOLFHSM_CLIENT
91104

92105
/* Client configuration/contexts */
@@ -558,7 +571,7 @@ void do_boot(const uint32_t *app_offset)
558571
exit(0);
559572
#else
560573
char *envp[1] = {NULL};
561-
int fd = memfd_create("test_app", 0);
574+
int fd = sim_memfd_create("test_app", 0);
562575
size_t wret;
563576
if (fd == -1) {
564577
wolfBoot_printf( "memfd error\n");

include/user_settings.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,9 @@ extern int tolower(int c);
367367
# define HAVE_PBKDF2
368368
# define WOLFPKCS11_CUSTOM_STORE
369369
# define WOLFBOOT_SECURE_PKCS11
370-
# define WOLFPKCS11_USER_SETTINGS
370+
# ifndef WOLFPKCS11_USER_SETTINGS
371+
# define WOLFPKCS11_USER_SETTINGS
372+
# endif
371373
# define WOLFPKCS11_NO_TIME
372374
#ifndef WOLFSSL_AES_COUNTER
373375
# define WOLFSSL_AES_COUNTER

lib/wolfPKCS11

Submodule wolfPKCS11 updated 57 files

lib/wolfTPM

Submodule wolfTPM updated 87 files

lib/wolfssl

Submodule wolfssl updated 1619 files

options.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,6 +791,7 @@ endif
791791

792792
ifeq ($(WOLFCRYPT_TZ_PKCS11),1)
793793
CFLAGS+=-DSECURE_PKCS11
794+
CFLAGS+=-DWOLFPKCS11_USER_SETTINGS
794795
CFLAGS+=-DWOLFSSL_PKCS11_RW_TOKENS
795796
CFLAGS+=-DCK_CALLABLE="__attribute__((cmse_nonsecure_entry))"
796797
CFLAGS+=-I$(WOLFBOOT_LIB_WOLFPKCS11)
@@ -899,7 +900,6 @@ ifeq ($(WOLFTPM),1)
899900
CFLAGS+=-I$(WOLFBOOT_LIB_WOLFTPM)
900901
CFLAGS+=-D"WOLFBOOT_TPM"
901902
CFLAGS+=-D"WOLFTPM_SMALL_STACK"
902-
CFLAGS+=-D"WOLFTPM_AUTODETECT"
903903
ifneq ($(SPI_FLASH),1)
904904
# don't use spi if we're using simulator
905905
ifeq ($(TARGET),sim)
@@ -915,6 +915,7 @@ ifeq ($(WOLFTPM),1)
915915
OBJS+=$(WOLFBOOT_LIB_WOLFTPM)/hal/tpm_io_mmio.o
916916
# By default, on other architectures, provide SPI driver
917917
else
918+
CFLAGS+=-D"WOLFTPM_AUTODETECT"
918919
WOLFCRYPT_OBJS+=hal/spi/spi_drv_$(SPI_TARGET).o
919920
endif
920921
endif

test-app/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ if(BUILD_TEST_APPS)
197197
endif()
198198

199199
if(WOLFCRYPT_TZ_PKCS11)
200-
list(APPEND TEST_APP_COMPILE_DEFINITIONS WOLFBOOT_PKCS11_APP SECURE_PKCS11)
200+
list(APPEND TEST_APP_COMPILE_DEFINITIONS WOLFBOOT_PKCS11_APP SECURE_PKCS11 WOLFPKCS11_USER_SETTINGS)
201201
set(WOLFSSL_PKCS11_SOURCES
202202
wcs/pkcs11_stub.c
203203
wcs/pkcs11_test_ecc.c

tools/scripts/sim-sunnyday-update.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,3 @@ fi
1414

1515
echo Test successful.
1616
exit 0
17-
18-

0 commit comments

Comments
 (0)