Lines Matching full:hash
2 /* System hash blacklist.
25 * the size of the currently longest supported hash algorithm is 512 bits,
45 * hex digits. The hash is kept in the description.
78 /* The hash is greater than MAX_HASH_LEN. */ in blacklist_vet_description()
147 static char *get_raw_hash(const u8 *hash, size_t hash_len, in get_raw_hash() argument
173 bin2hex(p, hash, hash_len); in get_raw_hash()
180 * mark_raw_hash_blacklisted - Add a hash to the system blacklist
181 * @hash: The hash as a hex string with a type prefix (eg. "tbs:23aa429783")
183 static int mark_raw_hash_blacklisted(const char *hash) in mark_raw_hash_blacklisted() argument
189 hash, in mark_raw_hash_blacklisted()
197 pr_warn("Duplicate blacklisted hash %s\n", hash); in mark_raw_hash_blacklisted()
199 pr_err("Problem blacklisting hash %s: %pe\n", hash, key); in mark_raw_hash_blacklisted()
205 int mark_hash_blacklisted(const u8 *hash, size_t hash_len, in mark_hash_blacklisted() argument
211 buffer = get_raw_hash(hash, hash_len, hash_type); in mark_hash_blacklisted()
220 * is_hash_blacklisted - Determine if a hash is blacklisted
221 * @hash: The hash to be checked as a binary blob
222 * @hash_len: The length of the binary hash
223 * @hash_type: Type of hash
225 int is_hash_blacklisted(const u8 *hash, size_t hash_len, in is_hash_blacklisted() argument
232 buffer = get_raw_hash(hash, hash_len, hash_type); in is_hash_blacklisted()
247 int is_binary_blacklisted(const u8 *hash, size_t hash_len) in is_binary_blacklisted() argument
249 if (is_hash_blacklisted(hash, hash_len, BLACKLIST_HASH_BINARY) == in is_binary_blacklisted()