/mcuboot-latest/ext/mbedtls-asn1/include/mbedtls/ |
D | check_config.h | 31 #if CHAR_BIT != 8 35 #if defined(_WIN32) 36 #if !defined(MBEDTLS_PLATFORM_C) 42 #if !defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) && \ 47 #if !defined(MBEDTLS_PLATFORM_VSNPRINTF_ALT) && \ 53 #if defined(TARGET_LIKE_MBED) && defined(MBEDTLS_NET_C) 57 #if defined(MBEDTLS_DEPRECATED_WARNING) && \ 62 #if defined(MBEDTLS_HAVE_TIME_DATE) && !defined(MBEDTLS_HAVE_TIME) 66 #if defined(MBEDTLS_AESNI_C) && !defined(MBEDTLS_HAVE_ASM) 70 #if defined(MBEDTLS_CTR_DRBG_C) && !defined(MBEDTLS_AES_C) [all …]
|
D | bignum.h | 31 #if defined(MBEDTLS_FS_IO) 47 if( ( ret = (f) ) != 0 ) \ 56 #if !defined(MBEDTLS_MPI_WINDOW_SIZE) 69 #if !defined(MBEDTLS_MPI_MAX_SIZE) 114 #if !defined(MBEDTLS_HAVE_INT32) 115 #if defined(_MSC_VER) && defined(_M_AMD64) 117 #if !defined(MBEDTLS_HAVE_INT64) 129 #if !defined(MBEDTLS_HAVE_INT64) 134 #if !defined(MBEDTLS_NO_UDBL_DIVISION) 144 #if !defined(MBEDTLS_HAVE_INT64) [all …]
|
D | platform.h | 37 #if defined(MBEDTLS_HAVE_TIME) 57 #if defined(__MINGW32__) || (defined(_MSC_VER) && _MSC_VER <= 1900) 62 #if !defined(MBEDTLS_PLATFORM_NO_STD_FUNCTIONS) 66 #if !defined(MBEDTLS_PLATFORM_STD_SNPRINTF) 67 #if defined(MBEDTLS_PLATFORM_HAS_NON_CONFORMING_SNPRINTF) 73 #if !defined(MBEDTLS_PLATFORM_STD_VSNPRINTF) 74 #if defined(MBEDTLS_PLATFORM_HAS_NON_CONFORMING_VSNPRINTF) 80 #if !defined(MBEDTLS_PLATFORM_STD_PRINTF) 83 #if !defined(MBEDTLS_PLATFORM_STD_FPRINTF) 86 #if !defined(MBEDTLS_PLATFORM_STD_CALLOC) [all …]
|
/mcuboot-latest/boot/mynewt/mcuboot_config/include/mcuboot_config/ |
D | mcuboot_config.h | 24 #if MYNEWT_VAL(BOOTUTIL_IMAGE_NUMBER) 29 #if MYNEWT_VAL(BOOTUTIL_VERSION_CMP_USE_BUILD_NUMBER) 32 #if MYNEWT_VAL(BOOT_SERIAL) 35 #if MYNEWT_VAL(BOOT_SERIAL_MGMT_ECHO) 38 #if MYNEWT_VAL(BOOTUTIL_VALIDATE_SLOT0) 41 #if MYNEWT_VAL(BOOTUTIL_USE_MBED_TLS) 44 #if MYNEWT_VAL(BOOTUTIL_USE_TINYCRYPT) 47 #if MYNEWT_VAL(BOOTUTIL_SIGN_EC256) 50 #if MYNEWT_VAL(BOOTUTIL_SIGN_RSA) 54 #if MYNEWT_VAL(BOOTUTIL_SIGN_ED25519) [all …]
|
/mcuboot-latest/boot/bootutil/src/ |
D | loader.c | 56 #if !defined(MCUBOOT_DIRECT_XIP) && !defined(MCUBOOT_RAM_LOAD) 66 #if defined(MCUBOOT_SERIAL_IMG_GRP_SLOT_INFO) || defined(MCUBOOT_DATA_SHARING) 70 #if (!defined(MCUBOOT_DIRECT_XIP) && !defined(MCUBOOT_RAM_LOAD)) || \ 72 #if !defined(__BOOTSIM__) 79 #if MCUBOOT_SWAP_USING_SCRATCH 88 #if (BOOT_IMAGE_NUMBER > 1) 101 #if !defined(__BOOTSIM__) 107 #if BOOT_MAX_ALIGN > 1024 113 #if defined(MCUBOOT_SWAP_USING_OFFSET) && defined(MCUBOOT_ENC_IMAGES) 136 if (rc == BOOT_HOOK_REGULAR) in boot_read_image_headers() [all …]
|
D | encrypted.c | 10 #if defined(MCUBOOT_ENC_IMAGES) 15 #if defined(MCUBOOT_ENCRYPT_RSA) 20 #if defined(MCUBOOT_ENCRYPT_KW) 24 #if defined(MCUBOOT_ENCRYPT_EC256) 28 #if defined(MCUBOOT_ENCRYPT_X25519) 32 #if defined(MCUBOOT_ENCRYPT_EC256) || defined(MCUBOOT_ENCRYPT_X25519) 46 #if defined(MCUBOOT_ENCRYPT_EC256) || defined(MCUBOOT_ENCRYPT_X25519) 47 #if defined(_compare) 68 #if defined(MCUBOOT_ENCRYPT_KW) 77 if (rc != 0) { in key_unwrap() [all …]
|
D | image_validate.c | 48 #if defined(MCUBOOT_SIGN_RSA) 51 #if defined(MCUBOOT_SIGN_EC256) 54 #if defined(MCUBOOT_ENC_IMAGES) || defined(MCUBOOT_SIGN_RSA) || \ 64 * (SHA384 if ECDSA-P384 is being used, 72 #if defined(MCUBOOT_SWAP_USING_OFFSET) && defined(MCUBOOT_SERIAL_RECOVERY) in bootutil_img_hash() 82 #if !defined(MCUBOOT_HASH_STORAGE_DIRECTLY) in bootutil_img_hash() 87 #if defined(MCUBOOT_ENC_IMAGES) in bootutil_img_hash() 91 #if defined(MCUBOOT_SWAP_USING_OFFSET) in bootutil_img_hash() 95 #if (BOOT_IMAGE_NUMBER == 1) || !defined(MCUBOOT_ENC_IMAGES) || \ in bootutil_img_hash() 112 if (state == NULL) { in bootutil_img_hash() [all …]
|
D | caps.c | 27 #if defined(MCUBOOT_SIGN_RSA) in bootutil_get_caps() 28 #if MCUBOOT_SIGN_RSA_LEN == 2048 in bootutil_get_caps() 31 #if MCUBOOT_SIGN_RSA_LEN == 3072 in bootutil_get_caps() 35 #if defined(MCUBOOT_SIGN_EC256) in bootutil_get_caps() 38 #if defined(MCUBOOT_SIGN_EC384) in bootutil_get_caps() 41 #if defined(MCUBOOT_SIGN_ED25519) in bootutil_get_caps() 44 #if defined(MCUBOOT_OVERWRITE_ONLY) in bootutil_get_caps() 53 #if defined(MCUBOOT_ENCRYPT_RSA) in bootutil_get_caps() 56 #if defined(MCUBOOT_ENCRYPT_KW) in bootutil_get_caps() 59 #if defined(MCUBOOT_ENCRYPT_EC256) in bootutil_get_caps() [all …]
|
D | boot_record.c | 28 #if defined(MCUBOOT_MEASURED_BOOT) || defined(MCUBOOT_DATA_SHARING) 35 #if defined(MCUBOOT_DATA_SHARING_BOOTINFO) 39 #if !defined(MCUBOOT_CUSTOM_DATA_SHARING_FUNCTION) 60 if (data == NULL) { in boot_add_data_to_shared_area() 66 /* Check whether first time to call this function. If does then initialise in boot_add_data_to_shared_area() 69 if (!shared_memory_init_done) { in boot_add_data_to_shared_area() 82 /* Iterates over the TLV section looks for the same entry if found then in boot_add_data_to_shared_area() 88 if (GET_MAJOR(tlv_entry.tlv_type) == major_type && in boot_add_data_to_shared_area() 100 if (!boot_u16_safe_add(&boot_data_size, boot_data->header.tlv_tot_len, in boot_add_data_to_shared_area() 106 if (boot_data_size > MCUBOOT_SHARED_DATA_SIZE) { in boot_add_data_to_shared_area() [all …]
|
D | swap_offset.c | 36 #if defined(MCUBOOT_VALIDATE_PRIMARY_SLOT) 43 if (!(x)) { \ 51 #if defined(MCUBOOT_ENC_IMAGES) 72 if (sz >= swap_size) { in find_last_idx() 92 #if (BOOT_IMAGE_NUMBER == 1) 96 if (bs == NULL) { 99 if (slot == BOOT_SECONDARY_SLOT && 104 if (!boot_status_is_reset(bs)) { 108 if (fap == NULL || boot_read_swap_size(fap, &swap_size)) { 121 if (bs->swap_type == BOOT_SWAP_TYPE_REVERT || [all …]
|
D | tlv.c | 34 * @param prot true if TLV has to be stored in the protected area, false otherwise 36 * @returns 0 if the TLV iterator was successfully started 46 if (it == NULL || hdr == NULL || fap == NULL) { in bootutil_tlv_iter_begin() 50 #if defined(MCUBOOT_SWAP_USING_OFFSET) in bootutil_tlv_iter_begin() 56 if (LOAD_IMAGE_DATA(hdr, fap, off_, &info, sizeof(info))) { in bootutil_tlv_iter_begin() 60 if (info.it_magic == IMAGE_TLV_PROT_INFO_MAGIC) { in bootutil_tlv_iter_begin() 61 if (hdr->ih_protect_tlv_size != info.it_tlv_tot) { in bootutil_tlv_iter_begin() 65 if (LOAD_IMAGE_DATA(hdr, fap, off_ + info.it_tlv_tot, in bootutil_tlv_iter_begin() 69 } else if (hdr->ih_protect_tlv_size != 0) { in bootutil_tlv_iter_begin() 73 if (info.it_magic != IMAGE_TLV_INFO_MAGIC) { in bootutil_tlv_iter_begin() [all …]
|
D | bootutil_misc.c | 51 * @brief Determine if the data at two memory addresses is equal 60 * bytes are compared and detect if loop was abused and some cycles 63 * @return FIH_SUCCESS if memory regions are equal, otherwise FIH_FAILURE 80 if (s1_p[i] != s2_p[i]) { in boot_fih_memequal() 84 if (i == n) { in boot_fih_memequal() 104 # if MCUBOOT_SWAP_SAVE_ENCTLV in boot_trailer_info_sz() 138 #if MCUBOOT_SWAP_USING_SCRATCH 155 #if MCUBOOT_SWAP_USING_SCRATCH in boot_status_entries() 156 if (flash_area_get_id(fap) == FLASH_AREA_IMAGE_SCRATCH) { in boot_status_entries() 160 if (flash_area_get_id(fap) == FLASH_AREA_IMAGE_PRIMARY(image_index) || in boot_status_entries() [all …]
|
D | swap_move.c | 35 #if defined(MCUBOOT_VALIDATE_PRIMARY_SLOT) 42 if (!(x)) { \ 63 if (sz >= swap_size) { in find_last_idx() 83 #if (BOOT_IMAGE_NUMBER == 1) in boot_read_image_header() 88 if (bs && !boot_status_is_reset(bs)) { in boot_read_image_header() 90 if (fap == NULL || boot_read_swap_size(fap, &swap_size)) { in boot_read_image_header() 103 if (bs->op == BOOT_STATUS_OP_MOVE && slot == 0 && bs->idx > last_idx) { in boot_read_image_header() 105 } else if (bs->op == BOOT_STATUS_OP_SWAP) { in boot_read_image_header() 106 if (bs->idx > 1 && bs->idx <= last_idx) { in boot_read_image_header() 108 } else if (bs->idx == 1) { in boot_read_image_header() [all …]
|
/mcuboot-latest/boot/zephyr/ |
D | Kconfig | 16 select MPU_ALLOW_FLASH_WRITE if ARM_MPU 17 select USE_DT_CODE_PARTITION if HAS_FLASH_LOAD_OFFSET 31 Hidden option set if using PSA crypt for cryptography functionality 40 select MBEDTLS_PROMPTLESS if ZEPHYR_MBEDTLS_MODULE 66 if BOOT_USE_MBEDTLS && MBEDTLS_BUILTIN 118 default BOOT_IMG_HASH_ALG_SHA256 if BOOT_IMG_HASH_ALG_SHA256_ALLOW 119 default BOOT_IMG_HASH_ALG_SHA384 if BOOT_IMG_HASH_ALG_SHA384_ALLOW 120 default BOOT_IMG_HASH_ALG_SHA512 if BOOT_IMG_HASH_ALG_SHA512_ALLOW 167 select MBEDTLS_ASN1_PARSE_C if MBEDTLS_BUILTIN 168 select MBEDTLS_KEY_EXCHANGE_RSA_ENABLED if MBEDTLS_BUILTIN [all …]
|
D | CMakeLists.txt | 12 if(TEST_RUNTIME_SOURCE_HOOKS) 34 if(NOT CONFIG_MBEDTLS_BUILTIN) 40 if(CONFIG_BOOT_USE_NRF_CC310_BL) 42 if(NOT EXISTS ${NRFXLIB_DIR}) 53 # Don't include this if we are using west 70 if(DEFINED CONFIG_ENABLE_MGMT_PERUSER) 80 if(DEFINED CONFIG_BOOT_MGMT_CUSTOM_STORAGE_ERASE OR DEFINED CONFIG_BOOT_MGMT_CUSTOM_IMG_LIST) 87 if(NOT DEFINED CONFIG_FLASH_PAGE_LAYOUT) 93 if(DEFINED CONFIG_BOOT_SHARE_BACKEND_RETENTION) 112 if(DEFINED CONFIG_MEASURED_BOOT OR DEFINED CONFIG_BOOT_SHARE_DATA) [all …]
|
D | firmware_loader.c | 27 #if defined(MCUBOOT_VALIDATE_PRIMARY_SLOT) || defined(MCUBOOT_VALIDATE_PRIMARY_SLOT_ONCE) 49 if (IS_ENCRYPTED(hdr)) in boot_image_validate() 52 * This flag could be set if there was a decryption in place in boot_image_validate() 53 * was performed. We will try to validate the image, and if still in boot_image_validate() 65 #if defined(MCUBOOT_VALIDATE_PRIMARY_SLOT_ONCE) 76 if (rc != 0) in boot_image_validate_once() 78 if (state.magic != BOOT_MAGIC_GOOD in boot_image_validate_once() 82 if (FIH_NOT_EQ(fih_rc, FIH_SUCCESS)) { in boot_image_validate_once() 85 if (state.magic != BOOT_MAGIC_GOOD) { in boot_image_validate_once() 87 if (rc != 0) in boot_image_validate_once() [all …]
|
/mcuboot-latest/boot/boot_serial/src/ |
D | boot_serial.c | 84 #if defined(MCUBOOT_SHA512) 115 #if (128 + BOOT_SERIAL_IMAGE_STATE_SIZE_MAX + BOOT_SERIAL_HASH_SIZE_MAX) > \ 151 #if (BOOT_IMAGE_NUMBER > 1) 227 if (n || dgt > 0 || d == 0) { in u32toa() 251 if (ver->iv_build_num != 0) { in bs_list_img_ver() 268 if (ver->iv_build_num != 0 && len > 0 && len < maxlen) { in bs_list_img_ver() 314 if (flash_area_open(area_id, &fap)) { in bs_list() 319 if (slot == BOOT_SECONDARY_SLOT && swap_status != BOOT_SWAP_TYPE_REVERT) { in bs_list() 325 if ((rc != 0 && rc != -ENOMEM) || in bs_list() 337 if (rc == BOOT_HOOK_REGULAR) in bs_list() [all …]
|
D | boot_serial_encryption.c | 40 if(IS_ENCRYPTED(hdr)) { in boot_image_validate_encrypted() 46 if (rc < 0) { in boot_image_validate_encrypted() 50 if (rc < 0) { in boot_image_validate_encrypted() 82 if (flash_area_read(fa_p, off, &info, sizeof(info))) { in read_image_size() 88 if (info.it_magic == IMAGE_TLV_PROT_INFO_MAGIC) { in read_image_size() 89 if (protect_tlv_size != info.it_tlv_tot) { in read_image_size() 94 if (flash_area_read(fa_p, off + info.it_tlv_tot, &info, sizeof(info))) { in read_image_size() 98 } else if (protect_tlv_size != 0) { in read_image_size() 103 if (info.it_magic != IMAGE_TLV_INFO_MAGIC) { in read_image_size() 148 if (sz - bytes_copied > sizeof buf) { in decrypt_region_inplace() [all …]
|
/mcuboot-latest/boot/espressif/hal/src/ |
D | flash_encrypt.c | 26 #if CONFIG_IDF_TARGET_ESP32 39 * and if required encrypt the partitions in flash memory 62 #if CONFIG_IDF_TARGET_ESP32 in esp_flash_encryption_enabled() 70 if (flash_crypt_cnt & 1) { in esp_flash_encryption_enabled() 93 if (esp_efuse_read_field_bit(WR_DIS_CRYPT_CNT)) { in esp_flash_encrypt_is_write_protected() 94 if (print_error) { in esp_flash_encrypt_is_write_protected() 109 if (flash_crypt_cnt % 2 == 1) { in esp_flash_encrypt_state() 112 if (flash_crypt_wr_dis) { in esp_flash_encrypt_state() 124 if (!flash_encryption_enabled) { in esp_flash_encrypt_check_and_update() 126 if (esp_flash_encrypt_is_write_protected(true)) { in esp_flash_encrypt_check_and_update() [all …]
|
D | secure_boot.c | 32 if (block->magic_byte != ETS_SECURE_BOOT_V2_SIGNATURE_MAGIC) { in validate_signature_block() 37 if (block->block_crc != esp_rom_crc32_le(0, (uint8_t *)block, CRC_SIGN_BLOCK_LEN)) { in validate_signature_block() 41 if (memcmp(image_digest, block->image_digest, ESP_SECURE_BOOT_DIGEST_LEN)) { in validate_signature_block() 60 Note that this function doesn't read any eFuses, so it doesn't know if the 63 …@return - ESP_OK if no signatures failed to verify, or if no valid signature blocks are found at a… 64 …- ESP_FAIL if there's a valid signature block that doesn't verify using the included public key (u… 78 if (ret != ESP_OK) { in s_calculate_image_public_key_digests() 85 if (signatures == NULL) { in s_calculate_image_public_key_digests() 95 if (ret != ESP_OK) { in s_calculate_image_public_key_digests() 103 #if CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME in s_calculate_image_public_key_digests() [all …]
|
/mcuboot-latest/ext/mbedtls-asn1/src/ |
D | asn1parse.c | 22 #if defined(MBEDTLS_ASN1_PARSE_C) 30 #if defined(MBEDTLS_BIGNUM_C) 34 #if defined(MBEDTLS_PLATFORM_C) 49 if( ( end - *p ) < 1 ) in mbedtls_asn1_get_len() 52 if( ( **p & 0x80 ) == 0 ) in mbedtls_asn1_get_len() 59 if( ( end - *p ) < 2 ) in mbedtls_asn1_get_len() 67 if( ( end - *p ) < 3 ) in mbedtls_asn1_get_len() 75 if( ( end - *p ) < 4 ) in mbedtls_asn1_get_len() 84 if( ( end - *p ) < 5 ) in mbedtls_asn1_get_len() 97 if( *len > (size_t) ( end - *p ) ) in mbedtls_asn1_get_len() [all …]
|
/mcuboot-latest/scripts/imgtool/ |
D | image.py | 137 if isinstance(kind, int): 138 if not TLV_VENDOR_RES_MIN <= kind <= TLV_VENDOR_RES_MAX: 150 if len(self.buf) == 0: 210 if key is None: 211 # If key is none, we allow whatever user has selected for sha 214 # If key is not None, then we have to filter hash to only allowed 216 allowed_key_ssh = ALLOWED_PURE_KEY_SHA if is_pure else ALLOWED_KEY_SHA 225 if user_sha == 'auto' or is_pure: 228 if user_sha in allowed: 243 """Check if provided key matches to TLV record in the image""" [all …]
|
/mcuboot-latest/boot/mynewt/src/ |
D | main.c | 41 #if defined(MCUBOOT_SERIAL) 50 #if MYNEWT_VAL(BOOT_CUSTOM_START) 54 #if MYNEWT_VAL(BOOT_PREBOOT) 58 #if defined(MCUBOOT_SERIAL) 72 #if MYNEWT_VAL(BOOT_SERIAL_REPORT_PIN) != -1 in boot_read() 75 if (tick == 0) { in boot_read() 83 if (os_cputime_get32() - tick > BOOT_SERIAL_REPORT_DUR) { in boot_read() 94 #if MYNEWT_VAL(BOOT_SERIAL_DETECT_TIMEOUT) != 0 104 * @return true if the management string was received; 105 * false if the management string was not received [all …]
|
/mcuboot-latest/boot/bootutil/include/bootutil/crypto/ |
D | ecdsa.h | 26 #if defined(MCUBOOT_USE_PSA_CRYPTO) || defined(MCUBOOT_USE_MBED_TLS) 30 #if defined(MCUBOOT_SIGN_EC384) && \ 35 #if (defined(MCUBOOT_USE_TINYCRYPT) + \ 41 #if defined(MCUBOOT_USE_TINYCRYPT) 46 #if defined(MCUBOOT_USE_CC310) 50 #if defined(MCUBOOT_USE_PSA_CRYPTO) 61 #if defined(MCUBOOT_USE_CC310) || defined(MCUBOOT_USE_MBED_TLS) 77 #if (defined(MCUBOOT_USE_TINYCRYPT) || defined(MCUBOOT_USE_MBED_TLS) || \ 94 if (mbedtls_asn1_get_tag(cp, end, &len, in bootutil_import_key() 101 if (mbedtls_asn1_get_alg(cp, end, &alg, ¶m)) { in bootutil_import_key() [all …]
|
/mcuboot-latest/boot/zcbor/src/ |
D | zcbor_decode.c | 26 if (additional <= ZCBOR_VALUE_IN_HEADER) { in additional_len() 28 } else if (ZCBOR_VALUE_IS_1_BYTE <= additional && additional <= ZCBOR_VALUE_IS_8_BYTES) { in additional_len() 50 if (!initial_checks(state)) { in type_check() 55 if (major_type != exp_major_type) { in type_check() 64 if (!initial_checks(state)) { \ 71 if (!type_check(state, exp_major_type)) { \ 123 * @p ppayload and @p elem_count are updated if the function 124 * succeeds. If not, they are left unchanged. 127 * big to little-endian if necessary (@ref ZCBOR_BIG_ENDIAN). 151 if (len == 0) { in value_extract() [all …]
|