note 111336 added to function.openssl-pkcs7-sign
| From: | Anonymous | Date: | Fri, 08 Feb 2013 16:35:08 +0000 |
| Subject: | note 111336 added to function.openssl-pkcs7-sign | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-193559@lists.php.net to get a copy of this message | ||
A note about the $flags parameter: PKCS7_BINARY has 2 effects:
* converts LF to CR+LF, as described in http://www.php.net/manual/en/openssl.pkcs7.flags.php
* it creates an opaque pkcs7 signature (p7m)
If you want to prevent the LF->CR+LF conversion *and* still have a detached signature (p7s), use
PKCS7_BINARY | PKCS7_DETACHED (both flags are set).
If the signed message is already MIME multi-part, using both flags as described above seems to be
the right solution to assemble the message properly. Without any flags, apparently only some of the
LF characters are converted. In a specific scenario (the local MTA is Postfix and then the message
goes through sendmail on another machine), the MIME boundaries get scrambled in sendmail. However,
this doesn't seem to happen if the local MTA is sendmail.
----
Server IP: 69.147.83.199
Probable Submitter: 83.166.214.174
----
Manual Page -- http://php.net/manual/en/function.openssl-pkcs7-sign.php
Edit -- https://master.php.net/note/edit/111336
Del: integrated -- https://master.php.net/note/delete/111336/integrated
Del: useless -- https://master.php.net/note/delete/111336/useless
Del: bad code -- https://master.php.net/note/delete/111336/bad+code
Del: spam -- https://master.php.net/note/delete/111336/spam
Del: non-english -- https://master.php.net/note/delete/111336/non-english
Del: in docs -- https://master.php.net/note/delete/111336/in+docs
Del: other reasons-- https://master.php.net/note/delete/111336
Reject -- https://master.php.net/note/reject/111336
Search -- https://master.php.net/manage/user-notes.php