Lines Matching defs:impl

188 	const struct sshkey_impl *impl;
190 if ((impl = sshkey_impl_from_key(k)) == NULL)
192 return impl->shortname;
198 const struct sshkey_impl *impl;
200 if ((impl = sshkey_impl_from_type_nid(type, nid)) == NULL)
202 return impl->name;
208 const struct sshkey_impl *impl;
210 if ((impl = sshkey_impl_from_type(type)) == NULL)
212 return impl->cert;
232 const struct sshkey_impl *impl;
235 impl = keyimpls[i];
236 if (impl->name != NULL && strcmp(name, impl->name) == 0)
237 return impl->type;
239 if (allow_short && !impl->cert && impl->shortname != NULL &&
240 strcasecmp(impl->shortname, name) == 0)
241 return impl->type;
314 const struct sshkey_impl *impl;
317 impl = keyimpls[i];
318 if (impl->name == NULL)
320 if (!include_sigonly && impl->sigonly)
322 if ((certs_only && !impl->cert) || (plain_only && impl->cert))
326 nlen = strlen(impl->name);
332 memcpy(ret + rlen, impl->name, nlen + 1);
342 const struct sshkey_impl *impl;
359 impl = NULL;
363 impl = keyimpls[i];
367 if (impl != NULL)
384 const struct sshkey_impl *impl;
386 if ((impl = sshkey_impl_from_key(k)) == NULL)
388 if (impl->funcs->size != NULL)
389 return impl->funcs->size(k);
390 return impl->keybits;
396 const struct sshkey_impl *impl;
398 if ((impl = sshkey_impl_from_type(type)) == NULL)
401 return !impl->cert;
687 const struct sshkey_impl *impl = NULL;
690 (impl = sshkey_impl_from_type(type)) == NULL)
698 if (impl != NULL && impl->funcs->alloc != NULL) {
699 if (impl->funcs->alloc(k) != 0) {
749 const struct sshkey_impl *impl;
753 if ((impl = sshkey_impl_from_type(k->type)) != NULL &&
754 impl->funcs->cleanup != NULL)
755 impl->funcs->cleanup(k);
802 const struct sshkey_impl *impl;
807 if ((impl = sshkey_impl_from_type(a->type)) == NULL)
809 return impl->funcs->equal(a, b);
843 const struct sshkey_impl *impl;
860 if ((impl = sshkey_impl_from_type(type)) == NULL)
866 return impl->funcs->serialize_public(key, b, opts);
1252 const struct sshkey_impl *impl;
1256 impl = keyimpls[i];
1257 if (impl->name == NULL || strlen(impl->name) != l)
1259 if (memcmp(s, impl->name, l) == 0) {
1261 if (key_type_is_ecdsa_variant(impl->type))
1262 *nid = impl->nid;
1263 return impl->type;
1469 const struct sshkey_impl *impl;
1474 if ((impl = sshkey_impl_from_type(type)) == NULL)
1476 if (impl->funcs->generate == NULL)
1481 if ((ret = impl->funcs->generate(k, bits)) != 0) {
1574 const struct sshkey_impl *impl;
1577 if ((impl = sshkey_impl_from_key(k)) == NULL)
1583 if ((r = impl->funcs->copy_public(k, n)) != 0)
1969 const struct sshkey_impl *impl;
1990 if ((impl = sshkey_impl_from_type(type)) == NULL) {
2005 if ((ret = impl->funcs->deserialize_public(ktype, b, key)) != 0)
2112 const struct sshkey_impl *impl;
2116 impl = keyimpls[i];
2117 if (strcmp(impl->name, name) != 0)
2119 if (impl->sigalg != NULL)
2120 return impl->sigalg;
2121 if (!impl->cert)
2122 return impl->name;
2124 sshkey_type_plain(impl->type), impl->nid);
2160 const struct sshkey_impl *impl;
2168 if ((impl = sshkey_impl_from_key(key)) == NULL)
2176 if (impl->funcs->sign == NULL)
2179 r = impl->funcs->sign(key, sigp, lenp, data, datalen,
2198 const struct sshkey_impl *impl;
2204 if ((impl = sshkey_impl_from_key(key)) == NULL)
2206 return impl->funcs->verify(key, sig, siglen, data, dlen,
2242 const struct sshkey_impl *impl;
2257 if ((impl = sshkey_impl_from_key(k)) == NULL)
2291 if ((ret = impl->funcs->serialize_public(k, cert,
2513 const struct sshkey_impl *impl;
2515 if ((impl = sshkey_impl_from_key(key)) == NULL)
2532 if ((r = impl->funcs->serialize_private(key, b, opts)) != 0)
2578 const struct sshkey_impl *impl;
2623 if ((impl = sshkey_impl_from_type(type)) == NULL) {
2627 if ((r = impl->funcs->deserialize_private(tname, buf, k)) != 0)