简体   繁体   中英

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM