Lines Matching refs:md
452 _cleanup_(EVP_MD_CTX_freep) EVP_MD_CTX *md = NULL; in sha256_hash_host_and_tpm2_key()
461 md = EVP_MD_CTX_new(); in sha256_hash_host_and_tpm2_key()
462 if (!md) in sha256_hash_host_and_tpm2_key()
465 if (EVP_DigestInit_ex(md, EVP_sha256(), NULL) != 1) in sha256_hash_host_and_tpm2_key()
468 if (host_key && EVP_DigestUpdate(md, host_key, host_key_size) != 1) in sha256_hash_host_and_tpm2_key()
471 if (tpm2_key && EVP_DigestUpdate(md, tpm2_key, tpm2_key_size) != 1) in sha256_hash_host_and_tpm2_key()
474 assert(EVP_MD_CTX_size(md) == SHA256_DIGEST_LENGTH); in sha256_hash_host_and_tpm2_key()
476 if (EVP_DigestFinal_ex(md, ret, &l) != 1) in sha256_hash_host_and_tpm2_key()
503 uint8_t md[SHA256_DIGEST_LENGTH]; in encrypt_credential_and_warn() local
624 r = sha256_hash_host_and_tpm2_key(host_key, host_key_size, tpm2_key, tpm2_key_size, md); in encrypt_credential_and_warn()
631 assert(ksz == sizeof(md)); in encrypt_credential_and_warn()
657 if (EVP_EncryptInit_ex(context, cc, NULL, md, iv) != 1) in encrypt_credential_and_warn()
779 uint8_t md[SHA256_DIGEST_LENGTH]; in decrypt_credential_and_warn() local
826 if (le32toh(h->key_size) != sizeof(md)) in decrypt_credential_and_warn()
904 sha256_hash_host_and_tpm2_key(host_key, host_key_size, tpm2_key, tpm2_key_size, md); in decrypt_credential_and_warn()
927 if (EVP_DecryptInit_ex(context, NULL, NULL, md, h->iv) != 1) in decrypt_credential_and_warn()