<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Fatal error: Cannot use string offset as an array in lib/Horde/Crypt/smime.php on line 770</title> 
  <pubDate>Wed, 08 Apr 2026 17:39:00 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/8751</link> 
  <atom:link rel="self" type="application/rss+xml" title="Fatal error: Cannot use string offset as an array in lib/Horde/Crypt/smime.php on line 770" href="https://bugs.horde.org/ticket/8751/rss" /> 
  <description>Fatal error: Cannot use string offset as an array in lib/Horde/Crypt/smime.php on line 770</description> 
 
   
   
  <item> 
   <title>When trying to read S/MIME-encrypted or signed messages I ca</title> 
   <description>When trying to read S/MIME-encrypted or signed messages I cannot read them at all in single message mode - I get only a blank screen.  When I select the message for multiple message view mode I get the above error.  It happens regardless of whether I&#039;ve got the sender&#039;s public certificate imported.

I get a similar error when attempting to view my own public key.

Here&#039;s a sample message that demonstrates the issue:

Certificate:
    Data:
        Version: 1 (0x0)
        Serial Number:
            82:21:04:c2:9d:04:1d:1a
        Signature Algorithm: sha1WithRSAEncryption
        Issuer: C=US, ST=Massachusetts, L=Brighton, O=Michelle Yaiser, CN=Michelle Yaiser/emailAddress=myaiser@mac.com
        Validity
            Not Before: Dec  4 20:29:06 2009 GMT
            Not After : Jan  3 20:29:06 2010 GMT
        Subject: C=US, ST=Massachusetts, L=Brighton, O=Michelle Yaiser, CN=Michelle Yaiser/emailAddress=myaiser@mac.com
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
            RSA Public Key: (2048 bit)
                Modulus (2048 bit):
                    00:c0:6e:59:64:84:f9:3a:2a:d2:c9:78:bc:01:73:
                    d3:c7:6b:85:7f:9a:88:17:38:dd:19:a8:13:79:58:
                    8d:e4:f0:ce:10:cc:79:ab:f5:0a:97:3f:78:f7:ad:
                    2d:3d:39:79:4f:6b:5d:26:21:2e:cc:77:c5:04:da:
                    a2:c2:79:40:97:0a:2f:e3:17:e9:27:22:4d:a2:16:
                    b7:93:00:e5:16:81:9a:c6:e8:d3:3d:9d:1a:36:21:
                    dd:bc:f5:c3:c2:fd:83:21:ed:19:ff:46:ac:e5:e7:
                    e9:79:94:10:aa:50:fc:9a:23:93:78:fa:b0:c3:e7:
                    43:4e:8b:3d:6c:0b:9f:60:dd:77:29:09:f8:f0:94:
                    96:bd:59:f9:5c:0a:f3:74:a4:29:2b:93:61:d8:ab:
                    94:e5:be:43:41:b9:2a:fc:37:70:d2:4d:c3:f5:53:
                    a5:e5:85:04:ed:07:75:01:5a:56:ba:38:0c:24:06:
                    f6:1b:04:01:df:71:53:32:f7:b6:d3:51:21:b2:f8:
                    7d:14:13:43:a2:07:69:ef:88:d3:c3:54:15:28:f8:
                    40:81:ff:65:24:be:3d:ab:91:97:d9:81:e9:07:b5:
                    45:22:60:29:09:c4:7c:21:f1:bf:e7:b5:bf:c5:5e:
                    6b:95:9d:8a:f2:74:62:2f:ba:7c:e8:60:92:3c:c7:
                    dc:b7
                Exponent: 65537 (0x10001)
    Signature Algorithm: sha1WithRSAEncryption
        b6:1e:8f:03:aa:ee:b9:b5:f2:47:fc:0b:4e:65:14:46:27:c8:
        53:bc:52:02:29:a0:8d:65:2c:16:c8:3f:a8:64:e5:1f:7e:65:
        05:2b:20:10:e2:cf:2e:cc:ad:5f:09:7e:8c:e2:d9:b0:bf:de:
        8f:1f:06:b5:d7:f5:d1:e9:3f:9c:44:c6:c4:f9:73:f4:8a:d9:
        d0:d3:5a:0c:0c:bf:50:76:bf:ff:5c:54:70:0d:a1:3e:9a:b4:
        fc:8d:79:6e:00:a0:f2:59:6b:ef:f5:33:8a:33:f0:47:f9:f3:
        98:81:83:99:d8:00:7e:00:47:8e:dc:51:cd:70:d5:55:40:50:
        c2:ab:ce:2f:66:07:3d:a5:37:bb:6b:91:bb:59:50:e7:59:de:
        29:61:bf:fb:1d:6f:84:df:9d:b9:b9:db:11:dc:01:dd:79:0c:
        2c:4e:86:f6:6f:ea:f4:c1:97:b2:7a:43:32:86:e8:d8:06:73:
        5f:cf:61:f8:98:63:69:e6:b2:af:94:8f:b7:c5:65:e7:3f:22:
        6f:02:03:0b:2d:a5:78:d6:4c:ff:61:89:e9:37:e5:f4:da:64:
        d6:51:f2:f2:b5:8b:5a:a6:6e:5d:f6:03:a5:a9:c3:62:fe:d8:
        17:cd:c7:97:8d:e7:24:a0:d6:9f:38:60:1f:be:4f:38:ee:4a:
        24:c2:a3:ae
-----BEGIN CERTIFICATE-----
MIIDljCCAn4CCQCCIQTCnQQdGjANBgkqhkiG9w0BAQUFADCBjDELMAkGA1UEBhMC
VVMxFjAUBgNVBAgTDU1hc3NhY2h1c2V0dHMxETAPBgNVBAcTCEJyaWdodG9uMRgw
FgYDVQQKEw9NaWNoZWxsZSBZYWlzZXIxGDAWBgNVBAMTD01pY2hlbGxlIFlhaXNl
cjEeMBwGCSqGSIb3DQEJARYPbXlhaXNlckBtYWMuY29tMB4XDTA5MTIwNDIwMjkw
NloXDTEwMDEwMzIwMjkwNlowgYwxCzAJBgNVBAYTAlVTMRYwFAYDVQQIEw1NYXNz
YWNodXNldHRzMREwDwYDVQQHEwhCcmlnaHRvbjEYMBYGA1UEChMPTWljaGVsbGUg
WWFpc2VyMRgwFgYDVQQDEw9NaWNoZWxsZSBZYWlzZXIxHjAcBgkqhkiG9w0BCQEW
D215YWlzZXJAbWFjLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
AMBuWWSE+Toq0sl4vAFz08drhX+aiBc43RmoE3lYjeTwzhDMeav1Cpc/ePetLT05
eU9rXSYhLsx3xQTaosJ5QJcKL+MX6SciTaIWt5MA5RaBmsbo0z2dGjYh3bz1w8L9
gyHtGf9GrOXn6XmUEKpQ/Jojk3j6sMPnQ06LPWwLn2DddykJ+PCUlr1Z+VwK83Sk
KSuTYdirlOW+Q0G5Kvw3cNJNw/VTpeWFBO0HdQFaVro4DCQG9hsEAd9xUzL3ttNR
IbL4fRQTQ6IHae+I08NUFSj4QIH/ZSS+PauRl9mB6Qe1RSJgKQnEfCHxv+e1v8Ve
a5WdivJ0Yi+6fOhgkjzH3LcCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAth6PA6ru
ubXyR/wLTmUURifIU7xSAimgjWUsFsg/qGTlH35lBSsgEOLPLsytXwl+jOLZsL/e
jx8Gtdf10ek/nETGxPlz9IrZ0NNaDAy/UHa//1xUcA2hPpq0/I15bgCg8llr7/Uz
ijPwR/nzmIGDmdgAfgBHjtxRzXDVVUBQwqvOL2YHPaU3u2uRu1lQ51neKWG/+x1v
hN+dubnbEdwB3XkMLE6G9m/q9MGXsnpDMobo2AZzX89h+Jhjaeayr5SPt8Vl5z8i
bwIDCy2leNZM/2GJ6Tfl9Npk1lHy8rWLWqZuXfYDpanDYv7YF83Hl43nJKDWnzhg
H75POO5KJMKjrg==
-----END CERTIFICATE-----</description> 
   <pubDate>Fri, 04 Dec 2009 21:47:20 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8751#t57007</link> 
  </item> 
   
  <item> 
   <title>Apologies for my copy-and-paste error.  That&#039;s the submitter</title> 
   <description>Apologies for my copy-and-paste error.  That&#039;s the submitter&#039;s public certificate in the description.

Below is a sample message signed with that certificate.

From myaiser@mac.com  Fri Dec  4 16:41:38 2009
Return-Path: &lt;myaiser@mac.com&gt;
X-Spam-Checker-Version: SpamAssassin 3.2.1-gr1 (2007-05-02) on
        omicron.boston22.com
X-Spam-Level:
X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham
        version=3.2.1-gr1
X-Original-To: medawson@boston22.com
Delivered-To: medawson@boston22.com
Received: by omicron.boston22.com (Postfix, from userid 65534)
        id C0A1832582C7; Fri,  4 Dec 2009 16:41:38 -0500 (EST)
Received: from asmtpout024.mac.com (asmtpout024.mac.com [17.148.16.99])
        by omicron.boston22.com (Postfix) with ESMTP id 9ED0632580B4
        for &lt;medawson@boston22.com&gt;; Fri,  4 Dec 2009 16:41:35 -0500 (EST)
MIME-version: 1.0
Received: from [172.16.1.6]
 (pool-151-203-48-185.bos.east.verizon.net [151.203.48.185])
 by asmtp024.mac.com
 (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit))
 with ESMTPA id &lt;0KU500EW7DL2VN90@asmtp024.mac.com&gt; for medawson@boston22.com;
 Fri, 04 Dec 2009 13:41:27 -0800 (PST)
From: &quot;Michelle L. Yaiser&quot; &lt;myaiser@mac.com&gt;
Content-type: multipart/signed; boundary=Apple-Mail-13-335327992;
 protocol=&quot;application/pkcs7-signature&quot;; micalg=sha1
Subject: signed email
Date: Fri, 04 Dec 2009 16:41:25 -0500
Message-id: &lt;8512D0AA-2D16-4E6F-AA9E-B553EDBAE4FA@mac.com&gt;
To: Matthew Dawson &lt;medawson@boston22.com&gt;
X-Mailer: Apple Mail (2.1077)
Status: RO
X-Status:
X-Keywords:
X-UID: 160933


--Apple-Mail-13-335327992
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
        charset=us-ascii

This email message has been signed.



--Apple-Mail-13-335327992
Content-Disposition: attachment;
        filename=smime.p7s
Content-Type: application/pkcs7-signature;
        name=smime.p7s
Content-Transfer-Encoding: base64

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIDmjCCA5Yw
ggJ+AgkAgiEEwp0EHRowDQYJKoZIhvcNAQEFBQAwgYwxCzAJBgNVBAYTAlVTMRYwFAYDVQQIEw1N
YXNzYWNodXNldHRzMREwDwYDVQQHEwhCcmlnaHRvbjEYMBYGA1UEChMPTWljaGVsbGUgWWFpc2Vy
MRgwFgYDVQQDEw9NaWNoZWxsZSBZYWlzZXIxHjAcBgkqhkiG9w0BCQEWD215YWlzZXJAbWFjLmNv
bTAeFw0wOTEyMDQyMDI5MDZaFw0xMDAxMDMyMDI5MDZaMIGMMQswCQYDVQQGEwJVUz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iXdqc0EdDkFLaxIKQ0wIAAAAAAAA

--Apple-Mail-13-335327992--
</description> 
   <pubDate>Fri, 04 Dec 2009 21:49:26 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8751#t57008</link> 
  </item> 
   
  <item> 
   <title>One further correction - I see the error when attempting to </title> 
   <description>One further correction - I see the error when attempting to view the details link on my own keypair&#039;s public key, not the key itself.</description> 
   <pubDate>Fri, 04 Dec 2009 21:58:08 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8751#t57009</link> 
  </item> 
   
  <item> 
   <title>Please upload the message source as an attachment.</title> 
   <description>Please upload the message source as an attachment.</description> 
   <pubDate>Fri, 04 Dec 2009 22:21:07 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8751#t57010</link> 
  </item> 
   
  <item> 
   <title>Message source uploaded.</title> 
   <description>Message source uploaded.</description> 
   <pubDate>Sun, 06 Dec 2009 15:14:52 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8751#t57015</link> 
  </item> 
   
  <item> 
   <title>I&#039;m really confused.  There is no errors viewing that messag</title> 
   <description>I&#039;m really confused.  There is no errors viewing that message with either the lastest CVS of FRAMEWORK_3 or the latest git code (although the message has an invalid signature).  But there is talk about viewing a public key?  So I don&#039;t know where this problem is supposed to be triggered.</description> 
   <pubDate>Mon, 07 Dec 2009 03:59:45 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8751#t57020</link> 
  </item> 
   
  <item> 
   <title>Okay, let&#039;s ignore the message with an invalid signature.  (</title> 
   <description>Okay, let&#039;s ignore the message with an invalid signature.  (Sorry about that - quite possibly a copy/paste error on my end.)

When I attempt to view the &quot;Details&quot; link for the public half of my own (self-signed) keypair (attached for your reference with no private key or export passphrases - feel free to use both as I&#039;ve revoked the certificate) in the &quot;Your S/MIME Public/Private Certificates &quot; section of the S/MIME options page I get the error that I reported in the title of this ticket.</description> 
   <pubDate>Mon, 07 Dec 2009 13:58:55 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8751#t57027</link> 
  </item> 
   
  <item> 
   <title>There is a problem with your certificate.  First, why are yo</title> 
   <description>There is a problem with your certificate.  First, why are you using version 1 of X.509?  Version 1 was obsoleted long ago (version 3 is the up-to-date version).

Regardless, there seems to be an issue parsing the version/serial number of that cert.  According to the ASN.1 data, the integer value for the version is 9 bytes long, instead of 1 byte long. (Additionally, without bcmath, this integer won&#039;t be parsed correctly anyway).  For whatever reason, the serial number information is being ignored.  This results in 1 fewer array entry than expected, which screws up the parsing.

Trying another ASN.1 PHP parser I found on the web, it fails at the same location.

openssl_x509_parse() *does* seem to parse the data correctly, but 1.) the documentation is listed as &quot;The structure of the returned data is (deliberately) not yet documented, as it is still subject to change.&quot; (WTF?) and 2.) it did not support ASN.1 decoding extensions data until PHP 5.2.4.</description> 
   <pubDate>Wed, 09 Dec 2009 08:27:34 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8751#t57077</link> 
  </item> 
   
  <item> 
   <title>I see the problem with the certificate.  Sorry about that.  </title> 
   <description>I see the problem with the certificate.  Sorry about that.  I&#039;ve fixed my cert creation steps and am having better luck now.</description> 
   <pubDate>Wed, 09 Dec 2009 16:48:29 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8751#t57080</link> 
  </item> 
   
  <item> 
   <title>For lack of a better way to solve this - what about aborting</title> 
   <description>For lack of a better way to solve this - what about aborting certificate parsing once we figure out the x.509 cert is not version 3?</description> 
   <pubDate>Wed, 09 Dec 2009 18:52:16 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8751#t57081</link> 
  </item> 
   
  <item> 
   <title>Presuming that you return a reasonable error message indicat</title> 
   <description>Presuming that you return a reasonable error message indicating that, I think that it&#039;s fine.  It would certainly have steered me more quickly toward regenerating my certificate.</description> 
   <pubDate>Wed, 09 Dec 2009 18:58:38 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8751#t57082</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in CVS for this ticket:

Bug: 8751
Me</title> 
   <description>Changes have been made in CVS for this ticket:

Bug: 8751
Merge from git:horde 0fdcebdbb7db59cd901735b7fd71afcaf05c0583
http://cvs.horde.org/diff.php/framework/Crypt/Crypt/Attic/smime.php?rt=horde&amp;r1=1.49.2.22&amp;r2=1.49.2.23&amp;ty=u</description> 
   <pubDate>Mon, 14 Dec 2009 19:40:36 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8751#t57149</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Bug #8751: F</title> 
   <description>Changes have been made in Git for this ticket:

Bug #8751: Fix parsing old x.509 certs

http://git.horde.org/diff.php/framework/Crypt/lib/Horde/Crypt/Smime.php?rt=horde-git&amp;r1=546e34905c8cfd147eef6d5d6b3c40531d0fc584&amp;r2=0fdcebdbb7db59cd901735b7fd71afcaf05c0583</description> 
   <pubDate>Mon, 14 Dec 2009 19:40:40 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8751#t57150</link> 
  </item> 
   
  <item> 
   <title>Fixed in Horde 3.3.6.</title> 
   <description>Fixed in Horde 3.3.6.</description> 
   <pubDate>Mon, 14 Dec 2009 19:41:26 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8751#t57151</link> 
  </item> 
   
  <item> 
   <title>Fatal error: Cannot use string offset as an array in /data/w</title> 
   <description>Fatal error: Cannot use string offset as an array in /data/www/my/library/autoChooseServer.php on line 19</description> 
   <pubDate>Mon, 09 Apr 2012 06:25:16 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8751#t71132</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
