Bug 525092: Allow SSL_GetChannelInfo to be called as soon as a TLS false
start handshake is done. r=agl. git-svn-id: svn://10.0.0.236/trunk@261168 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
555fca8a3d
commit
db53542ee4
@ -34,7 +34,7 @@
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
/* $Id: sslinfo.c,v 1.23 2010-01-15 01:49:33 alexei.volkov.bugs%sun.com Exp $ */
|
||||
/* $Id: sslinfo.c,v 1.24 2010-09-02 01:12:57 wtc%google.com Exp $ */
|
||||
#include "ssl.h"
|
||||
#include "sslimpl.h"
|
||||
#include "sslproto.h"
|
||||
@ -60,6 +60,7 @@ SSL_GetChannelInfo(PRFileDesc *fd, SSLChannelInfo *info, PRUintn len)
|
||||
sslSocket * ss;
|
||||
SSLChannelInfo inf;
|
||||
sslSessionID * sid;
|
||||
PRBool enoughFirstHsDone = PR_FALSE;
|
||||
|
||||
if (!info || len < sizeof inf.length) {
|
||||
PORT_SetError(SEC_ERROR_INVALID_ARGS);
|
||||
@ -76,7 +77,14 @@ SSL_GetChannelInfo(PRFileDesc *fd, SSLChannelInfo *info, PRUintn len)
|
||||
memset(&inf, 0, sizeof inf);
|
||||
inf.length = PR_MIN(sizeof inf, len);
|
||||
|
||||
if (ss->opt.useSecurity && ss->firstHsDone) {
|
||||
if (ss->firstHsDone) {
|
||||
enoughFirstHsDone = PR_TRUE;
|
||||
} else if (ss->version >= SSL_LIBRARY_VERSION_3_0 &&
|
||||
ssl3_CanFalseStart(ss)) {
|
||||
enoughFirstHsDone = PR_TRUE;
|
||||
}
|
||||
|
||||
if (ss->opt.useSecurity && enoughFirstHsDone) {
|
||||
sid = ss->sec.ci.sid;
|
||||
inf.protocolVersion = ss->version;
|
||||
inf.authKeyBits = ss->sec.authKeyBits;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user