note 61857 added to function.openssl-pkcs7-verify

From: Date: Tue, 14 Feb 2006 00:59:01 +0000
Subject: note 61857 added to function.openssl-pkcs7-verify
Groups: php.notes 
Request: Send a blank email to php-notes+get-103654@lists.php.net to get a copy of this message
There is a hidden sixth argument: string pointing to a file where the contents of the signed message should be saved. It is very important for verifying signed and encrypted messages from MS Outlook which uses opaque signing. After decrypting of message you will get another MIME envelope like this: MIME-Version: 1.0 Content-Disposition: attachment; filename="smime.p7m" Content-Type: application/x-pkcs7-mime; smime-type=signed-data; name="smime.p7m" Content-Transfer-Encoding: base64 MIIM/QYJ... Even if you use base64_decode() you will not get decrypted message but PKCS #7 object. BTW: How to create opaque signed message like from MS Outlook? Switch off PKCS7_DETACHED flag (the last 0 does it): openssl_pkcs7_sign( "full_path_to_message_file", "full_path_where_to_store_signed_message_file", "file://full_path_to_my_public_certificate.pem", array("file://full_path_to_my_private_key.pem", "password"), array(), 0 ); ---- Server IP: 64.246.30.37 Probable Submitter: 84.242.95.6 ---- Manual Page -- http://www.php.net/manual/en/function.openssl-pkcs7-verify.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+61857 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+61857&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+61857&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+61857&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+61857&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+61857&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+61857&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+61857&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+61857&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#103654) next »