I am modifying tstclnt to test my patch for bug 542832. With my patch, tstclnt 
always succeeds or fails like it did before, but in some of the failure cases 
it exits with exit code 1 when the testcase expects it to exit with exit code 
254, and sometimes it exits with exit code 254 when the testcase expects it to 
exit with exit code 1.

Basically, the current rule is that tstclnt exits with an exit code of 254 if 
PR_Send failed, and 1 for any other error. This doesn't seem like a useful 
rule. Instead, a modification of the proposal by Glen Beasley in bug 402058 
comment 9 [1] seems better: If the handshake failed because of a certificate 
validation failure, return 254; if it failed due to any other error, return 1. 
In the future, we could distinguish other types of errors (e.g. SSL version 
mismatch could be 253, TLS renegotiation support mismatch could be 252, etc.). 
This seems like it would be much more useful than distinguishing whether we 
failed during PR_Send or PR_Recv.

Thoughts?

Cheers,
Brian

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=402058#c9

Additional background on error codes returned by tstclnt:

[2] https://bugzilla.mozilla.org/show_bug.cgi?id=402058#c7
[3] https://bugzilla.mozilla.org/show_bug.cgi?id=402058#c5
[4] https://bugzilla.mozilla.org/show_bug.cgi?id=86528#c9
[5] https://bugzilla.mozilla.org/show_bug.cgi?id=68869
-- 
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to