Factor a function call out of the arguments of another function call,
which is mostly to make that code more easily debugged.
This is patch 3 of 5 for bug 245429. r=wtc.
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.
keyword. rename "ignore_stream" to "disallowStreaming" because it
doesn't merely ignore. rename "ignoresubstream" to "disallowStreaming"
for the same reason. Patch 1 of 5 for bug 245429. sr=wtc.
When we fail to decode based on a bad password, don't continue.
So once we've tried failed to decode a ANS.1 stream, don't continue collecting
more data.
On microsoft.pfx files, we would wind up decoding to the end of the encrypted
stream, then fail in the padding in PKCS #7. This code bypasses this problem by
making sure we don't continue to try to decode data once we've hit a bad
password failure.
This fixes a problem with encoding optional octet strings. The code
previously took a NULL SECItem that was not streaming and interpreted
that data.
XXX This may cause trouble when we try to encode large
S/MIME messages that may require streaming.