OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Various SSL functions. | 2 * Various SSL functions. |
3 * | 3 * |
4 * ***** BEGIN LICENSE BLOCK ***** | 4 * ***** BEGIN LICENSE BLOCK ***** |
5 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 5 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
6 * | 6 * |
7 * The contents of this file are subject to the Mozilla Public License Version | 7 * The contents of this file are subject to the Mozilla Public License Version |
8 * 1.1 (the "License"); you may not use this file except in compliance with | 8 * 1.1 (the "License"); you may not use this file except in compliance with |
9 * the License. You may obtain a copy of the License at | 9 * the License. You may obtain a copy of the License at |
10 * http://www.mozilla.org/MPL/ | 10 * http://www.mozilla.org/MPL/ |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
141 (!ss->firstHsDone) && /* only first time */ | 141 (!ss->firstHsDone) && /* only first time */ |
142 (ss->version < SSL_LIBRARY_VERSION_3_0)) { /* not ssl3 */ | 142 (ss->version < SSL_LIBRARY_VERSION_3_0)) { /* not ssl3 */ |
143 ss->firstHsDone = PR_TRUE; | 143 ss->firstHsDone = PR_TRUE; |
144 (ss->handshakeCallback)(ss->fd, ss->handshakeCallbackData); | 144 (ss->handshakeCallback)(ss->fd, ss->handshakeCallbackData); |
145 } | 145 } |
146 ss->firstHsDone = PR_TRUE; | 146 ss->firstHsDone = PR_TRUE; |
147 ss->gs.writeOffset = 0; | 147 ss->gs.writeOffset = 0; |
148 ss->gs.readOffset = 0; | 148 ss->gs.readOffset = 0; |
149 break; | 149 break; |
150 } | 150 } |
151 if (ss->version >= SSL_LIBRARY_VERSION_3_0 && | |
152 ssl3_CanFalseStart(ss) && | |
153 (ss->ssl3.hs.ws == wait_change_cipher || | |
wtc
2010/02/20 00:39:51
Let's test ss->ssl3.hs.ws before ssl3_CanFalseStar
| |
154 ss->ssl3.hs.ws == wait_new_session_ticket)) { | |
155 break; | |
156 } | |
151 rv = (*ss->handshake)(ss); | 157 rv = (*ss->handshake)(ss); |
152 ++loopCount; | 158 ++loopCount; |
153 /* This code must continue to loop on SECWouldBlock, | 159 /* This code must continue to loop on SECWouldBlock, |
154 * or any positive value. See XXX_1 comments. | 160 * or any positive value. See XXX_1 comments. |
155 */ | 161 */ |
156 } while (rv != SECFailure); /* was (rv >= 0); XXX_1 */ | 162 } while (rv != SECFailure); /* was (rv >= 0); XXX_1 */ |
157 | 163 |
158 PORT_Assert(ss->opt.noLocks || !ssl_HaveRecvBufLock(ss)); | 164 PORT_Assert(ss->opt.noLocks || !ssl_HaveRecvBufLock(ss)); |
159 PORT_Assert(ss->opt.noLocks || !ssl_HaveXmitBufLock(ss)); | 165 PORT_Assert(ss->opt.noLocks || !ssl_HaveXmitBufLock(ss)); |
160 | 166 |
(...skipping 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1521 if (!ss) { | 1527 if (!ss) { |
1522 SSL_DBG(("%d: SSL[%d]: bad socket in SNISocketConfigHook", | 1528 SSL_DBG(("%d: SSL[%d]: bad socket in SNISocketConfigHook", |
1523 SSL_GETPID(), fd)); | 1529 SSL_GETPID(), fd)); |
1524 return SECFailure; | 1530 return SECFailure; |
1525 } | 1531 } |
1526 | 1532 |
1527 ss->sniSocketConfig = func; | 1533 ss->sniSocketConfig = func; |
1528 ss->sniSocketConfigArg = arg; | 1534 ss->sniSocketConfigArg = arg; |
1529 return SECSuccess; | 1535 return SECSuccess; |
1530 } | 1536 } |
OLD | NEW |