Lines Matching defs:provider
69 struct pkcs11_provider *provider;
98 * finalize a provider shared library, it's no longer usable.
99 * however, there might still be keys referencing this provider,
101 * this is called when a provider gets unregistered.
109 debug_f("provider \"%s\" refcount %d valid %d",
129 * remove a reference to the provider.
130 * called when a key gets destroyed or when the provider is unregistered.
135 debug_f("provider \"%s\" refcount %d", p->name, p->refcount);
138 error_f("provider \"%s\" still valid", p->name);
159 /* lookup provider by name */
166 debug("check provider \"%s\"", p->name);
173 /* unregister provider by name */
204 if (k11->provider)
205 pkcs11_provider_unref(k11->provider);
239 pkcs11_login_slot(struct pkcs11_provider *provider, struct pkcs11_slotinfo *si,
245 if (provider == NULL || si == NULL || !provider->valid) {
246 error("no pkcs11 (valid) provider found");
266 rv = provider->function_list->C_Login(si->session, type, (u_char *)pin,
296 if (k11 == NULL || k11->provider == NULL || !k11->provider->valid) {
297 error("no pkcs11 (valid) provider found");
301 return pkcs11_login_slot(k11->provider,
302 &k11->provider->slotinfo[k11->slotidx], type);
318 if (!k11->provider || !k11->provider->valid) {
319 error("no pkcs11 (valid) provider found");
323 f = k11->provider->function_list;
324 si = &k11->provider->slotinfo[k11->slotidx];
336 debug_f("provider \"%s\" slot %lu object %lu: attrib %lu = %d",
337 k11->provider->name, k11->slotidx, obj, type, *val);
355 if (!k11->provider || !k11->provider->valid) {
356 error("no pkcs11 (valid) provider found");
360 f = k11->provider->function_list;
361 si = &k11->provider->slotinfo[k11->slotidx];
387 if (pkcs11_find(k11->provider, k11->slotidx, key_filter, 3, &obj) < 0 &&
388 pkcs11_find(k11->provider, k11->slotidx, key_filter, 2, &obj) < 0) {
438 f = k11->provider->function_list;
439 si = &k11->provider->slotinfo[k11->slotidx];
482 pkcs11_rsa_wrap(struct pkcs11_provider *provider, CK_ULONG slotidx,
491 k11->provider = provider;
492 provider->refcount++; /* provider referenced by RSA key */
530 f = k11->provider->function_list;
531 si = &k11->provider->slotinfo[k11->slotidx];
595 pkcs11_ecdsa_wrap(struct pkcs11_provider *provider, CK_ULONG slotidx,
604 k11->provider = provider;
605 provider->refcount++; /* provider referenced by ECDSA key */
1081 debug2("%s: provider %s slot %lu: %s %s", context, p->name,
1500 * register a new provider, fails if provider already exists. if
1528 debug_f("provider already registered: %s", provider_id);
1532 error("provider %s is not a PKCS11 library", provider_id);
1547 error("C_GetFunctionList for provider %s failed: %lu",
1553 error("C_Initialize for provider %s failed: %lu",
1559 error("C_GetInfo for provider %s failed: %lu",
1563 debug("provider %s: manufacturerID <%.*s> cryptokiVersion %d.%d"
1577 debug_f("provider %s returned no slots", provider_id);
1584 error("C_GetSlotList for provider %s failed: %lu",
1595 error("C_GetTokenInfo for provider %s slot %lu "
1601 "provider %s slot %lu", provider_id, (u_long)i);
1604 debug("provider %s slot %lu: label <%.*s> "
1640 p->refcount++; /* add to provider list */
1645 error("C_Finalize for provider %s failed: %lu",
1661 * register a new provider and get number of keys hold by the token,
1662 * fails if provider already exists
1674 /* no keys found or some other error, de-register provider */
1681 debug_f("provider %s returned no keys", provider_id);
1702 debug_f("provider \"%s\" available", provider_id);
1705 debug_f("could not register provider %s", provider_id);
1773 debug_f("using provider \"%s\"", provider_id);
1776 debug_f("could not register provider %s",