note 89083 added to function.openssl-csr-sign
| From: | KaiSellgren at osu1 dot php dot net | Date: | Fri, 20 Feb 2009 19:05:33 +0000 |
| Subject: | note 89083 added to function.openssl-csr-sign | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-150903@lists.php.net to get a copy of this message | ||
You can use file_get_contents() to directly pass the content instead of giving file paths.
Also, if you get an error "sec_error_reused_issuer_and_serial", put a serial into the last
parameter:
<?php
$privkey = array(file_get_contents('ca.key'),"your_ca_key_passphrase");
$usercert = openssl_csr_sign($csrdata,
file_get_contents('ca.crt'),$privkey,365,NULL,'06');
openssl_x509_export($usercert,$certout);
file_put_contents('serverCASigned.crt',$certout);
?>
In that above example the serial was "06".
----
Server IP: 62.237.7.3
Probable Submitter: 81.175.154.102
----
Manual Page -- http://www.php.net/manual/en/function.openssl-csr-sign.php
Edit -- https://master.php.net/note/edit/89083
Del: integrated -- https://master.php.net/note/delete/89083/integrated
Del: useless -- https://master.php.net/note/delete/89083/useless
Del: bad code -- https://master.php.net/note/delete/89083/bad+code
Del: spam -- https://master.php.net/note/delete/89083/spam
Del: non-english -- https://master.php.net/note/delete/89083/non-english
Del: in docs -- https://master.php.net/note/delete/89083/in+docs
Del: other reasons-- https://master.php.net/note/delete/89083
Reject -- https://master.php.net/note/reject/89083
Search -- https://master.php.net/manage/user-notes.php