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

Side by Side Diff: nss/lib/freebl/dsa.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/dh.c ('k') | nss/lib/freebl/ec.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 /* 1 /*
2 * 2 *
3 * This Source Code Form is subject to the terms of the Mozilla Public 3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 6
7 #ifdef FREEBL_NO_DEPEND 7 #ifdef FREEBL_NO_DEPEND
8 #include "stubs.h" 8 #include "stubs.h"
9 #endif 9 #endif
10 10
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 MP_TO_SEC_ERROR(err); 151 MP_TO_SEC_ERROR(err);
152 } 152 }
153 153
154 static SECStatus 154 static SECStatus
155 dsa_NewKeyExtended(const PQGParams *params, const SECItem * seed, 155 dsa_NewKeyExtended(const PQGParams *params, const SECItem * seed,
156 DSAPrivateKey **privKey) 156 DSAPrivateKey **privKey)
157 { 157 {
158 mp_int p, g; 158 mp_int p, g;
159 mp_int x, y; 159 mp_int x, y;
160 mp_err err; 160 mp_err err;
161 PRArenaPool *arena; 161 PLArenaPool *arena;
162 DSAPrivateKey *key; 162 DSAPrivateKey *key;
163 /* Check args. */ 163 /* Check args. */
164 if (!params || !privKey || !seed || !seed->data) { 164 if (!params || !privKey || !seed || !seed->data) {
165 PORT_SetError(SEC_ERROR_INVALID_ARGS); 165 PORT_SetError(SEC_ERROR_INVALID_ARGS);
166 return SECFailure; 166 return SECFailure;
167 } 167 }
168 /* Initialize an arena for the DSA key. */ 168 /* Initialize an arena for the DSA key. */
169 arena = PORT_NewArena(NSS_FREEBL_DSA_DEFAULT_CHUNKSIZE); 169 arena = PORT_NewArena(NSS_FREEBL_DSA_DEFAULT_CHUNKSIZE);
170 if (!arena) { 170 if (!arena) {
171 PORT_SetError(SEC_ERROR_NO_MEMORY); 171 PORT_SetError(SEC_ERROR_NO_MEMORY);
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 mp_clear(&s_); 622 mp_clear(&s_);
623 mp_clear(&u1); 623 mp_clear(&u1);
624 mp_clear(&u2); 624 mp_clear(&u2);
625 mp_clear(&v); 625 mp_clear(&v);
626 mp_clear(&w); 626 mp_clear(&w);
627 if (err) { 627 if (err) {
628 translate_mpi_error(err); 628 translate_mpi_error(err);
629 } 629 }
630 return verified; 630 return verified;
631 } 631 }
OLDNEW
« no previous file with comments | « nss/lib/freebl/dh.c ('k') | nss/lib/freebl/ec.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698