Home
last modified time | relevance | path

Searched full:if (Results 1 – 25 of 370) sorted by relevance

12345678910>>...15

/mcuboot-latest/ext/mbedtls-asn1/include/mbedtls/
Dcheck_config.h31 #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 …]
Dbignum.h31 #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 …]
Dplatform.h37 #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/
Dmcuboot_config.h24 #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/
Dloader.c56 #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
125 if (rc == BOOT_HOOK_REGULAR) in boot_read_image_headers()
129 if (rc != 0) { in boot_read_image_headers()
[all …]
Dencrypted.c10 #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 …]
Dcaps.c27 #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()
51 #if defined(MCUBOOT_ENCRYPT_RSA) in bootutil_get_caps()
54 #if defined(MCUBOOT_ENCRYPT_KW) in bootutil_get_caps()
57 #if defined(MCUBOOT_ENCRYPT_EC256) in bootutil_get_caps()
[all …]
Dimage_validate.c46 #if defined(MCUBOOT_SIGN_RSA)
49 #if defined(MCUBOOT_SIGN_EC256)
52 #if defined(MCUBOOT_ENC_IMAGES) || defined(MCUBOOT_SIGN_RSA) || \
61 * (SHA384 if ECDSA-P384 is being used,
79 #if (BOOT_IMAGE_NUMBER == 1) || !defined(MCUBOOT_ENC_IMAGES) || \ in bootutil_img_hash()
98 if (MUST_DECRYPT(fap, image_index, hdr) && in bootutil_img_hash()
108 if (seed && (seed_len > 0)) { in bootutil_img_hash()
117 /* If protected TLVs are present they are also hashed. */ in bootutil_img_hash()
127 if (blk_sz > tmp_buf_sz) { in bootutil_img_hash()
134 if ((off < hdr_size) && ((off + blk_sz) > hdr_size)) { in bootutil_img_hash()
[all …]
Dboot_record.c28 #if defined(MCUBOOT_MEASURED_BOOT) || defined(MCUBOOT_DATA_SHARING)
35 #if !defined(MCUBOOT_CUSTOM_DATA_SHARING_FUNCTION)
56 if (data == NULL) { in boot_add_data_to_shared_area()
62 /* Check whether first time to call this function. If does then initialise in boot_add_data_to_shared_area()
65 if (!shared_memory_init_done) { in boot_add_data_to_shared_area()
78 /* Iterates over the TLV section looks for the same entry if found then in boot_add_data_to_shared_area()
84 if (GET_MAJOR(tlv_entry.tlv_type) == major_type && in boot_add_data_to_shared_area()
96 if (!boot_u16_safe_add(&boot_data_size, boot_data->header.tlv_tot_len, in boot_add_data_to_shared_area()
102 if (boot_data_size > MCUBOOT_SHARED_DATA_SIZE) { in boot_add_data_to_shared_area()
144 if (rc) { in boot_save_boot_status()
[all …]
Dtlv.c33 * @param prot true if TLV has to be stored in the protected area, false otherwise
35 * @returns 0 if the TLV iterator was successfully started
45 if (it == NULL || hdr == NULL || fap == NULL) { in bootutil_tlv_iter_begin()
50 if (LOAD_IMAGE_DATA(hdr, fap, off_, &info, sizeof(info))) { in bootutil_tlv_iter_begin()
54 if (info.it_magic == IMAGE_TLV_PROT_INFO_MAGIC) { in bootutil_tlv_iter_begin()
55 if (hdr->ih_protect_tlv_size != info.it_tlv_tot) { in bootutil_tlv_iter_begin()
59 if (LOAD_IMAGE_DATA(hdr, fap, off_ + info.it_tlv_tot, in bootutil_tlv_iter_begin()
63 } else if (hdr->ih_protect_tlv_size != 0) { in bootutil_tlv_iter_begin()
67 if (info.it_magic != IMAGE_TLV_INFO_MAGIC) { in bootutil_tlv_iter_begin()
88 * @param type If not NULL returns the type of TLV found
[all …]
Dswap_move.c35 #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 …]
Dswap_scratch.c33 #if !defined(MCUBOOT_SWAP_USING_MOVE)
35 #if defined(MCUBOOT_VALIDATE_PRIMARY_SLOT)
42 if (!(x)) { \
50 #if !defined(MCUBOOT_DIRECT_XIP) && !defined(MCUBOOT_RAM_LOAD)
52 * Reads the status of a partially-completed swap, if any. This is necessary
71 if (max_entries < 0) { in swap_read_status_bytes()
81 if (rc < 0) { in swap_read_status_bytes()
85 if (bootutil_buffer_is_erased(fap, &status, 1)) { in swap_read_status_bytes()
86 if (found && !found_idx) { in swap_read_status_bytes()
89 } else if (!found) { in swap_read_status_bytes()
[all …]
/mcuboot-latest/boot/zephyr/
DKconfig16 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
93 default BOOT_IMG_HASH_ALG_SHA256 if BOOT_IMG_HASH_ALG_SHA256_ALLOW
94 default BOOT_IMG_HASH_ALG_SHA384 if BOOT_IMG_HASH_ALG_SHA384_ALLOW
95 default BOOT_IMG_HASH_ALG_SHA512 if BOOT_IMG_HASH_ALG_SHA512_ALLOW
137 if BOOT_SIGNATURE_TYPE_RSA
149 if BOOT_SIGNATURE_TYPE_ECDSA_P256
173 if BOOT_SIGNATURE_TYPE_ED25519
[all …]
DCMakeLists.txt32 if(CONFIG_BOOT_USE_NRF_CC310_BL)
34 if(NOT EXISTS ${NRFXLIB_DIR})
45 # Don't include this if we are using west
62 if(DEFINED CONFIG_ENABLE_MGMT_PERUSER)
72 if(DEFINED CONFIG_BOOT_MGMT_CUSTOM_STORAGE_ERASE OR DEFINED CONFIG_BOOT_MGMT_CUSTOM_IMG_LIST)
79 if(NOT DEFINED CONFIG_FLASH_PAGE_LAYOUT)
85 if(DEFINED CONFIG_BOOT_SHARE_BACKEND_RETENTION)
104 if(DEFINED CONFIG_MEASURED_BOOT OR DEFINED CONFIG_BOOT_SHARE_DATA)
120 if(CONFIG_BOOT_FIH_PROFILE_HIGH)
126 if(CONFIG_SINGLE_APPLICATION_SLOT)
[all …]
Dfirmware_loader.c27 #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 …]
DKconfig.serial_recovery18 If y, enables a serial-port based update mode. This allows
20 If unsure, leave at the default value.
22 if MCUBOOT_SERIAL
26 default BOOT_SERIAL_UART if !BOARD_NRF52840DONGLE_NRF52840
27 default BOOT_SERIAL_CDC_ACM if BOARD_NRF52840DONGLE_NRF52840
68 default 512 if SOC_SERIES_LPC55XXX
69 default 128 if SOC_SERIES_MCXN
103 default y if SOC_FAMILY_NORDIC_NRF || SOC_FAMILY_NXP_IMXRT
105 If enabled, flash is erased as necessary when receiving new firmware,
113 if enabled, support for the mcumgr echo command is being added.
[all …]
/mcuboot-latest/boot/espressif/hal/src/
Dflash_encrypt.c26 #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 …]
Dsecure_boot.c32 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/
Dasn1parse.c22 #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/boot/boot_serial/src/
Dboot_serial.c104 #if (128 + BOOT_SERIAL_IMAGE_STATE_SIZE_MAX + BOOT_SERIAL_HASH_SIZE_MAX) > \
140 #if (BOOT_IMAGE_NUMBER > 1)
208 if (n || dgt > 0 || d == 0) { in u32toa()
232 if (ver->iv_build_num != 0) { in bs_list_img_ver()
249 if (ver->iv_build_num != 0 && len > 0 && len < maxlen) { in bs_list_img_ver()
290 if (flash_area_open(area_id, &fap)) { in bs_list()
296 if (rc == BOOT_HOOK_REGULAR) in bs_list()
301 if (hdr.ih_magic == IMAGE_MAGIC) in bs_list()
306 if (FIH_EQ(fih_rc, FIH_BOOT_HOOK_REGULAR)) in bs_list()
308 #if defined(MCUBOOT_ENC_IMAGES) in bs_list()
[all …]
Dboot_serial_encryption.c38 if(IS_ENCRYPTED(hdr)) { in boot_image_validate_encrypted()
40 if (rc < 0) { in boot_image_validate_encrypted()
44 if (rc < 0) { in boot_image_validate_encrypted()
70 if (flash_area_read(fa_p, off, &info, sizeof(info))) { in read_image_size()
76 if (info.it_magic == IMAGE_TLV_PROT_INFO_MAGIC) { in read_image_size()
77 if (protect_tlv_size != info.it_tlv_tot) { in read_image_size()
82 if (flash_area_read(fa_p, off + info.it_tlv_tot, &info, sizeof(info))) { in read_image_size()
86 } else if (protect_tlv_size != 0) { in read_image_size()
91 if (info.it_magic != IMAGE_TLV_INFO_MAGIC) { in read_image_size()
136 if (sz - bytes_copied > sizeof buf) { in decrypt_region_inplace()
[all …]
/mcuboot-latest/scripts/imgtool/
Dimage.py136 if isinstance(kind, int):
137 if not TLV_VENDOR_RES_MIN <= kind <= TLV_VENDOR_RES_MAX:
149 if len(self.buf) == 0:
201 if key is None:
202 # If key is none, we allow whatever user has selected for sha
205 # If key is not None, then we have to filter hash to only allowed
212 if user_sha == 'auto':
215 if user_sha in allowed:
230 """Check if provided key matches to TLV record in the image"""
253 if load_addr and rom_fixed:
[all …]
/mcuboot-latest/boot/mynewt/src/
Dmain.c41 #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/
Decdsa.h26 #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, &param)) { in bootutil_import_key()
[all …]
/mcuboot-latest/boot/zcbor/src/
Dzcbor_decode.c26 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 …]

12345678910>>...15