~ubuntu-branches/ubuntu/raring/nss/raring-security

« back to all changes in this revision

Viewing changes to mozilla/security/nss/lib/ssl/sslreveal.c

Tags: 3.12.8-0ubuntu0.10.10.1
* New upstream release v3.12.8 (NSS_3_12_8_RTM)
  - Fix browser wildcard certificate validation issue
  - Update root certs
  - Fix SSL deadlocks
* Refresh patches:
  - update debian/patches/38_kbsd.patch
  - update debian/patches/97_SSL_RENEGOTIATE_TRANSITIONAL.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
 * the terms of any one of the MPL, the GPL or the LGPL.
37
37
 *
38
38
 * ***** END LICENSE BLOCK ***** */
39
 
/* $Id: sslreveal.c,v 1.7 2010/02/04 03:21:11 wtc%google.com Exp $ */
 
39
/* $Id: sslreveal.c,v 1.7.2.1 2010/08/03 18:52:13 wtc%google.com Exp $ */
40
40
 
41
41
#include "cert.h"
42
42
#include "ssl.h"
111
111
  /* some decisions derived from SSL_GetChannelInfo */
112
112
  sslSocket * sslsocket = NULL;
113
113
  SECStatus rv = SECFailure;
 
114
  PRBool enoughFirstHsDone = PR_FALSE;
114
115
 
115
116
  if (!pYes)
116
117
    return rv;
117
118
 
118
119
  sslsocket = ssl_FindSocket(socket);
 
120
  if (!sslsocket) {
 
121
    SSL_DBG(("%d: SSL[%d]: bad socket in HandshakeNegotiatedExtension",
 
122
             SSL_GETPID(), socket));
 
123
    return rv;
 
124
  }
 
125
 
 
126
  if (sslsocket->firstHsDone) {
 
127
    enoughFirstHsDone = PR_TRUE;
 
128
  } else if (sslsocket->ssl3.initialized && ssl3_CanFalseStart(sslsocket)) {
 
129
    enoughFirstHsDone = PR_TRUE;
 
130
  }
119
131
 
120
132
  /* according to public API SSL_GetChannelInfo, this doesn't need a lock */
121
 
  if (sslsocket && sslsocket->opt.useSecurity && sslsocket->firstHsDone) {
 
133
  if (sslsocket->opt.useSecurity && enoughFirstHsDone) {
122
134
    if (sslsocket->ssl3.initialized) { /* SSL3 and TLS */
123
135
      /* now we know this socket went through ssl3_InitState() and
124
136
       * ss->xtnData got initialized, which is the only member accessed by