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 * This Source Code Form is subject to the terms of the Mozilla Public | 5 * This Source Code Form is subject to the terms of the Mozilla Public |
6 * License, v. 2.0. If a copy of the MPL was not distributed with this | 6 * License, v. 2.0. If a copy of the MPL was not distributed with this |
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 7 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
8 | 8 |
9 /* TODO(ekr): Implement HelloVerifyRequest on server side. OK for now. */ | 9 /* TODO(ekr): Implement HelloVerifyRequest on server side. OK for now. */ |
10 | 10 |
(...skipping 10653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10664 * ssl3_HandleFinished | 10664 * ssl3_HandleFinished |
10665 */ | 10665 */ |
10666 static SECStatus | 10666 static SECStatus |
10667 ssl3_SendNextProto(sslSocket *ss) | 10667 ssl3_SendNextProto(sslSocket *ss) |
10668 { | 10668 { |
10669 SECStatus rv; | 10669 SECStatus rv; |
10670 int padding_len; | 10670 int padding_len; |
10671 static const unsigned char padding[32] = {0}; | 10671 static const unsigned char padding[32] = {0}; |
10672 | 10672 |
10673 if (ss->ssl3.nextProto.len == 0 || | 10673 if (ss->ssl3.nextProto.len == 0 || |
10674 ss->ssl3.nextProtoState == SSL_NEXT_PROTO_SELECTED) { | 10674 » ss->ssl3.nextProtoState == SSL_NEXT_PROTO_SELECTED) { |
10675 return SECSuccess; | 10675 return SECSuccess; |
10676 } | 10676 } |
10677 | 10677 |
10678 PORT_Assert( ss->opt.noLocks || ssl_HaveXmitBufLock(ss)); | 10678 PORT_Assert( ss->opt.noLocks || ssl_HaveXmitBufLock(ss)); |
10679 PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss)); | 10679 PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss)); |
10680 | 10680 |
10681 padding_len = 32 - ((ss->ssl3.nextProto.len + 2) % 32); | 10681 padding_len = 32 - ((ss->ssl3.nextProto.len + 2) % 32); |
10682 | 10682 |
10683 rv = ssl3_AppendHandshakeHeader(ss, next_proto, ss->ssl3.nextProto.len + | 10683 rv = ssl3_AppendHandshakeHeader(ss, next_proto, ss->ssl3.nextProto.len + |
10684 2 + padding_len); | 10684 2 + padding_len); |
(...skipping 2156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12841 PORT_Free(ss->ssl3.hs.recvdFragments.buf); | 12841 PORT_Free(ss->ssl3.hs.recvdFragments.buf); |
12842 } | 12842 } |
12843 } | 12843 } |
12844 | 12844 |
12845 ss->ssl3.initialized = PR_FALSE; | 12845 ss->ssl3.initialized = PR_FALSE; |
12846 | 12846 |
12847 SECITEM_FreeItem(&ss->ssl3.nextProto, PR_FALSE); | 12847 SECITEM_FreeItem(&ss->ssl3.nextProto, PR_FALSE); |
12848 } | 12848 } |
12849 | 12849 |
12850 /* End of ssl3con.c */ | 12850 /* End of ssl3con.c */ |
OLD | NEW |