php - Having trouble with openssl_x509_parse() function -
i'm having trouble openssl_x509_parse() function
$parsed_cert = openssl_x509_parse(file_get_contents('/home/my_location/aaa010101aaa__csd_01.cer'));
the function returning false , i'm unsure reasons. maybe certificate file must in .pem
or .crt
?
edit: code ok, format of file issue, had transform .crt .cer original.
after seeing example manual page, code seems fine. problem may in file_get_contents.
please try following , check if file valid.
$file = file_get_contents('/home/my_location/aaa010101aaa__csd_01.cer'); $parsed_cert = openssl_x509_parse($file);
now check file. exists or valid certificate file?
Comments
Post a Comment