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 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
779 return SECFailure; | 779 return SECFailure; |
780 } | 780 } |
781 | 781 |
782 if (peerVersion < ss->vrange.min || | 782 if (peerVersion < ss->vrange.min || |
783 (peerVersion > ss->vrange.max && !allowLargerPeerVersion)) { | 783 (peerVersion > ss->vrange.max && !allowLargerPeerVersion)) { |
784 PORT_SetError(SSL_ERROR_NO_CYPHER_OVERLAP); | 784 PORT_SetError(SSL_ERROR_NO_CYPHER_OVERLAP); |
785 return SECFailure; | 785 return SECFailure; |
786 } | 786 } |
787 | 787 |
788 ss->version = PR_MIN(peerVersion, ss->vrange.max); | 788 ss->version = PR_MIN(peerVersion, ss->vrange.max); |
789 PORT_Assert(ssl3_VersionIsSupported(ssl_variant_stream, ss->version)); | 789 PORT_Assert(ssl3_VersionIsSupported(ss->protocolVariant, ss->version)); |
790 | 790 |
791 return SECSuccess; | 791 return SECSuccess; |
792 } | 792 } |
793 | 793 |
794 static SECStatus | 794 static SECStatus |
795 ssl3_GetNewRandom(SSL3Random *random) | 795 ssl3_GetNewRandom(SSL3Random *random) |
796 { | 796 { |
797 PRUint32 gmt = ssl_Time(); | 797 PRUint32 gmt = ssl_Time(); |
798 SECStatus rv; | 798 SECStatus rv; |
799 | 799 |
(...skipping 9992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10792 PORT_Free(ss->ssl3.hs.recvdFragments.buf); | 10792 PORT_Free(ss->ssl3.hs.recvdFragments.buf); |
10793 } | 10793 } |
10794 } | 10794 } |
10795 | 10795 |
10796 ss->ssl3.initialized = PR_FALSE; | 10796 ss->ssl3.initialized = PR_FALSE; |
10797 | 10797 |
10798 SECITEM_FreeItem(&ss->ssl3.nextProto, PR_FALSE); | 10798 SECITEM_FreeItem(&ss->ssl3.nextProto, PR_FALSE); |
10799 } | 10799 } |
10800 | 10800 |
10801 /* End of ssl3con.c */ | 10801 /* End of ssl3con.c */ |
OLD | NEW |