Lines Matching refs:key_string

163 	char *key_string;  member
2472 static int crypt_set_keyring_key(struct crypt_config *cc, const char *key_string) in crypt_set_keyring_key() argument
2484 if (contains_whitespace(key_string)) { in crypt_set_keyring_key()
2490 key_desc = strpbrk(key_string, ":"); in crypt_set_keyring_key()
2491 if (!key_desc || key_desc == key_string || !strlen(key_desc + 1)) in crypt_set_keyring_key()
2494 if (!strncmp(key_string, "logon:", key_desc - key_string + 1)) { in crypt_set_keyring_key()
2497 } else if (!strncmp(key_string, "user:", key_desc - key_string + 1)) { in crypt_set_keyring_key()
2501 !strncmp(key_string, "encrypted:", key_desc - key_string + 1)) { in crypt_set_keyring_key()
2505 !strncmp(key_string, "trusted:", key_desc - key_string + 1)) { in crypt_set_keyring_key()
2512 new_key_string = kstrdup(key_string, GFP_KERNEL); in crypt_set_keyring_key()
2542 kfree_sensitive(cc->key_string); in crypt_set_keyring_key()
2543 cc->key_string = new_key_string; in crypt_set_keyring_key()
2550 static int get_key_size(char **key_string) in get_key_size() argument
2555 if (*key_string[0] != ':') in get_key_size()
2556 return strlen(*key_string) >> 1; in get_key_size()
2559 colon = strpbrk(*key_string + 1, ":"); in get_key_size()
2563 if (sscanf(*key_string + 1, "%u%c", &ret, &dummy) != 2 || dummy != ':') in get_key_size()
2566 *key_string = colon; in get_key_size()
2575 static int crypt_set_keyring_key(struct crypt_config *cc, const char *key_string) in crypt_set_keyring_key() argument
2580 static int get_key_size(char **key_string) in get_key_size() argument
2582 return (*key_string[0] == ':') ? -EINVAL : (int)(strlen(*key_string) >> 1); in get_key_size()
2606 kfree_sensitive(cc->key_string); in crypt_set_key()
2607 cc->key_string = NULL; in crypt_set_key()
2638 kfree_sensitive(cc->key_string); in crypt_wipe_key()
2639 cc->key_string = NULL; in crypt_wipe_key()
2723 kfree_sensitive(cc->key_string); in crypt_dtr()
3058 if (cc->key_string) in crypt_ctr_cipher()
3463 if (cc->key_string) in crypt_status()
3464 DMEMIT(":%u:%s", cc->key_size, cc->key_string); in crypt_status()
3595 if (cc->key_string) in crypt_message()