//
// Internal utilities
//
-inline CssmData CSPFullPluginSession::makeBuffer(size_t size, CssmAllocator &alloc)
+CssmData CSPFullPluginSession::makeBuffer(size_t size, CssmAllocator &alloc)
{
return CssmData(alloc.malloc(size), size);
}
void CSPFullPluginSession::DigestDataClone(CSSM_CC_HANDLE ccHandle,
CSSM_CC_HANDLE clonedCCHandle)
{
- setContext(clonedCCHandle, getStagedContext(ccHandle, CSSM_ALGCLASS_DIGEST)->clone(*this));
+ CSPContext *cloned = getStagedContext(ccHandle, CSSM_ALGCLASS_DIGEST)->clone(*this);
+ cloned->mDirection = true;
+ cloned->mType = CSSM_ALGCLASS_DIGEST;
+ setContext(clonedCCHandle, cloned);
}
CSSM_KEY_SIZE &keySize)
{
if (context) {
- getKeySize(context->get<CSSM_KEY>(CSSM_ATTRIBUTE_KEY, CSSMERR_CSP_MISSING_ATTR_KEY),
+ getKeySize(context->get<CssmKey>(CSSM_ATTRIBUTE_KEY, CSSMERR_CSP_MISSING_ATTR_KEY),
keySize);
} else {
getKeySize(CssmKey::required(key), keySize);
KeyPool::add(ReferencedKey &referencedKey)
{
StLock<Mutex> _(mKeyMapLock);
- bool inserted = mKeyMap.insert(KeyMap::value_type(referencedKey.keyReference(), &referencedKey)).second;
+ IFDEBUG(bool inserted =)
+ mKeyMap.insert(KeyMap::value_type(referencedKey.keyReference(), &referencedKey)).second;
// Since add is only called from the constructor of ReferencedKey we should
// never add a key that is already in mKeyMap
assert(inserted);