/mcuboot-latest/boot/boot_serial/test/src/testcases/ |
D | boot_serial_upload_bigger_image.c | 29 char buf[sizeof(struct nmgr_hdr) + 128]; in TEST_CASE() local 83 hdr = (struct nmgr_hdr *)buf; in TEST_CASE() 90 memcpy(buf + payload_off, payload_next, sizeof payload_next); in TEST_CASE() 92 buf[payload_off + len - 2] = ZCBOR_VALUE_IS_1_BYTE; in TEST_CASE() 93 buf[payload_off + len - 1] = off; in TEST_CASE() 95 memcpy(buf + payload_off, payload_first, sizeof payload_first); in TEST_CASE() 98 memcpy(buf + img_data_off, img + off, 32); in TEST_CASE() 103 tx_msg(buf, len); in TEST_CASE()
|
D | boot_serial_empty_msg.c | 23 char buf[4]; in TEST_CASE() local 26 tx_msg(buf, 0); in TEST_CASE() 28 strcpy(buf, "--"); in TEST_CASE() 29 tx_msg(buf, 2); in TEST_CASE()
|
D | boot_serial_empty_img_msg.c | 23 char buf[sizeof(struct nmgr_hdr) + 32]; in TEST_CASE() local 26 hdr = (struct nmgr_hdr *)buf; in TEST_CASE() 34 tx_msg(buf, sizeof(*hdr) + 2); in TEST_CASE()
|
D | boot_serial_img_msg.c | 26 char buf[sizeof(struct nmgr_hdr) + sizeof(enc_img) + 32]; in TEST_CASE() local 49 hdr = (struct nmgr_hdr *)buf; in TEST_CASE() 59 tx_msg(buf, len); in TEST_CASE()
|
/mcuboot-latest/boot/mynewt/boot_uart/src/ |
D | boot_uart.c | 29 #define CONSOLE_HEAD_INC(cr) (((cr)->head + 1) & (sizeof((cr)->buf) - 1)) 30 #define CONSOLE_TAIL_INC(cr) (((cr)->tail + 1) & (sizeof((cr)->buf) - 1)) 35 uint8_t buf[MYNEWT_VAL(CONSOLE_UART_RX_BUF_SIZE)]; member 87 bs_uart_rx.buf[bs_uart_rx.head] = byte; in bs_rx_char() 97 ch = bs_uart_rx.buf[bs_uart_rx.tail]; in bs_pull_char()
|
/mcuboot-latest/ext/mbedtls-asn1/include/mbedtls/ |
D | platform.h | 324 int mbedtls_platform_std_nv_seed_read( unsigned char *buf, size_t buf_len ); 325 int mbedtls_platform_std_nv_seed_write( unsigned char *buf, size_t buf_len ); 329 extern int (*mbedtls_nv_seed_read)( unsigned char *buf, size_t buf_len ); 330 extern int (*mbedtls_nv_seed_write)( unsigned char *buf, size_t buf_len ); 342 int (*nv_seed_read_func)( unsigned char *buf, size_t buf_len ), 343 int (*nv_seed_write_func)( unsigned char *buf, size_t buf_len )
|
D | ecp.h | 742 unsigned char *buf, size_t buflen ); 768 const unsigned char *buf, size_t ilen ); 790 const unsigned char **buf, size_t len ); 817 unsigned char *buf, size_t blen ); 856 const unsigned char **buf, size_t len ); 877 const unsigned char **buf, 899 unsigned char *buf, size_t blen ); 1225 const unsigned char *buf, size_t buflen ); 1244 unsigned char *buf, size_t buflen );
|
D | ecdsa.h | 170 const mbedtls_mpi *d, const unsigned char *buf, size_t blen, 215 const unsigned char *buf, size_t blen, 254 const unsigned char *buf, size_t blen,
|
D | pk.h | 773 int mbedtls_pk_write_key_der( const mbedtls_pk_context *ctx, unsigned char *buf, size_t size ); 788 int mbedtls_pk_write_pubkey_der( const mbedtls_pk_context *ctx, unsigned char *buf, size_t size ); 801 int mbedtls_pk_write_pubkey_pem( const mbedtls_pk_context *ctx, unsigned char *buf, size_t size ); 813 int mbedtls_pk_write_key_pem( const mbedtls_pk_context *ctx, unsigned char *buf, size_t size ); 857 int mbedtls_pk_load_file( const char *path, unsigned char **buf, size_t *n );
|
D | bignum.h | 433 char *buf, size_t buflen, size_t *olen ); 490 int mbedtls_mpi_read_binary( mbedtls_mpi *X, const unsigned char *buf, 506 const unsigned char *buf, size_t buflen ); 523 int mbedtls_mpi_write_binary( const mbedtls_mpi *X, unsigned char *buf, 542 unsigned char *buf, size_t buflen );
|
/mcuboot-latest/ext/mbedtls-asn1/src/ |
D | platform_util.c | 67 void mbedtls_platform_zeroize( void *buf, size_t len ) in mbedtls_platform_zeroize() argument 69 MBEDTLS_INTERNAL_VALIDATE( len == 0 || buf != NULL ); in mbedtls_platform_zeroize() 72 memset_func( buf, 0, len ); in mbedtls_platform_zeroize()
|
/mcuboot-latest/boot/bootutil/src/ |
D | encrypted.c | 433 boot_decrypt_key(const uint8_t *buf, uint8_t *enckey) in boot_decrypt_key() argument 484 rc = bootutil_rsa_oaep_decrypt(&rsa, &olen, buf, enckey, BOOT_ENC_KEY_SIZE); in boot_decrypt_key() 495 rc = key_unwrap(buf, enckey, bootutil_enc_key); in boot_decrypt_key() 518 rc = bootutil_ecdh_p256_shared_secret(&ecdh_p256, &buf[EC_PUBK_INDEX], private_key, shared); in boot_decrypt_key() 546 rc = bootutil_ecdh_x25519_shared_secret(&ecdh_x25519, &buf[EC_PUBK_INDEX], private_key, shared); in boot_decrypt_key() 579 rc = bootutil_hmac_sha256_update(&hmac, &buf[EC_CIPHERKEY_INDEX], BOOT_ENC_KEY_SIZE); in boot_decrypt_key() 592 if (bootutil_constant_time_compare(tag, &buf[EC_TAG_INDEX], 32) != 0) { in boot_decrypt_key() 616 …rc = bootutil_aes_ctr_decrypt(&aes_ctr, counter, &buf[EC_CIPHERKEY_INDEX], BOOTUTIL_CRYPTO_AES_CTR… in boot_decrypt_key() 648 uint8_t *buf; in boot_enc_load() local 650 uint8_t buf[EXPECTED_ENC_LEN]; in boot_enc_load() local [all …]
|
D | boot_record.c | 138 uint8_t buf[MAX_BOOT_RECORD_SZ]; in boot_save_boot_status() local 167 if (len > sizeof(buf)) { in boot_save_boot_status() 170 rc = flash_area_read(fap, offset, buf, len); in boot_save_boot_status() 222 memcpy(buf + offset, image_hash, sizeof(image_hash)); in boot_save_boot_status() 229 buf); in boot_save_boot_status()
|
D | image_validate.c | 508 uint8_t buf[SIG_BUF_SIZE]; in bootutil_img_validate() local 604 rc = LOAD_IMAGE_DATA(hdr, fap, off, buf, sizeof(hash)); in bootutil_img_validate() 609 FIH_CALL(boot_fih_memequal, fih_rc, hash, buf, sizeof(hash)); in bootutil_img_validate() 630 rc = LOAD_IMAGE_DATA(hdr, fap, off, buf, len); in bootutil_img_validate() 634 key_id = bootutil_find_key(buf, len); in bootutil_img_validate() 657 if (!EXPECTED_SIG_LEN(len) || len > sizeof(buf)) { in bootutil_img_validate() 661 rc = LOAD_IMAGE_DATA(hdr, fap, off, buf, len); in bootutil_img_validate() 667 buf, len, key_id); in bootutil_img_validate() 675 buf, len, key_id); in bootutil_img_validate()
|
/mcuboot-latest/boot/boot_serial/src/ |
D | boot_serial_encryption.c | 24 struct image_header *hdr, uint8_t *buf, in boot_image_validate_encrypted() argument 57 hdr, fa_p, buf, buf_size, NULL, 0, NULL, start_off); in boot_image_validate_encrypted() 60 hdr, fa_p, buf, buf_size, NULL, 0, NULL); in boot_image_validate_encrypted() 142 uint8_t buf[sz] __attribute__((aligned)); in decrypt_region_inplace() local 143 assert(sz <= sizeof buf); in decrypt_region_inplace() 148 if (sz - bytes_copied > sizeof buf) { in decrypt_region_inplace() 149 chunk_sz = sizeof buf; in decrypt_region_inplace() 154 rc = flash_area_read(fap, off + bytes_copied, buf, chunk_sz); in decrypt_region_inplace() 188 blk_off, &buf[idx]); in decrypt_region_inplace() 194 rc = flash_area_write(fap, off + bytes_copied, buf, chunk_sz); in decrypt_region_inplace()
|
D | boot_serial.c | 278 bs_list(char *buf, int len) in bs_list() argument 491 bs_set(char *buf, int len) in bs_set() argument 513 zcbor_new_state(zsd, sizeof(zsd) / sizeof(zcbor_state_t), (uint8_t *)buf, len, 1, NULL, 0); in bs_set() 648 bs_list(buf, len); in bs_set() 675 bs_list_set(uint8_t op, char *buf, int len) in bs_list_set() argument 678 bs_list(buf, len); in bs_list_set() 681 bs_set(buf, len); in bs_list_set() 690 bs_slot_info(uint8_t op, char *buf, int len) in bs_slot_info() argument 873 bs_upload(char *buf, int len) in bs_upload() argument 905 zcbor_new_state(zsd, sizeof(zsd) / sizeof(zcbor_state_t), (uint8_t *)buf, len, 1, NULL, 0); in bs_upload() [all …]
|
/mcuboot-latest/boot/bootutil/include/bootutil/ |
D | enc_key.h | 64 int boot_decrypt_key(const uint8_t *buf, uint8_t *enckey); 79 uint32_t off, uint32_t sz, uint32_t blk_off, uint8_t *buf); 81 uint32_t off, uint32_t sz, uint32_t blk_off, uint8_t *buf);
|
/mcuboot-latest/boot/mbed/include/utils/ |
D | DataShare.cpp | 58 int DataShare::get_next(uint16_t *type, mbed::Span<uint8_t> buf, uint16_t *actual_size) { in get_next() argument 77 if((size_t)buf.size() < *actual_size) { in get_next() 82 …memcpy(buf.data(), (const uint8_t*)PTR_TO_UINT8((SHARED_DATA_ENTRY_BASE + working_offset)), *actua… in get_next()
|
/mcuboot-latest/testplan/mynewt/apps/slinky/src/ |
D | main.c | 104 test_conf_get(int argc, char **argv, char *buf, int max_len) in test_conf_get() argument 108 return conf_str_from_value(CONF_INT8, &test8, buf, max_len); in test_conf_get() 140 char buf[4]; in test_conf_export() local 142 conf_str_from_value(CONF_INT8, &test8, buf, sizeof(buf)); in test_conf_export() 143 func("test/8", buf); in test_conf_export()
|
/mcuboot-latest/sim/simflash/src/ |
D | lib.rs | 335 let mut buf = [0xAA; 4]; in test_device() localVariable 336 flash.read(0, &mut buf).unwrap(); in test_device() 337 assert_eq!(buf, [0x55, erased_val, erased_val, erased_val]); in test_device() 340 flash.read(0, &mut buf).unwrap(); in test_device() 341 assert_eq!(buf, [erased_val; 4]); in test_device() 352 let mut buf = Vec::new(); in test_device() localVariable 355 buf.resize(sector.size, 0); in test_device() 356 flash.read(sector.base, &mut buf).unwrap(); in test_device() 357 assert_eq!(buf.first(), Some(&byte)); in test_device() 358 assert_eq!(buf.last(), Some(&byte)); in test_device() [all …]
|
/mcuboot-latest/boot/mynewt/src/ |
D | main.c | 112 char buf[BOOT_SERIAL_DETECT_STRING_LEN] = { 0 }; in serial_detect_uart_string() local 134 memmove(buf, buf + 1, BOOT_SERIAL_DETECT_STRING_LEN - 1); in serial_detect_uart_string() 135 buf[BOOT_SERIAL_DETECT_STRING_LEN - 1] = ch; in serial_detect_uart_string() 140 rc = memcmp(buf, in serial_detect_uart_string()
|
/mcuboot-latest/ext/tinycrypt/tests/ |
D | test_ecc_utils.c | 86 int hex2bin(uint8_t *buf, const size_t buflen, const char *hex, in hex2bin() argument 103 buf[0] = dec; in hex2bin() 104 buf++; in hex2bin() 116 buf[i] = dec << 4; in hex2bin() 123 buf[i] += dec; in hex2bin()
|
/mcuboot-latest/ptest/src/ |
D | main.rs | 333 let mut buf = String::new(); in textual() localVariable 335 write!(&mut buf, "{}:", self.env).unwrap(); in textual() 337 write!(&mut buf, " {}", v).unwrap(); in textual() 340 buf in textual() 347 let mut buf = String::new(); in simple_textual() localVariable 349 write!(&mut buf, " {}", v).unwrap(); in simple_textual() 352 buf in simple_textual()
|
/mcuboot-latest/boot/boot_serial/include/boot_serial/ |
D | boot_serial_encryption.h | 24 struct image_header *hdr, uint8_t *buf,
|
/mcuboot-latest/sim/src/ |
D | image.rs | 1901 let mut buf = vec![]; in install_image() localVariable 1902 buf.append(&mut b_header.to_vec()); in install_image() 1903 buf.append(&mut b_img); in install_image() 1904 buf.append(&mut b_tlv.clone()); in install_image() 1908 let image_sz = buf.len(); in install_image() 1909 while buf.len() % align != 0 { in install_image() 1910 buf.push(dev.erased_val()); in install_image() 1948 dev.write(offset, &buf).unwrap(); in install_image() 1950 let mut copy = vec![0u8; buf.len()]; in install_image() 1960 dev.write(offset, &buf).unwrap(); in install_image() [all …]
|