Lines Matching refs:dh

547 #define EVP_PKEY_get0_DH(_pkey) _pkey->pkey.dh  in ZEND_GET_MODULE()
597 static void DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g) in DH_get0_pqg() argument
599 *p = dh->p; in DH_get0_pqg()
600 *q = dh->q; in DH_get0_pqg()
601 *g = dh->g; in DH_get0_pqg()
604 static int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g) in DH_set0_pqg() argument
606 dh->p = p; in DH_set0_pqg()
607 dh->q = q; in DH_set0_pqg()
608 dh->g = g; in DH_set0_pqg()
613 static void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) in DH_get0_key() argument
615 *pub_key = dh->pub_key; in DH_get0_key()
616 *priv_key = dh->priv_key; in DH_get0_key()
619 static int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) in DH_set0_key() argument
621 dh->pub_key = pub_key; in DH_set0_key()
622 dh->priv_key = priv_key; in DH_set0_key()
3814 DH *dh = EVP_PKEY_get0_DH(pkey); in php_openssl_is_private_key() local
3815 if (dh != NULL) { in php_openssl_is_private_key()
3818 DH_get0_pqg(dh, &p, &q, &g); in php_openssl_is_private_key()
3823 DH_get0_key(dh, &pub_key, &priv_key); in php_openssl_is_private_key()
3979 zend_bool php_openssl_pkey_init_dh(DH *dh, zval *data) in php_openssl_pkey_init_dh() argument
3986 if (!p || !g || !DH_set0_pqg(dh, p, q, g)) { in php_openssl_pkey_init_dh()
3993 return DH_set0_key(dh, pub_key, priv_key); in php_openssl_pkey_init_dh()
4000 return DH_set0_key(dh, pub_key, priv_key); in php_openssl_pkey_init_dh()
4005 if (!DH_generate_key(dh)) { in php_openssl_pkey_init_dh()
4063 DH *dh = DH_new(); in PHP_FUNCTION() local
4064 if (dh) { in PHP_FUNCTION()
4065 if (php_openssl_pkey_init_dh(dh, data)) { in PHP_FUNCTION()
4066 if (EVP_PKEY_assign_DH(pkey, dh)) { in PHP_FUNCTION()
4071 DH_free(dh); in PHP_FUNCTION()
4392 DH *dh = EVP_PKEY_get0_DH(pkey); in PHP_FUNCTION() local
4395 if (dh != NULL) { in PHP_FUNCTION()
4399 DH_get0_pqg(dh, &p, &q, &g); in PHP_FUNCTION()
4400 DH_get0_key(dh, &pub_key, &priv_key); in PHP_FUNCTION()
5903 DH *dh; in PHP_FUNCTION() local
5918 dh = EVP_PKEY_get0_DH(pkey); in PHP_FUNCTION()
5919 if (dh == NULL) { in PHP_FUNCTION()
5926 data = zend_string_alloc(DH_size(dh), 0); in PHP_FUNCTION()
5927 len = DH_compute_key((unsigned char*)ZSTR_VAL(data), pub, dh); in PHP_FUNCTION()