diff --git a/security/nss/lib/ssl/sslimpl.h b/security/nss/lib/ssl/sslimpl.h index 66c35f8fc66e..07d367bd44b6 100644 --- a/security/nss/lib/ssl/sslimpl.h +++ b/security/nss/lib/ssl/sslimpl.h @@ -39,7 +39,7 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -/* $Id: sslimpl.h,v 1.41 2005/09/16 20:31:31 julien.pierre.bugs%sun.com Exp $ */ +/* $Id: sslimpl.h,v 1.42 2005/09/16 21:28:20 julien.pierre.bugs%sun.com Exp $ */ #ifndef __sslimpl_h_ #define __sslimpl_h_ @@ -1108,8 +1108,6 @@ extern PRBool ssl_FdIsBlocking(PRFileDesc *fd); extern SECStatus ssl_SetTimeout(PRFileDesc *fd, PRIntervalTime timeout); -extern SECStatus ssl_SetTimeout(PRFileDesc *fd, PRIntervalTime timeout); - extern PRBool ssl_SocketIsBlocking(sslSocket *ss); extern void ssl_SetAlwaysBlock(sslSocket *ss); diff --git a/security/nss/lib/ssl/sslsecur.c b/security/nss/lib/ssl/sslsecur.c index 18ebfb2b4806..10920839d2da 100644 --- a/security/nss/lib/ssl/sslsecur.c +++ b/security/nss/lib/ssl/sslsecur.c @@ -37,7 +37,7 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -/* $Id: sslsecur.c,v 1.33 2005/09/16 20:31:31 julien.pierre.bugs%sun.com Exp $ */ +/* $Id: sslsecur.c,v 1.34 2005/09/16 21:28:20 julien.pierre.bugs%sun.com Exp $ */ #include "cert.h" #include "secitem.h" #include "keyhi.h" @@ -297,19 +297,6 @@ SSL_IMPORT SECStatus SSL_ReHandshakeWithTimeout(PRFileDesc *fd, return SSL_ReHandshake(fd, flushCache); } -/* -** Same as above, but with an I/O timeout. - */ -SSL_IMPORT SECStatus SSL_ReHandshakeWithTimeout(PRFileDesc *fd, - PRBool flushCache, - PRIntervalTime timeout) -{ - if (SECSuccess != ssl_SetTimeout(fd, timeout)) { - return SECFailure; - } - return SSL_ReHandshake(fd, flushCache); -} - SECStatus SSL_RedoHandshake(PRFileDesc *fd) { @@ -391,19 +378,6 @@ SSL_ForceHandshake(PRFileDesc *fd) } else if (gatherResult == SECWouldBlock) { PORT_SetError(PR_WOULD_BLOCK_ERROR); } -/* - ** Same as above, but with an I/O timeout. - */ -SSL_IMPORT SECStatus SSL_ForceHandshakeWithTimeout(PRFileDesc *fd, - PRIntervalTime timeout) -{ - if (SECSuccess != ssl_SetTimeout(fd, timeout)) { - return SECFailure; - } - return SSL_ForceHandshake(fd); -} - - } else if (!ss->firstHsDone) { rv = ssl_Do1stHandshake(ss); } else { diff --git a/security/nss/lib/ssl/sslsock.c b/security/nss/lib/ssl/sslsock.c index 43fa12ff7840..e4f649719859 100644 --- a/security/nss/lib/ssl/sslsock.c +++ b/security/nss/lib/ssl/sslsock.c @@ -40,7 +40,7 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -/* $Id: sslsock.c,v 1.41 2005/09/16 20:31:31 julien.pierre.bugs%sun.com Exp $ */ +/* $Id: sslsock.c,v 1.42 2005/09/16 21:28:20 julien.pierre.bugs%sun.com Exp $ */ #include "seccomon.h" #include "cert.h" #include "keyhi.h" @@ -1423,35 +1423,11 @@ ssl_SetTimeout(PRFileDesc *fd, PRIntervalTime timeout) } SSL_LOCK_READER(ss); ss->rTimeout = timeout; - if (ss->fdx) { + if (ss->opt.fdx) { SSL_LOCK_WRITER(ss); } ss->wTimeout = timeout; - if (ss->fdx) { - SSL_UNLOCK_WRITER(ss); - } - SSL_UNLOCK_READER(ss); - return SECSuccess; -} - -SECStatus PR_CALLBACK -ssl_SetTimeout(PRFileDesc *fd, PRIntervalTime timeout) -{ - sslSocket *ss; - int rv; - - ss = ssl_GetPrivate(fd); - if (!ss) { - SSL_DBG(("%d: SSL[%d]: bad socket in SetTimeout", SSL_GETPID(), fd)); - return SECFailure; - } - SSL_LOCK_READER(ss); - ss->rTimeout = timeout; - if (ss->fdx) { - SSL_LOCK_WRITER(ss); - } - ss->wTimeout = timeout; - if (ss->fdx) { + if (ss->opt.fdx) { SSL_UNLOCK_WRITER(ss); } SSL_UNLOCK_READER(ss);