| Index: Source/modules/websockets/WebSocketHandshake.cpp
|
| diff --git a/Source/modules/websockets/WebSocketHandshake.cpp b/Source/modules/websockets/WebSocketHandshake.cpp
|
| index b0ed328eb15260c46a096eeea958649db3264814..cff98c34b7bb528afd2b700a68a3e4562a666c2c 100644
|
| --- a/Source/modules/websockets/WebSocketHandshake.cpp
|
| +++ b/Source/modules/websockets/WebSocketHandshake.cpp
|
| @@ -121,14 +121,14 @@ static String generateSecWebSocketKey()
|
| String WebSocketHandshake::getExpectedWebSocketAccept(const String& secWebSocketKey)
|
| {
|
| static const char webSocketKeyGUID[] = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
|
| - static const size_t sha1HashSize = 20; // FIXME: This should be defined in SHA1.h.
|
| SHA1 sha1;
|
| CString keyData = secWebSocketKey.ascii();
|
| sha1.addBytes(reinterpret_cast<const uint8_t*>(keyData.data()), keyData.length());
|
| sha1.addBytes(reinterpret_cast<const uint8_t*>(webSocketKeyGUID), strlen(webSocketKeyGUID));
|
| - Vector<uint8_t, sha1HashSize> hash;
|
| + Vector<uint8_t, SHA1::outputSizeBytes> hash;
|
| sha1.computeHash(hash);
|
| - return base64Encode(reinterpret_cast<const char*>(hash.data()), sha1HashSize);
|
| + return base64Encode(reinterpret_cast<const char*>(hash.data()),
|
| + SHA1::outputSizeBytes);
|
| }
|
|
|
| WebSocketHandshake::WebSocketHandshake(const KURL& url, const String& protocol, ExecutionContext* context)
|
|
|