cryptographicallyRandomValuesFromOS should use CCRandomCopyBytes when available.
authorkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Sep 2015 21:34:15 +0000 (21:34 +0000)
committerkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Sep 2015 21:34:15 +0000 (21:34 +0000)
commit7578e221acf2e6d09542ea5f7691c7be61f9218d
tree84c986c06c3d0182473e28c03f7e46036931cc45
parentf8fb557028925878e856d388ef26b52180fda30e
cryptographicallyRandomValuesFromOS should use CCRandomCopyBytes when available.
https://bugs.webkit.org/show_bug.cgi?id=148439

Reviewed by Alexey Proskuryakov.

Recently, we switched to using arc4random_buf on Darwin but further research indicates that
arc4random_buf has the same behavior we had before and thus we were just pushing the problem
further down the stack. CCRandomCopyBytes, however, appears to be more advanced and has much
better error handling than we had before.

* WTF.xcodeproj/project.pbxproj:
* wtf/OSRandomSource.cpp:
(WTF::cryptographicallyRandomValuesFromOS):
* wtf/spi/darwin/CommonCryptoSPI.h: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@189633 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WTF/ChangeLog
Source/WTF/WTF.xcodeproj/project.pbxproj
Source/WTF/wtf/OSRandomSource.cpp
Source/WTF/wtf/spi/darwin/CommonCryptoSPI.h [new file with mode: 0644]