static int tls_process_cke_dhe(SSL *s, PACKET *pkt)
{
-#ifndef OPENSSL_NO_DH
EVP_PKEY *skey = NULL;
- DH *cdh;
unsigned int i;
- BIGNUM *pub_key;
const unsigned char *data;
EVP_PKEY *ckey = NULL;
int ret = 0;
goto err;
}
- cdh = EVP_PKEY_get0_DH(ckey);
- pub_key = BN_bin2bn(data, i, NULL);
- if (pub_key == NULL || cdh == NULL || !DH_set0_key(cdh, pub_key, NULL)) {
+ if (!EVP_PKEY_set1_encoded_public_key(ckey, data, i)) {
SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
- BN_free(pub_key);
goto err;
}
err:
EVP_PKEY_free(ckey);
return ret;
-#else
- /* Should never happen */
- SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
- return 0;
-#endif
}
static int tls_process_cke_ecdhe(SSL *s, PACKET *pkt)