Lines Matching refs:pub_key

349 static void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key)  in DH_get0_key()  argument
351 *pub_key = dh->pub_key; in DH_get0_key()
355 static int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) in DH_set0_key() argument
357 dh->pub_key = pub_key; in DH_set0_key()
379 static void DSA_get0_key(const DSA *d, const BIGNUM **pub_key, const BIGNUM **priv_key) in DSA_get0_key() argument
381 *pub_key = d->pub_key; in DSA_get0_key()
385 int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key) in DSA_set0_key() argument
387 d->pub_key = pub_key; in DSA_set0_key()
3535 EVP_PKEY *pub_key = PEM_read_bio_PUBKEY(bio, NULL, NULL, NULL); in php_openssl_extract_public_key() local
3537 return pub_key; in php_openssl_extract_public_key()
4037 BIGNUM *p, *q, *g, *priv_key, *pub_key; in php_openssl_pkey_init_legacy_dsa() local
4047 OPENSSL_PKEY_SET_BN(data, pub_key); in php_openssl_pkey_init_legacy_dsa()
4050 if (pub_key) { in php_openssl_pkey_init_legacy_dsa()
4051 return DSA_set0_key(dsa, pub_key, priv_key); in php_openssl_pkey_init_legacy_dsa()
4076 BIGNUM *p = NULL, *q = NULL, *g = NULL, *priv_key = NULL, *pub_key = NULL; in php_openssl_pkey_init_dsa() local
4086 OPENSSL_PKEY_SET_BN(data, pub_key); in php_openssl_pkey_init_dsa()
4098 if (pub_key) { in php_openssl_pkey_init_dsa()
4099 OSSL_PARAM_BLD_push_BN(bld, OSSL_PKEY_PARAM_PUB_KEY, pub_key); in php_openssl_pkey_init_dsa()
4115 if (pub_key) { in php_openssl_pkey_init_dsa()
4139 BN_free(pub_key); in php_openssl_pkey_init_dsa()
4170 BIGNUM *pub_key, *priv_key_const_time; in php_openssl_dh_pub_from_priv() local
4173 pub_key = BN_new(); in php_openssl_dh_pub_from_priv()
4174 if (pub_key == NULL) { in php_openssl_dh_pub_from_priv()
4181 BN_free(pub_key); in php_openssl_dh_pub_from_priv()
4187 BN_free(pub_key); in php_openssl_dh_pub_from_priv()
4195 if (!BN_mod_exp_mont(pub_key, g, priv_key_const_time, p, ctx, NULL)) { in php_openssl_dh_pub_from_priv()
4196 BN_free(pub_key); in php_openssl_dh_pub_from_priv()
4198 pub_key = NULL; in php_openssl_dh_pub_from_priv()
4204 return pub_key; in php_openssl_dh_pub_from_priv()
4211 BIGNUM *p, *q, *g, *priv_key, *pub_key; in php_openssl_pkey_init_legacy_dh() local
4221 OPENSSL_PKEY_SET_BN(data, pub_key); in php_openssl_pkey_init_legacy_dh()
4223 if (pub_key) { in php_openssl_pkey_init_legacy_dh()
4224 return DH_set0_key(dh, pub_key, priv_key); in php_openssl_pkey_init_legacy_dh()
4227 pub_key = php_openssl_dh_pub_from_priv(priv_key, g, p); in php_openssl_pkey_init_legacy_dh()
4228 if (pub_key == NULL) { in php_openssl_pkey_init_legacy_dh()
4231 return DH_set0_key(dh, pub_key, priv_key); in php_openssl_pkey_init_legacy_dh()
4249 BIGNUM *p = NULL, *q = NULL, *g = NULL, *priv_key = NULL, *pub_key = NULL; in php_openssl_pkey_init_dh() local
4259 OPENSSL_PKEY_SET_BN(data, pub_key); in php_openssl_pkey_init_dh()
4274 if (!pub_key) { in php_openssl_pkey_init_dh()
4275 pub_key = php_openssl_dh_pub_from_priv(priv_key, g, p); in php_openssl_pkey_init_dh()
4276 if (!pub_key) { in php_openssl_pkey_init_dh()
4281 if (pub_key) { in php_openssl_pkey_init_dh()
4282 OSSL_PARAM_BLD_push_BN(bld, OSSL_PKEY_PARAM_PUB_KEY, pub_key); in php_openssl_pkey_init_dh()
4295 if (pub_key || priv_key) { in php_openssl_pkey_init_dh()
4319 BN_free(pub_key); in php_openssl_pkey_init_dh()
4985 const BIGNUM *p, *q, *g, *priv_key, *pub_key; in PHP_FUNCTION() local
4988 DSA_get0_key(dsa, &pub_key, &priv_key); in PHP_FUNCTION()
4995 OPENSSL_PKEY_GET_BN(z_dsa, pub_key); in PHP_FUNCTION()
5007 const BIGNUM *p, *q, *g, *priv_key, *pub_key; in PHP_FUNCTION() local
5010 DH_get0_key(dh, &pub_key, &priv_key); in PHP_FUNCTION()
5016 OPENSSL_PKEY_GET_BN(z_dh, pub_key); in PHP_FUNCTION()
5166 PHP_OPENSSL_CHECK_SIZE_T_TO_INT(pub_len, pub_key, 1); in PHP_FUNCTION()