Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(368)

Side by Side Diff: nss/lib/freebl/ec.c

Issue 16132005: Allow NSS to be built with NO_NSPR_10_SUPPORT. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « nss/lib/freebl/dsa.c ('k') | nss/lib/freebl/md5.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* This Source Code Form is subject to the terms of the Mozilla Public 1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 4
5 #ifdef FREEBL_NO_DEPEND 5 #ifdef FREEBL_NO_DEPEND
6 #include "stubs.h" 6 #include "stubs.h"
7 #endif 7 #endif
8 8
9 9
10 #include "blapi.h" 10 #include "blapi.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 /* Generates a new EC key pair. The private key is a supplied 197 /* Generates a new EC key pair. The private key is a supplied
198 * value and the public key is the result of performing a scalar 198 * value and the public key is the result of performing a scalar
199 * point multiplication of that value with the curve's base point. 199 * point multiplication of that value with the curve's base point.
200 */ 200 */
201 SECStatus 201 SECStatus
202 ec_NewKey(ECParams *ecParams, ECPrivateKey **privKey, 202 ec_NewKey(ECParams *ecParams, ECPrivateKey **privKey,
203 const unsigned char *privKeyBytes, int privKeyLen) 203 const unsigned char *privKeyBytes, int privKeyLen)
204 { 204 {
205 SECStatus rv = SECFailure; 205 SECStatus rv = SECFailure;
206 #ifdef NSS_ENABLE_ECC 206 #ifdef NSS_ENABLE_ECC
207 PRArenaPool *arena; 207 PLArenaPool *arena;
208 ECPrivateKey *key; 208 ECPrivateKey *key;
209 mp_int k; 209 mp_int k;
210 mp_err err = MP_OKAY; 210 mp_err err = MP_OKAY;
211 int len; 211 int len;
212 212
213 #if EC_DEBUG 213 #if EC_DEBUG
214 printf("ec_NewKey called\n"); 214 printf("ec_NewKey called\n");
215 #endif 215 #endif
216 MP_DIGITS(&k) = 0; 216 MP_DIGITS(&k) = 0;
217 217
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after
1071 printf("ECDSA verification %s\n", 1071 printf("ECDSA verification %s\n",
1072 (rv == SECSuccess) ? "succeeded" : "failed"); 1072 (rv == SECSuccess) ? "succeeded" : "failed");
1073 #endif 1073 #endif
1074 #else 1074 #else
1075 PORT_SetError(SEC_ERROR_UNSUPPORTED_KEYALG); 1075 PORT_SetError(SEC_ERROR_UNSUPPORTED_KEYALG);
1076 #endif /* NSS_ENABLE_ECC */ 1076 #endif /* NSS_ENABLE_ECC */
1077 1077
1078 return rv; 1078 return rv;
1079 } 1079 }
1080 1080
OLDNEW
« no previous file with comments | « nss/lib/freebl/dsa.c ('k') | nss/lib/freebl/md5.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698