php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #50482 openssl_pkcs7_verify error:0D06B08E
Submitted: 2009-12-15 15:55 UTC Modified: 2009-12-23 16:29 UTC
From: brubla at seznam dot cz Assigned: kalle (profile)
Status: Closed Package: Documentation problem
PHP Version: 5.2.11 OS: Windows Vista
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: brubla at seznam dot cz
New email:
PHP Version: OS:

 

 [2009-12-15 15:55 UTC] brubla at seznam dot cz
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


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-12-23 16:29 UTC] svn@php.net
Automatic comment from SVN on behalf of kalle
Revision: http://svn.php.net/viewvc/?view=revision&revision=292546
Log: Fixed bug #50482 (openssl_pkcs7_verify error:0D07B08E)
 [2009-12-23 16:29 UTC] kalle@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 [2020-02-07 06:09 UTC] phpdocbot@php.net
Automatic comment on behalf of kalle
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=2529ec6b15b7a01c9b9c414864333a1e34c30250
Log: Fixed bug #50482 (openssl_pkcs7_verify error:0D07B08E)
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 15 01:01:35 2025 UTC