Commit 8d822182 authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

Fix bug in PKCS#7 decode routines when indefinite length

encoding is used inside definite length encoding.
parent a8e738f9
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -4,6 +4,10 @@

 Changes between 0.9.6 and 0.9.6a  [xx XXX 2001]

  *) Fix PKCS#7 decode routines so they correctly update the length
     after reading an EOC for the EXPLICIT tag.
     [Steve Henson]

  *) Fix bug in PKCS#12 key generation routines. This was triggered
     if a 3DES key was generated with a 0 initial byte. Include
     PKCS12_BROKEN_KEYGEN compilation option to retain the old
+2 −0
Original line number Diff line number Diff line
@@ -307,6 +307,7 @@ PKCS7 *d2i_PKCS7(PKCS7 **a, unsigned char **pp, long length)
			}
		if (Tinf == (1|V_ASN1_CONSTRUCTED))
			{
			c.q=c.p;
			if (!ASN1_check_infinite_end(&c.p,c.slen))
				{
				c.error=ERR_R_MISSING_ASN1_EOS;
@@ -314,6 +315,7 @@ PKCS7 *d2i_PKCS7(PKCS7 **a, unsigned char **pp, long length)
				goto err;
				}
			}
			c.slen-=(c.p-c.q);
		}
	else
		ret->detached=1;