Lines Matching refs:cert_attr
919 CK_ATTRIBUTE cert_attr[3]; in pkcs11_fetch_x509_pubkey() local
941 memset(&cert_attr, 0, sizeof(cert_attr)); in pkcs11_fetch_x509_pubkey()
942 cert_attr[0].type = CKA_ID; in pkcs11_fetch_x509_pubkey()
943 cert_attr[1].type = CKA_SUBJECT; in pkcs11_fetch_x509_pubkey()
944 cert_attr[2].type = CKA_VALUE; in pkcs11_fetch_x509_pubkey()
950 rv = f->C_GetAttributeValue(session, *obj, cert_attr, 3); in pkcs11_fetch_x509_pubkey()
961 if (cert_attr[1].ulValueLen == 0 || in pkcs11_fetch_x509_pubkey()
962 cert_attr[2].ulValueLen == 0) { in pkcs11_fetch_x509_pubkey()
969 if (cert_attr[i].ulValueLen > 0) in pkcs11_fetch_x509_pubkey()
970 cert_attr[i].pValue = xcalloc(1, cert_attr[i].ulValueLen); in pkcs11_fetch_x509_pubkey()
973 rv = f->C_GetAttributeValue(session, *obj, cert_attr, 3); in pkcs11_fetch_x509_pubkey()
980 cp = cert_attr[1].pValue; in pkcs11_fetch_x509_pubkey()
982 cert_attr[1].ulValueLen)) == NULL || in pkcs11_fetch_x509_pubkey()
987 cp = cert_attr[2].pValue; in pkcs11_fetch_x509_pubkey()
988 if ((x509 = d2i_X509(NULL, &cp, cert_attr[2].ulValueLen)) == NULL) { in pkcs11_fetch_x509_pubkey()
1008 if (pkcs11_rsa_wrap(p, slotidx, &cert_attr[0], rsa)) in pkcs11_fetch_x509_pubkey()
1038 if (pkcs11_ecdsa_wrap(p, slotidx, &cert_attr[0], ec)) in pkcs11_fetch_x509_pubkey()
1059 free(cert_attr[i].pValue); in pkcs11_fetch_x509_pubkey()