|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-12-23 16:29 UTC] svn@php.net
[2009-12-23 16:29 UTC] kalle@php.net
[2020-02-07 06:09 UTC] phpdocbot@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 07 00:00:01 2025 UTC |
Description: ------------ When message.eml contains row longer than 76 characters, it generates error. message.eml example: Content-Type: application/x-pkcs7-mime; name=smime.p7m; smime-type=signed-data Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7m" Content-Description: S/MIME Cryptographic Signed Data MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAaCAJIAEggPoQ29u ... AJLxjYfEXR/ltNihtpCr9LQLxH02OBbE8YuhZuOpOeZ6mf+yqgD2AnFuEV0pdX8GTHY+KTe56yzU 2DnMC/2+kWQxs0wz+z/EEluGH+MEIplh1UFiLc/zn6DHbzBORTZNWd94aJzHFyQw50RK3hAw3uLjAAAA AAAA If the last row is fixed: 2DnMC/2+kWQxs0wz+z/EEluGH+MEIplh1UFiLc/zn6DHbzBORTZNWd94aJzHFyQw50RK3hAw3uLj AAAA AAAA everything is ok. Maybe not an error because message is against RFC 2045 which specifies base64 76 character row. But messages like this exists and at least good to mention it in documentation. Reproduce code: --------------- openssl_pkcs7_verify( 'message.eml' PKCS7_NOVERIFY, 'certificate.pem', array('some_ca_certficates') 'some_ca_certficate', 'content.eml' ); Actual result: -------------- openssl_error_string() returns: error:0D06B08E:asn1 encoding routines:ASN1_D2I_READ_BIO:not enough data error:21078082:PKCS7 routines:B64_READ_PKCS7:decode error error:2107A08B:PKCS7 routines:SMIME_read_PKCS7:pkcs7 parse error