Access certificate private key from PHP, certificate key stored in windows certificate store
We have an requirement to make SOAP calls using certificates in our PHP application, we need a way to read the private key stored in windows certificate store. The environment comprises of windows开发者_开发问答 2008 R2, IIS 7.
Whats our best option for the same?
You can export the encrypted, password protected, certificate from Windows, convert it to a format that PHP can read, and leave it on the web server where PHP is running.
PHP can read RSA encrypted (base 64 encoded) X.509 certificates and private keys.
Check out http://php.net/manual/en/function.openssl-private-decrypt.php.
I've done this in the past.
精彩评论