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

Side by Side Diff: base/nss_util.cc

Issue 2322008: Use SSLClientSocketNSS on Mac OS X. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Add build/linux/system.gyp to the CL. Created 10 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 | « base/base.gypi ('k') | build/all.gyp » ('j') | build/all.gyp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2008-2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008-2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/nss_util.h" 5 #include "base/nss_util.h"
6 #include "base/nss_util_internal.h" 6 #include "base/nss_util_internal.h"
7 7
8 #include <nss.h> 8 #include <nss.h>
9 #include <plarena.h> 9 #include <plarena.h>
10 #include <prerror.h> 10 #include <prerror.h>
11 #include <prinit.h> 11 #include <prinit.h>
12 #include <prtime.h> 12 #include <prtime.h>
13 #include <pk11pub.h> 13 #include <pk11pub.h>
14 #include <secmod.h> 14 #include <secmod.h>
15 15
16 #include "base/file_util.h" 16 #include "base/file_util.h"
17 #include "base/logging.h" 17 #include "base/logging.h"
18 #include "base/singleton.h" 18 #include "base/singleton.h"
19 #include "base/string_util.h" 19 #include "base/string_util.h"
20 20
21 // On some platforms, we use NSS for SSL only -- we don't use NSS for crypto 21 // On some platforms, we use NSS for SSL only -- we don't use NSS for crypto
22 // or certificate verification, and we don't use the NSS certificate and key 22 // or certificate verification, and we don't use the NSS certificate and key
23 // databases. 23 // databases.
24 #if defined(OS_WIN) 24 #if defined(OS_MACOSX) || defined(OS_WIN)
25 #define USE_NSS_FOR_SSL_ONLY 1 25 #define USE_NSS_FOR_SSL_ONLY 1
26 #endif 26 #endif
27 27
28 namespace { 28 namespace {
29 29
30 #if !defined(USE_NSS_FOR_SSL_ONLY) 30 #if !defined(USE_NSS_FOR_SSL_ONLY)
31 std::string GetDefaultConfigDirectory() { 31 std::string GetDefaultConfigDirectory() {
32 const char* home = getenv("HOME"); 32 const char* home = getenv("HOME");
33 if (home == NULL) { 33 if (home == NULL) {
34 LOG(ERROR) << "$HOME is not set."; 34 LOG(ERROR) << "$HOME is not set.";
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 exploded.millisecond = prxtime.tm_usec / 1000; 260 exploded.millisecond = prxtime.tm_usec / 1000;
261 261
262 return Time::FromUTCExploded(exploded); 262 return Time::FromUTCExploded(exploded);
263 } 263 }
264 264
265 PK11SlotInfo* GetDefaultNSSKeySlot() { 265 PK11SlotInfo* GetDefaultNSSKeySlot() {
266 return Singleton<NSSInitSingleton>::get()->GetDefaultKeySlot(); 266 return Singleton<NSSInitSingleton>::get()->GetDefaultKeySlot();
267 } 267 }
268 268
269 } // namespace base 269 } // namespace base
OLDNEW
« no previous file with comments | « base/base.gypi ('k') | build/all.gyp » ('j') | build/all.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698