Last active
September 2, 2016 15:49
-
-
Save snoj/4668f45c10afbf1cda5671b3e6e94c16 to your computer and use it in GitHub Desktop.
cer/key to pfx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//package up pem encoded certificate and key into a pfx (PKCS #12) file with your handy-dandy already installed php.exe. | |
$outpfx = "./out.pfx"; | |
$cert = openssl_x509_read(file_get_contents("./domain.cer")); | |
$privatekey = file_get_contents("./domain.key"); | |
$passphase = "somepass"; | |
openssl_pkcs12_export_to_file($cert, $outpfx, $privatekey, $passphrase); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment