Lines Matching refs:data
159 static int try_name(struct extracted_param_data_st *data, OSSL_STORE_INFO **v) in try_name() argument
161 if (data->object_type == OSSL_OBJECT_NAME) { in try_name()
164 if (data->utf8_data == NULL) in try_name()
166 if ((newname = OPENSSL_strdup(data->utf8_data)) == NULL in try_name()
167 || (data->desc != NULL in try_name()
168 && (newdesc = OPENSSL_strdup(data->desc)) == NULL) in try_name()
186 static EVP_PKEY *try_key_ref(struct extracted_param_data_st *data, in try_key_ref() argument
197 if (data->data_type == NULL) in try_key_ref()
200 keymgmt = EVP_KEYMGMT_fetch(libctx, data->data_type, propq); in try_key_ref()
214 keydata = evp_keymgmt_load(keymgmt, data->ref, data->ref_size); in try_key_ref()
230 data->ref, data->ref_size, in try_key_ref()
241 data->data_type, propq); in try_key_ref()
259 static EVP_PKEY *try_key_value(struct extracted_param_data_st *data, in try_key_value() argument
266 const unsigned char *pdata = data->octet_data; in try_key_value()
267 size_t pdatalen = data->octet_data_size; in try_key_value()
289 OSSL_DECODER_CTX_new_for_pkey(&pk, NULL, data->data_structure, in try_key_value()
290 data->data_type, selection, libctx, in try_key_value()
304 static EVP_PKEY *try_key_value_legacy(struct extracted_param_data_st *data, in try_key_value_legacy() argument
311 const unsigned char *der = data->octet_data, *derp; in try_key_value_legacy()
312 long der_len = (long)data->octet_data_size; in try_key_value_legacy()
354 oct->data, oct->length, in try_key_value_legacy()
386 static int try_key(struct extracted_param_data_st *data, OSSL_STORE_INFO **v, in try_key() argument
392 if (data->object_type == OSSL_OBJECT_UNKNOWN in try_key()
393 || data->object_type == OSSL_OBJECT_PKEY) { in try_key()
397 if (data->object_type == OSSL_OBJECT_PKEY && data->ref != NULL) { in try_key()
398 pk = try_key_ref(data, ctx, provider, libctx, propq); in try_key()
408 } else if (data->octet_data != NULL) { in try_key()
412 pk = try_key_value(data, ctx, cb, cbarg, libctx, propq); in try_key()
422 pk = try_key_value_legacy(data, &store_info_new, ctx, in try_key()
427 data->object_type = OSSL_OBJECT_PKEY; in try_key()
456 static int try_cert(struct extracted_param_data_st *data, OSSL_STORE_INFO **v, in try_cert() argument
459 if (data->object_type == OSSL_OBJECT_UNKNOWN in try_cert()
460 || data->object_type == OSSL_OBJECT_CERT) { in try_cert()
477 if (data->data_type != NULL in try_cert()
478 && (OPENSSL_strcasecmp(data->data_type, PEM_STRING_X509_TRUSTED) == 0)) in try_cert()
481 if (d2i_X509_AUX(&cert, (const unsigned char **)&data->octet_data, in try_cert()
482 data->octet_data_size) == NULL in try_cert()
484 || d2i_X509(&cert, (const unsigned char **)&data->octet_data, in try_cert()
485 data->octet_data_size) == NULL)) { in try_cert()
492 data->object_type = OSSL_OBJECT_CERT; in try_cert()
502 static int try_crl(struct extracted_param_data_st *data, OSSL_STORE_INFO **v, in try_crl() argument
505 if (data->object_type == OSSL_OBJECT_UNKNOWN in try_crl()
506 || data->object_type == OSSL_OBJECT_CRL) { in try_crl()
509 crl = d2i_X509_CRL(NULL, (const unsigned char **)&data->octet_data, in try_crl()
510 data->octet_data_size); in try_crl()
514 data->object_type = OSSL_OBJECT_CRL; in try_crl()
530 static int try_pkcs12(struct extracted_param_data_st *data, OSSL_STORE_INFO **v, in try_pkcs12() argument
537 if (data->object_type == OSSL_OBJECT_UNKNOWN) { in try_pkcs12()
541 p12 = d2i_PKCS12(NULL, (const unsigned char **)&data->octet_data, in try_pkcs12()
542 data->octet_data_size); in try_pkcs12()
552 data->object_type = OSSL_OBJECT_PKCS12; in try_pkcs12()