Changeset 279642 in webkit


Ignore:
Timestamp:
Jul 7, 2021 8:37:24 AM (13 months ago)
Author:
Chris Dumez
Message:

SubtleCrypto should only be exposed to secure contexts
https://bugs.webkit.org/show_bug.cgi?id=227725

Reviewed by Darin Adler.

Source/WebCore:

SubtleCrypto should only be exposed to secure contexts:

Gecko and Blink match the specification.

This was causing WebKit to fail the WebCryptoAPI/historical.any.html WPT test.

Test: http/wpt/crypto/historical.html

  • crypto/CryptoKey.idl:
  • crypto/SubtleCrypto.idl:
  • page/Crypto.idl:

LayoutTests:

Add layout test coverage.

  • http/wpt/crypto/historical-expected.txt: Added.
  • http/wpt/crypto/historical.html: Added.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r279640 r279642  
     12021-07-07  Chris Dumez  <cdumez@apple.com>
     2
     3        SubtleCrypto should only be exposed to secure contexts
     4        https://bugs.webkit.org/show_bug.cgi?id=227725
     5
     6        Reviewed by Darin Adler.
     7
     8        Add layout test coverage.
     9
     10        * http/wpt/crypto/historical-expected.txt: Added.
     11        * http/wpt/crypto/historical.html: Added.
     12
    1132021-07-07  Chris Lord  <clord@igalia.com>
    214
  • trunk/Source/WebCore/ChangeLog

    r279640 r279642  
     12021-07-07  Chris Dumez  <cdumez@apple.com>
     2
     3        SubtleCrypto should only be exposed to secure contexts
     4        https://bugs.webkit.org/show_bug.cgi?id=227725
     5
     6        Reviewed by Darin Adler.
     7
     8        SubtleCrypto should only be exposed to secure contexts:
     9        - https://www.w3.org/TR/WebCryptoAPI/#dfn-Crypto
     10
     11        Gecko and Blink match the specification.
     12
     13        This was causing WebKit to fail the WebCryptoAPI/historical.any.html WPT test.
     14
     15        Test: http/wpt/crypto/historical.html
     16
     17        * crypto/CryptoKey.idl:
     18        * crypto/SubtleCrypto.idl:
     19        * page/Crypto.idl:
     20
    1212021-07-07  Chris Lord  <clord@igalia.com>
    222
  • trunk/Source/WebCore/crypto/CryptoKey.idl

    r279639 r279642  
    3636    Exposed=(Window,Worker),
    3737    GenerateIsReachable=Impl,
     38    SecureContext,
    3839    SkipVTableValidation
    3940] interface CryptoKey {
  • trunk/Source/WebCore/crypto/SubtleCrypto.idl

    r279639 r279642  
    3232    Exposed=(Window,Worker),
    3333    GenerateIsReachable=ImplScriptExecutionContext,
     34    SecureContext,
    3435] interface SubtleCrypto {
    3536    [CallWith=GlobalObject] Promise<any> encrypt(AlgorithmIdentifier algorithm, CryptoKey key, BufferSource data);
  • trunk/Source/WebCore/page/Crypto.idl

    r279639 r279642  
    3232    GenerateIsReachable=ImplScriptExecutionContext
    3333] interface Crypto {
    34     [Conditional=WEB_CRYPTO] readonly attribute SubtleCrypto subtle;
     34    [Conditional=WEB_CRYPTO, SecureContext] readonly attribute SubtleCrypto subtle;
    3535    ArrayBufferView getRandomValues([ReturnValue] ArrayBufferView array);
    3636};
Note: See TracChangeset for help on using the changeset viewer.