Changeset 205755 in webkit


Ignore:
Timestamp:
Sep 9, 2016 11:38:47 AM (8 years ago)
Author:
jiewen_tan@apple.com
Message:

Rename Key to CryptoKey
https://bugs.webkit.org/show_bug.cgi?id=161665
<rdar://problem/28083391>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • WebCryptoAPI/idlharness-expected.txt:

Source/WebCore:

A link to the spec: https://www.w3.org/TR/WebCryptoAPI/#cryptokey-interface

  • crypto/CryptoKey.idl:

Remove some unnecessary IDL attributes and reorder KeyType enum to match the spec.

  • crypto/CryptoKeyType.h:

LayoutTests:

  • crypto/subtle/aes-cbc-unwrap-rsa-expected.txt:
  • crypto/subtle/aes-cbc-unwrap-rsa.html:
  • crypto/subtle/aes-kw-key-manipulation-expected.txt:
  • crypto/subtle/aes-kw-key-manipulation.html:
  • crypto/subtle/aes-kw-wrap-unwrap-aes-expected.txt:
  • crypto/subtle/aes-kw-wrap-unwrap-aes.html:
  • crypto/subtle/rsa-oaep-wrap-unwrap-aes-expected.txt:
  • crypto/subtle/rsa-oaep-wrap-unwrap-aes.html:
  • crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes-expected.txt:
  • crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html:
  • crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-expected.txt:
  • crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html:
  • platform/mac/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
Location:
trunk
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r205750 r205755  
     12016-09-09  Jiewen Tan  <jiewen_tan@apple.com>
     2
     3        Rename Key to CryptoKey
     4        https://bugs.webkit.org/show_bug.cgi?id=161665
     5        <rdar://problem/28083391>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        * crypto/subtle/aes-cbc-unwrap-rsa-expected.txt:
     10        * crypto/subtle/aes-cbc-unwrap-rsa.html:
     11        * crypto/subtle/aes-kw-key-manipulation-expected.txt:
     12        * crypto/subtle/aes-kw-key-manipulation.html:
     13        * crypto/subtle/aes-kw-wrap-unwrap-aes-expected.txt:
     14        * crypto/subtle/aes-kw-wrap-unwrap-aes.html:
     15        * crypto/subtle/rsa-oaep-wrap-unwrap-aes-expected.txt:
     16        * crypto/subtle/rsa-oaep-wrap-unwrap-aes.html:
     17        * crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes-expected.txt:
     18        * crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html:
     19        * crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-expected.txt:
     20        * crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html:
     21        * platform/mac/js/dom/global-constructors-attributes-expected.txt:
     22        * platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
     23
    1242016-09-09  Youenn Fablet  <youenn@apple.com>
    225
  • trunk/LayoutTests/crypto/subtle/aes-cbc-unwrap-rsa-expected.txt

    r160491 r205755  
    77PASS unwrappingKey.algorithm.name is 'AES-CBC'
    88Unwrapping a key...
    9 PASS unwrappedKey.toString() is '[object Key]'
     9PASS unwrappedKey.toString() is '[object CryptoKey]'
    1010PASS unwrappedKey.type is 'public'
    1111PASS unwrappedKey.usages is ['sign','verify']
  • trunk/LayoutTests/crypto/subtle/aes-cbc-unwrap-rsa.html

    r160491 r205755  
    3939    unwrappedKey = result;
    4040
    41     shouldBe("unwrappedKey.toString()", "'[object Key]'");
     41    shouldBe("unwrappedKey.toString()", "'[object CryptoKey]'");
    4242    shouldBe("unwrappedKey.type", "'public'");
    4343    shouldBe("unwrappedKey.usages", "['sign','verify']");
  • trunk/LayoutTests/crypto/subtle/aes-kw-key-manipulation-expected.txt

    r203333 r205755  
    55
    66Generating a key...
    7 PASS key.toString() is '[object Key]'
     7PASS key.toString() is '[object CryptoKey]'
    88PASS key.type is 'secret'
    99PASS key.algorithm.name is 'AES-KW'
     
    1616PASS exportedKey.toString() is '[object ArrayBuffer]'
    1717Importing it back...
    18 PASS importedKey.toString() is '[object Key]'
     18PASS importedKey.toString() is '[object CryptoKey]'
    1919PASS importedKey.type is 'secret'
    2020PASS importedKey.algorithm.name is 'AES-KW'
  • trunk/LayoutTests/crypto/subtle/aes-kw-key-manipulation.html

    r160491 r205755  
    1919crypto.subtle.generateKey({name: "aes-kw", length: 256}, extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]).then(function(result) {
    2020    key = result;
    21     shouldBe("key.toString()", "'[object Key]'");
     21    shouldBe("key.toString()", "'[object CryptoKey]'");
    2222    shouldBe("key.type", "'secret'");
    2323    shouldBe("key.algorithm.name", "'AES-KW'");
     
    3838    importedKey = result;
    3939
    40     shouldBe("importedKey.toString()", "'[object Key]'");
     40    shouldBe("importedKey.toString()", "'[object CryptoKey]'");
    4141    shouldBe("importedKey.type", "'secret'");
    4242    shouldBe("importedKey.algorithm.name", "'AES-KW'");
  • trunk/LayoutTests/crypto/subtle/aes-kw-wrap-unwrap-aes-expected.txt

    r163244 r205755  
    99PASS bytesToHexString(wrappedKey) is '1fa68b0a8112b447aef34bd8fb5a7b829d3e862371d2cfe5'
    1010Unwrapping it...
    11 PASS unwrappedKey.toString() is '[object Key]'
     11PASS unwrappedKey.toString() is '[object CryptoKey]'
    1212PASS unwrappedKey.type is 'secret'
    1313PASS unwrappedKey.extractable is true
  • trunk/LayoutTests/crypto/subtle/aes-kw-wrap-unwrap-aes.html

    r163244 r205755  
    3737}).then(function(result) {
    3838    unwrappedKey = result;
    39     shouldBe("unwrappedKey.toString()", "'[object Key]'");
     39    shouldBe("unwrappedKey.toString()", "'[object CryptoKey]'");
    4040    shouldBe("unwrappedKey.type", "'secret'");
    4141    shouldBe("unwrappedKey.extractable", "true");
  • trunk/LayoutTests/crypto/subtle/rsa-oaep-wrap-unwrap-aes-expected.txt

    r160547 r205755  
    99PASS wrappedKey.toString() is '[object ArrayBuffer]'
    1010Unwrapping it...
    11 PASS unwrappedKey.toString() is '[object Key]'
     11PASS unwrappedKey.toString() is '[object CryptoKey]'
    1212PASS unwrappedKey.type is 'secret'
    1313PASS unwrappedKey.extractable is true
     
    2121PASS wrappedKey.toString() is '[object ArrayBuffer]'
    2222Unwrapping it...
    23 PASS unwrappedKey.toString() is '[object Key]'
     23PASS unwrappedKey.toString() is '[object CryptoKey]'
    2424PASS unwrappedKey.type is 'secret'
    2525PASS unwrappedKey.extractable is true
  • trunk/LayoutTests/crypto/subtle/rsa-oaep-wrap-unwrap-aes.html

    r160547 r205755  
    6060}).then(function(result) {
    6161    unwrappedKey = result;
    62     shouldBe("unwrappedKey.toString()", "'[object Key]'");
     62    shouldBe("unwrappedKey.toString()", "'[object CryptoKey]'");
    6363    shouldBe("unwrappedKey.type", "'secret'");
    6464    shouldBe("unwrappedKey.extractable", "true");
     
    8383}).then(function(result) {
    8484    unwrappedKey = result;
    85     shouldBe("unwrappedKey.toString()", "'[object Key]'");
     85    shouldBe("unwrappedKey.toString()", "'[object CryptoKey]'");
    8686    shouldBe("unwrappedKey.type", "'secret'");
    8787    shouldBe("unwrappedKey.extractable", "true");
  • trunk/LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes-expected.txt

    r160547 r205755  
    99PASS wrappedKey.toString() is '[object ArrayBuffer]'
    1010Unwrapping it...
    11 PASS unwrappedKey.toString() is '[object Key]'
     11PASS unwrappedKey.toString() is '[object CryptoKey]'
    1212PASS unwrappedKey.type is 'secret'
    1313PASS unwrappedKey.extractable is true
     
    2121PASS wrappedKey.toString() is '[object ArrayBuffer]'
    2222Unwrapping it...
    23 PASS unwrappedKey.toString() is '[object Key]'
     23PASS unwrappedKey.toString() is '[object CryptoKey]'
    2424PASS unwrappedKey.type is 'secret'
    2525PASS unwrappedKey.extractable is true
  • trunk/LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html

    r160547 r205755  
    6060}).then(function(result) {
    6161    unwrappedKey = result;
    62     shouldBe("unwrappedKey.toString()", "'[object Key]'");
     62    shouldBe("unwrappedKey.toString()", "'[object CryptoKey]'");
    6363    shouldBe("unwrappedKey.type", "'secret'");
    6464    shouldBe("unwrappedKey.extractable", "true");
     
    8383}).then(function(result) {
    8484    unwrappedKey = result;
    85     shouldBe("unwrappedKey.toString()", "'[object Key]'");
     85    shouldBe("unwrappedKey.toString()", "'[object CryptoKey]'");
    8686    shouldBe("unwrappedKey.type", "'secret'");
    8787    shouldBe("unwrappedKey.extractable", "true");
  • trunk/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-expected.txt

    r160491 r205755  
    55
    66Importing a public key...
    7 PASS publicKey.toString() is '[object Key]'
     7PASS publicKey.toString() is '[object CryptoKey]'
    88PASS publicKey.type is 'public'
    99PASS publicKey.usages is ['sign','verify']
     
    1414
    1515Importing a private key...
    16 PASS privateKey.toString() is '[object Key]'
     16PASS privateKey.toString() is '[object CryptoKey]'
    1717PASS privateKey.type is 'private'
    1818PASS privateKey.usages is ['sign','verify']
  • trunk/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html

    r160491 r205755  
    3939crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["sign", "verify"]).then(function(result) {
    4040    publicKey = result;
    41     shouldBe("publicKey.toString()", "'[object Key]'");
     41    shouldBe("publicKey.toString()", "'[object CryptoKey]'");
    4242    shouldBe("publicKey.type", "'public'");
    4343    shouldBe("publicKey.usages", "['sign','verify']");
     
    5050}).then(function(result) {
    5151    privateKey = result;
    52     shouldBe("privateKey.toString()", "'[object Key]'");
     52    shouldBe("privateKey.toString()", "'[object CryptoKey]'");
    5353    shouldBe("privateKey.type", "'private'");
    5454    shouldBe("privateKey.usages", "['sign','verify']");
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r205750 r205755  
     12016-09-09  Jiewen Tan  <jiewen_tan@apple.com>
     2
     3        Rename Key to CryptoKey
     4        https://bugs.webkit.org/show_bug.cgi?id=161665
     5        <rdar://problem/28083391>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        * WebCryptoAPI/idlharness-expected.txt:
     10
    1112016-09-09  Youenn Fablet  <youenn@apple.com>
    212
  • trunk/LayoutTests/imported/w3c/WebCryptoAPI/idlharness-expected.txt

    r203476 r205755  
    1616PASS Crypto interface: crypto must inherit property "getRandomValues" with the proper type (1)
    1717PASS Crypto interface: calling getRandomValues(ArrayBufferView) on crypto with too few arguments must throw TypeError
    18 FAIL CryptoKey interface: existence and properties of interface object assert_own_property: self does not have own property "CryptoKey" expected property "CryptoKey" missing
    19 FAIL CryptoKey interface object length assert_own_property: self does not have own property "CryptoKey" expected property "CryptoKey" missing
    20 FAIL CryptoKey interface object name assert_own_property: self does not have own property "CryptoKey" expected property "CryptoKey" missing
    21 FAIL CryptoKey interface: existence and properties of interface prototype object assert_own_property: self does not have own property "CryptoKey" expected property "CryptoKey" missing
    22 FAIL CryptoKey interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "CryptoKey" expected property "CryptoKey" missing
    23 FAIL CryptoKey interface: attribute type assert_own_property: self does not have own property "CryptoKey" expected property "CryptoKey" missing
    24 FAIL CryptoKey interface: attribute extractable assert_own_property: self does not have own property "CryptoKey" expected property "CryptoKey" missing
    25 FAIL CryptoKey interface: attribute algorithm assert_own_property: self does not have own property "CryptoKey" expected property "CryptoKey" missing
    26 FAIL CryptoKey interface: attribute usages assert_own_property: self does not have own property "CryptoKey" expected property "CryptoKey" missing
     18PASS CryptoKey interface: existence and properties of interface object
     19PASS CryptoKey interface object length
     20PASS CryptoKey interface object name
     21PASS CryptoKey interface: existence and properties of interface prototype object
     22PASS CryptoKey interface: existence and properties of interface prototype object's "constructor" property
     23PASS CryptoKey interface: attribute type
     24PASS CryptoKey interface: attribute extractable
     25PASS CryptoKey interface: attribute algorithm
     26PASS CryptoKey interface: attribute usages
    2727FAIL SubtleCrypto interface: existence and properties of interface object assert_own_property: self does not have own property "SubtleCrypto" expected property "SubtleCrypto" missing
    2828FAIL SubtleCrypto interface object length assert_own_property: self does not have own property "SubtleCrypto" expected property "SubtleCrypto" missing
  • trunk/LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt

    r205024 r205755  
    299299PASS Object.getOwnPropertyDescriptor(global, 'Crypto').enumerable is false
    300300PASS Object.getOwnPropertyDescriptor(global, 'Crypto').configurable is true
     301PASS Object.getOwnPropertyDescriptor(global, 'CryptoKey').value is CryptoKey
     302PASS Object.getOwnPropertyDescriptor(global, 'CryptoKey').hasOwnProperty('get') is false
     303PASS Object.getOwnPropertyDescriptor(global, 'CryptoKey').hasOwnProperty('set') is false
     304PASS Object.getOwnPropertyDescriptor(global, 'CryptoKey').enumerable is false
     305PASS Object.getOwnPropertyDescriptor(global, 'CryptoKey').configurable is true
    301306PASS Object.getOwnPropertyDescriptor(global, 'CustomElementRegistry').value is CustomElementRegistry
    302307PASS Object.getOwnPropertyDescriptor(global, 'CustomElementRegistry').hasOwnProperty('get') is false
  • trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt

    r205024 r205755  
    299299PASS Object.getOwnPropertyDescriptor(global, 'Crypto').enumerable is false
    300300PASS Object.getOwnPropertyDescriptor(global, 'Crypto').configurable is true
     301PASS Object.getOwnPropertyDescriptor(global, 'CryptoKey').value is CryptoKey
     302PASS Object.getOwnPropertyDescriptor(global, 'CryptoKey').hasOwnProperty('get') is false
     303PASS Object.getOwnPropertyDescriptor(global, 'CryptoKey').hasOwnProperty('set') is false
     304PASS Object.getOwnPropertyDescriptor(global, 'CryptoKey').enumerable is false
     305PASS Object.getOwnPropertyDescriptor(global, 'CryptoKey').configurable is true
    301306PASS Object.getOwnPropertyDescriptor(global, 'CustomElementRegistry').value is CustomElementRegistry
    302307PASS Object.getOwnPropertyDescriptor(global, 'CustomElementRegistry').hasOwnProperty('get') is false
  • trunk/Source/WebCore/ChangeLog

    r205752 r205755  
     12016-09-09  Jiewen Tan  <jiewen_tan@apple.com>
     2
     3        Rename Key to CryptoKey
     4        https://bugs.webkit.org/show_bug.cgi?id=161665
     5        <rdar://problem/28083391>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        A link to the spec: https://www.w3.org/TR/WebCryptoAPI/#cryptokey-interface
     10
     11        * crypto/CryptoKey.idl:
     12        Remove some unnecessary IDL attributes and reorder KeyType enum to match the spec.
     13        * crypto/CryptoKeyType.h:
     14
    1152016-09-09  Alex Christensen  <achristensen@webkit.org>
    216
  • trunk/Source/WebCore/crypto/CryptoKey.idl

    r204336 r205755  
    2525
    2626enum KeyType {
    27     "secret",
    2827    "public",
    29     "private"
     28    "private",
     29    "secret"
    3030};
    3131
     
    4444    Conditional=SUBTLE_CRYPTO,
    4545    GenerateIsReachable=Impl,
    46     InterfaceName=Key,
    47     NoInterfaceObject,
    4846    SkipVTableValidation
    4947] interface CryptoKey {
  • trunk/Source/WebCore/crypto/CryptoKeyType.h

    r160687 r205755  
    3232
    3333enum class CryptoKeyType {
    34     Secret,
    3534    Public,
    36     Private
     35    Private,
     36    Secret
    3737};
    3838
Note: See TracChangeset for help on using the changeset viewer.