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

Side by Side Diff: net/cert/known_roots_mac.h

Issue 2833623002: Extract IsKnownRoot() functionality for testing if a certificate is a (Closed)
Patch Set: checkpoint Created 3 years, 8 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
OLDNEW
(Empty)
1 // Copyright (c) 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef NET_CERT_KNOWN_ROOTS_MAC_H_
6 #define NET_CERT_KNOWN_ROOTS_MAC_H_
7
8 #include <Security/Security.h>
9
10 namespace net {
11
12 // IsKnownRoot returns true if the given certificate is one that we believe
13 // is a standard (as opposed to user-installed) root.
14 //
15 // NOTE: The first call will lazily initialize the known roots, which requires
16 // holding crypto::GetMacSecurityServicesLock(). Callers must therefore either
17 // acquire that lock prior to calling this, or eagerly initialize beforehand
18 // using InitializeKnownRoots().
19 bool IsKnownRoot(SecCertificateRef cert);
20
21 // Calling this is optional as initialization will otherwise be done lazily when
22 // calling IsKnownRoot(). When calling this, the current thread must NOT already
23 // be holding/ crypto::GetMacSecurityServicesLock().
24 void InitializeKnownRoots();
25
26 } // namespace net
27
28 #endif // NET_CERT_KNOWN_ROOTS_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698