| Index: Source/bindings/v8/SerializedScriptValue.cpp
|
| diff --git a/Source/bindings/v8/SerializedScriptValue.cpp b/Source/bindings/v8/SerializedScriptValue.cpp
|
| index 68fb3e3c9dadda4b3ad0a976433819ef78317c31..f71aa8a840771b7567a15b454e8e0bbed49fee84 100644
|
| --- a/Source/bindings/v8/SerializedScriptValue.cpp
|
| +++ b/Source/bindings/v8/SerializedScriptValue.cpp
|
| @@ -293,6 +293,7 @@ enum CryptoKeyUsage {
|
| DeriveKeyUsage = 1 << 5,
|
| WrapKeyUsage = 1 << 6,
|
| UnwrapKeyUsage = 1 << 7,
|
| + DeriveBitsUsage = 1 << 8,
|
| // Maximum allowed value is 1 << 31
|
| };
|
|
|
| @@ -793,7 +794,7 @@ private:
|
| void doWriteKeyUsages(const blink::WebCryptoKeyUsageMask usages, bool extractable)
|
| {
|
| // Reminder to update this when adding new key usages.
|
| - COMPILE_ASSERT(blink::EndOfWebCryptoKeyUsage == (1 << 6) + 1, UpdateMe);
|
| + COMPILE_ASSERT(blink::EndOfWebCryptoKeyUsage == (1 << 7) + 1, UpdateMe);
|
|
|
| uint32_t value = 0;
|
|
|
| @@ -814,6 +815,8 @@ private:
|
| value |= WrapKeyUsage;
|
| if (usages & blink::WebCryptoKeyUsageUnwrapKey)
|
| value |= UnwrapKeyUsage;
|
| + if (usages & blink::WebCryptoKeyUsageDeriveBits)
|
| + value |= DeriveBitsUsage;
|
|
|
| doWriteUint32(value);
|
| }
|
| @@ -2508,8 +2511,8 @@ private:
|
| bool doReadKeyUsages(blink::WebCryptoKeyUsageMask& usages, bool& extractable)
|
| {
|
| // Reminder to update this when adding new key usages.
|
| - COMPILE_ASSERT(blink::EndOfWebCryptoKeyUsage == (1 << 6) + 1, UpdateMe);
|
| - const uint32_t allPossibleUsages = ExtractableUsage | EncryptUsage | DecryptUsage | SignUsage | VerifyUsage | DeriveKeyUsage | WrapKeyUsage | UnwrapKeyUsage;
|
| + COMPILE_ASSERT(blink::EndOfWebCryptoKeyUsage == (1 << 7) + 1, UpdateMe);
|
| + const uint32_t allPossibleUsages = ExtractableUsage | EncryptUsage | DecryptUsage | SignUsage | VerifyUsage | DeriveKeyUsage | WrapKeyUsage | UnwrapKeyUsage | DeriveBitsUsage;
|
|
|
| uint32_t rawUsages;
|
| if (!doReadUint32(&rawUsages))
|
| @@ -2537,6 +2540,8 @@ private:
|
| usages |= blink::WebCryptoKeyUsageWrapKey;
|
| if (rawUsages & UnwrapKeyUsage)
|
| usages |= blink::WebCryptoKeyUsageUnwrapKey;
|
| + if (rawUsages & DeriveBitsUsage)
|
| + usages |= blink::WebCryptoKeyUsageDeriveBits;
|
|
|
| return true;
|
| }
|
|
|