Lines Matching +full:1 +full:kb

69 			found = 1;  in card_cache_update()
113 static int ep11_kb_split(const u8 *kb, size_t kblen, u32 kbver, in ep11_kb_split() argument
124 hdr = (struct ep11kblob_header *)kb; in ep11_kb_split()
141 pl = (u8 *)kb + hdrsize; in ep11_kb_split()
157 static int ep11_kb_decode(const u8 *kb, size_t kblen, in ep11_kb_decode() argument
169 tmph = (struct ep11kblob_header *)kb; in ep11_kb_decode()
175 if (ep11_kb_split(kb, kblen, tmph->version, in ep11_kb_decode()
208 struct ep11keyblob *kb; in ep11_kb_wkvp() local
210 if (ep11_kb_decode(keyblob, keybloblen, NULL, NULL, &kb, NULL)) in ep11_kb_wkvp()
212 return kb->wkvp; in ep11_kb_wkvp()
223 struct ep11keyblob *kb = (struct ep11keyblob *)(key + sizeof(*hdr)); in ep11_check_aes_key_with_hdr() local
227 if (keylen < sizeof(*hdr) + sizeof(*kb)) { in ep11_check_aes_key_with_hdr()
229 __func__, keylen, sizeof(*hdr) + sizeof(*kb)); in ep11_check_aes_key_with_hdr()
257 if (hdr->len < sizeof(*hdr) + sizeof(*kb)) { in ep11_check_aes_key_with_hdr()
260 __func__, (int)hdr->len, sizeof(*hdr) + sizeof(*kb)); in ep11_check_aes_key_with_hdr()
264 if (kb->version != EP11_STRUCT_MAGIC) { in ep11_check_aes_key_with_hdr()
267 __func__, (int)kb->version, EP11_STRUCT_MAGIC); in ep11_check_aes_key_with_hdr()
270 if (checkcpacfexp && !(kb->attr & EP11_BLOB_PKEY_EXTRACTABLE)) { in ep11_check_aes_key_with_hdr()
290 struct ep11keyblob *kb = (struct ep11keyblob *)(key + sizeof(*hdr)); in ep11_check_ecc_key_with_hdr() local
294 if (keylen < sizeof(*hdr) + sizeof(*kb)) { in ep11_check_ecc_key_with_hdr()
296 __func__, keylen, sizeof(*hdr) + sizeof(*kb)); in ep11_check_ecc_key_with_hdr()
324 if (hdr->len < sizeof(*hdr) + sizeof(*kb)) { in ep11_check_ecc_key_with_hdr()
327 __func__, (int)hdr->len, sizeof(*hdr) + sizeof(*kb)); in ep11_check_ecc_key_with_hdr()
331 if (kb->version != EP11_STRUCT_MAGIC) { in ep11_check_ecc_key_with_hdr()
334 __func__, (int)kb->version, EP11_STRUCT_MAGIC); in ep11_check_ecc_key_with_hdr()
337 if (checkcpacfexp && !(kb->attr & EP11_BLOB_PKEY_EXTRACTABLE)) { in ep11_check_ecc_key_with_hdr()
357 struct ep11keyblob *kb = (struct ep11keyblob *)key; in ep11_check_aes_key() local
361 if (keylen < sizeof(*kb)) { in ep11_check_aes_key()
363 __func__, keylen, sizeof(*kb)); in ep11_check_aes_key()
367 if (kb->head.type != TOKTYPE_NON_CCA) { in ep11_check_aes_key()
370 __func__, (int)kb->head.type, TOKTYPE_NON_CCA); in ep11_check_aes_key()
373 if (kb->head.version != TOKVER_EP11_AES) { in ep11_check_aes_key()
376 __func__, (int)kb->head.version, TOKVER_EP11_AES); in ep11_check_aes_key()
379 if (kb->head.len > keylen) { in ep11_check_aes_key()
382 __func__, (int)kb->head.len, keylen); in ep11_check_aes_key()
385 if (kb->head.len < sizeof(*kb)) { in ep11_check_aes_key()
388 __func__, (int)kb->head.len, sizeof(*kb)); in ep11_check_aes_key()
392 if (kb->version != EP11_STRUCT_MAGIC) { in ep11_check_aes_key()
395 __func__, (int)kb->version, EP11_STRUCT_MAGIC); in ep11_check_aes_key()
398 if (checkcpacfexp && !(kb->attr & EP11_BLOB_PKEY_EXTRACTABLE)) { in ep11_check_aes_key()
437 #define ASN1TAGLEN(x) (2 + (x) + ((x) > 127 ? 1 : 0) + ((x) > 255 ? 1 : 0))
443 ptr[1] = 0x82; in asn1tag_write()
449 ptr[1] = 0x81; in asn1tag_write()
454 ptr[1] = (u8)valuelen; in asn1tag_write()
537 if (pl[0] != 0x04 || pl[1] != 0x04) { in check_reply_pl()
544 if (pl[0] != 0x04 || pl[1] != 0x04) { in check_reply_pl()
551 if (pl[0] != 0x04 || pl[1] != 0x04) { in check_reply_pl()
635 prep_urb(urb, &target, 1, in ep11_query_info()
765 info->cur_wk_state = '1'; in ep11_get_domain_info()
771 p_dom_info->dom_flags & 0x08 ? '2' : '1'; in ep11_get_domain_info()
891 prep_urb(urb, &target, 1, in _ep11_genaeskey()
1048 prep_urb(urb, &target, 1, in ep11_cryptsingle()
1211 prep_urb(urb, &target, 1, in _ep11_unwrapkey()
1371 prep_urb(urb, &target, 1, in _ep11_wrapkey()
1438 /* Step 1: generate AES 256 bit random kek key */ in ep11_clr2keyblob()
1502 wkbuflen = (keylen + AES_BLOCK_SIZE) & (~(AES_BLOCK_SIZE - 1)); in ep11_kblob2protkey()
1518 if (wki->version != 1 || wki->pkeytype < 1 || wki->pkeytype > 5) { in ep11_kblob2protkey()
1527 case 1: /* AES */ in ep11_kblob2protkey()
1598 /* allocate 1k space for up to 256 apqns */ in ep11_findcard2()
1635 if (edi.cur_wk_state != '1') in ep11_findcard2()