Estoy utilizando este codigo para generar certificados:
Código PHP:
Ver original
<?php $CA_CERT = "file://ca.crt"; "countryName" => "DE", "stateOrProvinceName" => "Frankfurt", "organizationName" => "smcc.net", "organizationalUnitName" => "E-Mail", "commonName" => "Testcert" ); echo "$out_key\n"; echo "$out_cert\n"; } else echo "Failed Cert\n"; } else echo "FailedKey\n"; ?>
Y me genera esto:
-----BEGIN RSA PRIVATE KEY----- MIICXwIBAAKBgQDSPowjp8jiuv3lz15XNah4asEv8041nrOWjb kG78hr8G25gAYS Ra5vZfwkfw/KmiyfdqifMGLbRhKxcWxU1WqAmNvCsebWBGMqJVjSV2DjeuwyO XaZ gubFsxTNBhLA0fa/Sa6AjKR9xgwjFF6AOfHEqTzQKfOpkMy5iwLVnhQAfwIDAQAB AoGBAMw9KMRGbVcckiOapCoSHTwFcPCU6mgaaJmbyZ/cdhWtddobbUp42LCtIRmP OZb22Nx8V+h1B8O9udEYv0VWIWNSuuIrO9viiGUAw3gKX1arUY 7izc75v/Yxybbr aimAKU1xUekCjpByt1iwTBrQQSzU0VJ/TO8Mu3ZkoiFypgqJAkEA7Z9HcyeRQU1/ 7wxOFFA5j1h4AkXyxbpCpXs/cH4Zh/ce2ZT6cD6xNebnXnELBX2pU21/EZ/kHNFs otkBA21EEwJBAOKBNacBN6LCIB7i7snH3dVU6vYXK7udLIJV0M/J/jXzTL3F2kL0 Au42887GQp1ZxMEHy467uNYa7vmObLmp52UCQQDJGYu2gT4FLj mfbaKGvn54Oj8W bWxQupm8wtmlspKY5yNMsTBh3izLmWcmHjVdqEOtP3XSzKaZXQ O7rjuVUtvRAkEA gyO8JI0X4Svz3O4WwsztKu6XexO/Rkih1HRLCYMxo5rR+63pyInuiG1Yi4dOWjv3 JquUt3cIdS3y3poPaQ9t4QJBALVn0ASE8EtgVx7/GyxqlJfTuukbRd7C0GKBZCN0 Djg1gbU3Fsf4LSlHey5bR6m9gBLGM9dO6O+UP//iVbxt3Rw= -----END RSA PRIVATE KEY----- -----BEGIN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uzAOC/qqdXk028OxWEPfD4Doi2vj1kZ2s 7aCocx4SAPDrWJ/3wkMf5z1S4WdYO9gQVs96Hs0V14FJYA7k+vy4R/HHqW1FxRzK s6RoFRDTuEPfeTVtKc0lY/+UOk5LvyDOtQkEeZiknVeVz3ShXs/46BrMg+SlWCen s37LxsN1m7MCD11TagpkoDWLnn3M632+bv2brqO/HE5wCQqeKx8znGefZP3UQ/By i8Zz2fDEvxnRrtxaFwc6aOF79lrTaeRAAaO/zDTFvW4+0yeDHbhmHNWj3irFaq5w WBbji2yIWoCNiN5oa05zndZgf6UZuWD2Dc1r0B/G0JPBkJeMw7xHz3Y79wlAe/uj I4HpkDFOG1NRQ/agMAJm6sFYTvZoMyh2IVrJjZtPPQJpLVTNB1EiioXGuvZQyruZ MdvTFCs8nulmeB8m3hlkIRCXIe4JYseruW5lL9k5WkRymI7HwB v+FgNGF93xRmEc GMGnRucG+pH5knnLEVGax00yViByTbvGOuBjkTJQq5xDzewn9g XwGTpt5cmTnvIN VitaKWelZ9oIujbjvNjhX3trx9buFYFLU3QzvVuFtKhVKApWig == -----END CERTIFICATE-----
pero cuando copio el certificado a un archivo .crt o .pem no me lo muestra.
Cómo si no estuviera firmado o .. algo..
Debe ser que algo mal está en código. Alguna idea?