diff options
| author | Konstantin Tokarev <annulen@yandex.ru> | 2019-06-04 22:44:55 +0300 |
|---|---|---|
| committer | Konstantin Tokarev <annulen@yandex.ru> | 2019-06-04 22:45:21 +0300 |
| commit | c49326e942d7cc21f78fe187020dce73befdd935 (patch) | |
| tree | faf0927eeeff4c57e998902b2085d976e588ed2b /Source/WTF/wtf/OSRandomSource.cpp | |
| parent | 72cfbd7664f21fcc0e62b869a6b01bf73eb5e7da (diff) | |
Import WebKit commit 5ccca3a720f7c2251c4ac8b28f25bd73524081f0
Change-Id: Idfb37cd43929536d4c67d1fa5d8cb598e9c0ad7e
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Source/WTF/wtf/OSRandomSource.cpp')
| -rw-r--r-- | Source/WTF/wtf/OSRandomSource.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/WTF/wtf/OSRandomSource.cpp b/Source/WTF/wtf/OSRandomSource.cpp index 378795dc7..529acf714 100644 --- a/Source/WTF/wtf/OSRandomSource.cpp +++ b/Source/WTF/wtf/OSRandomSource.cpp @@ -41,7 +41,8 @@ #endif #if OS(DARWIN) -#include "CommonCryptoSPI.h" +#include <CommonCrypto/CommonCryptoError.h> +#include <CommonCrypto/CommonRandom.h> #endif namespace WTF { @@ -61,7 +62,7 @@ NEVER_INLINE NO_RETURN_DUE_TO_CRASH static void crashUnableToReadFromURandom() void cryptographicallyRandomValuesFromOS(unsigned char* buffer, size_t length) { #if OS(DARWIN) - RELEASE_ASSERT(!CCRandomCopyBytes(kCCRandomDefault, buffer, length)); + RELEASE_ASSERT(!CCRandomGenerateBytes(buffer, length)); #elif OS(UNIX) int fd = open("/dev/urandom", O_RDONLY, 0); if (fd < 0) |
