#include "cspdebugging.h"
#include <security_cdsa_plugin/CSPsession.h>
#include <security_utilities/alloc.h>
-#ifdef BSAFE_CSP_ENABLE
-#include "bsafecsp.h"
-#include "bsafecspi.h"
-#endif
#ifdef CRYPTKIT_CSP_ENABLE
#include "cryptkitcsp.h"
#include "FEEKeys.h"
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
AppleCSPPlugin::~AppleCSPPlugin()
{
- #ifdef BSAFE_CSP_ENABLE
- delete bSafe4Factory;
- #endif
#ifdef CRYPTKIT_CSP_ENABLE
delete cryptKitFactory;
#endif
upcalls);
default:
CssmError::throwMe(CSSMERR_CSSM_INVALID_SERVICE_MASK);
- return 0; // placebo
}
}
subserviceType,
attachFlags,
upcalls),
- #ifdef BSAFE_CSP_ENABLE
- bSafe4Factory(*(dynamic_cast<BSafeFactory *>(plug.bSafe4Factory))),
- #endif
#ifdef CRYPTKIT_CSP_ENABLE
cryptKitFactory(*(dynamic_cast<CryptKitFactory *>(plug.cryptKitFactory))),
#endif
* 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;
default:
return false;
}
- /* NOT REACHED */
- return false;
-
}
//
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);
}
StLock<Mutex> _(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);
}
}
else {
- secdebug("freeKey", "CSP freeKey unknown key");
+ secinfo("freeKey", "CSP freeKey unknown key");
}
}
}
{
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;