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

Make X509_NAME produce correct encoding when empty.

parent c6b523d3
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 X509_NAME bug which produced incorrect encoding if X509_NAME
     was empty.
     [Steve Henson]

  *) Use the cached encoding of an X509_NAME structure rather than
     copying it. This is apparently the reason for the libsafe "errors"
     but the code is actually correct.
+3 −2
Original line number Diff line number Diff line
@@ -141,7 +141,8 @@ static int i2d_X509_NAME_entries(X509_NAME *a)
			}
		size+=i2d_X509_NAME_ENTRY(ne,NULL);
		}

	/* If empty no extra SET OF needed */
	if (ret)
		ret+=ASN1_object_size(1,size,V_ASN1_SET);
	if (fe != NULL)
		fe->size=size;