#endif
static int dh_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2)
+{
+ switch (op) {
+ case ASN1_PKEY_CTRL_SET1_TLS_ENCPT:
+ return dh_buf2key(EVP_PKEY_get0_DH(pkey), arg2, arg1);
+ case ASN1_PKEY_CTRL_GET1_TLS_ENCPT:
+ return dh_key2buf(EVP_PKEY_get0_DH(pkey), arg2);
+ default:
+ return -2;
+ }
+}
+
+static int dhx_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2)
{
switch (op) {
#ifndef OPENSSL_NO_CMS
0,
int_dh_free,
- 0,
+ dh_pkey_ctrl,
0, 0, 0, 0, 0,
0,
int_dh_free,
- dh_pkey_ctrl,
+ dhx_pkey_ctrl,
0, 0, 0, 0, 0,