|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2015-09-09 23:13 UTC] philip@php.net
  [2015-09-09 23:14 UTC] philip@php.net
 
-Status:      Open
+Status:      Closed
-Assigned To:
+Assigned To: philip
  [2015-09-09 23:14 UTC] philip@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 18:00:01 2025 UTC | 
Description: ------------ Hi, First time user of openssl_pkcs12_read() here. Having "_read()" in the function name implied to me that this function actually reads the file, which I believe is consistent with other PHP functions containing "_read()". I got caught troubleshooting this function for a white until googling and finding other developers with the same issue. Indeed, openssl_pkcs12_read() doesn't actually read the file, but must be provided with the contents of the key file as the first parameter. I was attempting to use it like this: openssl_pkcs12_read('/path/to/cert.p12', $certs, 'mypassphrase'); But it actually expected this: $cert = file_get_contents('/path/to/cert.p12'); openssl_pkcs12_read($cert, $certs, 'mypassphrase'); On the documentation page (http://php.net/manual/en/function.openssl-pkcs12-read.php), the first parameter is lacking any notes. While it does specify type String, it's not clear that it was not expecting a string path to the certificate file. It would have saved me some time if this was explained. Thanks for reading!