<pre style='margin:0'>
Ken (kencu) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/345d8b2e4d361f595003ed5059ae50a4b662b4f7">https://github.com/macports/macports-ports/commit/345d8b2e4d361f595003ed5059ae50a4b662b4f7</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 345d8b2 webkit2-gtk-devel: refresh patch
</span>345d8b2 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 345d8b2e4d361f595003ed5059ae50a4b662b4f7
</span>Author: Ken Cunningham <kencu@macports.org>
AuthorDate: Fri Aug 31 22:35:11 2018 -0700
<span style='display:block; white-space:pre;color:#404040;'> webkit2-gtk-devel: refresh patch
</span>---
.../files/patch-WTF-wtf-Randomdevice.diff | 120 ++++++++-------------
1 file changed, 45 insertions(+), 75 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/www/webkit2-gtk-devel/files/patch-WTF-wtf-Randomdevice.diff b/www/webkit2-gtk-devel/files/patch-WTF-wtf-Randomdevice.diff
</span><span style='display:block; white-space:pre;color:#808080;'>index 07092e8..bbd5052 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/www/webkit2-gtk-devel/files/patch-WTF-wtf-Randomdevice.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/www/webkit2-gtk-devel/files/patch-WTF-wtf-Randomdevice.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,115 +1,85 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-diff --git Source/WTF/wtf/RandomDevice.cpp Source/WTF/wtf/RandomDevice.cpp
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-index 61d6057..90fa30c 100644
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- Source/WTF/wtf/RandomDevice.cpp
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ Source/WTF/wtf/RandomDevice.cpp
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -30,24 +30,12 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff -u Source/WTF/wtf/RandomDevice.cpp.orig Source/WTF/wtf/RandomDevice.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- Source/WTF/wtf/RandomDevice.cpp.orig 2018-08-31 20:57:40.000000000 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ Source/WTF/wtf/RandomDevice.cpp 2018-08-31 21:01:02.000000000 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -30,7 +30,7 @@
</span> #include <stdint.h>
#include <stdlib.h>
<span style='display:block; white-space:pre;background:#ffe0e0;'>--#if !OS(DARWIN) && OS(UNIX)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#if !OS(DARWIN) && !OS(FUCHSIA) && OS(UNIX)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if (1)
</span> #include <errno.h>
#include <fcntl.h>
#include <unistd.h>
<span style='display:block; white-space:pre;background:#ffe0e0;'>--#endif
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--#if OS(WINDOWS)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--#include <windows.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--#include <wincrypt.h> // windows.h must be included before wincrypt.h.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--#endif
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -41,7 +41,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <wincrypt.h> // windows.h must be included before wincrypt.h.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> -#if OS(DARWIN)
<span style='display:block; white-space:pre;background:#ffe0e0;'>--#include "CommonCryptoSPI.h"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if (0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "CommonCryptoSPI.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -51,7 +51,7 @@
</span>
namespace WTF {
<span style='display:block; white-space:pre;background:#ffe0e0;'>--#if !OS(DARWIN) && OS(UNIX)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#if !OS(DARWIN) && !OS(FUCHSIA) && OS(UNIX)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if (1)
</span> NEVER_INLINE NO_RETURN_DUE_TO_CRASH static void crashUnableToOpenURandom()
{
CRASH();
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -57,9 +45,7 @@ NEVER_INLINE NO_RETURN_DUE_TO_CRASH static void crashUnableToReadFromURandom()
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- CRASH();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -63,7 +63,7 @@
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>--#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>--#if !OS(DARWIN) && !OS(WINDOWS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#if !OS(DARWIN) && !OS(FUCHSIA) && !OS(WINDOWS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if (1)
</span> RandomDevice::RandomDevice()
{
int ret = 0;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -70,22 +56,16 @@ RandomDevice::RandomDevice()
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (m_fd < 0)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- crashUnableToOpenURandom(); // We need /dev/urandom for this API to work...
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -76,7 +76,7 @@
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>--#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>--#if !OS(DARWIN) && !OS(WINDOWS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#if !OS(DARWIN) && !OS(FUCHSIA) && !OS(WINDOWS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if (1)
</span> RandomDevice::~RandomDevice()
{
close(m_fd);
<span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--#endif
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- // FIXME: Make this call fast by creating the pool in RandomDevice.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -87,11 +87,11 @@
</span> // https://bugs.webkit.org/show_bug.cgi?id=170190
void RandomDevice::cryptographicallyRandomValues(unsigned char* buffer, size_t length)
{
-#if OS(DARWIN)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-- RELEASE_ASSERT(!CCRandomCopyBytes(kCCRandomDefault, buffer, length));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if (0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ RELEASE_ASSERT(!CCRandomCopyBytes(kCCRandomDefault, buffer, length));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #elif OS(FUCHSIA)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ zx_cprng_draw(buffer, length);
</span> -#elif OS(UNIX)
<span style='display:block; white-space:pre;background:#e0ffe0;'>++#elif (1)
</span> ssize_t amountRead = 0;
while (static_cast<size_t>(amountRead) < length) {
ssize_t currentRead = read(m_fd, buffer + amountRead, length - amountRead);
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -97,20 +77,6 @@ void RandomDevice::cryptographicallyRandomValues(unsigned char* buffer, size_t l
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- amountRead += currentRead;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--#elif OS(WINDOWS)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- // FIXME: We cannot ensure that Cryptographic Service Provider context and CryptGenRandom are safe across threads.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- // If it is safe, we can acquire context per RandomDevice.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- HCRYPTPROV hCryptProv = 0;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- if (!CryptAcquireContext(&hCryptProv, 0, MS_DEF_PROV, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT))
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- CRASH();
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- if (!CryptGenRandom(hCryptProv, length, buffer))
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- CRASH();
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- CryptReleaseContext(hCryptProv, 0);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--#else
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--#error "This configuration doesn't have a strong source of randomness."
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--// WARNING: When adding new sources of OS randomness, the randomness must
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--// be of cryptographic quality!
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--#endif
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-diff --git Source/WTF/wtf/RandomDevice.h Source/WTF/wtf/RandomDevice.h
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-index 86636c9..410ccd0 100644
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- Source/WTF/wtf/RandomDevice.h
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ Source/WTF/wtf/RandomDevice.h
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -34,12 +34,8 @@ namespace WTF {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff -u Source/WTF/wtf/RandomDevice.h.orig Source/WTF/wtf/RandomDevice.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- Source/WTF/wtf/RandomDevice.h.orig 2018-08-31 21:02:42.000000000 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ Source/WTF/wtf/RandomDevice.h 2018-08-31 21:03:23.000000000 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -34,7 +34,7 @@
</span> class RandomDevice {
WTF_MAKE_NONCOPYABLE(RandomDevice);
public:
<span style='display:block; white-space:pre;background:#ffe0e0;'>--#if OS(DARWIN) || OS(WINDOWS)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- RandomDevice() = default;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#if OS(DARWIN) || OS(FUCHSIA) || OS(WINDOWS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if (0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ RandomDevice() = default;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #else
</span> RandomDevice();
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ~RandomDevice();
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--#endif
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- // This function attempts to fill buffer with randomness from the operating
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- // system. Rather than calling this function directly, consider calling
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -47,14 +43,7 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -47,8 +47,8 @@
</span> void cryptographicallyRandomValues(unsigned char* buffer, size_t length);
private:
<span style='display:block; white-space:pre;background:#ffe0e0;'>--#if OS(DARWIN) || OS(WINDOWS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#if OS(DARWIN) || OS(FUCHSIA) || OS(WINDOWS)
</span> -#elif OS(UNIX)
<span style='display:block; white-space:pre;background:#e0ffe0;'>++#if (0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#elif (1)
</span> int m_fd { -1 };
<span style='display:block; white-space:pre;background:#ffe0e0;'>--#else
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--#error "This configuration doesn't have a strong source of randomness."
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--// WARNING: When adding new sources of OS randomness, the randomness must
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--// be of cryptographic quality!
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--#endif
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- };
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #error "This configuration doesn't have a strong source of randomness."
</span></pre><pre style='margin:0'>
</pre>