[webkit-changes] [WebKit/WebKit] 2aee34: Deprecate WebCrypto RSAES-PKCS1-v1_5 support

youennf noreply at github.com
Wed Jan 18 00:37:48 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2aee342cf4c4c0ef893c132314a2e529aa2c5335
      https://github.com/WebKit/WebKit/commit/2aee342cf4c4c0ef893c132314a2e529aa2c5335
  Author: Youenn Fablet <youennf at gmail.com>
  Date:   2023-01-18 (Wed, 18 Jan 2023)

  Changed paths:
    M LayoutTests/crypto/subtle/derive-key-malformed-parameters-expected.txt
    M LayoutTests/crypto/subtle/generate-key-malformed-parameters-expected.txt
    M LayoutTests/crypto/subtle/import-key-malformed-parameters-expected.txt
    M LayoutTests/crypto/subtle/rsa-generate-key-malformed-parameters-expected.txt
    M LayoutTests/crypto/subtle/rsa-import-key-malformed-parameters-expected.txt
    M LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-generate-export-key-jwk.html
    M LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-generate-export-key-pkcs8.html
    M LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-generate-export-key-spki.html
    M LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-generate-key-encrypt-decrypt.html
    M LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-generate-key-extractable.html
    M LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-generate-key.html
    M LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-private-key.html
    M LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-empty-usages.html
    M LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-leading-zero.html
    M LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-minimum.html
    M LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-non-extractable.html
    M LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key.html
    M LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-import-key-decrypt.html
    M LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html
    M LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-import-pkcs8-key.html
    M LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-import-spki-key-empty-usages.html
    M LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-import-spki-key.html
    M LayoutTests/crypto/workers/subtle/rsa-postMessage-worker.html
    M LayoutTests/crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-decrypt.html
    M LayoutTests/crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html
    R LayoutTests/platform/glib/crypto/subtle/rsa-generate-key-malformed-parameters-expected.txt
    R LayoutTests/platform/glib/crypto/subtle/rsa-import-key-malformed-parameters-expected.txt
    R LayoutTests/platform/ios/crypto/subtle/rsa-generate-key-malformed-parameters-expected.txt
    R LayoutTests/platform/ios/crypto/subtle/rsa-import-key-malformed-parameters-expected.txt
    R LayoutTests/platform/mac/crypto/subtle/rsa-generate-key-malformed-parameters-expected.txt
    R LayoutTests/platform/mac/crypto/subtle/rsa-import-key-malformed-parameters-expected.txt
    R LayoutTests/platform/wincairo/crypto/subtle/rsa-generate-key-malformed-parameters-expected.txt
    R LayoutTests/platform/wincairo/crypto/subtle/rsa-import-key-malformed-parameters-expected.txt
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WebCore/crypto/SubtleCrypto.cpp

  Log Message:
  -----------
  Deprecate WebCrypto RSAES-PKCS1-v1_5 support
https://bugs.webkit.org/show_bug.cgi?id=247358
rdar://101765059

Reviewed by J Pascoe.

Add a runtime flag to enable/disable RSAES-PKCS1-v1_5 support.
Mark it as experimental. Update tests covering RSAES-PKCS1-v1_5 to enable this flag.
Based on the flag, all WebCrypto operations related to RSAES-PKCS1-v1_5 will either return NotSupported or proceeed as before.

* LayoutTests/crypto/subtle/derive-key-malformed-parameters-expected.txt:
* LayoutTests/crypto/subtle/generate-key-malformed-parameters-expected.txt:
* LayoutTests/crypto/subtle/import-key-malformed-parameters-expected.txt:
* LayoutTests/crypto/subtle/rsa-import-key-malformed-parameters-expected.txt:
* LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-generate-export-key-jwk.html:
* LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-generate-export-key-pkcs8.html:
* LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-generate-export-key-spki.html:
* LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-generate-key-encrypt-decrypt.html:
* LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-generate-key-extractable.html:
* LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-generate-key.html:
* LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-private-key.html:
* LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-empty-usages.html:
* LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-leading-zero.html:
* LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-minimum.html:
* LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-non-extractable.html:
* LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key.html:
* LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-import-key-decrypt.html:
* LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html:
* LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-import-pkcs8-key.html:
* LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-import-spki-key-empty-usages.html:
* LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-import-spki-key.html:
* LayoutTests/crypto/workers/subtle/rsa-postMessage-worker.html:
* LayoutTests/crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-decrypt.html:
* LayoutTests/crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html:
* LayoutTests/platform/glib/crypto/subtle/rsa-generate-key-malformed-parameters-expected.txt: Removed.
* LayoutTests/platform/glib/crypto/subtle/rsa-import-key-malformed-parameters-expected.txt: Removed.
* LayoutTests/platform/ios/crypto/subtle/rsa-generate-key-malformed-parameters-expected.txt: Removed.
* LayoutTests/platform/ios/crypto/subtle/rsa-import-key-malformed-parameters-expected.txt: Removed.
* LayoutTests/platform/mac/crypto/subtle/rsa-generate-key-malformed-parameters-expected.txt: Removed.
* LayoutTests/platform/mac/crypto/subtle/rsa-generate-key-malformed-parameters-expected.txt:
* LayoutTests/platform/mac/crypto/subtle/rsa-import-key-malformed-parameters-expected.txt: Removed.
* LayoutTests/platform/wincairo/crypto/subtle/rsa-generate-key-malformed-parameters-expected.txt: Removed.
* LayoutTests/platform/wincairo/crypto/subtle/rsa-import-key-malformed-parameters-expected.txt: Removed.
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/crypto/SubtleCrypto.cpp:
(WebCore::isRSAESPKCSWebCryptoDeprecated):
(WebCore::normalizeCryptoAlgorithmParameters):
(WebCore::isSupportedExportKey):
(WebCore::SubtleCrypto::exportKey):
(WebCore::SubtleCrypto::wrapKey):

Canonical link: https://commits.webkit.org/259018@main




More information about the webkit-changes mailing list