Lines Matching refs:pub_key
354 static void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) in DH_get0_key() argument
356 *pub_key = dh->pub_key; in DH_get0_key()
360 static int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) in DH_set0_key() argument
362 dh->pub_key = pub_key; in DH_set0_key()
384 static void DSA_get0_key(const DSA *d, const BIGNUM **pub_key, const BIGNUM **priv_key) in DSA_get0_key() argument
386 *pub_key = d->pub_key; in DSA_get0_key()
390 int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key) in DSA_set0_key() argument
392 d->pub_key = pub_key; in DSA_set0_key()
3436 EVP_PKEY *pub_key = PEM_read_bio_PUBKEY(bio, NULL, NULL, NULL); in php_openssl_extract_public_key() local
3438 return pub_key; in php_openssl_extract_public_key()
3945 BIGNUM *p, *q, *g, *priv_key, *pub_key; in php_openssl_pkey_init_legacy_dsa() local
3955 OPENSSL_PKEY_SET_BN(data, pub_key); in php_openssl_pkey_init_legacy_dsa()
3958 if (pub_key) { in php_openssl_pkey_init_legacy_dsa()
3959 return DSA_set0_key(dsa, pub_key, priv_key); in php_openssl_pkey_init_legacy_dsa()
3984 BIGNUM *p = NULL, *q = NULL, *g = NULL, *priv_key = NULL, *pub_key = NULL; in php_openssl_pkey_init_dsa() local
3994 OPENSSL_PKEY_SET_BN(data, pub_key); in php_openssl_pkey_init_dsa()
4006 if (pub_key) { in php_openssl_pkey_init_dsa()
4007 OSSL_PARAM_BLD_push_BN(bld, OSSL_PKEY_PARAM_PUB_KEY, pub_key); in php_openssl_pkey_init_dsa()
4023 if (pub_key) { in php_openssl_pkey_init_dsa()
4047 BN_free(pub_key); in php_openssl_pkey_init_dsa()
4078 BIGNUM *pub_key, *priv_key_const_time; in php_openssl_dh_pub_from_priv() local
4081 pub_key = BN_new(); in php_openssl_dh_pub_from_priv()
4082 if (pub_key == NULL) { in php_openssl_dh_pub_from_priv()
4089 BN_free(pub_key); in php_openssl_dh_pub_from_priv()
4095 BN_free(pub_key); in php_openssl_dh_pub_from_priv()
4103 if (!BN_mod_exp_mont(pub_key, g, priv_key_const_time, p, ctx, NULL)) { in php_openssl_dh_pub_from_priv()
4104 BN_free(pub_key); in php_openssl_dh_pub_from_priv()
4106 pub_key = NULL; in php_openssl_dh_pub_from_priv()
4112 return pub_key; in php_openssl_dh_pub_from_priv()
4119 BIGNUM *p, *q, *g, *priv_key, *pub_key; in php_openssl_pkey_init_legacy_dh() local
4129 OPENSSL_PKEY_SET_BN(data, pub_key); in php_openssl_pkey_init_legacy_dh()
4131 if (pub_key) { in php_openssl_pkey_init_legacy_dh()
4132 return DH_set0_key(dh, pub_key, priv_key); in php_openssl_pkey_init_legacy_dh()
4135 pub_key = php_openssl_dh_pub_from_priv(priv_key, g, p); in php_openssl_pkey_init_legacy_dh()
4136 if (pub_key == NULL) { in php_openssl_pkey_init_legacy_dh()
4139 return DH_set0_key(dh, pub_key, priv_key); in php_openssl_pkey_init_legacy_dh()
4157 BIGNUM *p = NULL, *q = NULL, *g = NULL, *priv_key = NULL, *pub_key = NULL; in php_openssl_pkey_init_dh() local
4167 OPENSSL_PKEY_SET_BN(data, pub_key); in php_openssl_pkey_init_dh()
4182 if (!pub_key) { in php_openssl_pkey_init_dh()
4183 pub_key = php_openssl_dh_pub_from_priv(priv_key, g, p); in php_openssl_pkey_init_dh()
4184 if (!pub_key) { in php_openssl_pkey_init_dh()
4189 if (pub_key) { in php_openssl_pkey_init_dh()
4190 OSSL_PARAM_BLD_push_BN(bld, OSSL_PKEY_PARAM_PUB_KEY, pub_key); in php_openssl_pkey_init_dh()
4203 if (pub_key || priv_key) { in php_openssl_pkey_init_dh()
4227 BN_free(pub_key); in php_openssl_pkey_init_dh()
4894 const BIGNUM *p, *q, *g, *priv_key, *pub_key; in PHP_FUNCTION() local
4897 DSA_get0_key(dsa, &pub_key, &priv_key); in PHP_FUNCTION()
4904 OPENSSL_PKEY_GET_BN(z_dsa, pub_key); in PHP_FUNCTION()
4916 const BIGNUM *p, *q, *g, *priv_key, *pub_key; in PHP_FUNCTION() local
4919 DH_get0_key(dh, &pub_key, &priv_key); in PHP_FUNCTION()
4925 OPENSSL_PKEY_GET_BN(z_dh, pub_key); in PHP_FUNCTION()
5075 PHP_OPENSSL_CHECK_SIZE_T_TO_INT(pub_len, pub_key, 1); in PHP_FUNCTION()