| OLD | NEW |
| (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_ |
| OLD | NEW |