I use pkcs7 to sign the document, and everything works fine, the problem is that the command to check the character does not work, always returns false. I am trying to use a terminal command in a file and it works fine.
Sign the command:
openssl_pkcs7_sign( $tempdoc, $tempsign, $this->signature_data['signcert'], array($this->signature_data['privkey'], $this->signature_data['password']), array(), PKCS7_BINARY | PKCS7_DETACHED);
Check command:
openssl_pkcs7_verify($tempsign, PKCS7_NOVERIFY)
Terminal command:
openssl pkcs7 -inform DER -in signature.pkcs7 -print_certs -text
EDIT 1
I do tests in my code and find that I only create my character with PKCS7_DETACHED or PKCS7_BINARY, it works fine, but I get an error message together. Why is this happening?
php php-openssl pkcs # 7
Pedro soares
source share