WebCrypto uses deprecated CCKeyDerivationHMac
Created attachment 436287 [details] Patch
rdar://48896021
Created attachment 436291 [details] Patch
Comment on attachment 436291 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=436291&action=review r=me > Source/WebCore/crypto/mac/CryptoUtilitiesCocoa.cpp:119 > + return rv; Does an unsuccessful call to CCKDFParametersCreateHkdf guarantee that the params are properly cleaned up? > Source/WebCore/crypto/mac/CryptoUtilitiesCocoa.cpp:133 > + if (keyDerivationHMAC(digestAlgorithm, key, keySize, info, infoSize, salt, saltSize, result.data(), result.size())) Should this be a check for != kCCSuccess?
(In reply to Brent Fulgham from comment #4) > Comment on attachment 436291 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=436291&action=review > > r=me > > > Source/WebCore/crypto/mac/CryptoUtilitiesCocoa.cpp:119 > > + return rv; > > Does an unsuccessful call to CCKDFParametersCreateHkdf guarantee that the > params are properly cleaned up? > Yes, params are not set in CCKDFParametersCreateHkdf unless it is returning kCCSuccess. > > Source/WebCore/crypto/mac/CryptoUtilitiesCocoa.cpp:133 > > + if (keyDerivationHMAC(digestAlgorithm, key, keySize, info, infoSize, salt, saltSize, result.data(), result.size())) > > Should this be a check for != kCCSuccess? Yes, probably easier to read that way. I'll fix before landing. Thanks for the review!
Created attachment 436314 [details] Patch
Committed r281554 (240921@main): <https://commits.webkit.org/240921@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 436314 [details].