]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_keychain/lib/TrustStore.cpp
Security-58286.260.20.tar.gz
[apple/security.git] / OSX / libsecurity_keychain / lib / TrustStore.cpp
index c703d431a5108c76c80dca0c3e0d4b104657b8ab..abdfa2a3d665f802f4dafdb45b7516123a2f2b4f 100644 (file)
@@ -30,7 +30,7 @@
 #include <security_keychain/KCCursor.h>
 #include <security_keychain/SecCFTypes.h>
 #include <security_cdsa_utilities/Schema.h>
-#include <security_keychain/SecTrustSettingsPriv.h>
+#include <Security/SecTrustSettingsPriv.h>
 
 namespace Security {
 namespace KeychainCore {
@@ -65,14 +65,14 @@ SecTrustUserSetting TrustStore::find(Certificate *cert, Policy *policy,
                                        try {
                                                cert->copyTo(location); // add cert to the trust item's keychain
                                        } catch (...) {
-                                               secdebug("trusteval", "failed to add certificate %p to keychain \"%s\"",
+                                               secinfo("trusteval", "failed to add certificate %p to keychain \"%s\"",
                                                        cert, location->name());
                                                try {
                                                        if (&*location != &*defaultKeychain)
                                                                cert->copyTo(defaultKeychain);  // try the default (if it's not the same)
                                                } catch (...) {
                                                        // unable to add the certificate
-                                                       secdebug("trusteval", "failed to add certificate %p to keychain \"%s\"",
+                                                       secinfo("trusteval", "failed to add certificate %p to keychain \"%s\"",
                                                                cert, defaultKeychain->name());
                                                }
                                        }
@@ -138,14 +138,14 @@ void TrustStore::assign(Certificate *cert, Policy *policy, SecTrustUserSetting t
                        try {
                                cert->copyTo(trustLocation);    // add cert to the trust item's keychain
                        } catch (...) {
-                               secdebug("trusteval", "failed to add certificate %p to keychain \"%s\"",
+                               secinfo("trusteval", "failed to add certificate %p to keychain \"%s\"",
                                        cert, trustLocation->name());
                                try {
                                        if (&*trustLocation != &*defaultKeychain)
                                                cert->copyTo(defaultKeychain);  // try the default (if it's not the same)
                                } catch (...) {
                                        // unable to add the certificate
-                                       secdebug("trusteval", "failed to add certificate %p to keychain \"%s\"",
+                                       secinfo("trusteval", "failed to add certificate %p to keychain \"%s\"",
                                                cert, defaultKeychain->name());
                                }
                        }
@@ -170,6 +170,7 @@ Item TrustStore::findItem(Certificate *cert, Policy *policy,
        // we no longer need or want to look for them anymore.
        return ((ItemImpl*)NULL);
 
+#if 0
        StLock<Mutex> _(mMutex);
 
        try {
@@ -192,6 +193,7 @@ Item TrustStore::findItem(Certificate *cert, Policy *policy,
        catch (const CommonError &error) {}
 
        return ((ItemImpl*)NULL);       // no trust schema, no records, no error
+#endif
 }
 
 void TrustStore::getCssmRootCertificates(CertGroup &rootCerts)
@@ -252,7 +254,7 @@ void TrustStore::loadRootCertificates()
                base += certData.Length;
        }
 
-       secdebug("anchors", "%ld anchors loaded", (long)numCerts);
+       secinfo("anchors", "%ld anchors loaded", (long)numCerts);
 
        mRootsValid = true;                     // ready to roll
 }