Lines Matching refs:a
3447 #define EMIT_ALG(a, n) \ in dm_integrity_status() argument
3449 if (ic->a.alg_string) { \ in dm_integrity_status()
3450 DMEMIT(" %s:%s", n, ic->a.alg_string); \ in dm_integrity_status()
3451 if (ic->a.key_string) \ in dm_integrity_status()
3452 DMEMIT(":%s", ic->a.key_string);\ in dm_integrity_status()
3772 static void free_alg(struct alg_spec *a) in free_alg() argument
3774 kfree_sensitive(a->alg_string); in free_alg()
3775 kfree_sensitive(a->key); in free_alg()
3776 memset(a, 0, sizeof(*a)); in free_alg()
3779 static int get_alg_and_key(const char *arg, struct alg_spec *a, char **error, char *error_inval) in get_alg_and_key() argument
3783 free_alg(a); in get_alg_and_key()
3785 a->alg_string = kstrdup(strchr(arg, ':') + 1, GFP_KERNEL); in get_alg_and_key()
3786 if (!a->alg_string) in get_alg_and_key()
3789 k = strchr(a->alg_string, ':'); in get_alg_and_key()
3792 a->key_string = k + 1; in get_alg_and_key()
3793 if (strlen(a->key_string) & 1) in get_alg_and_key()
3796 a->key_size = strlen(a->key_string) / 2; in get_alg_and_key()
3797 a->key = kmalloc(a->key_size, GFP_KERNEL); in get_alg_and_key()
3798 if (!a->key) in get_alg_and_key()
3800 if (hex2bin(a->key, a->key_string, a->key_size)) in get_alg_and_key()
3813 static int get_mac(struct crypto_shash **hash, struct alg_spec *a, char **error, in get_mac() argument
3818 if (a->alg_string) { in get_mac()
3819 *hash = crypto_alloc_shash(a->alg_string, 0, CRYPTO_ALG_ALLOCATES_MEMORY); in get_mac()
3827 if (a->key) { in get_mac()
3828 r = crypto_shash_setkey(*hash, a->key, a->key_size); in get_mac()