Skip to content

Commit

Permalink
Merge pull request wolfSSL#481 from danielinux/pkcs11-store-fixes
Browse files Browse the repository at this point in the history
Refactoring of pkcs11_store.c module
  • Loading branch information
dgarske authored Sep 6, 2024
2 parents 002dc8d + 865e3ee commit 21464f7
Show file tree
Hide file tree
Showing 21 changed files with 1,170 additions and 429 deletions.
9 changes: 9 additions & 0 deletions options.mk
Original file line number Diff line number Diff line change
Expand Up @@ -843,3 +843,12 @@ endif
ifeq ($(SIGN_ALG),ext_LMS)
SIGN_ALG=LMS
endif

ifneq ($(KEYVAULT_OBJ_SIZE),)
CFLAGS+=-DKEYVAULT_OBJ_SIZE=$(KEYVAULT_OBJ_SIZE)
endif

ifneq ($(KEYVAULT_MAX_ITEMS),)
CFLAGS+=-DKEYVAULT_MAX_ITEMS=$(KEYVAULT_MAX_ITEMS)
endif

3 changes: 3 additions & 0 deletions src/image.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
#ifndef IMAGE_H_
#define IMAGE_H_

#ifdef UNIT_TEST
#include <stdio.h>
#endif
#include <wolfssl/wolfcrypt/settings.h> /* for wolfCrypt hash/sign routines */

#include <stddef.h>
Expand Down
6 changes: 3 additions & 3 deletions src/libwolfboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -1504,13 +1504,13 @@ ChaCha chacha;
int RAMFUNCTION chacha_init(void)
{
#if defined(MMU) || defined(UNIT_TEST)
uint8_t *key = ENCRYPT_KEY;
const uint8_t *key = ENCRYPT_KEY;
#else
uint8_t *key = (uint8_t *)(WOLFBOOT_PARTITION_BOOT_ADDRESS +
const uint8_t *key = (uint8_t *)(WOLFBOOT_PARTITION_BOOT_ADDRESS +
ENCRYPT_TMP_SECRET_OFFSET);
#endif
uint8_t ff[ENCRYPT_KEY_SIZE];
uint8_t* stored_nonce;
const uint8_t* stored_nonce;

#ifdef NVM_FLASH_WRITEONCE
key -= WOLFBOOT_SECTOR_SIZE * nvm_select_fresh_sector(PART_BOOT);
Expand Down
Loading

0 comments on commit 21464f7

Please sign in to comment.