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

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

Issue 18121007: *WIP* Store NSS slots per profile. Move keygen to chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more refactoring Created 7 years 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 | « net/third_party/mozilla_security_manager/nsNSSCertificateDB.cpp ('k') | 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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 SEC_PKCS12EnableCipher(PKCS12_DES_EDE3_168, 1); 333 SEC_PKCS12EnableCipher(PKCS12_DES_EDE3_168, 1);
334 SEC_PKCS12SetPreferredCipher(PKCS12_DES_EDE3_168, 1); 334 SEC_PKCS12SetPreferredCipher(PKCS12_DES_EDE3_168, 1);
335 335
336 // Set no-op ascii-ucs2 conversion function to work around weird NSS 336 // Set no-op ascii-ucs2 conversion function to work around weird NSS
337 // interface. Thankfully, PKCS12 appears to be the only thing in NSS that 337 // interface. Thankfully, PKCS12 appears to be the only thing in NSS that
338 // uses PORT_UCS2_ASCIIConversion, so this doesn't break anything else. 338 // uses PORT_UCS2_ASCIIConversion, so this doesn't break anything else.
339 PORT_SetUCS2_ASCIIConversionFunction(pip_ucs2_ascii_conversion_fn); 339 PORT_SetUCS2_ASCIIConversionFunction(pip_ucs2_ascii_conversion_fn);
340 } 340 }
341 }; 341 };
342 342
343 static base::LazyInstance<PKCS12InitSingleton> g_pkcs12_init_singleton = 343 static base::LazyInstance<PKCS12InitSingleton>::Leaky g_pkcs12_init_singleton =
344 LAZY_INSTANCE_INITIALIZER; 344 LAZY_INSTANCE_INITIALIZER;
345 345
346 } // namespace 346 } // namespace
347 347
348 void EnsurePKCS12Init() { 348 void EnsurePKCS12Init() {
349 g_pkcs12_init_singleton.Get(); 349 g_pkcs12_init_singleton.Get();
350 } 350 }
351 351
352 // Based on nsPKCS12Blob::ImportFromFile. 352 // Based on nsPKCS12Blob::ImportFromFile.
353 int nsPKCS12Blob_Import(PK11SlotInfo* slot, 353 int nsPKCS12Blob_Import(PK11SlotInfo* slot,
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 | « net/third_party/mozilla_security_manager/nsNSSCertificateDB.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698