Lines Matching refs:dh

311 #define EVP_PKEY_get0_DH(_pkey) _pkey->pkey.dh  in ZEND_GET_MODULE()
361 static void DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g) in DH_get0_pqg() argument
363 *p = dh->p; in DH_get0_pqg()
364 *q = dh->q; in DH_get0_pqg()
365 *g = dh->g; in DH_get0_pqg()
368 static int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g) in DH_set0_pqg() argument
370 dh->p = p; in DH_set0_pqg()
371 dh->q = q; in DH_set0_pqg()
372 dh->g = g; in DH_set0_pqg()
377 static void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) in DH_get0_key() argument
379 *pub_key = dh->pub_key; in DH_get0_key()
380 *priv_key = dh->priv_key; in DH_get0_key()
383 static int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) in DH_set0_key() argument
385 dh->pub_key = pub_key; in DH_set0_key()
386 dh->priv_key = priv_key; in DH_set0_key()
4228 static bool php_openssl_pkey_init_legacy_dh(DH *dh, zval *data, bool *is_private) in php_openssl_pkey_init_legacy_dh() argument
4235 if (!p || !g || !DH_set0_pqg(dh, p, q, g)) { in php_openssl_pkey_init_legacy_dh()
4243 return DH_set0_key(dh, pub_key, priv_key); in php_openssl_pkey_init_legacy_dh()
4250 return DH_set0_key(dh, pub_key, priv_key); in php_openssl_pkey_init_legacy_dh()
4255 if (!DH_generate_key(dh)) { in php_openssl_pkey_init_legacy_dh()
4347 DH *dh = DH_new(); in php_openssl_pkey_init_dh()
4348 if (!dh) { in php_openssl_pkey_init_dh()
4353 if (!php_openssl_pkey_init_legacy_dh(dh, data, is_private) in php_openssl_pkey_init_dh()
4354 || !EVP_PKEY_assign_DH(pkey, dh)) { in php_openssl_pkey_init_dh()
4357 DH_free(dh); in php_openssl_pkey_init_dh()
5308 DH *dh = EVP_PKEY_get0_DH(pkey); in PHP_FUNCTION() local
5311 if (dh != NULL) { in PHP_FUNCTION()
5315 DH_get0_pqg(dh, &p, &q, &g); in PHP_FUNCTION()
5316 DH_get0_key(dh, &pub_key, &priv_key); in PHP_FUNCTION()
5437 DH *dh = EVP_PKEY_get0_DH(pkey); in php_openssl_dh_compute_key()
5438 if (dh == NULL) { in php_openssl_dh_compute_key()
5443 zend_string *data = zend_string_alloc(DH_size(dh), 0); in php_openssl_dh_compute_key()
5444 int len = DH_compute_key((unsigned char*)ZSTR_VAL(data), pub, dh); in php_openssl_dh_compute_key()