Ver Mensaje Individual
  #1243  
Antiguo 06-08-2021
aflores1 aflores1 is offline
Miembro
 
Registrado: jul 2021
Posts: 12
Reputación: 0
aflores1 Va por buen camino
pasar pfx a pem php

En php como habeis conseguido pasar el certificado de pfx a pem?¿

Lo estoy intentado de esta forma pero me da error luego el servicio

Código PHP:
function ConvertirCertificadoPEM($certificado,$pass){
    
$rutaCertPem CERTPEM;
    if(!
file_exists($rutaCertPem)){   
    
$res = [];
    
$openSSL openssl_pkcs12_read($certificado$respass);
    if(!
$openSSL) {
        echo 
"Error: ".openssl_error_string();
    }

    
$cert $res['cert'].implode(''$res['extracerts']);
    
file_put_contents($rutaCertPem$cert);
    return 
$rutaCertPem
Responder Con Cita