OLD | NEW |
---|---|
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ | 1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
2 /* | 2 /* |
3 * SSL3 Protocol | 3 * SSL3 Protocol |
4 * | 4 * |
5 * ***** BEGIN LICENSE BLOCK ***** | 5 * ***** BEGIN LICENSE BLOCK ***** |
6 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 6 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
7 * | 7 * |
8 * The contents of this file are subject to the Mozilla Public License Version | 8 * The contents of this file are subject to the Mozilla Public License Version |
9 * 1.1 (the "License"); you may not use this file except in compliance with | 9 * 1.1 (the "License"); you may not use this file except in compliance with |
10 * the License. You may obtain a copy of the License at | 10 * the License. You may obtain a copy of the License at |
(...skipping 6083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6094 | 6094 |
6095 PRBool | 6095 PRBool |
6096 ssl3_CanFalseStart(sslSocket *ss) { | 6096 ssl3_CanFalseStart(sslSocket *ss) { |
6097 PRBool rv; | 6097 PRBool rv; |
6098 | 6098 |
6099 PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss) ); | 6099 PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss) ); |
6100 | 6100 |
6101 /* XXX: does not take into account whether we are waiting for | 6101 /* XXX: does not take into account whether we are waiting for |
6102 * SSL_AuthCertificateComplete or SSL_RestartHandshakeAfterCertReq. If/when | 6102 * SSL_AuthCertificateComplete or SSL_RestartHandshakeAfterCertReq. If/when |
6103 * that is done, this function could return different results each time it | 6103 * that is done, this function could return different results each time it |
6104 * would be called. | 6104 * would be called. |
wtc
2012/04/27 20:52:37
Nit: would be nice to add a comment about the NPN
agl
2012/04/30 16:53:31
Done (and patch updated).
| |
6105 */ | 6105 */ |
6106 | 6106 |
6107 ssl_GetSpecReadLock(ss); | 6107 ssl_GetSpecReadLock(ss); |
6108 rv = ss->opt.enableFalseStart && | 6108 rv = ss->opt.enableFalseStart && |
6109 !ss->sec.isServer && | 6109 !ss->sec.isServer && |
6110 !ss->ssl3.hs.isResuming && | 6110 !ss->ssl3.hs.isResuming && |
6111 ssl3_ExtensionNegotiated(ss, ssl_next_proto_nego_xtn) && | |
6111 ss->ssl3.cwSpec && | 6112 ss->ssl3.cwSpec && |
6112 | 6113 |
6113 /* An attacker can control the selected ciphersuite so we only wish to | 6114 /* An attacker can control the selected ciphersuite so we only wish to |
6114 * do False Start in the case that the selected ciphersuite is | 6115 * do False Start in the case that the selected ciphersuite is |
6115 * sufficiently strong that the attack can gain no advantage. | 6116 * sufficiently strong that the attack can gain no advantage. |
6116 * Therefore we require an 80-bit cipher and a forward-secret key | 6117 * Therefore we require an 80-bit cipher and a forward-secret key |
6117 * exchange. */ | 6118 * exchange. */ |
6118 ss->ssl3.cwSpec->cipher_def->secret_key_size >= 10 && | 6119 ss->ssl3.cwSpec->cipher_def->secret_key_size >= 10 && |
6119 (ss->ssl3.hs.kea_def->kea == kea_dhe_dss || | 6120 (ss->ssl3.hs.kea_def->kea == kea_dhe_dss || |
6120 ss->ssl3.hs.kea_def->kea == kea_dhe_rsa || | 6121 ss->ssl3.hs.kea_def->kea == kea_dhe_rsa || |
(...skipping 4339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
10460 PORT_Free(ss->ssl3.hs.recvdFragments.buf); | 10461 PORT_Free(ss->ssl3.hs.recvdFragments.buf); |
10461 } | 10462 } |
10462 } | 10463 } |
10463 | 10464 |
10464 ss->ssl3.initialized = PR_FALSE; | 10465 ss->ssl3.initialized = PR_FALSE; |
10465 | 10466 |
10466 SECITEM_FreeItem(&ss->ssl3.nextProto, PR_FALSE); | 10467 SECITEM_FreeItem(&ss->ssl3.nextProto, PR_FALSE); |
10467 } | 10468 } |
10468 | 10469 |
10469 /* End of ssl3con.c */ | 10470 /* End of ssl3con.c */ |
OLD | NEW |