mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Init OpenSSL libctx and use it for pkey (#18282)
This commit is contained in:
parent
905bba637a
commit
cb4bafa4c0
6 changed files with 111 additions and 25 deletions
|
@ -225,8 +225,15 @@ EVP_MD * php_openssl_get_evp_md_from_algo(zend_long algo);
|
|||
const EVP_CIPHER * php_openssl_get_evp_cipher_from_algo(zend_long algo);
|
||||
|
||||
void php_openssl_backend_init(void);
|
||||
void php_openssl_backend_init_common(void);
|
||||
void php_openssl_backend_gshutdown(void);
|
||||
void php_openssl_backend_shutdown(void);
|
||||
|
||||
#if PHP_OPENSSL_API_VERSION >= 0x30000
|
||||
void php_openssl_backend_init_libctx(OSSL_LIB_CTX **plibctx, char **ppropq);
|
||||
void php_openssl_backend_destroy_libctx(OSSL_LIB_CTX *libctx, char *propq);
|
||||
#endif
|
||||
|
||||
const char *php_openssl_get_conf_filename(void);
|
||||
|
||||
void php_openssl_set_cert_locations(zval *return_value);
|
||||
|
@ -273,10 +280,8 @@ struct php_openssl_pem_password {
|
|||
int len;
|
||||
};
|
||||
|
||||
int php_openssl_pem_password_cb(char *buf, int size, int rwflag, void *userdata);
|
||||
EVP_PKEY *php_openssl_pkey_from_zval(
|
||||
zval *val, int public_key, char *passphrase, size_t passphrase_len, uint32_t arg_num);
|
||||
int php_openssl_get_evp_pkey_type(int key_type);
|
||||
EVP_PKEY *php_openssl_generate_private_key(struct php_x509_request * req);
|
||||
void php_openssl_add_bn_to_array(zval *ary, const BIGNUM *bn, const char *name);
|
||||
|
||||
|
@ -296,15 +301,16 @@ void php_openssl_add_bn_to_array(zval *ary, const BIGNUM *bn, const char *name);
|
|||
} \
|
||||
} while (0);
|
||||
|
||||
EVP_PKEY_CTX *php_openssl_pkey_new_from_name(const char *name, int id);
|
||||
EVP_PKEY_CTX *php_openssl_pkey_new_from_pkey(EVP_PKEY *pkey);
|
||||
|
||||
EVP_PKEY *php_openssl_pkey_init_rsa(zval *data);
|
||||
EVP_PKEY *php_openssl_pkey_init_dsa(zval *data, bool *is_private);
|
||||
BIGNUM *php_openssl_dh_pub_from_priv(BIGNUM *priv_key, BIGNUM *g, BIGNUM *p);
|
||||
EVP_PKEY *php_openssl_pkey_init_dh(zval *data, bool *is_private);
|
||||
EVP_PKEY *php_openssl_pkey_init_ec(zval *data, bool *is_private);
|
||||
void php_openssl_pkey_object_curve_25519_448(zval *return_value, int key_type, zval *data);
|
||||
#if PHP_OPENSSL_API_VERSION >= 0x30000
|
||||
void php_openssl_pkey_object_curve_25519_448(zval *return_value, int key_type, zval *data);
|
||||
void php_openssl_pkey_object_curve_25519_448(zval *return_value, const char *name, zval *data);
|
||||
#endif
|
||||
zend_long php_openssl_pkey_get_details(zval *return_value, EVP_PKEY *pkey);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue