Lines Matching refs:le32toh
826 if (le32toh(h->key_size) != sizeof(md)) in decrypt_credential_and_warn()
828 if (le32toh(h->block_size) <= 0 || le32toh(h->block_size) > CREDENTIAL_FIELD_SIZE_MAX) in decrypt_credential_and_warn()
830 if (le32toh(h->iv_size) > CREDENTIAL_FIELD_SIZE_MAX) in decrypt_credential_and_warn()
832 …if (le32toh(h->tag_size) != 16) /* FIXME: On OpenSSL 3, let's verify via EVP_CIPHER_CTX_get_tag_le… in decrypt_credential_and_warn()
838 ALIGN8(offsetof(struct encrypted_credential_header, iv) + le32toh(h->iv_size)) + in decrypt_credential_and_warn()
841 le32toh(h->tag_size)) in decrypt_credential_and_warn()
844 p = ALIGN8(offsetof(struct encrypted_credential_header, iv) + le32toh(h->iv_size)); in decrypt_credential_and_warn()
856 if (le32toh(t->blob_size) > CREDENTIAL_FIELD_SIZE_MAX) in decrypt_credential_and_warn()
858 if (le32toh(t->policy_hash_size) > CREDENTIAL_FIELD_SIZE_MAX) in decrypt_credential_and_warn()
864 ALIGN8(offsetof(struct encrypted_credential_header, iv) + le32toh(h->iv_size)) + in decrypt_credential_and_warn()
865 …setof(struct tpm2_credential_header, policy_hash_and_blob) + le32toh(t->blob_size) + le32toh(t->po… in decrypt_credential_and_warn()
867 le32toh(h->tag_size)) in decrypt_credential_and_warn()
875 le32toh(t->blob_size), in decrypt_credential_and_warn()
876 t->policy_hash_and_blob + le32toh(t->blob_size), in decrypt_credential_and_warn()
877 le32toh(t->policy_hash_size), in decrypt_credential_and_warn()
885 le32toh(t->blob_size) + in decrypt_credential_and_warn()
886 le32toh(t->policy_hash_size)); in decrypt_credential_and_warn()
909 if (EVP_CIPHER_key_length(cc) != (int) le32toh(h->key_size)) in decrypt_credential_and_warn()
911 if (EVP_CIPHER_block_size(cc) != (int) le32toh(h->block_size)) in decrypt_credential_and_warn()
923 if (EVP_CIPHER_CTX_ctrl(context, EVP_CTRL_GCM_SET_IVLEN, le32toh(h->iv_size), NULL) != 1) in decrypt_credential_and_warn()
935 plaintext = malloc(input_size - p - le32toh(h->tag_size)); in decrypt_credential_and_warn()
944 input_size - p - le32toh(h->tag_size)) != 1) in decrypt_credential_and_warn()
949 assert((size_t) added <= input_size - p - le32toh(h->tag_size)); in decrypt_credential_and_warn()
952 …IPHER_CTX_ctrl(context, EVP_CTRL_GCM_SET_TAG, le32toh(h->tag_size), (uint8_t*) input + input_size … in decrypt_credential_and_warn()
972 if (le32toh(m->name_size) > CREDENTIAL_NAME_MAX) in decrypt_credential_and_warn()
975 hs = ALIGN8(offsetof(struct metadata_credential_header, name) + le32toh(m->name_size)); in decrypt_credential_and_warn()
979 if (le32toh(m->name_size) > 0) { in decrypt_credential_and_warn()
982 if (memchr(m->name, 0, le32toh(m->name_size))) in decrypt_credential_and_warn()
985 embedded_name = memdup_suffix0(m->name, le32toh(m->name_size)); in decrypt_credential_and_warn()