Lines Matching full:hash
2 /* System hash blacklist.
24 * the size of the currently longest supported hash algorithm is 512 bits,
44 * hex digits. The hash is kept in the description.
77 /* The hash is greater than MAX_HASH_LEN. */ in blacklist_vet_description()
146 static char *get_raw_hash(const u8 *hash, size_t hash_len, in get_raw_hash() argument
172 bin2hex(p, hash, hash_len); in get_raw_hash()
179 * mark_raw_hash_blacklisted - Add a hash to the system blacklist
180 * @hash: The hash as a hex string with a type prefix (eg. "tbs:23aa429783")
182 static int mark_raw_hash_blacklisted(const char *hash) in mark_raw_hash_blacklisted() argument
188 hash, in mark_raw_hash_blacklisted()
196 pr_warn("Duplicate blacklisted hash %s\n", hash); in mark_raw_hash_blacklisted()
198 pr_err("Problem blacklisting hash %s: %pe\n", hash, key); in mark_raw_hash_blacklisted()
204 int mark_hash_blacklisted(const u8 *hash, size_t hash_len, in mark_hash_blacklisted() argument
210 buffer = get_raw_hash(hash, hash_len, hash_type); in mark_hash_blacklisted()
219 * is_hash_blacklisted - Determine if a hash is blacklisted
220 * @hash: The hash to be checked as a binary blob
221 * @hash_len: The length of the binary hash
222 * @hash_type: Type of hash
224 int is_hash_blacklisted(const u8 *hash, size_t hash_len, in is_hash_blacklisted() argument
231 buffer = get_raw_hash(hash, hash_len, hash_type); in is_hash_blacklisted()
246 int is_binary_blacklisted(const u8 *hash, size_t hash_len) in is_binary_blacklisted() argument
248 if (is_hash_blacklisted(hash, hash_len, BLACKLIST_HASH_BINARY) == in is_binary_blacklisted()