Skip to content

Commit 1d3f224

Browse files
committed
HSM: export php_openssl_pkey_from_zval()
Let's export it in order to design some calls from xp_ssl.c
1 parent 874cfc0 commit 1d3f224

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

ext/openssl/openssl.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,6 @@ struct php_x509_request { /* {{{ */
516516
static X509 *php_openssl_x509_from_param(zend_object *cert_obj, zend_string *cert_str);
517517
static X509 *php_openssl_x509_from_zval(zval *val, bool *free_cert);
518518
static X509_REQ *php_openssl_csr_from_param(zend_object *csr_obj, zend_string *csr_str);
519-
static EVP_PKEY *php_openssl_pkey_from_zval(zval *val, int public_key, char *passphrase, size_t passphrase_len);
520519

521520
static int php_openssl_is_private_key(EVP_PKEY* pkey);
522521
static X509_STORE * php_openssl_setup_verify(zval * calist);
@@ -3478,7 +3477,7 @@ static int php_openssl_pem_password_cb(char *buf, int size, int rwflag, void *us
34783477
}
34793478
/* }}} */
34803479

3481-
static EVP_PKEY *php_openssl_pkey_from_zval(zval *val, int public_key, char *passphrase, size_t passphrase_len)
3480+
EVP_PKEY *php_openssl_pkey_from_zval(zval *val, int public_key, char *passphrase, size_t passphrase_len)
34823481
{
34833482
EVP_PKEY *key = NULL;
34843483
X509 *cert = NULL;

ext/openssl/php_openssl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ PHP_OPENSSL_API zend_string* php_openssl_decrypt(
108108
const char *iv, size_t iv_len,
109109
const char *tag, zend_long tag_len,
110110
const char *aad, size_t aad_len);
111+
PHP_OPENSSL_API EVP_PKEY *php_openssl_pkey_from_zval(zval *val, int public_key,
112+
char *passphrase, size_t passphrase_len);
111113

112114
/* OpenSSLCertificate class */
113115

0 commit comments

Comments
 (0)