Function sec_asn1e_write_contents was two functions combined into one, separated by one huge if-then-else.  They do different things and take different arguments.  So, I split them into two separate functions: sec_asn1e_write_contents and sec_asn1e_write_contents_from_buf the latter of which takes a buf pointer and length argument. The if statement that chooses between the two is now in the caller. This is patch 2 of 5 for bug 245429.  r=wtc.
Function sec_asn1e_write_contents was two functions combined into one,
separated by one huge if-then-else.  They do different things and take
different arguments.  So, I split them into two separate functions:
sec_asn1e_write_contents and sec_asn1e_write_contents_from_buf
the latter of which takes a buf pointer and length argument.
The if statement that chooses between the two is now in the caller.
This is patch 2 of 5 for bug 245429.  r=wtc.

nmav/nss,nmav/nss,ekr/nss-old,ekr/nss-old,nmav/nss,ekr/nss-old,ekr/nss-old,nmav/nss,nmav/nss,nmav/nss,ekr/nss-old,ekr/nss-old,ekr/nss-old,nmav/nss