Bug 939365: Improve the error code in SSL_ReHandshake. r=brian.
authorWan-Teh Chang <wtc@google.com>
Tue, 26 Nov 2013 17:26:52 -0800
changeset 10947 063fd8b8f178aef1019b135e0137e8b0e5902ef4
parent 10946 f28426e944ae3d6def36123e8534b2d94f30bf20
child 10948 661e0159d3f9f23d770cd0dc8b9c47141b83a216
push id227
push userwtc@google.com
push dateWed, 27 Nov 2013 01:27:26 +0000
reviewersbrian
bugs939365
Bug 939365: Improve the error code in SSL_ReHandshake. r=brian.
lib/ssl/sslsecur.c
--- a/lib/ssl/sslsecur.c
+++ b/lib/ssl/sslsecur.c
@@ -272,17 +272,17 @@ SSL_ReHandshake(PRFileDesc *fd, PRBool f
 
     if (!ss->opt.useSecurity)
 	return SECSuccess;
     
     ssl_Get1stHandshakeLock(ss);
 
     /* SSL v2 protocol does not support subsequent handshakes. */
     if (ss->version < SSL_LIBRARY_VERSION_3_0) {
-	PORT_SetError(SEC_ERROR_INVALID_ARGS);
+	PORT_SetError(SSL_ERROR_FEATURE_NOT_SUPPORTED_FOR_SSL2);
 	rv = SECFailure;
     } else {
 	ssl_GetSSL3HandshakeLock(ss);
 	rv = ssl3_RedoHandshake(ss, flushCache); /* force full handshake. */
 	ssl_ReleaseSSL3HandshakeLock(ss);
     }
 
     ssl_Release1stHandshakeLock(ss);