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

Side by Side Diff: net/third_party/mozilla_security_manager/nsPKCS12Blob.cpp

Issue 9139041: Initialized variable to fix -Wmaybe-uninitialized warning. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* ***** BEGIN LICENSE BLOCK ***** 1 /* ***** BEGIN LICENSE BLOCK *****
2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
3 * 3 *
4 * The contents of this file are subject to the Mozilla Public License Version 4 * The contents of this file are subject to the Mozilla Public License Version
5 * 1.1 (the "License"); you may not use this file except in compliance with 5 * 1.1 (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at 6 * the License. You may obtain a copy of the License at
7 * http://www.mozilla.org/MPL/ 7 * http://www.mozilla.org/MPL/
8 * 8 *
9 * Software distributed under the License is distributed on an "AS IS" basis, 9 * Software distributed under the License is distributed on an "AS IS" basis,
10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 // token may ignore this attribute (and hence still be able to export) but 426 // token may ignore this attribute (and hence still be able to export) but
427 // we still refuse to attempt an export. 427 // we still refuse to attempt an export.
428 // In addition, some tokens may not support this attribute, in which case 428 // In addition, some tokens may not support this attribute, in which case
429 // we still attempt the export and let the token implementation dictate 429 // we still attempt the export and let the token implementation dictate
430 // the export behavior. 430 // the export behavior.
431 if (nssCert->slot) { 431 if (nssCert->slot) {
432 SECKEYPrivateKey *privKey=PK11_FindKeyByDERCert(nssCert->slot, 432 SECKEYPrivateKey *privKey=PK11_FindKeyByDERCert(nssCert->slot,
433 nssCert, 433 nssCert,
434 NULL); // wincx 434 NULL); // wincx
435 if (privKey) { 435 if (privKey) {
436 PRBool privKeyIsExtractable; 436 PRBool privKeyIsExtractable = PR_FALSE;
437 SECStatus rv = isExtractable(privKey, &privKeyIsExtractable); 437 SECStatus rv = isExtractable(privKey, &privKeyIsExtractable);
438 SECKEY_DestroyPrivateKey(privKey); 438 SECKEY_DestroyPrivateKey(privKey);
439 439
440 if (rv == SECSuccess && !privKeyIsExtractable) { 440 if (rv == SECSuccess && !privKeyIsExtractable) {
441 LOG(ERROR) << "Private key is not extractable"; 441 LOG(ERROR) << "Private key is not extractable";
442 continue; 442 continue;
443 } 443 }
444 } 444 }
445 } 445 }
446 446
(...skipping 30 matching lines...) Expand all
477 finish: 477 finish:
478 if (srv) 478 if (srv)
479 LOG(ERROR) << "PKCS#12 export failed with error " << PORT_GetError(); 479 LOG(ERROR) << "PKCS#12 export failed with error " << PORT_GetError();
480 if (ecx) 480 if (ecx)
481 SEC_PKCS12DestroyExportContext(ecx); 481 SEC_PKCS12DestroyExportContext(ecx);
482 SECITEM_ZfreeItem(&unicodePw, PR_FALSE); 482 SECITEM_ZfreeItem(&unicodePw, PR_FALSE);
483 return return_count; 483 return return_count;
484 } 484 }
485 485
486 } // namespace mozilla_security_manager 486 } // namespace mozilla_security_manager
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698