Lines Matching +full:1 +full:kb

74 			found = 1;  in card_cache_update()
118 static int ep11_kb_split(const u8 *kb, size_t kblen, u32 kbver, in ep11_kb_split() argument
129 hdr = (struct ep11kblob_header *)kb; in ep11_kb_split()
146 pl = (u8 *)kb + hdrsize; in ep11_kb_split()
162 static int ep11_kb_decode(const u8 *kb, size_t kblen, in ep11_kb_decode() argument
174 tmph = (struct ep11kblob_header *)kb; in ep11_kb_decode()
180 if (ep11_kb_split(kb, kblen, tmph->version, in ep11_kb_decode()
213 struct ep11keyblob *kb; in ep11_kb_wkvp() local
215 if (ep11_kb_decode(keyblob, keybloblen, NULL, NULL, &kb, NULL)) in ep11_kb_wkvp()
217 return kb->wkvp; in ep11_kb_wkvp()
228 struct ep11keyblob *kb = (struct ep11keyblob *)(key + sizeof(*hdr)); in ep11_check_aes_key_with_hdr() local
232 if (keylen < sizeof(*hdr) + sizeof(*kb)) { in ep11_check_aes_key_with_hdr()
234 __func__, keylen, sizeof(*hdr) + sizeof(*kb)); in ep11_check_aes_key_with_hdr()
262 if (hdr->len < sizeof(*hdr) + sizeof(*kb)) { in ep11_check_aes_key_with_hdr()
265 __func__, (int)hdr->len, sizeof(*hdr) + sizeof(*kb)); in ep11_check_aes_key_with_hdr()
269 if (kb->version != EP11_STRUCT_MAGIC) { in ep11_check_aes_key_with_hdr()
272 __func__, (int)kb->version, EP11_STRUCT_MAGIC); in ep11_check_aes_key_with_hdr()
275 if (checkcpacfexp && !(kb->attr & EP11_BLOB_PKEY_EXTRACTABLE)) { in ep11_check_aes_key_with_hdr()
295 struct ep11keyblob *kb = (struct ep11keyblob *)(key + sizeof(*hdr)); in ep11_check_ecc_key_with_hdr() local
299 if (keylen < sizeof(*hdr) + sizeof(*kb)) { in ep11_check_ecc_key_with_hdr()
301 __func__, keylen, sizeof(*hdr) + sizeof(*kb)); in ep11_check_ecc_key_with_hdr()
329 if (hdr->len < sizeof(*hdr) + sizeof(*kb)) { in ep11_check_ecc_key_with_hdr()
332 __func__, (int)hdr->len, sizeof(*hdr) + sizeof(*kb)); in ep11_check_ecc_key_with_hdr()
336 if (kb->version != EP11_STRUCT_MAGIC) { in ep11_check_ecc_key_with_hdr()
339 __func__, (int)kb->version, EP11_STRUCT_MAGIC); in ep11_check_ecc_key_with_hdr()
342 if (checkcpacfexp && !(kb->attr & EP11_BLOB_PKEY_EXTRACTABLE)) { in ep11_check_ecc_key_with_hdr()
362 struct ep11keyblob *kb = (struct ep11keyblob *)key; in ep11_check_aes_key() local
366 if (keylen < sizeof(*kb)) { in ep11_check_aes_key()
368 __func__, keylen, sizeof(*kb)); in ep11_check_aes_key()
372 if (kb->head.type != TOKTYPE_NON_CCA) { in ep11_check_aes_key()
375 __func__, (int)kb->head.type, TOKTYPE_NON_CCA); in ep11_check_aes_key()
378 if (kb->head.version != TOKVER_EP11_AES) { in ep11_check_aes_key()
381 __func__, (int)kb->head.version, TOKVER_EP11_AES); in ep11_check_aes_key()
384 if (kb->head.len > keylen) { in ep11_check_aes_key()
387 __func__, (int)kb->head.len, keylen); in ep11_check_aes_key()
390 if (kb->head.len < sizeof(*kb)) { in ep11_check_aes_key()
393 __func__, (int)kb->head.len, sizeof(*kb)); in ep11_check_aes_key()
397 if (kb->version != EP11_STRUCT_MAGIC) { in ep11_check_aes_key()
400 __func__, (int)kb->version, EP11_STRUCT_MAGIC); in ep11_check_aes_key()
403 if (checkcpacfexp && !(kb->attr & EP11_BLOB_PKEY_EXTRACTABLE)) { in ep11_check_aes_key()
442 #define ASN1TAGLEN(x) (2 + (x) + ((x) > 127 ? 1 : 0) + ((x) > 255 ? 1 : 0))
448 ptr[1] = 0x82; in asn1tag_write()
454 ptr[1] = 0x81; in asn1tag_write()
459 ptr[1] = (u8)valuelen; in asn1tag_write()
542 if (pl[0] != 0x04 || pl[1] != 0x04) { in check_reply_pl()
549 if (pl[0] != 0x04 || pl[1] != 0x04) { in check_reply_pl()
556 if (pl[0] != 0x04 || pl[1] != 0x04) { in check_reply_pl()
623 prep_urb(urb, &target, 1, in ep11_query_info()
748 info->cur_wk_state = '1'; in ep11_get_domain_info()
754 p_dom_info->dom_flags & 0x08 ? '2' : '1'; in ep11_get_domain_info()
875 prep_urb(urb, &target, 1, in _ep11_genaeskey()
1027 prep_urb(urb, &target, 1, in ep11_cryptsingle()
1185 prep_urb(urb, &target, 1, in _ep11_unwrapkey()
1340 prep_urb(urb, &target, 1, in _ep11_wrapkey()
1403 /* Step 1: generate AES 256 bit random kek key */ in ep11_clr2keyblob()
1470 wkbuflen = (keylen + AES_BLOCK_SIZE) & (~(AES_BLOCK_SIZE - 1)); in ep11_kblob2protkey()
1487 if (wki->version != 1 || wki->pkeytype < 1 || wki->pkeytype > 5) { in ep11_kblob2protkey()
1496 case 1: /* AES */ in ep11_kblob2protkey()
1567 /* allocate 1k space for up to 256 apqns */ in ep11_findcard2()
1604 if (edi.cur_wk_state != '1') in ep11_findcard2()