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

Side by Side Diff: net/cert/test_keychain_search_list_mac.cc

Issue 2411023002: *WIP* Mac Unittest for client cert selection with intermediate certs
Patch Set: rebase Created 4 years, 1 month 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 | « net/cert/test_keychain_search_list_mac.h ('k') | net/data/ssl/certificates/README » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "net/cert/test_keychain_search_list_mac.h" 5 #include "net/cert/test_keychain_search_list_mac.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 8
9 namespace net { 9 namespace net {
10 10
(...skipping 24 matching lines...) Expand all
35 bool TestKeychainSearchList::HasInstance() { 35 bool TestKeychainSearchList::HasInstance() {
36 return !!g_test_keychain_search_list; 36 return !!g_test_keychain_search_list;
37 } 37 }
38 38
39 // static 39 // static
40 TestKeychainSearchList* TestKeychainSearchList::GetInstance() { 40 TestKeychainSearchList* TestKeychainSearchList::GetInstance() {
41 return g_test_keychain_search_list; 41 return g_test_keychain_search_list;
42 } 42 }
43 43
44 OSStatus TestKeychainSearchList::CopySearchList( 44 OSStatus TestKeychainSearchList::CopySearchList(
45 CFArrayRef* keychain_search_list) const { 45 base::ScopedCFTypeRef<CFArrayRef>* keychain_search_list) const {
46 *keychain_search_list = 46 keychain_search_list->reset(CFArrayCreateCopy(
47 CFArrayCreateCopy(kCFAllocatorDefault, scoped_keychain_search_list.get()); 47 kCFAllocatorDefault, scoped_keychain_search_list.get()));
48 return *keychain_search_list ? 0 : errSecAllocate; 48 return *keychain_search_list ? 0 : errSecAllocate;
49 } 49 }
50 50
51 void TestKeychainSearchList::AddKeychain(SecKeychainRef keychain) { 51 void TestKeychainSearchList::AddKeychain(SecKeychainRef keychain) {
52 CFArrayAppendValue(scoped_keychain_search_list.get(), keychain); 52 CFArrayAppendValue(scoped_keychain_search_list.get(), keychain);
53 } 53 }
54 54
55 } // namespace net 55 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/test_keychain_search_list_mac.h ('k') | net/data/ssl/certificates/README » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698