* GOST CMS processing functions
*/
/* FIXME reaarange declarations */
-static int pub_decode_gost_ec(EVP_PKEY *pk, const X509_PUBKEY *pub);
+static int pub_decode_gost_ec(EVP_PKEY *pk, X509_PUBKEY *pub);
static int gost_cms_set_kari_shared_info(EVP_PKEY_CTX *pctx, CMS_RecipientInfo *ri)
{
case ASN1_PKEY_CTRL_DEFAULT_MD_NID:
*(int *)arg2 = md_nid;
return 2;
+
+ case ASN1_PKEY_CTRL_SET1_TLS_ENCPT:
+ return gost_ec_oct2key((EC_KEY *)EVP_PKEY_get0(pkey), arg2, arg1);
+
+ case ASN1_PKEY_CTRL_GET1_TLS_ENCPT:
+ return gost_ec_key2buf((EC_KEY *)EVP_PKEY_get0(pkey), arg2);
}
return -2;
}
/* ---------- Public key functions * --------------------------------------*/
-static int pub_decode_gost_ec(EVP_PKEY *pk, const X509_PUBKEY *pub)
+static int pub_decode_gost_ec(EVP_PKEY *pk, X509_PUBKEY *pub)
{
X509_ALGOR *palg = NULL;
const unsigned char *pubkey_buf = NULL;