]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_apple_cspdl/lib/SSCSPSession.cpp
Security-59306.61.1.tar.gz
[apple/security.git] / OSX / libsecurity_apple_cspdl / lib / SSCSPSession.cpp
index d82bb4e3ddb50def1fec6c83a734284026a2c384..d079b3f09c0c94f94512667490c4f66a11afe99b 100644 (file)
@@ -346,6 +346,7 @@ SSCSPSession::FreeKey(const AccessCredentials *accessCred,
 {
        if (ioKey.blobType() == CSSM_KEYBLOB_REFERENCE)
        {
+        StLock<Mutex> _(mSSCSPDLSession.mKeyDeletionMutex);
                // @@@ Note that this means that detaching a session should free
                // all keys ascociated with it or else...
                // -- or else what?
@@ -357,7 +358,7 @@ SSCSPSession::FreeKey(const AccessCredentials *accessCred,
 
                // Find the key in the map.  Tell tell the key to free itself
                // (when the auto_ptr deletes the key it removes itself from the map). 
-           secdebug("freeKey", "CSPDL FreeKey");
+           secinfo("freeKey", "CSPDL FreeKey");
                auto_ptr<SSKey> ssKey(&mSSCSPDLSession.find<SSKey>(ioKey));
                ssKey->free(accessCred, ioKey, deleteKey);
        }