Lines Matching full:if

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()
81 if (rc != 0) { in key_unwrap()
91 #if defined(MCUBOOT_ENCRYPT_EC256)
111 if ((rc = mbedtls_asn1_get_tag(p, end, &len, in parse_ec256_enckey()
116 if (*p + len != end) { in parse_ec256_enckey()
121 if (mbedtls_asn1_get_int(p, end, &version) || version != 0) { in parse_ec256_enckey()
125 if ((rc = mbedtls_asn1_get_alg(p, end, &alg, &param)) != 0) { in parse_ec256_enckey()
129 if (alg.ASN1_CONTEXT_MEMBER(len) != sizeof(ec_pubkey_oid) - 1 || in parse_ec256_enckey()
133 if (param.ASN1_CONTEXT_MEMBER(len) != sizeof(ec_secp256r1_oid) - 1 || in parse_ec256_enckey()
138 if ((rc = mbedtls_asn1_get_tag(p, end, &len, MBEDTLS_ASN1_OCTET_STRING)) != 0) { in parse_ec256_enckey()
144 if ((rc = mbedtls_asn1_get_tag(p, end, &len, in parse_ec256_enckey()
150 if (mbedtls_asn1_get_int(p, end, &version) || version != 1) { in parse_ec256_enckey()
156 if ((rc = mbedtls_asn1_get_tag(p, end, &len, MBEDTLS_ASN1_OCTET_STRING)) != 0) { in parse_ec256_enckey()
160 if (len != NUM_ECC_BYTES) { in parse_ec256_enckey()
172 #if defined(MCUBOOT_ENCRYPT_X25519)
188 if (mbedtls_asn1_get_tag(p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | in parse_x25519_enckey()
193 if (*p + len != end) { in parse_x25519_enckey()
198 if (mbedtls_asn1_get_int(p, end, &version) || version != 0) { in parse_x25519_enckey()
202 if (mbedtls_asn1_get_alg(p, end, &alg, &param) != 0) { in parse_x25519_enckey()
206 if (alg.ASN1_CONTEXT_MEMBER(len) != sizeof(ec_pubkey_oid) - 1 || in parse_x25519_enckey()
211 if (mbedtls_asn1_get_tag(p, end, &len, MBEDTLS_ASN1_OCTET_STRING) != 0) { in parse_x25519_enckey()
215 if (mbedtls_asn1_get_tag(p, end, &len, MBEDTLS_ASN1_OCTET_STRING) != 0) { in parse_x25519_enckey()
219 if (len != PRIV_KEY_LEN) { in parse_x25519_enckey()
228 #if defined(MCUBOOT_ENCRYPT_EC256) || defined(MCUBOOT_ENCRYPT_X25519)
257 if (ikm == NULL || okm == NULL || ikm_len == 0) { in hkdf()
265 if (rc != 0) { in hkdf()
270 if (rc != 0) { in hkdf()
275 if (rc != 0) { in hkdf()
292 if (rc != 0) { in hkdf()
296 if (first) { in hkdf()
300 if (rc != 0) { in hkdf()
306 if (rc != 0) { in hkdf()
311 if (rc != 0) { in hkdf()
316 if (rc != 0) { in hkdf()
322 if (len > BOOTUTIL_CRYPTO_SHA256_DIGEST_SIZE) { in hkdf()
339 #if !defined(MCUBOOT_ENC_BUILTIN_KEY)
376 if (rc != 0) { in boot_enc_set_key()
388 #if defined(MCUBOOT_ENCRYPT_RSA)
408 #if ( (defined(MCUBOOT_ENCRYPT_RSA) && defined(MCUBOOT_USE_MBED_TLS) && !defined(MCUBOOT_USE_PSA_CR…
410 #if MBEDTLS_VERSION_NUMBER >= 0x03000000
435 #if defined(MCUBOOT_ENCRYPT_RSA) in boot_decrypt_key()
441 #if defined(MCUBOOT_ENCRYPT_EC256) in boot_decrypt_key()
444 #if defined(MCUBOOT_ENCRYPT_X25519) in boot_decrypt_key()
447 #if defined(MCUBOOT_ENCRYPT_EC256) || defined(MCUBOOT_ENCRYPT_X25519) in boot_decrypt_key()
463 if (rc) { in boot_decrypt_key()
467 if (bootutil_enc_key == NULL) { in boot_decrypt_key()
471 #if defined(MCUBOOT_ENCRYPT_RSA) in boot_decrypt_key()
479 if (rc) { in boot_decrypt_key()
486 if (rc) { in boot_decrypt_key()
492 #if defined(MCUBOOT_ENCRYPT_KW) in boot_decrypt_key()
499 #if defined(MCUBOOT_ENCRYPT_EC256) in boot_decrypt_key()
509 if (rc) { in boot_decrypt_key()
520 if (rc != 0) { in boot_decrypt_key()
526 #if defined(MCUBOOT_ENCRYPT_X25519) in boot_decrypt_key()
536 if (rc) { in boot_decrypt_key()
548 if (!rc) { in boot_decrypt_key()
554 #if defined(MCUBOOT_ENCRYPT_EC256) || defined(MCUBOOT_ENCRYPT_X25519) in boot_decrypt_key()
563 if (rc != 0 || len != (BOOTUTIL_CRYPTO_AES_CTR_KEY_SIZE + BOOTUTIL_CRYPTO_SHA256_DIGEST_SIZE)) { in boot_decrypt_key()
574 if (rc != 0) { in boot_decrypt_key()
580 if (rc != 0) { in boot_decrypt_key()
587 if (rc != 0) { in boot_decrypt_key()
592 if (bootutil_constant_time_compare(tag, &buf[EC_TAG_INDEX], 32) != 0) { in boot_decrypt_key()
604 if (rc != 0) { in boot_decrypt_key()
610 if (rc != 0) { in boot_decrypt_key()
617 if (rc != 0) { in boot_decrypt_key()
642 #if MCUBOOT_SWAP_SAVE_ENCTLV in boot_enc_load()
650 if (enc_state[slot].valid) { in boot_enc_load()
658 if (rc) { in boot_enc_load()
663 if (rc != 0) { in boot_enc_load()
667 if (len != EXPECTED_ENC_LEN) { in boot_enc_load()
671 #if MCUBOOT_SWAP_SAVE_ENCTLV in boot_enc_load()
677 if (rc) { in boot_enc_load()
698 if (sz == 0) { in boot_enc_encrypt()
721 if (sz == 0) { in boot_enc_decrypt()