X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/5c19dc3ae3bd8e40a9c028b0deddd50ff337692c..7e6b461318c8a779d91381531435a68ee4e8b6ed:/OSX/libsecurity_apple_csp/lib/AppleCSP.cpp diff --git a/OSX/libsecurity_apple_csp/lib/AppleCSP.cpp b/OSX/libsecurity_apple_csp/lib/AppleCSP.cpp index ec9e78ca..1a32f514 100644 --- a/OSX/libsecurity_apple_csp/lib/AppleCSP.cpp +++ b/OSX/libsecurity_apple_csp/lib/AppleCSP.cpp @@ -26,10 +26,6 @@ #include "cspdebugging.h" #include #include -#ifdef BSAFE_CSP_ENABLE -#include "bsafecsp.h" -#include "bsafecspi.h" -#endif #ifdef CRYPTKIT_CSP_ENABLE #include "cryptkitcsp.h" #include "FEEKeys.h" @@ -51,9 +47,6 @@ AppleCSPPlugin::AppleCSPPlugin() : normAllocator(Allocator::standard(Allocator::normal)), privAllocator(Allocator::standard(Allocator::sensitive)), - #ifdef BSAFE_CSP_ENABLE - bSafe4Factory(new BSafeFactory(&normAllocator, &privAllocator)), - #endif #ifdef CRYPTKIT_CSP_ENABLE cryptKitFactory(new CryptKitFactory(&normAllocator, &privAllocator)), #endif @@ -69,9 +62,6 @@ AppleCSPPlugin::AppleCSPPlugin() : AppleCSPPlugin::~AppleCSPPlugin() { - #ifdef BSAFE_CSP_ENABLE - delete bSafe4Factory; - #endif #ifdef CRYPTKIT_CSP_ENABLE delete cryptKitFactory; #endif @@ -106,7 +96,6 @@ PluginSession *AppleCSPPlugin::makeSession( upcalls); default: CssmError::throwMe(CSSMERR_CSSM_INVALID_SERVICE_MASK); - return 0; // placebo } } @@ -129,9 +118,6 @@ AppleCSPSession::AppleCSPSession( subserviceType, attachFlags, upcalls), - #ifdef BSAFE_CSP_ENABLE - bSafe4Factory(*(dynamic_cast(plug.bSafe4Factory))), - #endif #ifdef CRYPTKIT_CSP_ENABLE cryptKitFactory(*(dynamic_cast(plug.cryptKitFactory))), #endif @@ -179,13 +165,6 @@ void AppleCSPSession::setupContext( * Note we leave the decision as to whether it's OK to * reuse a context to the individual factories. */ - #ifdef BSAFE_CSP_ENABLE - /* Give BSAFE the firsrt shot if it's present */ - if (bSafe4Factory.setup(*this, cspCtx, context)) { - CASSERT(cspCtx != NULL); - return; - } - #endif if (rsaDsaAlgFactory.setup(*this, cspCtx, context)) { CASSERT(cspCtx != NULL); return; @@ -244,9 +223,6 @@ bool AppleCSPSession::setup( default: return false; } - /* NOT REACHED */ - return false; - } // @@ -378,7 +354,7 @@ void AppleCSPSession::addRefKey( cssmKey.KeyHeader.BlobType = CSSM_KEYBLOB_REFERENCE; cssmKey.KeyHeader.Format = CSSM_KEYBLOB_REF_FORMAT_INTEGER; keyRefToCssmData(keyRef, cssmKey.KeyData, normAllocator); - secdebug("freeKey", "CSP addRefKey key %p keyData %p keyRef %p", + secinfo("freeKey", "CSP addRefKey key %p keyData %p keyRef %p", &cssmKey, cssmKey.KeyData.Data, &binKey); } @@ -432,7 +408,7 @@ void AppleCSPSession::FreeKey( StLock _(refKeyMapLock); BinaryKey *binKey = lookupKeyRef(keyRef); if(binKey != NULL) { - secdebug("freeKey", "CSP FreeKey key %p keyData %p binKey %p", + secinfo("freeKey", "CSP FreeKey key %p keyData %p binKey %p", &KeyPtr, KeyPtr.KeyData.Data, binKey); try { refKeyMap.erase(keyRef); @@ -444,7 +420,7 @@ void AppleCSPSession::FreeKey( } } else { - secdebug("freeKey", "CSP freeKey unknown key"); + secinfo("freeKey", "CSP freeKey unknown key"); } } } @@ -621,14 +597,6 @@ CSPKeyInfoProvider *AppleCSPSession::infoProvider( { CSPKeyInfoProvider *provider = NULL; - #ifdef BSAFE_CSP_ENABLE - /* Give BSAFE first shot, if it's here */ - provider = BSafe::BSafeKeyInfoProvider::provider(key, *this); - if(provider != NULL) { - return provider; - } - #endif - provider = RSAKeyInfoProvider::provider(key, *this); if(provider != NULL) { return provider;