| OLD | NEW |
| 1 /* | 1 /* |
| 2 * SSL v2 handshake functions, and functions common to SSL2 and SSL3. | 2 * SSL v2 handshake functions, and functions common to SSL2 and SSL3. |
| 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 19 matching lines...) Expand all Loading... |
| 30 * in which case the provisions of the GPL or the LGPL are applicable instead | 30 * in which case the provisions of the GPL or the LGPL are applicable instead |
| 31 * of those above. If you wish to allow use of your version of this file only | 31 * of those above. If you wish to allow use of your version of this file only |
| 32 * under the terms of either the GPL or the LGPL, and not to allow others to | 32 * under the terms of either the GPL or the LGPL, and not to allow others to |
| 33 * use your version of this file under the terms of the MPL, indicate your | 33 * use your version of this file under the terms of the MPL, indicate your |
| 34 * decision by deleting the provisions above and replace them with the notice | 34 * decision by deleting the provisions above and replace them with the notice |
| 35 * and other provisions required by the GPL or the LGPL. If you do not delete | 35 * and other provisions required by the GPL or the LGPL. If you do not delete |
| 36 * the provisions above, a recipient may use your version of this file under | 36 * the provisions above, a recipient may use your version of this file under |
| 37 * the terms of any one of the MPL, the GPL or the LGPL. | 37 * the terms of any one of the MPL, the GPL or the LGPL. |
| 38 * | 38 * |
| 39 * ***** END LICENSE BLOCK ***** */ | 39 * ***** END LICENSE BLOCK ***** */ |
| 40 /* $Id: sslcon.c,v 1.39 2010/02/04 03:08:44 wtc%google.com Exp $ */ | 40 /* $Id: sslcon.c,v 1.40 2010/04/25 23:37:38 nelson%bolyard.com Exp $ */ |
| 41 | 41 |
| 42 #include "nssrenam.h" | 42 #include "nssrenam.h" |
| 43 #include "cert.h" | 43 #include "cert.h" |
| 44 #include "secitem.h" | 44 #include "secitem.h" |
| 45 #include "sechash.h" | 45 #include "sechash.h" |
| 46 #include "cryptohi.h" /* for SGN_ funcs */ | 46 #include "cryptohi.h" /* for SGN_ funcs */ |
| 47 #include "keyhi.h" /* for SECKEY_ high level functions. */ | 47 #include "keyhi.h" /* for SECKEY_ high level functions. */ |
| 48 #include "ssl.h" | 48 #include "ssl.h" |
| 49 #include "sslimpl.h" | 49 #include "sslimpl.h" |
| 50 #include "sslproto.h" | 50 #include "sslproto.h" |
| (...skipping 1803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1854 if (0 != (allowed & (1U << preferred[0]))) { | 1854 if (0 != (allowed & (1U << preferred[0]))) { |
| 1855 ss->preferredCipher = preferred; | 1855 ss->preferredCipher = preferred; |
| 1856 break; | 1856 break; |
| 1857 } | 1857 } |
| 1858 preferred += 3; | 1858 preferred += 3; |
| 1859 } | 1859 } |
| 1860 } | 1860 } |
| 1861 } | 1861 } |
| 1862 preferred = ss->preferredCipher ? ss->preferredCipher : noneSuch; | 1862 preferred = ss->preferredCipher ? ss->preferredCipher : noneSuch; |
| 1863 /* | 1863 /* |
| 1864 ** Scan list of ciphers recieved from peer and look for a match in | 1864 ** Scan list of ciphers received from peer and look for a match in |
| 1865 ** our list. | 1865 ** our list. |
| 1866 * Note: Our list may contain SSL v3 ciphers. | 1866 * Note: Our list may contain SSL v3 ciphers. |
| 1867 * We MUST NOT match on any of those. | 1867 * We MUST NOT match on any of those. |
| 1868 * Fortunately, this is easy to detect because SSLv3 ciphers have zero | 1868 * Fortunately, this is easy to detect because SSLv3 ciphers have zero |
| 1869 * in the first byte, and none of the SSLv2 ciphers do. | 1869 * in the first byte, and none of the SSLv2 ciphers do. |
| 1870 */ | 1870 */ |
| 1871 bestKeySize = bestRealKeySize = 0; | 1871 bestKeySize = bestRealKeySize = 0; |
| 1872 bestCypher = -1; | 1872 bestCypher = -1; |
| 1873 while (--hc >= 0) { | 1873 while (--hc >= 0) { |
| 1874 for (i = 0, ms = ss->cipherSpecs; i < ss->sizeCipherSpecs; i += 3, ms +=
3) { | 1874 for (i = 0, ms = ss->cipherSpecs; i < ss->sizeCipherSpecs; i += 3, ms +=
3) { |
| (...skipping 1970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3845 * check algorithm. This release is not backward | 3845 * check algorithm. This release is not backward |
| 3846 * compatible with previous major releases. It is | 3846 * compatible with previous major releases. It is |
| 3847 * not compatible with future major, minor, or | 3847 * not compatible with future major, minor, or |
| 3848 * patch releases. | 3848 * patch releases. |
| 3849 */ | 3849 */ |
| 3850 volatile char c; /* force a reference that won't get optimized away */ | 3850 volatile char c; /* force a reference that won't get optimized away */ |
| 3851 | 3851 |
| 3852 c = __nss_ssl_rcsid[0] + __nss_ssl_sccsid[0]; | 3852 c = __nss_ssl_rcsid[0] + __nss_ssl_sccsid[0]; |
| 3853 return NSS_VersionCheck(importedVersion); | 3853 return NSS_VersionCheck(importedVersion); |
| 3854 } | 3854 } |
| OLD | NEW |