note 115037 added to function.openssl-pkcs12-export
| From: | Robert | Date: | Thu, 15 May 2014 17:36:52 +0000 |
| Subject: | note 115037 added to function.openssl-pkcs12-export | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-199546@lists.php.net to get a copy of this message | ||
If you need to provide multiple additional certificates, the 'extracerts' argument needs
to be an array with one certificate per element:
<?php
$args = array(
'extracerts' => array(
0 => '-----BEGIN CERTIFICATE----- cert1 ...',
1 => '-----BEGIN CERTIFICATE----- cert2 ...',
// ...
)
);
?>
You can use this to prepare a PEM.
<?php
$pemChain = '...';
preg_match_all('/(-----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE-----)/si', $pemChain,
$matches);
$args = array('extracerts' => $matches[0]);
openssl_pkcs12_export($signed_csr, $cerificate_out, $private_key_resource, $passphrase, $args);
?>
----
Server IP: 147.32.160.17
Probable Submitter: 165.72.200.11
----
Manual Page -- http://php.net/manual/en/function.openssl-pkcs12-export.php
Edit -- https://master.php.net/note/edit/115037
Del: integrated -- https://master.php.net/note/delete/115037/integrated
Del: useless -- https://master.php.net/note/delete/115037/useless
Del: bad code -- https://master.php.net/note/delete/115037/bad+code
Del: spam -- https://master.php.net/note/delete/115037/spam
Del: non-english -- https://master.php.net/note/delete/115037/non-english
Del: in docs -- https://master.php.net/note/delete/115037/in+docs
Del: other reasons-- https://master.php.net/note/delete/115037
Reject -- https://master.php.net/note/reject/115037
Search -- https://master.php.net/manage/user-notes.php