We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I was having an issue when executing the line: $salida = shell_exec('openssl x509 -in '.$nombreCerPem.' -noout -enddate 2>&1');
displaying the error: unable to load certificate 37410:error:0906D06C:PEM routines:PEM_read_bio:no start line:/BuildRoot/Library/Caches/com.apple.xbs/Sources/OpenSSL098/OpenSSL098-59/src/crypto/pem/pem_lib.c:648:Expecting: TRUSTED CERTIFICATE
I change it for: $salida = shell_exec('openssl x509 -text -inform DER -in '.$nombreCerPem); //var_dump($salida); $fecha=substr($salida, strpos($salida, "Not Before:")+strlen("Not Before:")); $fecha=substr($fecha, 0, strpos($fecha, "\n")); $fecha=strtotime($fecha); if(!empty($fecha)){ echo(date("Y-m-d",$fecha)); //$this->_estableceError(1, null, array('fecha' => $fecha)); }else { echo('No se logro obtener la fecha de inicio del certificado'); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I was having an issue when executing the line:
$salida = shell_exec('openssl x509 -in '.$nombreCerPem.' -noout -enddate 2>&1');
displaying the error:
unable to load certificate
37410:error:0906D06C:PEM routines:PEM_read_bio:no start line:/BuildRoot/Library/Caches/com.apple.xbs/Sources/OpenSSL098/OpenSSL098-59/src/crypto/pem/pem_lib.c:648:Expecting: TRUSTED CERTIFICATE
I change it for:
$salida = shell_exec('openssl x509 -text -inform DER -in '.$nombreCerPem);
//var_dump($salida);
$fecha=substr($salida, strpos($salida, "Not Before:")+strlen("Not Before:"));
$fecha=substr($fecha, 0, strpos($fecha, "\n"));
$fecha=strtotime($fecha);
if(!empty($fecha)){
echo(date("Y-m-d",$fecha));
//$this->_estableceError(1, null, array('fecha' => $fecha));
}else {
echo('No se logro obtener la fecha de inicio del certificado');
}
The text was updated successfully, but these errors were encountered: