X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/bac41a7b9a0a9254fa30f8bb6e6038ab71a483e2..7948e047ad0cdb129f10661905b2f3eecd5c85a0:/cdsa/cdsa_pluginlib/CSPsession.cpp?ds=sidebyside diff --git a/cdsa/cdsa_pluginlib/CSPsession.cpp b/cdsa/cdsa_pluginlib/CSPsession.cpp index d18fd08e..f972732d 100644 --- a/cdsa/cdsa_pluginlib/CSPsession.cpp +++ b/cdsa/cdsa_pluginlib/CSPsession.cpp @@ -40,7 +40,7 @@ CSPPluginSession::PluginContext::~PluginContext() // // 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); } @@ -655,7 +655,10 @@ void CSPFullPluginSession::DigestDataFinal(CSSM_CC_HANDLE ccHandle, 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); }