Lines Matching refs:impl

211 	const struct sshkey_impl *impl;  in sshkey_type()  local
213 if ((impl = sshkey_impl_from_key(k)) == NULL) in sshkey_type()
215 return impl->shortname; in sshkey_type()
221 const struct sshkey_impl *impl; in sshkey_ssh_name_from_type_nid() local
223 if ((impl = sshkey_impl_from_type_nid(type, nid)) == NULL) in sshkey_ssh_name_from_type_nid()
225 return impl->name; in sshkey_ssh_name_from_type_nid()
231 const struct sshkey_impl *impl; in sshkey_type_is_cert() local
233 if ((impl = sshkey_impl_from_type(type)) == NULL) in sshkey_type_is_cert()
235 return impl->cert; in sshkey_type_is_cert()
255 const struct sshkey_impl *impl; in sshkey_type_from_name() local
258 impl = keyimpls[i]; in sshkey_type_from_name()
260 if ((impl->name != NULL && strcmp(name, impl->name) == 0) || in sshkey_type_from_name()
261 (!impl->cert && strcasecmp(impl->shortname, name) == 0)) in sshkey_type_from_name()
262 return impl->type; in sshkey_type_from_name()
323 const struct sshkey_impl *impl; in sshkey_alg_list() local
326 impl = keyimpls[i]; in sshkey_alg_list()
327 if (impl->name == NULL) in sshkey_alg_list()
329 if (!include_sigonly && impl->sigonly) in sshkey_alg_list()
331 if ((certs_only && !impl->cert) || (plain_only && impl->cert)) in sshkey_alg_list()
335 nlen = strlen(impl->name); in sshkey_alg_list()
341 memcpy(ret + rlen, impl->name, nlen + 1); in sshkey_alg_list()
351 const struct sshkey_impl *impl; in sshkey_names_valid2() local
368 impl = NULL; in sshkey_names_valid2()
372 impl = keyimpls[i]; in sshkey_names_valid2()
376 if (impl != NULL) in sshkey_names_valid2()
393 const struct sshkey_impl *impl; in sshkey_size() local
395 if ((impl = sshkey_impl_from_key(k)) == NULL) in sshkey_size()
397 if (impl->funcs->size != NULL) in sshkey_size()
398 return impl->funcs->size(k); in sshkey_size()
399 return impl->keybits; in sshkey_size()
405 const struct sshkey_impl *impl; in sshkey_type_is_valid_ca() local
407 if ((impl = sshkey_impl_from_type(type)) == NULL) in sshkey_type_is_valid_ca()
410 return !impl->cert; in sshkey_type_is_valid_ca()
612 const struct sshkey_impl *impl = NULL; in sshkey_new() local
615 (impl = sshkey_impl_from_type(type)) == NULL) in sshkey_new()
623 if (impl != NULL && impl->funcs->alloc != NULL) { in sshkey_new()
624 if (impl->funcs->alloc(k) != 0) { in sshkey_new()
653 const struct sshkey_impl *impl; in sshkey_free_contents() local
657 if ((impl = sshkey_impl_from_type(k->type)) != NULL && in sshkey_free_contents()
658 impl->funcs->cleanup != NULL) in sshkey_free_contents()
659 impl->funcs->cleanup(k); in sshkey_free_contents()
706 const struct sshkey_impl *impl; in sshkey_equal_public() local
711 if ((impl = sshkey_impl_from_type(a->type)) == NULL) in sshkey_equal_public()
713 return impl->funcs->equal(a, b); in sshkey_equal_public()
747 const struct sshkey_impl *impl; in to_blob_buf() local
764 if ((impl = sshkey_impl_from_type(type)) == NULL) in to_blob_buf()
770 return impl->funcs->serialize_public(key, b, opts); in to_blob_buf()
1156 const struct sshkey_impl *impl; in peek_type_nid() local
1160 impl = keyimpls[i]; in peek_type_nid()
1161 if (impl->name == NULL || strlen(impl->name) != l) in peek_type_nid()
1163 if (memcmp(s, impl->name, l) == 0) { in peek_type_nid()
1165 if (key_type_is_ecdsa_variant(impl->type)) in peek_type_nid()
1166 *nid = impl->nid; in peek_type_nid()
1167 return impl->type; in peek_type_nid()
1402 const struct sshkey_impl *impl; in sshkey_generate() local
1407 if ((impl = sshkey_impl_from_type(type)) == NULL) in sshkey_generate()
1409 if (impl->funcs->generate == NULL) in sshkey_generate()
1414 if ((ret = impl->funcs->generate(k, bits)) != 0) { in sshkey_generate()
1507 const struct sshkey_impl *impl; in sshkey_from_private() local
1510 if ((impl = sshkey_impl_from_key(k)) == NULL) in sshkey_from_private()
1516 if ((r = impl->funcs->copy_public(k, n)) != 0) in sshkey_from_private()
1904 const struct sshkey_impl *impl; in sshkey_from_blob_internal() local
1925 if ((impl = sshkey_impl_from_type(type)) == NULL) { in sshkey_from_blob_internal()
1940 if ((ret = impl->funcs->deserialize_public(ktype, b, key)) != 0) in sshkey_from_blob_internal()
2047 const struct sshkey_impl *impl; in sshkey_sigalg_by_name() local
2051 impl = keyimpls[i]; in sshkey_sigalg_by_name()
2052 if (strcmp(impl->name, name) != 0) in sshkey_sigalg_by_name()
2054 if (impl->sigalg != NULL) in sshkey_sigalg_by_name()
2055 return impl->sigalg; in sshkey_sigalg_by_name()
2056 if (!impl->cert) in sshkey_sigalg_by_name()
2057 return impl->name; in sshkey_sigalg_by_name()
2059 sshkey_type_plain(impl->type), impl->nid); in sshkey_sigalg_by_name()
2095 const struct sshkey_impl *impl; in sshkey_sign() local
2103 if ((impl = sshkey_impl_from_key(key)) == NULL) in sshkey_sign()
2111 if (impl->funcs->sign == NULL) in sshkey_sign()
2114 r = impl->funcs->sign(key, sigp, lenp, data, datalen, in sshkey_sign()
2133 const struct sshkey_impl *impl; in sshkey_verify() local
2139 if ((impl = sshkey_impl_from_key(key)) == NULL) in sshkey_verify()
2141 return impl->funcs->verify(key, sig, siglen, data, dlen, in sshkey_verify()
2177 const struct sshkey_impl *impl; in sshkey_certify_custom() local
2192 if ((impl = sshkey_impl_from_key(k)) == NULL) in sshkey_certify_custom()
2226 if ((ret = impl->funcs->serialize_public(k, cert, in sshkey_certify_custom()
2448 const struct sshkey_impl *impl; in sshkey_private_serialize_opt() local
2450 if ((impl = sshkey_impl_from_key(key)) == NULL) in sshkey_private_serialize_opt()
2467 if ((r = impl->funcs->serialize_private(key, b, opts)) != 0) in sshkey_private_serialize_opt()
2513 const struct sshkey_impl *impl; in sshkey_private_deserialize() local
2558 if ((impl = sshkey_impl_from_type(type)) == NULL) { in sshkey_private_deserialize()
2562 if ((r = impl->funcs->deserialize_private(tname, buf, k)) != 0) in sshkey_private_deserialize()