Home
last modified time | relevance | path

Searched refs:ret (Results 1 – 24 of 24) sorted by relevance

/mcuboot-latest/ext/tinycrypt/tests/
Dtest_ctr_prng.c320 int ret; in test_reseed() local
328 ret = tc_ctr_prng_generate(&ctx, 0, 0, output, sizeof output); in test_reseed()
329 if (1 != ret) { in test_reseed()
335 ret = tc_ctr_prng_generate(&ctx, 0, 0, output, sizeof output); in test_reseed()
336 if (-1 != ret) { in test_reseed()
344 ret = tc_ctr_prng_reseed(&ctx, entropy, sizeof entropy, additional_input, sizeof additional_input); in test_reseed()
345 if (1 != ret) { in test_reseed()
350 ret = tc_ctr_prng_generate(&ctx, 0, 0, output, sizeof output); in test_reseed()
351 if (1 != ret) { in test_reseed()
362 ret = tc_ctr_prng_reseed(&ctx, entropy, sizeof entropy, 0, 0U); in test_reseed()
[all …]
/mcuboot-latest/boot/espressif/hal/src/
Dsecure_boot.c68 esp_err_t ret; in s_calculate_image_public_key_digests() local
77ret = bootloader_sha256_flash_contents(flash_offset, sig_block_addr - flash_offset, image_digest); in s_calculate_image_public_key_digests()
78 if (ret != ESP_OK) { in s_calculate_image_public_key_digests()
79 ESP_LOGE(TAG, "error generating image digest, %d", ret); in s_calculate_image_public_key_digests()
80 return ret; in s_calculate_image_public_key_digests()
94 ret = validate_signature_block(block, i, image_digest); in s_calculate_image_public_key_digests()
95 if (ret != ESP_OK) { in s_calculate_image_public_key_digests()
96 ret = ESP_OK; // past the last valid signature block in s_calculate_image_public_key_digests()
122 ret = ESP_FAIL; in s_calculate_image_public_key_digests()
132 if (ret == ESP_OK && public_key_digests->num_digests > 0) { in s_calculate_image_public_key_digests()
[all …]
/mcuboot-latest/boot/nuttx/src/watchdog/
Dwatchdog.c57 int ret; in mcuboot_watchdog_feed() local
67 ret = ioctl(fd, WDIOC_KEEPALIVE, 0); in mcuboot_watchdog_feed()
68 if (ret < 0) in mcuboot_watchdog_feed()
96 int ret; in mcuboot_watchdog_init() local
105 ret = ioctl(fd, WDIOC_SETTIMEOUT, (unsigned long)CONFIG_MCUBOOT_WATCHDOG_TIMEOUT); in mcuboot_watchdog_init()
106 if (ret < 0) in mcuboot_watchdog_init()
114 ret = ioctl(fd, WDIOC_START, 0); in mcuboot_watchdog_init()
115 if (ret < 0) in mcuboot_watchdog_init()
/mcuboot-latest/ext/mbedtls-asn1/src/
Dasn1parse.c122 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_asn1_get_bool() local
125 if( ( ret = mbedtls_asn1_get_tag( p, end, &len, MBEDTLS_ASN1_BOOLEAN ) ) != 0 ) in mbedtls_asn1_get_bool()
126 return( ret ); in mbedtls_asn1_get_bool()
141 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in asn1_get_tagged_int() local
144 if( ( ret = mbedtls_asn1_get_tag( p, end, &len, tag ) ) != 0 ) in asn1_get_tagged_int()
145 return( ret ); in asn1_get_tagged_int()
200 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_asn1_get_mpi() local
203 if( ( ret = mbedtls_asn1_get_tag( p, end, &len, MBEDTLS_ASN1_INTEGER ) ) != 0 ) in mbedtls_asn1_get_mpi()
204 return( ret ); in mbedtls_asn1_get_mpi()
206 ret = mbedtls_mpi_read_binary( X, *p, len ); in mbedtls_asn1_get_mpi()
[all …]
/mcuboot-latest/boot/bootutil/include/bootutil/crypto/
Dsha.h139 int ret;
143 ret = mbedtls_sha512_starts_ret(ctx, 0);
146 ret = mbedtls_sha256_starts_ret(ctx, 0);
149 return ret;
167 int ret;
170 ret = mbedtls_sha512_update_ret(ctx, data, data_len);
172 ret = mbedtls_sha256_update_ret(ctx, data, data_len);
175 return ret;
181 int ret;
184 ret = mbedtls_sha512_finish_ret(ctx, output);
[all …]
/mcuboot-latest/boot/bootutil/include/bootutil/
Dfault_injection_hardening.h212 fih_int ret = {x, x ^ _fih_mask}; in fih_int_encode() local
213 return ret; in fih_int_encode()
303 #define FIH_CALL(f, ret, ...) FIH_CALL2(f, ret, __LINE__, __COUNTER__, __VA_ARGS__) argument
305 #define FIH_CALL2(f, ret, l, c, ...) \ argument
309 ret = FIH_FAILURE; \
311 ret = f(__VA_ARGS__); \
319 #define FIH_CALL(f, ret, ...) \ argument
323 ret = FIH_FAILURE; \
325 ret = f(__VA_ARGS__); \
336 #define FIH_RET(ret) \ argument
[all …]
/mcuboot-latest/boot/nuttx/
Dmain.c69 int ret; in do_boot() local
73 ret = flash_area_open(area_id, &flash_area); in do_boot()
74 assert(ret == OK); in do_boot()
118 int ret = mcuboot_watchdog_init(); in main() local
119 if (ret < 0) in main()
/mcuboot-latest/boot/mbed/src/
Dflash_map_backend.cpp98 int ret = bd->init(); in flash_area_open() local
99 if (ret) in flash_area_open()
101 MCUBOOT_LOG_ERR("initializing flash area failed %d", ret); in flash_area_open()
102 return ret; in flash_area_open()
160 int ret = bd->read(dst, off, len); in flash_area_read() local
161 if (ret != 0) { in flash_area_read()
164 return ret; in flash_area_read()
178 int ret = bd->read(buffer, off + len, read_size); in flash_area_read() local
179 if (ret != 0) { in flash_area_read()
180 MCUBOOT_LOG_ERR("Read failed: %d", ret); in flash_area_read()
[all …]
/mcuboot-latest/boot/cypress/cy_flash_pal/
Dcy_flash_map.c187 int flash_device_base(uint8_t fd_id, uintptr_t *ret) in flash_device_base() argument
194 *ret = CY_FLASH_BASE; in flash_device_base()
201 int ret = -1; in flash_area_open() local
209 ret = 0; in flash_area_open()
214 return ret; in flash_area_open()
360 int ret = -1; in flash_area_align() local
363 ret = CY_FLASH_ALIGN; in flash_area_align()
374 ret = -1; in flash_area_align()
376 return ret; in flash_area_align()
443 int ret = 0; in flash_area_erased_val() local
[all …]
/mcuboot-latest/boot/zephyr/
Dflash_map_legacy.c60 int flash_area_get_sectors(int idx, uint32_t *cnt, struct flash_sector *ret) in flash_area_get_sectors() argument
87 ret[*cnt].fs_off = FLASH_AREA_IMAGE_SECTOR_SIZE * (*cnt); in flash_area_get_sectors()
88 ret[*cnt].fs_size = FLASH_AREA_IMAGE_SECTOR_SIZE; in flash_area_get_sectors()
Dflash_map_extended.c43 int flash_device_base(uint8_t fd_id, uintptr_t *ret) in flash_device_base() argument
50 *ret = FLASH_DEVICE_BASE; in flash_device_base()
/mcuboot-latest/boot/nuttx/src/flash_map_backend/
Dflash_map_backend.c250 int ret; in flash_area_open() local
282 ret = ioctl(fd, MTDIOC_GEOMETRY, (unsigned long)((uintptr_t)&dev->mtdgeo)); in flash_area_open()
283 if (ret < 0) in flash_area_open()
292 ret = ioctl(fd, BIOC_PARTINFO, (unsigned long)((uintptr_t)&dev->partinfo)); in flash_area_open()
293 if (ret < 0) in flash_area_open()
302 ret = ioctl(fd, MTDIOC_ERASESTATE, in flash_area_open()
304 if (ret < 0) in flash_area_open()
537 int ret; in flash_area_erase() local
564 ret = flash_area_write(fa, off + i, buffer, sector_size); in flash_area_erase()
567 while (ret == OK && i < (len - sector_size)); in flash_area_erase()
[all …]
/mcuboot-latest/boot/cypress/cy_flash_pal/include/flash_map_backend/
Dflash_map_backend.h156 int flash_device_base(uint8_t fd_id, uintptr_t *ret);
172 int flash_area_to_sectors(int idx, int *cnt, struct flash_area *ret);
179 int flash_area_get_sectors(int idx, uint32_t *cnt, struct flash_sector *ret);
/mcuboot-latest/sim/mcuboot-sys/csupport/storage/
Dflash_map.h105 int flash_device_base(uint8_t fd_id, uintptr_t *ret);
161 int flash_area_to_sectors(int idx, int *cnt, struct flash_area *ret);
/mcuboot-latest/ext/mbedtls-asn1/include/mbedtls/
Dplatform_util.h39 #define MBEDTLS_INTERNAL_VALIDATE_RET( cond, ret ) do { } while( 0 ) argument
Dbignum.h47 if( ( ret = (f) ) != 0 ) \
608 unsigned *ret );
/mcuboot-latest/boot/bootutil/src/
Dbootutil_misc.c77 FIH_DECLARE(ret, FIH_FAILURE); in boot_fih_memequal()
85 ret = FIH_SUCCESS; in boot_fih_memequal()
89 FIH_RET(ret); in boot_fih_memequal()
/mcuboot-latest/boot/zephyr/include/flash_map_backend/
Dflash_map_backend.h45 int flash_device_base(uint8_t fd_id, uintptr_t *ret);
/mcuboot-latest/boot/mynewt/src/
Dmain.c210 int flash_device_base(uint8_t fd_id, uintptr_t *ret) in flash_device_base() argument
212 *ret = 0; in flash_device_base()
/mcuboot-latest/scripts/imgtool/
Dmain.py229 ret, version, digest = image.Image.verify(imgfile, key)
230 if ret == image.VerifyResult.OK:
235 elif ret == image.VerifyResult.INVALID_MAGIC:
237 elif ret == image.VerifyResult.INVALID_TLV_INFO_MAGIC:
239 elif ret == image.VerifyResult.INVALID_HASH:
241 elif ret == image.VerifyResult.INVALID_SIGNATURE:
243 elif ret == image.VerifyResult.KEY_MISMATCH:
246 print("Unknown return code: {}".format(ret))
/mcuboot-latest/ext/fiat/src/
Dcurve25519.c1099 int ret; in ED25519_verify() local
1103 ret = mbedtls_sha512_starts_ret(&ctx, 0); in ED25519_verify()
1104 assert(ret == 0); in ED25519_verify()
1106 ret = mbedtls_sha512_update_ret(&ctx, signature, 32); in ED25519_verify()
1107 assert(ret == 0); in ED25519_verify()
1108 ret = mbedtls_sha512_update_ret(&ctx, public_key, 32); in ED25519_verify()
1109 assert(ret == 0); in ED25519_verify()
1110 ret = mbedtls_sha512_update_ret(&ctx, message, message_len); in ED25519_verify()
1111 assert(ret == 0); in ED25519_verify()
1114 ret = mbedtls_sha512_finish_ret(&ctx, h); in ED25519_verify()
[all …]
/mcuboot-latest/boot/zcbor/src/
Dzcbor_common.c296 bool ret = func(state, result); in zcbor_entry_function() local
298 if (!ret) { in zcbor_entry_function()
Dzcbor_decode.c691 bool ret = list_map_start_decode(state, ZCBOR_MAJOR_TYPE_MAP); local
693 if (ret && !state->decode_state.indefinite_length_array) {
700 return ret;
/mcuboot-latest/sim/mcuboot-sys/csupport/
Drun.c370 int flash_area_to_sectors(int idx, int *cnt, struct flash_area *ret) in flash_area_to_sectors() argument
394 memcpy(ret, slot->areas, slot->num_areas * sizeof(struct flash_area)); in flash_area_to_sectors()