Lines Matching refs:ameth
27 const EVP_PKEY_ASN1_METHOD *, ameth);
36 const EVP_PKEY_ASN1_METHOD *, ameth);
110 const EVP_PKEY_ASN1_METHOD *ameth = NULL; in EVP_PKEY_asn1_find_str() local
117 ameth = ENGINE_pkey_asn1_find_str(&e, str, len); in EVP_PKEY_asn1_find_str()
118 if (ameth) { in EVP_PKEY_asn1_find_str()
123 ameth = NULL; in EVP_PKEY_asn1_find_str()
126 return ameth; in EVP_PKEY_asn1_find_str()
132 ameth = EVP_PKEY_asn1_get0(i); in EVP_PKEY_asn1_find_str()
133 if (ameth->pkey_flags & ASN1_PKEY_ALIAS) in EVP_PKEY_asn1_find_str()
135 if ((int)strlen(ameth->pem_str) == len in EVP_PKEY_asn1_find_str()
136 && OPENSSL_strncasecmp(ameth->pem_str, str, len) == 0) in EVP_PKEY_asn1_find_str()
137 return ameth; in EVP_PKEY_asn1_find_str()
142 int EVP_PKEY_asn1_add0(const EVP_PKEY_ASN1_METHOD *ameth) in EVP_PKEY_asn1_add0() argument
154 if (!((ameth->pem_str == NULL in EVP_PKEY_asn1_add0()
155 && (ameth->pkey_flags & ASN1_PKEY_ALIAS) != 0) in EVP_PKEY_asn1_add0()
156 || (ameth->pem_str != NULL in EVP_PKEY_asn1_add0()
157 && (ameth->pkey_flags & ASN1_PKEY_ALIAS) == 0))) { in EVP_PKEY_asn1_add0()
168 tmp.pkey_id = ameth->pkey_id; in EVP_PKEY_asn1_add0()
175 if (!sk_EVP_PKEY_ASN1_METHOD_push(app_methods, ameth)) in EVP_PKEY_asn1_add0()
183 EVP_PKEY_ASN1_METHOD *ameth; in EVP_PKEY_asn1_add_alias() local
184 ameth = EVP_PKEY_asn1_new(from, ASN1_PKEY_ALIAS, NULL, NULL); in EVP_PKEY_asn1_add_alias()
185 if (ameth == NULL) in EVP_PKEY_asn1_add_alias()
187 ameth->pkey_base_id = to; in EVP_PKEY_asn1_add_alias()
188 if (!EVP_PKEY_asn1_add0(ameth)) { in EVP_PKEY_asn1_add_alias()
189 EVP_PKEY_asn1_free(ameth); in EVP_PKEY_asn1_add_alias()
198 const EVP_PKEY_ASN1_METHOD *ameth) in EVP_PKEY_asn1_get0_info() argument
200 if (!ameth) in EVP_PKEY_asn1_get0_info()
203 *ppkey_id = ameth->pkey_id; in EVP_PKEY_asn1_get0_info()
205 *ppkey_base_id = ameth->pkey_base_id; in EVP_PKEY_asn1_get0_info()
207 *ppkey_flags = ameth->pkey_flags; in EVP_PKEY_asn1_get0_info()
209 *pinfo = ameth->info; in EVP_PKEY_asn1_get0_info()
211 *ppem_str = ameth->pem_str; in EVP_PKEY_asn1_get0_info()
217 return pkey->ameth; in EVP_PKEY_get0_asn1()
223 EVP_PKEY_ASN1_METHOD *ameth = OPENSSL_zalloc(sizeof(*ameth)); in EVP_PKEY_asn1_new() local
225 if (ameth == NULL) in EVP_PKEY_asn1_new()
228 ameth->pkey_id = id; in EVP_PKEY_asn1_new()
229 ameth->pkey_base_id = id; in EVP_PKEY_asn1_new()
230 ameth->pkey_flags = flags | ASN1_PKEY_DYNAMIC; in EVP_PKEY_asn1_new()
233 ameth->info = OPENSSL_strdup(info); in EVP_PKEY_asn1_new()
234 if (ameth->info == NULL) in EVP_PKEY_asn1_new()
239 ameth->pem_str = OPENSSL_strdup(pem_str); in EVP_PKEY_asn1_new()
240 if (ameth->pem_str == NULL) in EVP_PKEY_asn1_new()
244 return ameth; in EVP_PKEY_asn1_new()
247 EVP_PKEY_asn1_free(ameth); in EVP_PKEY_asn1_new()
270 void EVP_PKEY_asn1_free(EVP_PKEY_ASN1_METHOD *ameth) in EVP_PKEY_asn1_free() argument
272 if (ameth && (ameth->pkey_flags & ASN1_PKEY_DYNAMIC)) { in EVP_PKEY_asn1_free()
273 OPENSSL_free(ameth->pem_str); in EVP_PKEY_asn1_free()
274 OPENSSL_free(ameth->info); in EVP_PKEY_asn1_free()
275 OPENSSL_free(ameth); in EVP_PKEY_asn1_free()
279 void EVP_PKEY_asn1_set_public(EVP_PKEY_ASN1_METHOD *ameth, in EVP_PKEY_asn1_set_public() argument
292 ameth->pub_decode = pub_decode; in EVP_PKEY_asn1_set_public()
293 ameth->pub_encode = pub_encode; in EVP_PKEY_asn1_set_public()
294 ameth->pub_cmp = pub_cmp; in EVP_PKEY_asn1_set_public()
295 ameth->pub_print = pub_print; in EVP_PKEY_asn1_set_public()
296 ameth->pkey_size = pkey_size; in EVP_PKEY_asn1_set_public()
297 ameth->pkey_bits = pkey_bits; in EVP_PKEY_asn1_set_public()
300 void EVP_PKEY_asn1_set_private(EVP_PKEY_ASN1_METHOD *ameth, in EVP_PKEY_asn1_set_private() argument
311 ameth->priv_decode = priv_decode; in EVP_PKEY_asn1_set_private()
312 ameth->priv_encode = priv_encode; in EVP_PKEY_asn1_set_private()
313 ameth->priv_print = priv_print; in EVP_PKEY_asn1_set_private()
316 void EVP_PKEY_asn1_set_param(EVP_PKEY_ASN1_METHOD *ameth, in EVP_PKEY_asn1_set_param() argument
331 ameth->param_decode = param_decode; in EVP_PKEY_asn1_set_param()
332 ameth->param_encode = param_encode; in EVP_PKEY_asn1_set_param()
333 ameth->param_missing = param_missing; in EVP_PKEY_asn1_set_param()
334 ameth->param_copy = param_copy; in EVP_PKEY_asn1_set_param()
335 ameth->param_cmp = param_cmp; in EVP_PKEY_asn1_set_param()
336 ameth->param_print = param_print; in EVP_PKEY_asn1_set_param()
339 void EVP_PKEY_asn1_set_free(EVP_PKEY_ASN1_METHOD *ameth, in EVP_PKEY_asn1_set_free() argument
342 ameth->pkey_free = pkey_free; in EVP_PKEY_asn1_set_free()
345 void EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth, in EVP_PKEY_asn1_set_ctrl() argument
349 ameth->pkey_ctrl = pkey_ctrl; in EVP_PKEY_asn1_set_ctrl()
352 void EVP_PKEY_asn1_set_security_bits(EVP_PKEY_ASN1_METHOD *ameth, in EVP_PKEY_asn1_set_security_bits() argument
356 ameth->pkey_security_bits = pkey_security_bits; in EVP_PKEY_asn1_set_security_bits()
359 void EVP_PKEY_asn1_set_item(EVP_PKEY_ASN1_METHOD *ameth, in EVP_PKEY_asn1_set_item() argument
373 ameth->item_sign = item_sign; in EVP_PKEY_asn1_set_item()
374 ameth->item_verify = item_verify; in EVP_PKEY_asn1_set_item()
377 void EVP_PKEY_asn1_set_siginf(EVP_PKEY_ASN1_METHOD *ameth, in EVP_PKEY_asn1_set_siginf() argument
382 ameth->siginf_set = siginf_set; in EVP_PKEY_asn1_set_siginf()
385 void EVP_PKEY_asn1_set_check(EVP_PKEY_ASN1_METHOD *ameth, in EVP_PKEY_asn1_set_check() argument
388 ameth->pkey_check = pkey_check; in EVP_PKEY_asn1_set_check()
391 void EVP_PKEY_asn1_set_public_check(EVP_PKEY_ASN1_METHOD *ameth, in EVP_PKEY_asn1_set_public_check() argument
394 ameth->pkey_public_check = pkey_pub_check; in EVP_PKEY_asn1_set_public_check()
397 void EVP_PKEY_asn1_set_param_check(EVP_PKEY_ASN1_METHOD *ameth, in EVP_PKEY_asn1_set_param_check() argument
400 ameth->pkey_param_check = pkey_param_check; in EVP_PKEY_asn1_set_param_check()
403 void EVP_PKEY_asn1_set_set_priv_key(EVP_PKEY_ASN1_METHOD *ameth, in EVP_PKEY_asn1_set_set_priv_key() argument
409 ameth->set_priv_key = set_priv_key; in EVP_PKEY_asn1_set_set_priv_key()
412 void EVP_PKEY_asn1_set_set_pub_key(EVP_PKEY_ASN1_METHOD *ameth, in EVP_PKEY_asn1_set_set_pub_key() argument
417 ameth->set_pub_key = set_pub_key; in EVP_PKEY_asn1_set_set_pub_key()
420 void EVP_PKEY_asn1_set_get_priv_key(EVP_PKEY_ASN1_METHOD *ameth, in EVP_PKEY_asn1_set_get_priv_key() argument
425 ameth->get_priv_key = get_priv_key; in EVP_PKEY_asn1_set_get_priv_key()
428 void EVP_PKEY_asn1_set_get_pub_key(EVP_PKEY_ASN1_METHOD *ameth, in EVP_PKEY_asn1_set_get_pub_key() argument
433 ameth->get_pub_key = get_pub_key; in EVP_PKEY_asn1_set_get_pub_key()