| OLD | NEW |
| 1 /* | 1 /* |
| 2 * SSL3 Protocol | 2 * SSL3 Protocol |
| 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 22 matching lines...) Expand all Loading... |
| 33 * under the terms of either the GPL or the LGPL, and not to allow others to | 33 * under the terms of either the GPL or the LGPL, and not to allow others to |
| 34 * use your version of this file under the terms of the MPL, indicate your | 34 * use your version of this file under the terms of the MPL, indicate your |
| 35 * decision by deleting the provisions above and replace them with the notice | 35 * decision by deleting the provisions above and replace them with the notice |
| 36 * and other provisions required by the GPL or the LGPL. If you do not delete | 36 * and other provisions required by the GPL or the LGPL. If you do not delete |
| 37 * the provisions above, a recipient may use your version of this file under | 37 * the provisions above, a recipient may use your version of this file under |
| 38 * the terms of any one of the MPL, the GPL or the LGPL. | 38 * the terms of any one of the MPL, the GPL or the LGPL. |
| 39 * | 39 * |
| 40 * ***** END LICENSE BLOCK ***** */ | 40 * ***** END LICENSE BLOCK ***** */ |
| 41 | 41 |
| 42 /* ECC code moved here from ssl3con.c */ | 42 /* ECC code moved here from ssl3con.c */ |
| 43 /* $Id: ssl3ecc.c,v 1.23 2010/01/28 16:14:25 kaie%kuix.de Exp $ */ | 43 /* $Id: ssl3ecc.c,v 1.24 2010/03/15 08:03:14 nelson%bolyard.com Exp $ */ |
| 44 | 44 |
| 45 #include "nss.h" | 45 #include "nss.h" |
| 46 #include "cert.h" | 46 #include "cert.h" |
| 47 #include "ssl.h" | 47 #include "ssl.h" |
| 48 #include "cryptohi.h" /* for DSAU_ stuff */ | 48 #include "cryptohi.h" /* for DSAU_ stuff */ |
| 49 #include "keyhi.h" | 49 #include "keyhi.h" |
| 50 #include "secder.h" | 50 #include "secder.h" |
| 51 #include "secitem.h" | 51 #include "secitem.h" |
| 52 | 52 |
| 53 #include "sslimpl.h" | 53 #include "sslimpl.h" |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 memcpy(pBuf, server_ecpoint.data, server_ecpoint.len); | 281 memcpy(pBuf, server_ecpoint.data, server_ecpoint.len); |
| 282 pBuf += server_ecpoint.len; | 282 pBuf += server_ecpoint.len; |
| 283 PORT_Assert((unsigned int)(pBuf - hashBuf) == bufLen); | 283 PORT_Assert((unsigned int)(pBuf - hashBuf) == bufLen); |
| 284 | 284 |
| 285 rv = ssl3_ComputeCommonKeyHash(hashBuf, bufLen, hashes, bypassPKCS11); | 285 rv = ssl3_ComputeCommonKeyHash(hashBuf, bufLen, hashes, bypassPKCS11); |
| 286 | 286 |
| 287 PRINT_BUF(95, (NULL, "ECDHkey hash: ", hashBuf, bufLen)); | 287 PRINT_BUF(95, (NULL, "ECDHkey hash: ", hashBuf, bufLen)); |
| 288 PRINT_BUF(95, (NULL, "ECDHkey hash: MD5 result", hashes->md5, MD5_LENGTH)); | 288 PRINT_BUF(95, (NULL, "ECDHkey hash: MD5 result", hashes->md5, MD5_LENGTH)); |
| 289 PRINT_BUF(95, (NULL, "ECDHkey hash: SHA1 result", hashes->sha, SHA1_LENGTH))
; | 289 PRINT_BUF(95, (NULL, "ECDHkey hash: SHA1 result", hashes->sha, SHA1_LENGTH))
; |
| 290 | 290 |
| 291 if (hashBuf != buf && hashBuf != NULL) | 291 if (hashBuf != buf) |
| 292 PORT_Free(hashBuf); | 292 PORT_Free(hashBuf); |
| 293 return rv; | 293 return rv; |
| 294 } | 294 } |
| 295 | 295 |
| 296 | 296 |
| 297 /* Called from ssl3_SendClientKeyExchange(). */ | 297 /* Called from ssl3_SendClientKeyExchange(). */ |
| 298 SECStatus | 298 SECStatus |
| 299 ssl3_SendECDHClientKeyExchange(sslSocket * ss, SECKEYPublicKey * svrPubKey) | 299 ssl3_SendECDHClientKeyExchange(sslSocket * ss, SECKEYPublicKey * svrPubKey) |
| 300 { | 300 { |
| 301 PK11SymKey * pms = NULL; | 301 PK11SymKey * pms = NULL; |
| (...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1184 ssl3_DisableECCSuites(ss, ecdhe_ecdsa_suites); | 1184 ssl3_DisableECCSuites(ss, ecdhe_ecdsa_suites); |
| 1185 return SECFailure; | 1185 return SECFailure; |
| 1186 | 1186 |
| 1187 loser: | 1187 loser: |
| 1188 /* no common curve supported */ | 1188 /* no common curve supported */ |
| 1189 ssl3_DisableECCSuites(ss, ecSuites); | 1189 ssl3_DisableECCSuites(ss, ecSuites); |
| 1190 return SECFailure; | 1190 return SECFailure; |
| 1191 } | 1191 } |
| 1192 | 1192 |
| 1193 #endif /* NSS_ENABLE_ECC */ | 1193 #endif /* NSS_ENABLE_ECC */ |
| OLD | NEW |