Lines Matching refs:priv_key
178 ZEND_ARG_INFO(0, priv_key)
186 ZEND_ARG_INFO(0, priv_key)
212 ZEND_ARG_INFO(0, priv_key)
613 static void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) in DH_get0_key() argument
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
622 dh->priv_key = priv_key; in DH_set0_key()
643 static void DSA_get0_key(const DSA *d, const BIGNUM **pub_key, const BIGNUM **priv_key) in DSA_get0_key() argument
646 *priv_key = d->priv_key; in DSA_get0_key()
649 int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key) in DSA_set0_key() argument
652 d->priv_key = priv_key; in DSA_set0_key()
786 EVP_PKEY * priv_key; member
1163 if (req->priv_key) { in php_openssl_dispose_config()
1164 EVP_PKEY_free(req->priv_key); in php_openssl_dispose_config()
1165 req->priv_key = NULL; in php_openssl_dispose_config()
2627 EVP_PKEY *priv_key = NULL; in PHP_FUNCTION() local
2642 priv_key = php_openssl_evp_from_zval(zpkey, 0, "", 0, 1, &keyresource); in PHP_FUNCTION()
2643 if (priv_key == NULL) { in PHP_FUNCTION()
2647 if (!X509_check_private_key(cert, priv_key)) { in PHP_FUNCTION()
2670 p12 = PKCS12_create(pass, friendly_name, priv_key, cert, ca, 0, 0, 0, 0, 0); in PHP_FUNCTION()
2688 if (keyresource == NULL && priv_key) { in PHP_FUNCTION()
2689 EVP_PKEY_free(priv_key); in PHP_FUNCTION()
2706 EVP_PKEY *priv_key = NULL; in PHP_FUNCTION() local
2724 priv_key = php_openssl_evp_from_zval(zpkey, 0, "", 0, 1, &keyresource); in PHP_FUNCTION()
2725 if (priv_key == NULL) { in PHP_FUNCTION()
2729 if (!X509_check_private_key(cert, priv_key)) { in PHP_FUNCTION()
2742 p12 = PKCS12_create(pass, friendly_name, priv_key, cert, ca, 0, 0, 0, 0, 0); in PHP_FUNCTION()
2761 if (keyresource == NULL && priv_key) { in PHP_FUNCTION()
2762 EVP_PKEY_free(priv_key); in PHP_FUNCTION()
3028 X509_REQ_set_pubkey(csr, req->priv_key); in php_openssl_make_REQ()
3180 EVP_PKEY * key = NULL, *priv_key = NULL; in PHP_FUNCTION() local
3203 priv_key = php_openssl_evp_from_zval(zpkey, 0, "", 0, 1, &keyresource); in PHP_FUNCTION()
3204 if (priv_key == NULL) { in PHP_FUNCTION()
3208 if (cert && !X509_check_private_key(cert, priv_key)) { in PHP_FUNCTION()
3272 if (!X509_sign(new_cert, priv_key, req.digest)) { in PHP_FUNCTION()
3288 if (keyresource == NULL && priv_key) { in PHP_FUNCTION()
3289 EVP_PKEY_free(priv_key); in PHP_FUNCTION()
3327 req.priv_key = php_openssl_evp_from_zval(out_pkey, 0, NULL, 0, 0, &key_resource); in PHP_FUNCTION()
3328 if (req.priv_key != NULL) { in PHP_FUNCTION()
3332 if (req.priv_key == NULL) { in PHP_FUNCTION()
3335 if (req.priv_key == NULL) { in PHP_FUNCTION()
3354 if (X509_REQ_sign(csr, req.priv_key, req.digest)) { in PHP_FUNCTION()
3364 ZVAL_RES(out_pkey, zend_register_resource(req.priv_key, le_key)); in PHP_FUNCTION()
3365 req.priv_key = NULL; /* make sure the cleanup code doesn't zap it! */ in PHP_FUNCTION()
3367 req.priv_key = NULL; /* make sure the cleanup code doesn't zap it! */ in PHP_FUNCTION()
3374 req.priv_key = NULL; in PHP_FUNCTION()
3682 if ((req->priv_key = EVP_PKEY_new()) != NULL) { in php_openssl_generate_private_key()
3705 if (rsaparam && EVP_PKEY_assign_RSA(req->priv_key, rsaparam)) { in php_openssl_generate_private_key()
3706 return_val = req->priv_key; in php_openssl_generate_private_key()
3718 if (EVP_PKEY_assign_DSA(req->priv_key, dsaparam)) { in php_openssl_generate_private_key()
3719 return_val = req->priv_key; in php_openssl_generate_private_key()
3737 if (EVP_PKEY_assign_DH(req->priv_key, dhparam)) { in php_openssl_generate_private_key()
3738 return_val = req->priv_key; in php_openssl_generate_private_key()
3755 EVP_PKEY_free(req->priv_key); in php_openssl_generate_private_key()
3756 req->priv_key = NULL; in php_openssl_generate_private_key()
3796 const BIGNUM *p, *q, *g, *pub_key, *priv_key; in php_openssl_is_private_key() local
3803 DSA_get0_key(dsa, &pub_key, &priv_key); in php_openssl_is_private_key()
3804 if (priv_key == NULL) { in php_openssl_is_private_key()
3816 const BIGNUM *p, *q, *g, *pub_key, *priv_key; in php_openssl_is_private_key() local
3823 DH_get0_key(dh, &pub_key, &priv_key); in php_openssl_is_private_key()
3824 if (priv_key == NULL) { in php_openssl_is_private_key()
3908 BIGNUM *p, *q, *g, *priv_key, *pub_key; in php_openssl_pkey_init_dsa() local
3919 OPENSSL_PKEY_SET_BN(data, priv_key); in php_openssl_pkey_init_dsa()
3921 return DSA_set0_key(dsa, pub_key, priv_key); in php_openssl_pkey_init_dsa()
3942 static BIGNUM *php_openssl_dh_pub_from_priv(BIGNUM *priv_key, BIGNUM *g, BIGNUM *p) in php_openssl_dh_pub_from_priv() argument
3964 BN_with_flags(priv_key_const_time, priv_key, BN_FLG_CONSTTIME); in php_openssl_dh_pub_from_priv()
3981 BIGNUM *p, *q, *g, *priv_key, *pub_key; in php_openssl_pkey_init_dh() local
3990 OPENSSL_PKEY_SET_BN(data, priv_key); in php_openssl_pkey_init_dh()
3993 return DH_set0_key(dh, pub_key, priv_key); in php_openssl_pkey_init_dh()
3995 if (priv_key) { in php_openssl_pkey_init_dh()
3996 pub_key = php_openssl_dh_pub_from_priv(priv_key, g, p); in php_openssl_pkey_init_dh()
4000 return DH_set0_key(dh, pub_key, priv_key); in php_openssl_pkey_init_dh()
4085 RETVAL_RES(zend_register_resource(req.priv_key, le_key)); in PHP_FUNCTION()
4087 req.priv_key = NULL; in PHP_FUNCTION()
4375 const BIGNUM *p, *q, *g, *priv_key, *pub_key; in PHP_FUNCTION() local
4378 DSA_get0_key(dsa, &pub_key, &priv_key); in PHP_FUNCTION()
4384 OPENSSL_PKEY_GET_BN(z_dsa, priv_key); in PHP_FUNCTION()
4397 const BIGNUM *p, *q, *g, *priv_key, *pub_key; in PHP_FUNCTION() local
4400 DH_get0_key(dh, &pub_key, &priv_key); in PHP_FUNCTION()
4405 OPENSSL_PKEY_GET_BN(z_dh, priv_key); in PHP_FUNCTION()