Lines Matching refs:kdata
1723 PKEY_DATA *kdata;
1737 if (!TEST_ptr(kdata = OPENSSL_zalloc(sizeof(*kdata)))) {
1741 kdata->keyop = keyop;
1742 if (!TEST_ptr(kdata->ctx = EVP_PKEY_CTX_new_from_pkey(libctx, pkey, NULL))) {
1744 OPENSSL_free(kdata);
1747 if (keyopinit(kdata->ctx) <= 0)
1749 t->data = kdata;
1755 PKEY_DATA *kdata = t->data;
1757 OPENSSL_free(kdata->input);
1758 OPENSSL_free(kdata->output);
1759 EVP_PKEY_CTX_free(kdata->ctx);
1795 PKEY_DATA *kdata = t->data;
1797 return parse_bin(value, &kdata->input, &kdata->input_len);
1799 return parse_bin(value, &kdata->output, &kdata->output_len);
1801 return pkey_test_ctrl(t, kdata->ctx, value);
1907 PKEY_DATA *kdata = t->data;
1909 if (EVP_PKEY_verify(kdata->ctx, kdata->output, kdata->output_len,
1910 kdata->input, kdata->input_len) <= 0)
1931 PKEY_DATA *kdata = t->data;
1941 if (EVP_PKEY_derive_set_peer_ex(kdata->ctx, peer, validate) <= 0) {
1949 return parse_bin(value, &kdata->output, &kdata->output_len);
1951 return pkey_test_ctrl(t, kdata->ctx, value);
1958 if (EVP_PKEY_CTX_set_params(kdata->ctx, params) == 0)
1968 if (EVP_PKEY_CTX_set_params(kdata->ctx, params) == 0)
1978 if (EVP_PKEY_CTX_set_params(kdata->ctx, params) == 0)
1993 if (EVP_PKEY_CTX_set_params(kdata->ctx, params) == 0)
2725 KDF_DATA *kdata;
2734 if (!TEST_ptr(kdata = OPENSSL_zalloc(sizeof(*kdata))))
2736 kdata->p = kdata->params;
2737 *kdata->p = OSSL_PARAM_construct_end();
2741 OPENSSL_free(kdata);
2744 kdata->ctx = EVP_KDF_CTX_new(kdf);
2746 if (kdata->ctx == NULL) {
2747 OPENSSL_free(kdata);
2750 t->data = kdata;
2756 KDF_DATA *kdata = t->data;
2759 for (p = kdata->params; p->key != NULL; p++)
2761 OPENSSL_free(kdata->output);
2762 EVP_KDF_CTX_free(kdata->ctx);
2768 KDF_DATA *kdata = t->data;
2781 rv = OSSL_PARAM_allocate_from_text(kdata->p, defs, name, p,
2783 *++kdata->p = OSSL_PARAM_construct_end();
2810 KDF_DATA *kdata = t->data;
2813 return parse_bin(value, &kdata->output, &kdata->output_len);
2815 return kdf_test_ctrl(t, kdata->ctx, value);
2875 PKEY_KDF_DATA *kdata = NULL;
2883 if (!TEST_ptr(kdata = OPENSSL_zalloc(sizeof(*kdata))))
2886 kdata->ctx = EVP_PKEY_CTX_new_from_name(libctx, name, NULL);
2887 if (kdata->ctx == NULL
2888 || EVP_PKEY_derive_init(kdata->ctx) <= 0)
2891 t->data = kdata;
2894 EVP_PKEY_CTX_free(kdata->ctx);
2895 OPENSSL_free(kdata);
2901 PKEY_KDF_DATA *kdata = t->data;
2903 OPENSSL_free(kdata->output);
2904 EVP_PKEY_CTX_free(kdata->ctx);
2910 PKEY_KDF_DATA *kdata = t->data;
2913 return parse_bin(value, &kdata->output, &kdata->output_len);
2915 return pkey_test_ctrl(t, kdata->ctx, value);