Lines Matching refs:pub_key

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()
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()
407 static void DSA_get0_key(const DSA *d, const BIGNUM **pub_key, const BIGNUM **priv_key) in DSA_get0_key() argument
409 *pub_key = d->pub_key; in DSA_get0_key()
413 int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key) in DSA_set0_key() argument
415 d->pub_key = pub_key; in DSA_set0_key()
3534 EVP_PKEY *pub_key = PEM_read_bio_PUBKEY(bio, NULL, NULL, NULL); in php_openssl_extract_public_key() local
3536 return pub_key; in php_openssl_extract_public_key()
4065 BIGNUM *p, *q, *g, *priv_key, *pub_key; in php_openssl_pkey_init_legacy_dsa() local
4075 OPENSSL_PKEY_SET_BN(data, pub_key); in php_openssl_pkey_init_legacy_dsa()
4078 if (pub_key) { in php_openssl_pkey_init_legacy_dsa()
4079 return DSA_set0_key(dsa, pub_key, priv_key); in php_openssl_pkey_init_legacy_dsa()
4104 BIGNUM *p = NULL, *q = NULL, *g = NULL, *priv_key = NULL, *pub_key = NULL; in php_openssl_pkey_init_dsa() local
4114 OPENSSL_PKEY_SET_BN(data, pub_key); in php_openssl_pkey_init_dsa()
4126 if (pub_key) { in php_openssl_pkey_init_dsa()
4127 OSSL_PARAM_BLD_push_BN(bld, OSSL_PKEY_PARAM_PUB_KEY, pub_key); in php_openssl_pkey_init_dsa()
4143 if (pub_key) { in php_openssl_pkey_init_dsa()
4167 BN_free(pub_key); in php_openssl_pkey_init_dsa()
4198 BIGNUM *pub_key, *priv_key_const_time; in php_openssl_dh_pub_from_priv() local
4201 pub_key = BN_new(); in php_openssl_dh_pub_from_priv()
4202 if (pub_key == NULL) { in php_openssl_dh_pub_from_priv()
4209 BN_free(pub_key); in php_openssl_dh_pub_from_priv()
4215 BN_free(pub_key); in php_openssl_dh_pub_from_priv()
4223 if (!BN_mod_exp_mont(pub_key, g, priv_key_const_time, p, ctx, NULL)) { in php_openssl_dh_pub_from_priv()
4224 BN_free(pub_key); in php_openssl_dh_pub_from_priv()
4226 pub_key = NULL; in php_openssl_dh_pub_from_priv()
4232 return pub_key; in php_openssl_dh_pub_from_priv()
4239 BIGNUM *p, *q, *g, *priv_key, *pub_key; in php_openssl_pkey_init_legacy_dh() local
4249 OPENSSL_PKEY_SET_BN(data, pub_key); in php_openssl_pkey_init_legacy_dh()
4251 if (pub_key) { in php_openssl_pkey_init_legacy_dh()
4252 return DH_set0_key(dh, pub_key, priv_key); in php_openssl_pkey_init_legacy_dh()
4255 pub_key = php_openssl_dh_pub_from_priv(priv_key, g, p); in php_openssl_pkey_init_legacy_dh()
4256 if (pub_key == NULL) { in php_openssl_pkey_init_legacy_dh()
4259 return DH_set0_key(dh, pub_key, priv_key); in php_openssl_pkey_init_legacy_dh()
4277 BIGNUM *p = NULL, *q = NULL, *g = NULL, *priv_key = NULL, *pub_key = NULL; in php_openssl_pkey_init_dh() local
4287 OPENSSL_PKEY_SET_BN(data, pub_key); in php_openssl_pkey_init_dh()
4302 if (!pub_key) { in php_openssl_pkey_init_dh()
4303 pub_key = php_openssl_dh_pub_from_priv(priv_key, g, p); in php_openssl_pkey_init_dh()
4304 if (!pub_key) { in php_openssl_pkey_init_dh()
4309 if (pub_key) { in php_openssl_pkey_init_dh()
4310 OSSL_PARAM_BLD_push_BN(bld, OSSL_PKEY_PARAM_PUB_KEY, pub_key); in php_openssl_pkey_init_dh()
4323 if (pub_key || priv_key) { in php_openssl_pkey_init_dh()
4347 BN_free(pub_key); in php_openssl_pkey_init_dh()
4765 zval *pub_key = zend_hash_str_find(Z_ARRVAL_P(data), "pub_key", sizeof("pub_key") - 1); in php_openssl_pkey_object_curve_25519_448() local
4766 if (pub_key && Z_TYPE_P(pub_key) == IS_STRING && Z_STRLEN_P(pub_key) > 0) { in php_openssl_pkey_object_curve_25519_448()
4767 …AM_BLD_push_octet_string(bld, OSSL_PKEY_PARAM_PUB_KEY, Z_STRVAL_P(pub_key), Z_STRLEN_P(pub_key))) { in php_openssl_pkey_object_curve_25519_448()
4778 if (pub_key || priv_key) { in php_openssl_pkey_object_curve_25519_448()
5301 const BIGNUM *p, *q, *g, *priv_key, *pub_key; in PHP_FUNCTION() local
5304 DSA_get0_key(dsa, &pub_key, &priv_key); in PHP_FUNCTION()
5311 OPENSSL_PKEY_GET_BN(z_dsa, pub_key); in PHP_FUNCTION()
5323 const BIGNUM *p, *q, *g, *priv_key, *pub_key; in PHP_FUNCTION() local
5326 DH_get0_key(dh, &pub_key, &priv_key); in PHP_FUNCTION()
5332 OPENSSL_PKEY_GET_BN(z_dh, pub_key); in PHP_FUNCTION()
5480 PHP_OPENSSL_CHECK_SIZE_T_TO_INT(pub_len, pub_key, 1); in PHP_FUNCTION()