I have a PKCS7 signature, which I
parsed content parsed from pks Can I get - Notify DER-in signature.pkcs7-print_certs -text
but how to get the same output with PHP openssl functions?
Edit I succeeded in creating a correct PEM file with the following function:
function der2pem ($ der_data, $ type = "certificate") {$ pem = Chunk_split (base64_encode ($ der_data), 64, "\ n"); $ Pem = "----- BEGIN $ type ----- \ n". $ Pem "----- END $ type ----- \ n"; Refund $ PEM; } $ Data = der2pem ($ der_data, "PKCS7);
But I have not been able to parse the data with any of the tasks mentioned in the PHP manual. / P>
openssl pkcs7 -informs PEM-in signature.pkcs7 -print_certs -text
No comments:
Post a Comment