Bugzilla bug 86528: have tstclnt exit with 254 (= -2 mod 256) where it
authorwtc%netscape.com
Wed, 27 Jun 2001 00:29:01 +0000
changeset 1687 ac83686cb0734369586f8a30f17ad7c2188eb8f3
parent 1686 72b7a3a636ac31723acc9b2282b8c9dc08c07fbd
child 1690 83f046607cd57ebd962338be25aca37ee3a1a14a
push idunknown
push userunknown
push dateunknown
bugs86528
Bugzilla bug 86528: have tstclnt exit with 254 (= -2 mod 256) where it was exiting with -2 before so that old test script that expects 254 continues to work. r=larryh. Modified Files: tstclnt.c sslauth.txt
security/nss/cmd/tstclnt/tstclnt.c
security/nss/tests/ssl/sslauth.txt
--- a/security/nss/cmd/tstclnt/tstclnt.c
+++ b/security/nss/cmd/tstclnt/tstclnt.c
@@ -628,17 +628,17 @@ int main(int argc, char **argv)
 		PRINTF("%s: Writing %d bytes to server\n", progName, nb);
 		do {
 		    PRInt32 cc = PR_Write(s, bufp, nb);
 		    if (cc < 0) {
 		    	PRErrorCode err = PR_GetError();
 			if (err != PR_WOULD_BLOCK_ERROR) {
 			    SECU_PrintError(progName, 
 			                    "write to SSL socket failed");
-			    error=2;
+			    error=254;
 			    goto done;
 			}
 			cc = 0;
 		    }
 		    bufp += cc;
 		    nb   -= cc;
 		    if (nb <= 0) 
 		    	break;
--- a/security/nss/tests/ssl/sslauth.txt
+++ b/security/nss/tests/ssl/sslauth.txt
@@ -5,17 +5,17 @@
 #  return  server     client                         Test Case name
 #   value  params     params
 #  ------  ------     ------                         ---------------
      0       -r       -w_nss                 TLS Request don't require client auth (client does not provide auth)
      0       -r  -w_bogus_-n_TestUser     TLS Request don't require client auth (bad password)
      0       -r   -w_nss_-n_TestUser      TLS Request don't require client auth (client auth)
      0     -r_-r       -w_nss                TLS Require client auth (client does not provide auth)
 # this one should fail
-     2     -r_-r -w_bogus_-n_TestUser     TLS Require client auth (bad password)
+    254    -r_-r -w_bogus_-n_TestUser     TLS Require client auth (bad password)
      0     -r_-r  -w_nss_-n_TestUser_      TLS Require client auth (client auth)
      0       -r       -T_-w_nss             SSL3 Request don't require client auth (client does not provide auth)
      0       -r  -T_-n_TestUser_-w_bogus SSL3 Request don't require client auth (bad password)
      0       -r   -T_-n_TestUser_-w_nss  SSL3 Request don't require client auth (client auth)
      0     -r_-r       -T_-w_nss            SSL3 Require client auth (client does not provide auth)
 # this one should fail
-     2     -r_-r -T_-n_TestUser_-w_bogus SSL3 Require client auth (bad password)
+    254    -r_-r -T_-n_TestUser_-w_bogus SSL3 Require client auth (bad password)
      0     -r_-r  -T_-n_TestUser_-w_nss  SSL3 Require client auth (client auth)