Lines Matching refs:dh
271 #define EVP_PKEY_get0_DH(_pkey) _pkey->pkey.dh in ZEND_GET_MODULE()
321 static void DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g) in DH_get0_pqg() argument
323 *p = dh->p; in DH_get0_pqg()
324 *q = dh->q; in DH_get0_pqg()
325 *g = dh->g; in DH_get0_pqg()
328 static int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g) in DH_set0_pqg() argument
330 dh->p = p; in DH_set0_pqg()
331 dh->q = q; in DH_set0_pqg()
332 dh->g = g; in DH_set0_pqg()
337 static void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) in DH_get0_key() argument
339 *pub_key = dh->pub_key; in DH_get0_key()
340 *priv_key = dh->priv_key; in DH_get0_key()
343 static int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) in DH_set0_key() argument
345 dh->pub_key = pub_key; in DH_set0_key()
346 dh->priv_key = priv_key; in DH_set0_key()
3953 DH *dh = EVP_PKEY_get0_DH(pkey); in php_openssl_is_private_key() local
3954 if (dh != NULL) { in php_openssl_is_private_key()
3957 DH_get0_pqg(dh, &p, &q, &g); in php_openssl_is_private_key()
3962 DH_get0_key(dh, &pub_key, &priv_key); in php_openssl_is_private_key()
4123 static zend_bool php_openssl_pkey_init_dh(DH *dh, zval *data) in php_openssl_pkey_init_dh() argument
4130 if (!p || !g || !DH_set0_pqg(dh, p, q, g)) { in php_openssl_pkey_init_dh()
4137 return DH_set0_key(dh, pub_key, priv_key); in php_openssl_pkey_init_dh()
4144 return DH_set0_key(dh, pub_key, priv_key); in php_openssl_pkey_init_dh()
4149 if (!DH_generate_key(dh)) { in php_openssl_pkey_init_dh()
4224 DH *dh = DH_new(); in PHP_FUNCTION() local
4225 if (dh) { in PHP_FUNCTION()
4226 if (php_openssl_pkey_init_dh(dh, data)) { in PHP_FUNCTION()
4227 if (EVP_PKEY_assign_DH(pkey, dh)) { in PHP_FUNCTION()
4238 DH_free(dh); in PHP_FUNCTION()
4690 DH *dh = EVP_PKEY_get0_DH(pkey); in PHP_FUNCTION() local
4693 if (dh != NULL) { in PHP_FUNCTION()
4697 DH_get0_pqg(dh, &p, &q, &g); in PHP_FUNCTION()
4698 DH_get0_key(dh, &pub_key, &priv_key); in PHP_FUNCTION()
4784 DH *dh; in PHP_FUNCTION() local
4801 dh = EVP_PKEY_get0_DH(pkey); in PHP_FUNCTION()
4802 if (dh == NULL) { in PHP_FUNCTION()
4808 data = zend_string_alloc(DH_size(dh), 0); in PHP_FUNCTION()
4809 len = DH_compute_key((unsigned char*)ZSTR_VAL(data), pub, dh); in PHP_FUNCTION()