<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[208891] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/208891">208891</a></dd>
<dt>Author</dt> <dd>jiewen_tan@apple.com</dd>
<dt>Date</dt> <dd>2016-11-18 13:31:42 -0800 (Fri, 18 Nov 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Update SubtleCrypto::encrypt to match the latest spec
https://bugs.webkit.org/show_bug.cgi?id=164738
&lt;rdar://problem/29257812&gt;

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

* WebCryptoAPI/encrypt_decrypt/test_aes_cbc-expected.txt:
* WebCryptoAPI/encrypt_decrypt/test_aes_ctr-expected.txt:
* WebCryptoAPI/encrypt_decrypt/test_aes_gcm-expected.txt:
* WebCryptoAPI/encrypt_decrypt/test_rsa_oaep-expected.txt:
* WebCryptoAPI/idlharness-expected.txt:

Source/WebCore:

This patch does following few things:
1. It updates the SubtleCrypto::encrypt method to match the latest spec:
   https://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-method-encrypt.
   It also refers to the latest Editor's Draft to a certain degree:
   https://w3c.github.io/webcrypto/Overview.html#SubtleCrypto-method-encrypt.
2. It implements encrypt operations of the following algorithms: AES-CBC,
   RSAES-PKCS1-V1_5, and RSA-OAEP.
3. It addes ASSERT(parameters) for every method that accepts a
   std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp; type parameter.
4. It changes RefPtr&lt;CryptoKey&gt;&amp;&amp; to Ref&lt;CryptoKey&gt;&amp;&amp; for every method that
   accepts a CryptoKey.

Tests: crypto/subtle/aes-cbc-encrypt-malformed-parameters.html
       crypto/subtle/aes-cbc-import-key-encrypt.html
       crypto/subtle/encrypt-malformed-parameters.html
       crypto/subtle/rsa-oaep-encrypt-malformed-parameters.html
       crypto/subtle/rsa-oaep-import-key-encrypt-label.html
       crypto/subtle/rsa-oaep-import-key-encrypt.html
       crypto/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html
       crypto/workers/subtle/aes-cbc-import-key-encrypt.html
       crypto/workers/subtle/rsa-oaep-import-key-encrypt.html
       crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/BufferSource.h:
(WebCore::BufferSource::BufferSource):
Add a default constructor for initializing an empty BufferSource object.
* bindings/js/JSSubtleCryptoCustom.cpp:
(WebCore::normalizeCryptoAlgorithmParameters):
(WebCore::jsSubtleCryptoFunctionEncryptPromise):
(WebCore::JSSubtleCrypto::encrypt):
* crypto/CryptoAlgorithm.cpp:
(WebCore::CryptoAlgorithm::encrypt):
(WebCore::CryptoAlgorithm::exportKey):
* crypto/CryptoAlgorithm.h:
* crypto/CryptoAlgorithmParameters.h:
* crypto/CryptoKey.h:
* crypto/SubtleCrypto.cpp:
(WebCore::SubtleCrypto::SubtleCrypto):
* crypto/SubtleCrypto.h:
(WebCore::SubtleCrypto::workQueue):
* crypto/SubtleCrypto.idl:
* crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp:
(WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
* crypto/gnutls/CryptoAlgorithmRSAES_PKCS1_v1_5GnuTLS.cpp:
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
* crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp:
(WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
* crypto/gnutls/CryptoKeyRSAGnuTLS.cpp:
(WebCore::CryptoKeyRSA::generatePair):
* crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
(WebCore::CryptoAlgorithmAES_CBC::encrypt):
(WebCore::CryptoAlgorithmAES_CBC::generateKey):
(WebCore::CryptoAlgorithmAES_CBC::importKey):
(WebCore::CryptoAlgorithmAES_CBC::exportKey):
* crypto/algorithms/CryptoAlgorithmAES_CBC.h:
* crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
(WebCore::CryptoAlgorithmAES_KW::generateKey):
(WebCore::CryptoAlgorithmAES_KW::importKey):
(WebCore::CryptoAlgorithmAES_KW::exportKey):
* crypto/algorithms/CryptoAlgorithmAES_KW.h:
* crypto/algorithms/CryptoAlgorithmHMAC.cpp:
(WebCore::CryptoAlgorithmHMAC::generateKey):
(WebCore::CryptoAlgorithmHMAC::importKey):
(WebCore::CryptoAlgorithmHMAC::exportKey):
* crypto/algorithms/CryptoAlgorithmHMAC.h:
* crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::encrypt):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::exportKey):
* crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h:
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::exportKey):
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
* crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
(WebCore::CryptoAlgorithmRSA_OAEP::encrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::generateKey):
(WebCore::CryptoAlgorithmRSA_OAEP::importKey):
(WebCore::CryptoAlgorithmRSA_OAEP::exportKey):
* crypto/algorithms/CryptoAlgorithmRSA_OAEP.h:
* crypto/keys/CryptoKeyRSA.h:
* crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
(WebCore::transformAES_CBC):
(WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
* crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:
(WebCore::encryptRSAES_PKCS1_v1_5):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
* crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:
(WebCore::encryptRSA_OAEP):
(WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
* crypto/mac/CryptoKeyRSAMac.cpp:
(WebCore::CryptoKeyRSA::generatePair):
* crypto/parameters/AesCbcParams.idl: Added.
* crypto/parameters/CryptoAlgorithmAesCbcParams.h: Added.
* crypto/parameters/CryptoAlgorithmAesCbcParamsDeprecated.h:
* crypto/parameters/CryptoAlgorithmRsaOaepParams.h: Added.
* crypto/parameters/RsaOaepParams.idl: Added.

LayoutTests:

* TestExpectations:
* crypto/subtle/aes-cbc-encrypt-malformed-parameters-expected.txt: Added.
* crypto/subtle/aes-cbc-encrypt-malformed-parameters.html: Added.
* crypto/subtle/aes-cbc-import-key-encrypt-expected.txt: Added.
* crypto/subtle/aes-cbc-import-key-encrypt.html: Added.
* crypto/subtle/encrypt-malformed-parameters-expected.txt: Added.
* crypto/subtle/encrypt-malformed-parameters.html: Added.
* crypto/subtle/rsa-oaep-encrypt-malformed-parameters-expected.txt: Added.
* crypto/subtle/rsa-oaep-encrypt-malformed-parameters.html: Added.
* crypto/subtle/rsa-oaep-import-key-encrypt-expected.txt: Added.
* crypto/subtle/rsa-oaep-import-key-encrypt-label-expected.txt: Added.
* crypto/subtle/rsa-oaep-import-key-encrypt-label.html: Added.
* crypto/subtle/rsa-oaep-import-key-encrypt.html: Added.
* crypto/subtle/rsaes-pkcs1-v1_5-import-key-encrypt-expected.txt: Added.
* crypto/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html: Added.
* crypto/workers/subtle/aes-cbc-import-key-encrypt-expected.txt: Added.
* crypto/workers/subtle/aes-cbc-import-key-encrypt.html: Added.
* crypto/workers/subtle/resources/aes-cbc-import-key-encrypt.js: Added.
* crypto/workers/subtle/resources/rsa-oaep-import-key-encrypt.js: Added.
* crypto/workers/subtle/resources/rsaes-pkcs1-v1_5-import-key-encrypt.js: Added.
* crypto/workers/subtle/rsa-oaep-import-key-encrypt-expected.txt: Added.
* crypto/workers/subtle/rsa-oaep-import-key-encrypt.html: Added.
* crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-encrypt-expected.txt: Added.
* crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsTestExpectations">trunk/LayoutTests/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cWebCryptoAPIencrypt_decrypttest_aes_cbcexpectedtxt">trunk/LayoutTests/imported/w3c/WebCryptoAPI/encrypt_decrypt/test_aes_cbc-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cWebCryptoAPIencrypt_decrypttest_aes_ctrexpectedtxt">trunk/LayoutTests/imported/w3c/WebCryptoAPI/encrypt_decrypt/test_aes_ctr-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cWebCryptoAPIencrypt_decrypttest_aes_gcmexpectedtxt">trunk/LayoutTests/imported/w3c/WebCryptoAPI/encrypt_decrypt/test_aes_gcm-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cWebCryptoAPIencrypt_decrypttest_rsa_oaepexpectedtxt">trunk/LayoutTests/imported/w3c/WebCryptoAPI/encrypt_decrypt/test_rsa_oaep-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cWebCryptoAPIidlharnessexpectedtxt">trunk/LayoutTests/imported/w3c/WebCryptoAPI/idlharness-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcesmake">trunk/Source/WebCore/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsjsBufferSourceh">trunk/Source/WebCore/bindings/js/BufferSource.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSSubtleCryptoCustomcpp">trunk/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorecryptoCryptoAlgorithmcpp">trunk/Source/WebCore/crypto/CryptoAlgorithm.cpp</a></li>
<li><a href="#trunkSourceWebCorecryptoCryptoAlgorithmh">trunk/Source/WebCore/crypto/CryptoAlgorithm.h</a></li>
<li><a href="#trunkSourceWebCorecryptoCryptoAlgorithmParametersh">trunk/Source/WebCore/crypto/CryptoAlgorithmParameters.h</a></li>
<li><a href="#trunkSourceWebCorecryptoCryptoKeyh">trunk/Source/WebCore/crypto/CryptoKey.h</a></li>
<li><a href="#trunkSourceWebCorecryptoSubtleCryptocpp">trunk/Source/WebCore/crypto/SubtleCrypto.cpp</a></li>
<li><a href="#trunkSourceWebCorecryptoSubtleCryptoh">trunk/Source/WebCore/crypto/SubtleCrypto.h</a></li>
<li><a href="#trunkSourceWebCorecryptoSubtleCryptoidl">trunk/Source/WebCore/crypto/SubtleCrypto.idl</a></li>
<li><a href="#trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmAES_CBCcpp">trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CBC.cpp</a></li>
<li><a href="#trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmAES_CBCh">trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CBC.h</a></li>
<li><a href="#trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmAES_KWcpp">trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_KW.cpp</a></li>
<li><a href="#trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmAES_KWh">trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_KW.h</a></li>
<li><a href="#trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmHMACcpp">trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmHMAC.cpp</a></li>
<li><a href="#trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmHMACh">trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmHMAC.h</a></li>
<li><a href="#trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmRSAES_PKCS1_v1_5cpp">trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp</a></li>
<li><a href="#trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmRSAES_PKCS1_v1_5h">trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h</a></li>
<li><a href="#trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmRSASSA_PKCS1_v1_5cpp">trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp</a></li>
<li><a href="#trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmRSASSA_PKCS1_v1_5h">trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h</a></li>
<li><a href="#trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmRSA_OAEPcpp">trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp</a></li>
<li><a href="#trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmRSA_OAEPh">trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_OAEP.h</a></li>
<li><a href="#trunkSourceWebCorecryptognutlsCryptoAlgorithmAES_CBCGnuTLScpp">trunk/Source/WebCore/crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp</a></li>
<li><a href="#trunkSourceWebCorecryptognutlsCryptoAlgorithmRSAES_PKCS1_v1_5GnuTLScpp">trunk/Source/WebCore/crypto/gnutls/CryptoAlgorithmRSAES_PKCS1_v1_5GnuTLS.cpp</a></li>
<li><a href="#trunkSourceWebCorecryptognutlsCryptoAlgorithmRSA_OAEPGnuTLScpp">trunk/Source/WebCore/crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp</a></li>
<li><a href="#trunkSourceWebCorecryptognutlsCryptoKeyRSAGnuTLScpp">trunk/Source/WebCore/crypto/gnutls/CryptoKeyRSAGnuTLS.cpp</a></li>
<li><a href="#trunkSourceWebCorecryptokeysCryptoKeyRSAh">trunk/Source/WebCore/crypto/keys/CryptoKeyRSA.h</a></li>
<li><a href="#trunkSourceWebCorecryptomacCryptoAlgorithmAES_CBCMaccpp">trunk/Source/WebCore/crypto/mac/CryptoAlgorithmAES_CBCMac.cpp</a></li>
<li><a href="#trunkSourceWebCorecryptomacCryptoAlgorithmRSAES_PKCS1_v1_5Maccpp">trunk/Source/WebCore/crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp</a></li>
<li><a href="#trunkSourceWebCorecryptomacCryptoAlgorithmRSA_OAEPMaccpp">trunk/Source/WebCore/crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp</a></li>
<li><a href="#trunkSourceWebCorecryptomacCryptoKeyRSAMaccpp">trunk/Source/WebCore/crypto/mac/CryptoKeyRSAMac.cpp</a></li>
<li><a href="#trunkSourceWebCorecryptoparametersCryptoAlgorithmAesCbcParamsDeprecatedh">trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmAesCbcParamsDeprecated.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestscryptosubtleaescbcencryptmalformedparametersexpectedtxt">trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-malformed-parameters-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbcencryptmalformedparametershtml">trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-malformed-parameters.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbcimportkeyencryptexpectedtxt">trunk/LayoutTests/crypto/subtle/aes-cbc-import-key-encrypt-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbcimportkeyencrypthtml">trunk/LayoutTests/crypto/subtle/aes-cbc-import-key-encrypt.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleencryptmalformedparametersexpectedtxt">trunk/LayoutTests/crypto/subtle/encrypt-malformed-parameters-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleencryptmalformedparametershtml">trunk/LayoutTests/crypto/subtle/encrypt-malformed-parameters.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersaoaepencryptmalformedparametersexpectedtxt">trunk/LayoutTests/crypto/subtle/rsa-oaep-encrypt-malformed-parameters-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersaoaepencryptmalformedparametershtml">trunk/LayoutTests/crypto/subtle/rsa-oaep-encrypt-malformed-parameters.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersaoaepimportkeyencryptexpectedtxt">trunk/LayoutTests/crypto/subtle/rsa-oaep-import-key-encrypt-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersaoaepimportkeyencryptlabelexpectedtxt">trunk/LayoutTests/crypto/subtle/rsa-oaep-import-key-encrypt-label-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersaoaepimportkeyencryptlabelhtml">trunk/LayoutTests/crypto/subtle/rsa-oaep-import-key-encrypt-label.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersaoaepimportkeyencrypthtml">trunk/LayoutTests/crypto/subtle/rsa-oaep-import-key-encrypt.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersaespkcs1v1_5importkeyencryptexpectedtxt">trunk/LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-import-key-encrypt-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersaespkcs1v1_5importkeyencrypthtml">trunk/LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtleaescbcimportkeyencryptexpectedtxt">trunk/LayoutTests/crypto/workers/subtle/aes-cbc-import-key-encrypt-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtleaescbcimportkeyencrypthtml">trunk/LayoutTests/crypto/workers/subtle/aes-cbc-import-key-encrypt.html</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtleresourcesaescbcimportkeyencryptjs">trunk/LayoutTests/crypto/workers/subtle/resources/aes-cbc-import-key-encrypt.js</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtleresourcesrsaoaepimportkeyencryptjs">trunk/LayoutTests/crypto/workers/subtle/resources/rsa-oaep-import-key-encrypt.js</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtleresourcesrsaespkcs1v1_5importkeyencryptjs">trunk/LayoutTests/crypto/workers/subtle/resources/rsaes-pkcs1-v1_5-import-key-encrypt.js</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtlersaoaepimportkeyencryptexpectedtxt">trunk/LayoutTests/crypto/workers/subtle/rsa-oaep-import-key-encrypt-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtlersaoaepimportkeyencrypthtml">trunk/LayoutTests/crypto/workers/subtle/rsa-oaep-import-key-encrypt.html</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtlersaespkcs1v1_5importkeyencryptexpectedtxt">trunk/LayoutTests/crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-encrypt-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtlersaespkcs1v1_5importkeyencrypthtml">trunk/LayoutTests/crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html</a></li>
<li><a href="#trunkSourceWebCorecryptoparametersAesCbcParamsidl">trunk/Source/WebCore/crypto/parameters/AesCbcParams.idl</a></li>
<li><a href="#trunkSourceWebCorecryptoparametersCryptoAlgorithmAesCbcParamsh">trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmAesCbcParams.h</a></li>
<li><a href="#trunkSourceWebCorecryptoparametersCryptoAlgorithmRsaOaepParamsh">trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmRsaOaepParams.h</a></li>
<li><a href="#trunkSourceWebCorecryptoparametersRsaOaepParamsidl">trunk/Source/WebCore/crypto/parameters/RsaOaepParams.idl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/LayoutTests/ChangeLog        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -1,3 +1,36 @@
</span><ins>+2016-11-17  Jiewen Tan  &lt;jiewen_tan@apple.com&gt;
+
+        Update SubtleCrypto::encrypt to match the latest spec
+        https://bugs.webkit.org/show_bug.cgi?id=164738
+        &lt;rdar://problem/29257812&gt;
+
+        Reviewed by Brent Fulgham.
+
+        * TestExpectations:
+        * crypto/subtle/aes-cbc-encrypt-malformed-parameters-expected.txt: Added.
+        * crypto/subtle/aes-cbc-encrypt-malformed-parameters.html: Added.
+        * crypto/subtle/aes-cbc-import-key-encrypt-expected.txt: Added.
+        * crypto/subtle/aes-cbc-import-key-encrypt.html: Added.
+        * crypto/subtle/encrypt-malformed-parameters-expected.txt: Added.
+        * crypto/subtle/encrypt-malformed-parameters.html: Added.
+        * crypto/subtle/rsa-oaep-encrypt-malformed-parameters-expected.txt: Added.
+        * crypto/subtle/rsa-oaep-encrypt-malformed-parameters.html: Added.
+        * crypto/subtle/rsa-oaep-import-key-encrypt-expected.txt: Added.
+        * crypto/subtle/rsa-oaep-import-key-encrypt-label-expected.txt: Added.
+        * crypto/subtle/rsa-oaep-import-key-encrypt-label.html: Added.
+        * crypto/subtle/rsa-oaep-import-key-encrypt.html: Added.
+        * crypto/subtle/rsaes-pkcs1-v1_5-import-key-encrypt-expected.txt: Added.
+        * crypto/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html: Added.
+        * crypto/workers/subtle/aes-cbc-import-key-encrypt-expected.txt: Added.
+        * crypto/workers/subtle/aes-cbc-import-key-encrypt.html: Added.
+        * crypto/workers/subtle/resources/aes-cbc-import-key-encrypt.js: Added.
+        * crypto/workers/subtle/resources/rsa-oaep-import-key-encrypt.js: Added.
+        * crypto/workers/subtle/resources/rsaes-pkcs1-v1_5-import-key-encrypt.js: Added.
+        * crypto/workers/subtle/rsa-oaep-import-key-encrypt-expected.txt: Added.
+        * crypto/workers/subtle/rsa-oaep-import-key-encrypt.html: Added.
+        * crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-encrypt-expected.txt: Added.
+        * crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html: Added.
+
</ins><span class="cx"> 2016-11-18  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [CSS Font Loading] FontFaceSet.load() promises don't always fire
</span></span></pre></div>
<a id="trunkLayoutTestsTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/TestExpectations (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/TestExpectations        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/LayoutTests/TestExpectations        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -919,12 +919,7 @@
</span><span class="cx"> # This test is just way too slow.
</span><span class="cx"> workers/bomb-with-v8.html [ Skip ]
</span><span class="cx"> 
</span><del>-# WebCryptoAPI tests, skip for unimplemented features. webkit.org/b/159638
-imported/w3c/WebCryptoAPI/encrypt_decrypt/test_aes_cbc.html [ Skip ]
-imported/w3c/WebCryptoAPI/encrypt_decrypt/test_aes_ctr.html [ Skip ]
-imported/w3c/WebCryptoAPI/encrypt_decrypt/test_aes_gcm.html [ Skip ]
-imported/w3c/WebCryptoAPI/encrypt_decrypt/test_rsa_oaep.html [ Skip ]
-# Take too long to complete, need to scale down.
</del><ins>+# WebCryptoAPI tests that take too long to complete, need to scale down. webkit.org/b/159638
</ins><span class="cx"> imported/w3c/WebCryptoAPI/generateKey/test_failures.html [ Slow ]
</span><span class="cx"> imported/w3c/WebCryptoAPI/generateKey/test_successes_RSA-OAEP.html [ Skip ]
</span><span class="cx"> imported/w3c/WebCryptoAPI/generateKey/test_successes_RSASSA-PKCS1-v1_5.html [ Slow ]
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbcencryptmalformedparametersexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-malformed-parameters-expected.txt (0 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-malformed-parameters-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-malformed-parameters-expected.txt        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+Test encrypting using AES-CBC with malformed parameters
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS crypto.subtle.encrypt(&quot;aes-cbc&quot;, key, plainText) rejected promise  with TypeError: Member AesCbcParams.iv is required and must be an instance of BufferSource.
+PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;}, key, plainText) rejected promise  with TypeError: Member AesCbcParams.iv is required and must be an instance of BufferSource.
+PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: true}, key, plainText) rejected promise  with TypeError: Type error.
+PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: 1}, key, plainText) rejected promise  with TypeError: Type error.
+PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: null}, key, plainText) rejected promise  with TypeError: Type error.
+PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: undefined}, key, plainText) rejected promise  with TypeError: Member AesCbcParams.iv is required and must be an instance of BufferSource.
+PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: Symbol()}, key, plainText) rejected promise  with TypeError: Type error.
+PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: { }}, key, plainText) rejected promise  with TypeError: Type error.
+PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: &quot;foo&quot;}, key, plainText) rejected promise  with TypeError: Type error.
+PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: asciiToUint8Array(&quot;&quot;)}, key, plainText) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
+PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: asciiToUint8Array(&quot;j&quot;)}, key, plainText) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
+PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: asciiToUint8Array(&quot;jnOw99oOZFLIEPMrd&quot;)}, key, plainText) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbcencryptmalformedparametershtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-malformed-parameters.html (0 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-malformed-parameters.html                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-malformed-parameters.html        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -0,0 +1,44 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+description(&quot;Test encrypting using AES-CBC with malformed parameters&quot;);
+
+jsTestIsAsync = true;
+
+var extractable = false;
+var plainText = asciiToUint8Array(&quot;Hello, World!&quot;);
+var rawKey = asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;);
+
+crypto.subtle.importKey(&quot;raw&quot;, rawKey, &quot;aes-cbc&quot;, extractable, [&quot;encrypt&quot;]).then(function(result) {
+    key = result;
+    // Malformed AlgorithmIdentifiers
+    shouldReject('crypto.subtle.encrypt(&quot;aes-cbc&quot;, key, plainText)');
+    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;}, key, plainText)');
+    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: true}, key, plainText)');
+    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: 1}, key, plainText)');
+    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: null}, key, plainText)');
+    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: undefined}, key, plainText)');
+    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: Symbol()}, key, plainText)');
+    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: { }}, key, plainText)');
+    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: &quot;foo&quot;}, key, plainText)');
+    // Wrong iv length
+    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: asciiToUint8Array(&quot;&quot;)}, key, plainText)');
+    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: asciiToUint8Array(&quot;j&quot;)}, key, plainText)');
+    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: asciiToUint8Array(&quot;jnOw99oOZFLIEPMrd&quot;)}, key, plainText)');
+
+    finishJSTest();
+});
+
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbcimportkeyencryptexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cbc-import-key-encrypt-expected.txt (0 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-import-key-encrypt-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-import-key-encrypt-expected.txt        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+Test encrypting using AES-CBC with an imported 128bit key
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS bytesToHexString(cipherText) is expectedCipherText
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbcimportkeyencrypthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cbc-import-key-encrypt.html (0 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-import-key-encrypt.html                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-import-key-encrypt.html        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -0,0 +1,39 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+description(&quot;Test encrypting using AES-CBC with an imported 128bit key&quot;);
+
+jsTestIsAsync = true;
+
+var extractable = false;
+var plainText = asciiToUint8Array(&quot;Hello, World!&quot;);
+var aesCbcParams = {
+    name: &quot;aes-cbc&quot;,
+    iv: asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;),
+}
+var rawKey = asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;);
+var expectedCipherText = &quot;2ffa4618784dfd414b22c40c6330d022&quot;;
+
+crypto.subtle.importKey(&quot;raw&quot;, rawKey, &quot;aes-cbc&quot;, extractable, [&quot;encrypt&quot;]).then(function(key) {
+    return crypto.subtle.encrypt(aesCbcParams, key, plainText);
+}).then(function(result) {
+    cipherText = result;
+
+    shouldBe(&quot;bytesToHexString(cipherText)&quot;, &quot;expectedCipherText&quot;);
+
+    finishJSTest();
+});
+
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleencryptmalformedparametersexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/encrypt-malformed-parameters-expected.txt (0 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/encrypt-malformed-parameters-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/encrypt-malformed-parameters-expected.txt        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+Test encrypting with malformed parameters
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS crypto.subtle.encrypt() rejected promise  with TypeError: Not enough arguments.
+PASS crypto.subtle.encrypt(1) rejected promise  with TypeError: Not enough arguments.
+PASS crypto.subtle.encrypt(1, 2) rejected promise  with TypeError: Not enough arguments.
+PASS crypto.subtle.encrypt(aesCbcParams, fakedKey, plainText) rejected promise  with TypeError: Invalid CryptoKey.
+PASS crypto.subtle.encrypt(aesCbcParams, wrongKey, plainText) rejected promise  with InvalidAccessError (DOM Exception 15): CryptoKey doesn't match AlgorithmIdentifier.
+PASS crypto.subtle.encrypt(aesCbcParams, wrongKey, plainText) rejected promise  with InvalidAccessError (DOM Exception 15): CryptoKey doesn't support encryption.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleencryptmalformedparametershtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/encrypt-malformed-parameters.html (0 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/encrypt-malformed-parameters.html                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/encrypt-malformed-parameters.html        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -0,0 +1,53 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+description(&quot;Test encrypting with malformed parameters&quot;);
+
+jsTestIsAsync = true;
+
+var extractable = false;
+var plainText = asciiToUint8Array(&quot;Hello, World!&quot;);
+var aesCbcParams = {
+    name: &quot;aes-cbc&quot;,
+    iv: asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;),
+}
+var fakedKey = {
+    type: &quot;secret&quot;,
+    extractable: true,
+    algorithm: {name: &quot;AES-CBC&quot;, length: 128},
+    usages: [&quot;encrypt&quot;, &quot;decrypt&quot;]
+}
+var rawKey = asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;);
+
+// Not enough arguments.
+shouldReject('crypto.subtle.encrypt()');
+shouldReject('crypto.subtle.encrypt(1)');
+shouldReject('crypto.subtle.encrypt(1, 2)');
+// Wrong CryptoKey.
+shouldReject('crypto.subtle.encrypt(aesCbcParams, fakedKey, plainText)');
+
+crypto.subtle.importKey(&quot;raw&quot;, rawKey, &quot;aes-kw&quot;, extractable, [&quot;wrapKey&quot;, &quot;unwrapKey&quot;]).then(function(result) {
+    wrongKey = result;
+    // Wrong algorithm identifier.
+    shouldReject('crypto.subtle.encrypt(aesCbcParams, wrongKey, plainText)');
+
+    return crypto.subtle.importKey(&quot;raw&quot;, rawKey, &quot;aes-cbc&quot;, extractable, [&quot;wrapKey&quot;, &quot;unwrapKey&quot;]);
+}).then(function(result) {
+    wrongKey = result;
+    // Wrong usage.
+    return shouldReject('crypto.subtle.encrypt(aesCbcParams, wrongKey, plainText)');
+}).then(finishJSTest);
+
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersaoaepencryptmalformedparametersexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/rsa-oaep-encrypt-malformed-parameters-expected.txt (0 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsa-oaep-encrypt-malformed-parameters-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/rsa-oaep-encrypt-malformed-parameters-expected.txt        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+Test encrypting using RSA-OAEP with malformed parameters
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS crypto.subtle.encrypt({name: &quot;RSA-OAEP&quot;, label: true}, key, plainText) rejected promise  with TypeError: Type error.
+PASS crypto.subtle.encrypt({name: &quot;RSA-OAEP&quot;, label: 1}, key, plainText) rejected promise  with TypeError: Type error.
+PASS crypto.subtle.encrypt({name: &quot;RSA-OAEP&quot;, label: null}, key, plainText) rejected promise  with TypeError: Type error.
+PASS crypto.subtle.encrypt({name: &quot;RSA-OAEP&quot;, label: Symbol()}, key, plainText) rejected promise  with TypeError: Type error.
+PASS crypto.subtle.encrypt({name: &quot;RSA-OAEP&quot;, label: { }}, key, plainText) rejected promise  with TypeError: Type error.
+PASS crypto.subtle.encrypt({name: &quot;RSA-OAEP&quot;, label: &quot;foo&quot;}, key, plainText) rejected promise  with TypeError: Type error.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersaoaepencryptmalformedparametershtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/rsa-oaep-encrypt-malformed-parameters.html (0 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsa-oaep-encrypt-malformed-parameters.html                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/rsa-oaep-encrypt-malformed-parameters.html        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+description(&quot;Test encrypting using RSA-OAEP with malformed parameters&quot;);
+
+jsTestIsAsync = true;
+
+var extractable = false;
+var plainText = asciiToUint8Array(&quot;Hello, World!&quot;);
+var jwkKey = {
+    kty: &quot;RSA&quot;,
+    alg: &quot;RSA-OAEP&quot;,
+    use: &quot;enc&quot;,
+    key_ops: [&quot;encrypt&quot;, &quot;wrapKey&quot;],
+    ext: true,
+    n: &quot;rcCUCv7Oc1HVam1DIhCzqknThWawOp8QLk8Ziy2p10ByjQFCajoFiyuAWl-R1WXZaf4xitLRracT9agpzIzc-MbLSHIGgWQGO21lGiImy5ftZ-D8bHAqRz2y15pzD4c4CEou7XSSLDoRnR0QG5MsDhD6s2gV9mwHkrtkCxtMWdBi-77as8wGmlNRldcOSgZDLK8UnCSgA1OguZ989bFyc8tOOEIb0xUSfPSz3LPSCnyYz68aDjmKVeNH-ig857OScyWbGyEy3Biw64qun3juUlNWsJ3zngkOdteYWytx5Qr4XKNs6R-Myyq72KUp02mJDZiiyiglxML_i3-_CeecCw&quot;,
+    e: &quot;AQAB&quot;
+};
+
+crypto.subtle.importKey(&quot;jwk&quot;, jwkKey, {name: &quot;RSA-OAEP&quot;, hash: &quot;SHA-1&quot;}, extractable, [&quot;encrypt&quot;]).then(function(result) {
+    key = result;
+    // Malformed AlgorithmIdentifiers
+    shouldReject('crypto.subtle.encrypt({name: &quot;RSA-OAEP&quot;, label: true}, key, plainText)');
+    shouldReject('crypto.subtle.encrypt({name: &quot;RSA-OAEP&quot;, label: 1}, key, plainText)');
+    shouldReject('crypto.subtle.encrypt({name: &quot;RSA-OAEP&quot;, label: null}, key, plainText)');
+    shouldReject('crypto.subtle.encrypt({name: &quot;RSA-OAEP&quot;, label: Symbol()}, key, plainText)');
+    shouldReject('crypto.subtle.encrypt({name: &quot;RSA-OAEP&quot;, label: { }}, key, plainText)');
+    shouldReject('crypto.subtle.encrypt({name: &quot;RSA-OAEP&quot;, label: &quot;foo&quot;}, key, plainText)');
+
+    finishJSTest();
+});
+
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersaoaepimportkeyencryptexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/rsa-oaep-import-key-encrypt-expected.txt (0 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsa-oaep-import-key-encrypt-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/rsa-oaep-import-key-encrypt-expected.txt        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+Test encrypting using RSA-OAEP SHA-1 with an imported key
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS cipherText.byteLength is 256
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersaoaepimportkeyencryptlabelexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/rsa-oaep-import-key-encrypt-label-expected.txt (0 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsa-oaep-import-key-encrypt-label-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/rsa-oaep-import-key-encrypt-label-expected.txt        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+Test encrypting using RSA-OAEP SHA-1 with an imported key and a label
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS cipherText.byteLength is 256
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersaoaepimportkeyencryptlabelhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/rsa-oaep-import-key-encrypt-label.html (0 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsa-oaep-import-key-encrypt-label.html                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/rsa-oaep-import-key-encrypt-label.html        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -0,0 +1,46 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+description(&quot;Test encrypting using RSA-OAEP SHA-1 with an imported key and a label&quot;);
+
+jsTestIsAsync = true;
+
+var extractable = false;
+var plainText = asciiToUint8Array(&quot;Hello, World!&quot;);
+var jwkKey = {
+    kty: &quot;RSA&quot;,
+    alg: &quot;RSA-OAEP&quot;,
+    use: &quot;enc&quot;,
+    key_ops: [&quot;encrypt&quot;, &quot;wrapKey&quot;],
+    ext: true,
+    n: &quot;rcCUCv7Oc1HVam1DIhCzqknThWawOp8QLk8Ziy2p10ByjQFCajoFiyuAWl-R1WXZaf4xitLRracT9agpzIzc-MbLSHIGgWQGO21lGiImy5ftZ-D8bHAqRz2y15pzD4c4CEou7XSSLDoRnR0QG5MsDhD6s2gV9mwHkrtkCxtMWdBi-77as8wGmlNRldcOSgZDLK8UnCSgA1OguZ989bFyc8tOOEIb0xUSfPSz3LPSCnyYz68aDjmKVeNH-ig857OScyWbGyEy3Biw64qun3juUlNWsJ3zngkOdteYWytx5Qr4XKNs6R-Myyq72KUp02mJDZiiyiglxML_i3-_CeecCw&quot;,
+    e: &quot;AQAB&quot;
+};
+var rsaOaepParams = {
+    name: &quot;rsa-oaep&quot;,
+    label: asciiToUint8Array(&quot;WebKit.org&quot;),
+}
+
+crypto.subtle.importKey(&quot;jwk&quot;, jwkKey, {name: &quot;RSA-OAEP&quot;, hash: &quot;SHA-1&quot;}, extractable, [&quot;encrypt&quot;]).then(function(key) {
+    return crypto.subtle.encrypt(rsaOaepParams, key, plainText);
+}).then(function(result) {
+    cipherText = result;
+
+    shouldBe(&quot;cipherText.byteLength&quot;, &quot;256&quot;);
+
+    finishJSTest();
+});
+
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersaoaepimportkeyencrypthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/rsa-oaep-import-key-encrypt.html (0 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsa-oaep-import-key-encrypt.html                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/rsa-oaep-import-key-encrypt.html        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+description(&quot;Test encrypting using RSA-OAEP SHA-1 with an imported key&quot;);
+
+jsTestIsAsync = true;
+
+var extractable = false;
+var plainText = asciiToUint8Array(&quot;Hello, World!&quot;);
+var jwkKey = {
+    kty: &quot;RSA&quot;,
+    alg: &quot;RSA-OAEP&quot;,
+    use: &quot;enc&quot;,
+    key_ops: [&quot;encrypt&quot;, &quot;wrapKey&quot;],
+    ext: true,
+    n: &quot;rcCUCv7Oc1HVam1DIhCzqknThWawOp8QLk8Ziy2p10ByjQFCajoFiyuAWl-R1WXZaf4xitLRracT9agpzIzc-MbLSHIGgWQGO21lGiImy5ftZ-D8bHAqRz2y15pzD4c4CEou7XSSLDoRnR0QG5MsDhD6s2gV9mwHkrtkCxtMWdBi-77as8wGmlNRldcOSgZDLK8UnCSgA1OguZ989bFyc8tOOEIb0xUSfPSz3LPSCnyYz68aDjmKVeNH-ig857OScyWbGyEy3Biw64qun3juUlNWsJ3zngkOdteYWytx5Qr4XKNs6R-Myyq72KUp02mJDZiiyiglxML_i3-_CeecCw&quot;,
+    e: &quot;AQAB&quot;
+};
+var rsaOaepParams = {
+    name: &quot;rsa-oaep&quot;
+}
+
+crypto.subtle.importKey(&quot;jwk&quot;, jwkKey, {name: &quot;RSA-OAEP&quot;, hash: &quot;SHA-1&quot;}, extractable, [&quot;encrypt&quot;]).then(function(key) {
+    return crypto.subtle.encrypt(rsaOaepParams, key, plainText);
+}).then(function(result) {
+    cipherText = result;
+
+    shouldBe(&quot;cipherText.byteLength&quot;, &quot;256&quot;);
+
+    finishJSTest();
+});
+
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersaespkcs1v1_5importkeyencryptexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-import-key-encrypt-expected.txt (0 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-import-key-encrypt-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-import-key-encrypt-expected.txt        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+Test encrypting using RSAES-PKCS1-v1_5 with an imported key
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS cipherText.byteLength is 256
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersaespkcs1v1_5importkeyencrypthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html (0 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+description(&quot;Test encrypting using RSAES-PKCS1-v1_5 with an imported key&quot;);
+
+jsTestIsAsync = true;
+
+var extractable = false;
+var plainText = asciiToUint8Array(&quot;Hello, World!&quot;);
+var jwkKey = {
+    kty: &quot;RSA&quot;,
+    alg: &quot;RSA1_5&quot;,
+    use: &quot;enc&quot;,
+    key_ops: [&quot;encrypt&quot;],
+    ext: true,
+    n: &quot;rcCUCv7Oc1HVam1DIhCzqknThWawOp8QLk8Ziy2p10ByjQFCajoFiyuAWl-R1WXZaf4xitLRracT9agpzIzc-MbLSHIGgWQGO21lGiImy5ftZ-D8bHAqRz2y15pzD4c4CEou7XSSLDoRnR0QG5MsDhD6s2gV9mwHkrtkCxtMWdBi-77as8wGmlNRldcOSgZDLK8UnCSgA1OguZ989bFyc8tOOEIb0xUSfPSz3LPSCnyYz68aDjmKVeNH-ig857OScyWbGyEy3Biw64qun3juUlNWsJ3zngkOdteYWytx5Qr4XKNs6R-Myyq72KUp02mJDZiiyiglxML_i3-_CeecCw&quot;,
+    e: &quot;AQAB&quot;
+};
+
+crypto.subtle.importKey(&quot;jwk&quot;, jwkKey, &quot;RSAES-PKCS1-v1_5&quot;, extractable, [&quot;encrypt&quot;]).then(function(key) {
+    return crypto.subtle.encrypt(&quot;RSAES-PKCS1-v1_5&quot;, key, plainText);
+}).then(function(result) {
+    cipherText = result;
+
+    shouldBe(&quot;cipherText.byteLength&quot;, &quot;256&quot;);
+
+    finishJSTest();
+});
+
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtleaescbcimportkeyencryptexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/workers/subtle/aes-cbc-import-key-encrypt-expected.txt (0 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/aes-cbc-import-key-encrypt-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/subtle/aes-cbc-import-key-encrypt-expected.txt        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+[Worker] Test encrypting using AES-CBC with an imported 128bit key in workers
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Starting worker: resources/aes-cbc-import-key-encrypt.js
+PASS [Worker] bytesToHexString(cipherText) is expectedCipherText
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtleaescbcimportkeyencrypthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/workers/subtle/aes-cbc-import-key-encrypt.html (0 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/aes-cbc-import-key-encrypt.html                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/subtle/aes-cbc-import-key-encrypt.html        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+    &lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;script&gt;
+        worker = startWorker('resources/aes-cbc-import-key-encrypt.js');
+    &lt;/script&gt;
+    &lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtleresourcesaescbcimportkeyencryptjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/workers/subtle/resources/aes-cbc-import-key-encrypt.js (0 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/resources/aes-cbc-import-key-encrypt.js                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/subtle/resources/aes-cbc-import-key-encrypt.js        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+importScripts('../../../../resources/js-test-pre.js');
+importScripts('../../../resources/common.js');
+
+description(&quot;Test encrypting using AES-CBC with an imported 128bit key in workers&quot;);
+
+jsTestIsAsync = true;
+
+var extractable = false;
+var plainText = asciiToUint8Array(&quot;Hello, World!&quot;);
+var aesCbcParams = {
+    name: &quot;aes-cbc&quot;,
+    iv: asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;),
+}
+var rawKey = asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;);
+var expectedCipherText = &quot;2ffa4618784dfd414b22c40c6330d022&quot;;
+
+crypto.subtle.importKey(&quot;raw&quot;, rawKey, &quot;aes-cbc&quot;, extractable, [&quot;encrypt&quot;]).then(function(key) {
+    return crypto.subtle.encrypt(aesCbcParams, key, plainText);
+}).then(function(result) {
+    cipherText = result;
+
+    shouldBe(&quot;bytesToHexString(cipherText)&quot;, &quot;expectedCipherText&quot;);
+
+    finishJSTest();
+});
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtleresourcesrsaoaepimportkeyencryptjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/workers/subtle/resources/rsa-oaep-import-key-encrypt.js (0 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/resources/rsa-oaep-import-key-encrypt.js                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/subtle/resources/rsa-oaep-import-key-encrypt.js        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+importScripts('../../../../resources/js-test-pre.js');
+importScripts('../../../resources/common.js');
+
+description(&quot;Test encrypting using RSA-OAEP SHA-1 with an imported key and a label in workers&quot;);
+
+jsTestIsAsync = true;
+
+var extractable = false;
+var plainText = asciiToUint8Array(&quot;Hello, World!&quot;);
+var jwkKey = {
+    kty: &quot;RSA&quot;,
+    alg: &quot;RSA-OAEP&quot;,
+    use: &quot;enc&quot;,
+    key_ops: [&quot;encrypt&quot;, &quot;wrapKey&quot;],
+    ext: true,
+    n: &quot;rcCUCv7Oc1HVam1DIhCzqknThWawOp8QLk8Ziy2p10ByjQFCajoFiyuAWl-R1WXZaf4xitLRracT9agpzIzc-MbLSHIGgWQGO21lGiImy5ftZ-D8bHAqRz2y15pzD4c4CEou7XSSLDoRnR0QG5MsDhD6s2gV9mwHkrtkCxtMWdBi-77as8wGmlNRldcOSgZDLK8UnCSgA1OguZ989bFyc8tOOEIb0xUSfPSz3LPSCnyYz68aDjmKVeNH-ig857OScyWbGyEy3Biw64qun3juUlNWsJ3zngkOdteYWytx5Qr4XKNs6R-Myyq72KUp02mJDZiiyiglxML_i3-_CeecCw&quot;,
+    e: &quot;AQAB&quot;
+};
+var rsaOaepParams = {
+    name: &quot;rsa-oaep&quot;,
+    label: asciiToUint8Array(&quot;WebKit.org&quot;),
+}
+
+crypto.subtle.importKey(&quot;jwk&quot;, jwkKey, {name: &quot;RSA-OAEP&quot;, hash: &quot;SHA-1&quot;}, extractable, [&quot;encrypt&quot;]).then(function(key) {
+    return crypto.subtle.encrypt(rsaOaepParams, key, plainText);
+}).then(function(result) {
+    cipherText = result;
+
+    shouldBe(&quot;cipherText.byteLength&quot;, &quot;256&quot;);
+
+    finishJSTest();
+});
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtleresourcesrsaespkcs1v1_5importkeyencryptjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/workers/subtle/resources/rsaes-pkcs1-v1_5-import-key-encrypt.js (0 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/resources/rsaes-pkcs1-v1_5-import-key-encrypt.js                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/subtle/resources/rsaes-pkcs1-v1_5-import-key-encrypt.js        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -0,0 +1,28 @@
</span><ins>+importScripts('../../../../resources/js-test-pre.js');
+importScripts('../../../resources/common.js');
+
+description(&quot;Test encrypting using RSAES-PKCS1-v1_5 with an imported key in workers&quot;);
+
+jsTestIsAsync = true;
+
+var extractable = false;
+var plainText = asciiToUint8Array(&quot;Hello, World!&quot;);
+var jwkKey = {
+    kty: &quot;RSA&quot;,
+    alg: &quot;RSA1_5&quot;,
+    use: &quot;enc&quot;,
+    key_ops: [&quot;encrypt&quot;],
+    ext: true,
+    n: &quot;rcCUCv7Oc1HVam1DIhCzqknThWawOp8QLk8Ziy2p10ByjQFCajoFiyuAWl-R1WXZaf4xitLRracT9agpzIzc-MbLSHIGgWQGO21lGiImy5ftZ-D8bHAqRz2y15pzD4c4CEou7XSSLDoRnR0QG5MsDhD6s2gV9mwHkrtkCxtMWdBi-77as8wGmlNRldcOSgZDLK8UnCSgA1OguZ989bFyc8tOOEIb0xUSfPSz3LPSCnyYz68aDjmKVeNH-ig857OScyWbGyEy3Biw64qun3juUlNWsJ3zngkOdteYWytx5Qr4XKNs6R-Myyq72KUp02mJDZiiyiglxML_i3-_CeecCw&quot;,
+    e: &quot;AQAB&quot;
+};
+
+crypto.subtle.importKey(&quot;jwk&quot;, jwkKey, &quot;RSAES-PKCS1-v1_5&quot;, extractable, [&quot;encrypt&quot;]).then(function(key) {
+    return crypto.subtle.encrypt(&quot;RSAES-PKCS1-v1_5&quot;, key, plainText);
+}).then(function(result) {
+    cipherText = result;
+
+    shouldBe(&quot;cipherText.byteLength&quot;, &quot;256&quot;);
+
+    finishJSTest();
+});
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtlersaoaepimportkeyencryptexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/workers/subtle/rsa-oaep-import-key-encrypt-expected.txt (0 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/rsa-oaep-import-key-encrypt-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/subtle/rsa-oaep-import-key-encrypt-expected.txt        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+[Worker] Test encrypting using RSA-OAEP SHA-1 with an imported key and a label in workers
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Starting worker: resources/rsa-oaep-import-key-encrypt.js
+PASS [Worker] cipherText.byteLength is 256
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtlersaoaepimportkeyencrypthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/workers/subtle/rsa-oaep-import-key-encrypt.html (0 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/rsa-oaep-import-key-encrypt.html                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/subtle/rsa-oaep-import-key-encrypt.html        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+    &lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;script&gt;
+        worker = startWorker('resources/rsa-oaep-import-key-encrypt.js');
+    &lt;/script&gt;
+    &lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtlersaespkcs1v1_5importkeyencryptexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-encrypt-expected.txt (0 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-encrypt-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-encrypt-expected.txt        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+[Worker] Test encrypting using RSAES-PKCS1-v1_5 with an imported key in workers
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Starting worker: resources/rsaes-pkcs1-v1_5-import-key-encrypt.js
+PASS [Worker] cipherText.byteLength is 256
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtlersaespkcs1v1_5importkeyencrypthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html (0 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+    &lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;script&gt;
+        worker = startWorker('resources/rsaes-pkcs1-v1_5-import-key-encrypt.js');
+    &lt;/script&gt;
+    &lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-11-17  Jiewen Tan  &lt;jiewen_tan@apple.com&gt;
+
+        Update SubtleCrypto::encrypt to match the latest spec
+        https://bugs.webkit.org/show_bug.cgi?id=164738
+        &lt;rdar://problem/29257812&gt;
+
+        Reviewed by Brent Fulgham.
+
+        * WebCryptoAPI/encrypt_decrypt/test_aes_cbc-expected.txt:
+        * WebCryptoAPI/encrypt_decrypt/test_aes_ctr-expected.txt:
+        * WebCryptoAPI/encrypt_decrypt/test_aes_gcm-expected.txt:
+        * WebCryptoAPI/encrypt_decrypt/test_rsa_oaep-expected.txt:
+        * WebCryptoAPI/idlharness-expected.txt:
+
</ins><span class="cx"> 2016-11-17  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Implement TextDecoder and TextEncoder
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cWebCryptoAPIencrypt_decrypttest_aes_cbcexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/WebCryptoAPI/encrypt_decrypt/test_aes_cbc-expected.txt (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/WebCryptoAPI/encrypt_decrypt/test_aes_cbc-expected.txt        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/LayoutTests/imported/w3c/WebCryptoAPI/encrypt_decrypt/test_aes_cbc-expected.txt        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -1,3 +1,46 @@
</span><del>-CONSOLE MESSAGE: line 285: TypeError: undefined is not an object (evaluating 'subtle.importKey')
-FAIL: Timed out waiting for notifyDone to be called
</del><ins>+encrypt Tests for AES-CBC
</ins><span class="cx"> 
</span><ins>+
+PASS AES-CBC 128-bit key 
+PASS AES-CBC 192-bit key 
+PASS AES-CBC 256-bit key 
+PASS AES-CBC 128-bit key with altered plaintext 
+PASS AES-CBC 192-bit key with altered plaintext 
+PASS AES-CBC 256-bit key with altered plaintext 
+FAIL AES-CBC 128-bit key decryption subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined)
+FAIL AES-CBC 192-bit key decryption subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined)
+FAIL AES-CBC 256-bit key decryption subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined)
+FAIL AES-CBC 128-bit key decryption with altered ciphertext subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, ciphertext)', 'subtle.decrypt' is undefined)
+FAIL AES-CBC 192-bit key decryption with altered ciphertext subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, ciphertext)', 'subtle.decrypt' is undefined)
+FAIL AES-CBC 256-bit key decryption with altered ciphertext subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, ciphertext)', 'subtle.decrypt' is undefined)
+PASS AES-CBC 128-bit key without encrypt usage 
+PASS AES-CBC 192-bit key without encrypt usage 
+PASS AES-CBC 256-bit key without encrypt usage 
+FAIL AES-CBC 128-bit key with mismatched key and algorithm assert_equals: Mismatch should cause InvalidAccessError instead of The operation is not supported. expected &quot;InvalidAccessError&quot; but got &quot;NotSupportedError&quot;
+FAIL AES-CBC 192-bit key with mismatched key and algorithm assert_equals: Mismatch should cause InvalidAccessError instead of The operation is not supported. expected &quot;InvalidAccessError&quot; but got &quot;NotSupportedError&quot;
+FAIL AES-CBC 256-bit key with mismatched key and algorithm assert_equals: Mismatch should cause InvalidAccessError instead of The operation is not supported. expected &quot;InvalidAccessError&quot; but got &quot;NotSupportedError&quot;
+FAIL AES-CBC 128-bit key without decrypt usage subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined)
+FAIL AES-CBC 192-bit key without decrypt usage subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined)
+FAIL AES-CBC 256-bit key without decrypt usage subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined)
+PASS AES-CBC 128-bit key, 64-bit IV 
+PASS AES-CBC 128-bit key, 192-bit IV 
+PASS AES-CBC 192-bit key, 64-bit IV 
+PASS AES-CBC 192-bit key, 192-bit IV 
+PASS AES-CBC 256-bit key, 64-bit IV 
+PASS AES-CBC 256-bit key, 192-bit IV 
+FAIL AES-CBC 128-bit key, 64-bit IV decryption subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined)
+FAIL AES-CBC 128-bit key, 192-bit IV decryption subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined)
+FAIL AES-CBC 192-bit key, 64-bit IV decryption subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined)
+FAIL AES-CBC 192-bit key, 192-bit IV decryption subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined)
+FAIL AES-CBC 256-bit key, 64-bit IV decryption subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined)
+FAIL AES-CBC 256-bit key, 192-bit IV decryption subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined)
+FAIL AES-CBC 128-bit key, zeroPadChar subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined)
+FAIL AES-CBC 128-bit key, bigPadChar subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined)
+FAIL AES-CBC 128-bit key, inconsistentPadChars subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined)
+FAIL AES-CBC 192-bit key, zeroPadChar subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined)
+FAIL AES-CBC 192-bit key, bigPadChar subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined)
+FAIL AES-CBC 192-bit key, inconsistentPadChars subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined)
+FAIL AES-CBC 256-bit key, zeroPadChar subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined)
+FAIL AES-CBC 256-bit key, bigPadChar subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined)
+FAIL AES-CBC 256-bit key, inconsistentPadChars subtle.decrypt is not a function. (In 'subtle.decrypt(vector.algorithm, vector.key, vector.result)', 'subtle.decrypt' is undefined)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cWebCryptoAPIencrypt_decrypttest_aes_ctrexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/WebCryptoAPI/encrypt_decrypt/test_aes_ctr-expected.txt (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/WebCryptoAPI/encrypt_decrypt/test_aes_ctr-expected.txt        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/LayoutTests/imported/w3c/WebCryptoAPI/encrypt_decrypt/test_aes_ctr-expected.txt        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -1,3 +1,37 @@
</span><del>-CONSOLE MESSAGE: line 285: TypeError: undefined is not an object (evaluating 'subtle.importKey')
-FAIL: Timed out waiting for notifyDone to be called
</del><ins>+encrypt Tests for AES-CTR
</ins><span class="cx"> 
</span><ins>+
+FAIL importKey step: AES-CTR 128-bit key assert_unreached: importKey failed for AES-CTR 128-bit key Reached unreachable code
+FAIL importKey step: AES-CTR 192-bit key assert_unreached: importKey failed for AES-CTR 192-bit key Reached unreachable code
+FAIL importKey step: AES-CTR 256-bit key assert_unreached: importKey failed for AES-CTR 256-bit key Reached unreachable code
+FAIL importKey step: AES-CTR 128-bit key with altered plaintext assert_unreached: importKey failed for AES-CTR 128-bit key Reached unreachable code
+FAIL importKey step: AES-CTR 192-bit key with altered plaintext assert_unreached: importKey failed for AES-CTR 192-bit key Reached unreachable code
+FAIL importKey step: AES-CTR 256-bit key with altered plaintext assert_unreached: importKey failed for AES-CTR 256-bit key Reached unreachable code
+FAIL importKey step for decryption: AES-CTR 128-bit key assert_unreached: importKey failed for AES-CTR 128-bit key Reached unreachable code
+FAIL importKey step for decryption: AES-CTR 192-bit key assert_unreached: importKey failed for AES-CTR 192-bit key Reached unreachable code
+FAIL importKey step for decryption: AES-CTR 256-bit key assert_unreached: importKey failed for AES-CTR 256-bit key Reached unreachable code
+FAIL importKey step for decryption: AES-CTR 128-bit key with altered ciphertext assert_unreached: importKey failed for AES-CTR 128-bit key Reached unreachable code
+FAIL importKey step for decryption: AES-CTR 192-bit key with altered ciphertext assert_unreached: importKey failed for AES-CTR 192-bit key Reached unreachable code
+FAIL importKey step for decryption: AES-CTR 256-bit key with altered ciphertext assert_unreached: importKey failed for AES-CTR 256-bit key Reached unreachable code
+FAIL importKey step: AES-CTR 128-bit key without encrypt usage assert_unreached: importKey failed for AES-CTR 128-bit key Reached unreachable code
+FAIL importKey step: AES-CTR 192-bit key without encrypt usage assert_unreached: importKey failed for AES-CTR 192-bit key Reached unreachable code
+FAIL importKey step: AES-CTR 256-bit key without encrypt usage assert_unreached: importKey failed for AES-CTR 256-bit key Reached unreachable code
+FAIL importKey step: AES-CTR 128-bit key with mismatched key and algorithm assert_unreached: importKey failed for AES-CTR 128-bit key Reached unreachable code
+FAIL importKey step: AES-CTR 192-bit key with mismatched key and algorithm assert_unreached: importKey failed for AES-CTR 192-bit key Reached unreachable code
+FAIL importKey step: AES-CTR 256-bit key with mismatched key and algorithm assert_unreached: importKey failed for AES-CTR 256-bit key Reached unreachable code
+FAIL importKey step: AES-CTR 128-bit key without decrypt usage assert_unreached: importKey failed for AES-CTR 128-bit key Reached unreachable code
+FAIL importKey step: AES-CTR 192-bit key without decrypt usage assert_unreached: importKey failed for AES-CTR 192-bit key Reached unreachable code
+FAIL importKey step: AES-CTR 256-bit key without decrypt usage assert_unreached: importKey failed for AES-CTR 256-bit key Reached unreachable code
+FAIL importKey step: AES-CTR 128-bit key, 0-bit counter assert_unreached: importKey failed for AES-CTR 128-bit key, 0-bit counter Reached unreachable code
+FAIL importKey step: AES-CTR 128-bit key, 129-bit counter assert_unreached: importKey failed for AES-CTR 128-bit key, 129-bit counter Reached unreachable code
+FAIL importKey step: AES-CTR 192-bit key, 0-bit counter assert_unreached: importKey failed for AES-CTR 192-bit key, 0-bit counter Reached unreachable code
+FAIL importKey step: AES-CTR 192-bit key, 129-bit counter assert_unreached: importKey failed for AES-CTR 192-bit key, 129-bit counter Reached unreachable code
+FAIL importKey step: AES-CTR 256-bit key, 0-bit counter assert_unreached: importKey failed for AES-CTR 256-bit key, 0-bit counter Reached unreachable code
+FAIL importKey step: AES-CTR 256-bit key, 129-bit counter assert_unreached: importKey failed for AES-CTR 256-bit key, 129-bit counter Reached unreachable code
+FAIL importKey step: decryption AES-CTR 128-bit key, 0-bit counter assert_unreached: importKey failed for AES-CTR 128-bit key, 0-bit counter Reached unreachable code
+FAIL importKey step: decryption AES-CTR 128-bit key, 129-bit counter assert_unreached: importKey failed for AES-CTR 128-bit key, 129-bit counter Reached unreachable code
+FAIL importKey step: decryption AES-CTR 192-bit key, 0-bit counter assert_unreached: importKey failed for AES-CTR 192-bit key, 0-bit counter Reached unreachable code
+FAIL importKey step: decryption AES-CTR 192-bit key, 129-bit counter assert_unreached: importKey failed for AES-CTR 192-bit key, 129-bit counter Reached unreachable code
+FAIL importKey step: decryption AES-CTR 256-bit key, 0-bit counter assert_unreached: importKey failed for AES-CTR 256-bit key, 0-bit counter Reached unreachable code
+FAIL importKey step: decryption AES-CTR 256-bit key, 129-bit counter assert_unreached: importKey failed for AES-CTR 256-bit key, 129-bit counter Reached unreachable code
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cWebCryptoAPIencrypt_decrypttest_aes_gcmexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/WebCryptoAPI/encrypt_decrypt/test_aes_gcm-expected.txt (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/WebCryptoAPI/encrypt_decrypt/test_aes_gcm-expected.txt        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/LayoutTests/imported/w3c/WebCryptoAPI/encrypt_decrypt/test_aes_gcm-expected.txt        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -1,3 +1,334 @@
</span><del>-CONSOLE MESSAGE: line 285: TypeError: undefined is not an object (evaluating 'subtle.importKey')
-FAIL: Timed out waiting for notifyDone to be called
</del><ins>+encrypt Tests for AES-GCM
</ins><span class="cx"> 
</span><ins>+
+FAIL importKey step: AES-GCM 128-bit key, 32-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, 32-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 32-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 32-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 64-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, 64-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 64-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 64-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 96-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, 96-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 96-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 96-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 104-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, 104-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 104-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 104-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 112-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, 112-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 112-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 112-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 120-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, 120-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 120-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 120-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 128-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, 128-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 128-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 128-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 32-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, 32-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 32-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 32-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 64-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, 64-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 64-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 64-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 96-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, 96-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 96-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 96-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 104-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, 104-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 104-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 104-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 112-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, 112-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 112-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 112-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 120-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, 120-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 120-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 120-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 128-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, 128-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 128-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 128-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 32-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, 32-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 32-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 32-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 64-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, 64-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 64-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 64-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 96-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, 96-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 96-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 96-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 104-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, 104-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 104-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 104-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 112-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, 112-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 112-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 112-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 120-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, 120-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 120-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 120-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 128-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, 128-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 128-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 128-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 32-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 128-bit key, 32-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 32-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 32-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 64-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 128-bit key, 64-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 64-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 64-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 96-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 128-bit key, 96-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 96-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 96-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 104-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 128-bit key, 104-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 104-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 104-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 112-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 128-bit key, 112-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 112-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 112-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 120-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 128-bit key, 120-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 120-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 120-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 128-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 128-bit key, 128-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 128-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 128-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 32-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 192-bit key, 32-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 32-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 32-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 64-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 192-bit key, 64-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 64-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 64-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 96-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 192-bit key, 96-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 96-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 96-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 104-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 192-bit key, 104-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 104-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 104-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 112-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 192-bit key, 112-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 112-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 112-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 120-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 192-bit key, 120-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 120-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 120-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 128-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 192-bit key, 128-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 128-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 128-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 32-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 256-bit key, 32-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 32-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 32-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 64-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 256-bit key, 64-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 64-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 64-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 96-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 256-bit key, 96-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 96-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 96-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 104-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 256-bit key, 104-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 104-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 104-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 112-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 256-bit key, 112-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 112-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 112-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 120-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 256-bit key, 120-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 120-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 120-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 128-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 256-bit key, 128-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 128-bit tag with altered plaintext assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 128-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 128-bit key, 32-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, 32-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 128-bit key, no additional data, 32-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 32-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 128-bit key, 64-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, 64-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 128-bit key, no additional data, 64-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 64-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 128-bit key, 96-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, 96-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 128-bit key, no additional data, 96-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 96-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 128-bit key, 104-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, 104-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 128-bit key, no additional data, 104-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 104-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 128-bit key, 112-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, 112-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 128-bit key, no additional data, 112-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 112-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 128-bit key, 120-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, 120-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 128-bit key, no additional data, 120-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 120-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 128-bit key, 128-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, 128-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 128-bit key, no additional data, 128-bit tag assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 128-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 192-bit key, 32-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, 32-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 192-bit key, no additional data, 32-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 32-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 192-bit key, 64-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, 64-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 192-bit key, no additional data, 64-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 64-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 192-bit key, 96-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, 96-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 192-bit key, no additional data, 96-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 96-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 192-bit key, 104-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, 104-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 192-bit key, no additional data, 104-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 104-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 192-bit key, 112-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, 112-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 192-bit key, no additional data, 112-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 112-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 192-bit key, 120-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, 120-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 192-bit key, no additional data, 120-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 120-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 192-bit key, 128-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, 128-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 192-bit key, no additional data, 128-bit tag assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 128-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 256-bit key, 32-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, 32-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 256-bit key, no additional data, 32-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 32-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 256-bit key, 64-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, 64-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 256-bit key, no additional data, 64-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 64-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 256-bit key, 96-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, 96-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 256-bit key, no additional data, 96-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 96-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 256-bit key, 104-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, 104-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 256-bit key, no additional data, 104-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 104-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 256-bit key, 112-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, 112-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 256-bit key, no additional data, 112-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 112-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 256-bit key, 120-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, 120-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 256-bit key, no additional data, 120-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 120-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 256-bit key, 128-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, 128-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 256-bit key, no additional data, 128-bit tag assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 128-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 128-bit key, 32-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 128-bit key, 32-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 128-bit key, no additional data, 32-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 32-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 128-bit key, 64-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 128-bit key, 64-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 128-bit key, no additional data, 64-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 64-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 128-bit key, 96-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 128-bit key, 96-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 128-bit key, no additional data, 96-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 96-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 128-bit key, 104-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 128-bit key, 104-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 128-bit key, no additional data, 104-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 104-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 128-bit key, 112-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 128-bit key, 112-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 128-bit key, no additional data, 112-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 112-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 128-bit key, 120-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 128-bit key, 120-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 128-bit key, no additional data, 120-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 120-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 128-bit key, 128-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 128-bit key, 128-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 128-bit key, no additional data, 128-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 128-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 192-bit key, 32-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 192-bit key, 32-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 192-bit key, no additional data, 32-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 32-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 192-bit key, 64-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 192-bit key, 64-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 192-bit key, no additional data, 64-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 64-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 192-bit key, 96-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 192-bit key, 96-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 192-bit key, no additional data, 96-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 96-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 192-bit key, 104-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 192-bit key, 104-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 192-bit key, no additional data, 104-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 104-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 192-bit key, 112-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 192-bit key, 112-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 192-bit key, no additional data, 112-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 112-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 192-bit key, 120-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 192-bit key, 120-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 192-bit key, no additional data, 120-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 120-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 192-bit key, 128-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 192-bit key, 128-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 192-bit key, no additional data, 128-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 128-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 256-bit key, 32-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 256-bit key, 32-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 256-bit key, no additional data, 32-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 32-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 256-bit key, 64-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 256-bit key, 64-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 256-bit key, no additional data, 64-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 64-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 256-bit key, 96-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 256-bit key, 96-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 256-bit key, no additional data, 96-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 96-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 256-bit key, 104-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 256-bit key, 104-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 256-bit key, no additional data, 104-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 104-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 256-bit key, 112-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 256-bit key, 112-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 256-bit key, no additional data, 112-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 112-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 256-bit key, 120-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 256-bit key, 120-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 256-bit key, no additional data, 120-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 120-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 256-bit key, 128-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 256-bit key, 128-bit tag Reached unreachable code
+FAIL importKey step for decryption: AES-GCM 256-bit key, no additional data, 128-bit tag with altered ciphertext assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 128-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 32-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, 32-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 32-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 32-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 64-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, 64-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 64-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 64-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 96-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, 96-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 96-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 96-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 104-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, 104-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 104-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 104-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 112-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, 112-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 112-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 112-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 120-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, 120-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 120-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 120-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 128-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, 128-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 128-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 128-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 32-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, 32-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 32-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 32-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 64-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, 64-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 64-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 64-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 96-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, 96-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 96-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 96-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 104-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, 104-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 104-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 104-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 112-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, 112-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 112-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 112-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 120-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, 120-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 120-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 120-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 128-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, 128-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 128-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 128-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 32-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, 32-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 32-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 32-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 64-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, 64-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 64-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 64-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 96-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, 96-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 96-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 96-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 104-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, 104-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 104-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 104-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 112-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, 112-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 112-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 112-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 120-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, 120-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 120-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 120-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 128-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, 128-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 128-bit tag without encrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 128-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 32-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 128-bit key, 32-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 32-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 32-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 64-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 128-bit key, 64-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 64-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 64-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 96-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 128-bit key, 96-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 96-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 96-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 104-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 128-bit key, 104-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 104-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 104-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 112-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 128-bit key, 112-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 112-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 112-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 120-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 128-bit key, 120-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 120-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 120-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 128-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 128-bit key, 128-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 128-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 128-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 32-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 192-bit key, 32-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 32-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 32-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 64-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 192-bit key, 64-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 64-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 64-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 96-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 192-bit key, 96-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 96-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 96-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 104-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 192-bit key, 104-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 104-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 104-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 112-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 192-bit key, 112-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 112-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 112-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 120-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 192-bit key, 120-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 120-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 120-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 128-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 192-bit key, 128-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 128-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 128-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 32-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 256-bit key, 32-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 32-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 32-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 64-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 256-bit key, 64-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 64-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 64-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 96-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 256-bit key, 96-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 96-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 96-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 104-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 256-bit key, 104-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 104-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 104-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 112-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 256-bit key, 112-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 112-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 112-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 120-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 256-bit key, 120-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 120-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 120-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 128-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 256-bit key, 128-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 128-bit tag with mismatched key and algorithm assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 128-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 32-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, 32-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 32-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 32-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 64-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, 64-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 64-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 64-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 96-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, 96-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 96-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 96-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 104-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, 104-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 104-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 104-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 112-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, 112-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 112-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 112-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 120-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, 120-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 120-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 120-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, 128-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, 128-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, no additional data, 128-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 128-bit key, no additional data, 128-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 32-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, 32-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 32-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 32-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 64-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, 64-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 64-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 64-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 96-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, 96-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 96-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 96-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 104-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, 104-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 104-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 104-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 112-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, 112-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 112-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 112-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 120-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, 120-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 120-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 120-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, 128-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, 128-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, no additional data, 128-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 192-bit key, no additional data, 128-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 32-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, 32-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 32-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 32-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 64-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, 64-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 64-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 64-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 96-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, 96-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 96-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 96-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 104-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, 104-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 104-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 104-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 112-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, 112-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 112-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 112-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 120-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, 120-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 120-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 120-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, 128-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, 128-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, no additional data, 128-bit tag without decrypt usage assert_unreached: importKey failed for AES-GCM 256-bit key, no additional data, 128-bit tag Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, illegal tag length 24-bits assert_unreached: importKey failed for AES-GCM 128-bit key, illegal tag length 24-bits Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, illegal tag length 48-bits assert_unreached: importKey failed for AES-GCM 128-bit key, illegal tag length 48-bits Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, illegal tag length 72-bits assert_unreached: importKey failed for AES-GCM 128-bit key, illegal tag length 72-bits Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, illegal tag length 95-bits assert_unreached: importKey failed for AES-GCM 128-bit key, illegal tag length 95-bits Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, illegal tag length 129-bits assert_unreached: importKey failed for AES-GCM 128-bit key, illegal tag length 129-bits Reached unreachable code
+FAIL importKey step: AES-GCM 128-bit key, illegal tag length 256-bits assert_unreached: importKey failed for AES-GCM 128-bit key, illegal tag length 256-bits Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, illegal tag length 24-bits assert_unreached: importKey failed for AES-GCM 192-bit key, illegal tag length 24-bits Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, illegal tag length 48-bits assert_unreached: importKey failed for AES-GCM 192-bit key, illegal tag length 48-bits Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, illegal tag length 72-bits assert_unreached: importKey failed for AES-GCM 192-bit key, illegal tag length 72-bits Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, illegal tag length 95-bits assert_unreached: importKey failed for AES-GCM 192-bit key, illegal tag length 95-bits Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, illegal tag length 129-bits assert_unreached: importKey failed for AES-GCM 192-bit key, illegal tag length 129-bits Reached unreachable code
+FAIL importKey step: AES-GCM 192-bit key, illegal tag length 256-bits assert_unreached: importKey failed for AES-GCM 192-bit key, illegal tag length 256-bits Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, illegal tag length 24-bits assert_unreached: importKey failed for AES-GCM 256-bit key, illegal tag length 24-bits Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, illegal tag length 48-bits assert_unreached: importKey failed for AES-GCM 256-bit key, illegal tag length 48-bits Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, illegal tag length 72-bits assert_unreached: importKey failed for AES-GCM 256-bit key, illegal tag length 72-bits Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, illegal tag length 95-bits assert_unreached: importKey failed for AES-GCM 256-bit key, illegal tag length 95-bits Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, illegal tag length 129-bits assert_unreached: importKey failed for AES-GCM 256-bit key, illegal tag length 129-bits Reached unreachable code
+FAIL importKey step: AES-GCM 256-bit key, illegal tag length 256-bits assert_unreached: importKey failed for AES-GCM 256-bit key, illegal tag length 256-bits Reached unreachable code
+FAIL importKey step: decryption AES-GCM 128-bit key, illegal tag length 24-bits assert_unreached: importKey failed for AES-GCM 128-bit key, illegal tag length 24-bits Reached unreachable code
+FAIL importKey step: decryption AES-GCM 128-bit key, illegal tag length 48-bits assert_unreached: importKey failed for AES-GCM 128-bit key, illegal tag length 48-bits Reached unreachable code
+FAIL importKey step: decryption AES-GCM 128-bit key, illegal tag length 72-bits assert_unreached: importKey failed for AES-GCM 128-bit key, illegal tag length 72-bits Reached unreachable code
+FAIL importKey step: decryption AES-GCM 128-bit key, illegal tag length 95-bits assert_unreached: importKey failed for AES-GCM 128-bit key, illegal tag length 95-bits Reached unreachable code
+FAIL importKey step: decryption AES-GCM 128-bit key, illegal tag length 129-bits assert_unreached: importKey failed for AES-GCM 128-bit key, illegal tag length 129-bits Reached unreachable code
+FAIL importKey step: decryption AES-GCM 128-bit key, illegal tag length 256-bits assert_unreached: importKey failed for AES-GCM 128-bit key, illegal tag length 256-bits Reached unreachable code
+FAIL importKey step: decryption AES-GCM 192-bit key, illegal tag length 24-bits assert_unreached: importKey failed for AES-GCM 192-bit key, illegal tag length 24-bits Reached unreachable code
+FAIL importKey step: decryption AES-GCM 192-bit key, illegal tag length 48-bits assert_unreached: importKey failed for AES-GCM 192-bit key, illegal tag length 48-bits Reached unreachable code
+FAIL importKey step: decryption AES-GCM 192-bit key, illegal tag length 72-bits assert_unreached: importKey failed for AES-GCM 192-bit key, illegal tag length 72-bits Reached unreachable code
+FAIL importKey step: decryption AES-GCM 192-bit key, illegal tag length 95-bits assert_unreached: importKey failed for AES-GCM 192-bit key, illegal tag length 95-bits Reached unreachable code
+FAIL importKey step: decryption AES-GCM 192-bit key, illegal tag length 129-bits assert_unreached: importKey failed for AES-GCM 192-bit key, illegal tag length 129-bits Reached unreachable code
+FAIL importKey step: decryption AES-GCM 192-bit key, illegal tag length 256-bits assert_unreached: importKey failed for AES-GCM 192-bit key, illegal tag length 256-bits Reached unreachable code
+FAIL importKey step: decryption AES-GCM 256-bit key, illegal tag length 24-bits assert_unreached: importKey failed for AES-GCM 256-bit key, illegal tag length 24-bits Reached unreachable code
+FAIL importKey step: decryption AES-GCM 256-bit key, illegal tag length 48-bits assert_unreached: importKey failed for AES-GCM 256-bit key, illegal tag length 48-bits Reached unreachable code
+FAIL importKey step: decryption AES-GCM 256-bit key, illegal tag length 72-bits assert_unreached: importKey failed for AES-GCM 256-bit key, illegal tag length 72-bits Reached unreachable code
+FAIL importKey step: decryption AES-GCM 256-bit key, illegal tag length 95-bits assert_unreached: importKey failed for AES-GCM 256-bit key, illegal tag length 95-bits Reached unreachable code
+FAIL importKey step: decryption AES-GCM 256-bit key, illegal tag length 129-bits assert_unreached: importKey failed for AES-GCM 256-bit key, illegal tag length 129-bits Reached unreachable code
+FAIL importKey step: decryption AES-GCM 256-bit key, illegal tag length 256-bits assert_unreached: importKey failed for AES-GCM 256-bit key, illegal tag length 256-bits Reached unreachable code
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cWebCryptoAPIencrypt_decrypttest_rsa_oaepexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/WebCryptoAPI/encrypt_decrypt/test_rsa_oaep-expected.txt (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/WebCryptoAPI/encrypt_decrypt/test_rsa_oaep-expected.txt        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/LayoutTests/imported/w3c/WebCryptoAPI/encrypt_decrypt/test_rsa_oaep-expected.txt        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -1,3 +1,112 @@
</span><del>-CONSOLE MESSAGE: line 313: TypeError: undefined is not an object (evaluating 'subtle.importKey')
-FAIL: Timed out waiting for notifyDone to be called
</del><ins>+encrypt Tests for RSA-OAEP
</ins><span class="cx"> 
</span><ins>+
+FAIL importVectorKeys step: RSA-OAEP with SHA-1 and no label decryption assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-256 and no label decryption assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-384 and no label decryption assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-512 and no label decryption assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-1 and empty label decryption assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-256 and empty label decryption assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-384 and empty label decryption assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-512 and empty label decryption assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-1 and a label decryption assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-256 and a label decryption assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-384 and a label decryption assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-512 and a label decryption assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-1 and no label decryption with altered ciphertext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-256 and no label decryption with altered ciphertext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-384 and no label decryption with altered ciphertext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-512 and no label decryption with altered ciphertext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-1 and empty label decryption with altered ciphertext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-256 and empty label decryption with altered ciphertext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-384 and empty label decryption with altered ciphertext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-512 and empty label decryption with altered ciphertext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-1 and a label decryption with altered ciphertext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-256 and a label decryption with altered ciphertext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-384 and a label decryption with altered ciphertext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-512 and a label decryption with altered ciphertext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-1 and no label using publicKey to decrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-256 and no label using publicKey to decrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-384 and no label using publicKey to decrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-512 and no label using publicKey to decrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-1 and empty label using publicKey to decrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-256 and empty label using publicKey to decrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-384 and empty label using publicKey to decrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-512 and empty label using publicKey to decrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-1 and a label using publicKey to decrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-256 and a label using publicKey to decrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-384 and a label using publicKey to decrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-512 and a label using publicKey to decrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-1 and no label no decrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-256 and no label no decrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-384 and no label no decrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-512 and no label no decrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-1 and empty label no decrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-256 and empty label no decrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-384 and empty label no decrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-512 and empty label no decrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-1 and a label no decrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-256 and a label no decrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-384 and a label no decrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-512 and a label no decrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-1 and no label with altered plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-256 and no label with altered plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-384 and no label with altered plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-512 and no label with altered plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-1 and empty label with altered plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-256 and empty label with altered plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-384 and empty label with altered plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-512 and empty label with altered plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-1 and a label with altered plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-256 and a label with altered plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-384 and a label with altered plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-512 and a label with altered plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-1 and no label assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-256 and no label assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-384 and no label assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-512 and no label assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-1 and empty label assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-256 and empty label assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-384 and empty label assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-512 and empty label assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-1 and a label assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-256 and a label assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-384 and a label assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-512 and a label assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-1 and no label too long plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-256 and no label too long plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-384 and no label too long plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-512 and no label too long plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-1 and empty label too long plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-256 and empty label too long plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-384 and empty label too long plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-512 and empty label too long plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-1 and a label too long plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-256 and a label too long plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-384 and a label too long plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-512 and a label too long plaintext assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-1 and no label using privateKey to encrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-256 and no label using privateKey to encrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-384 and no label using privateKey to encrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-512 and no label using privateKey to encrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-1 and empty label using privateKey to encrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-256 and empty label using privateKey to encrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-384 and empty label using privateKey to encrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-512 and empty label using privateKey to encrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-1 and a label using privateKey to encrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-256 and a label using privateKey to encrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-384 and a label using privateKey to encrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-512 and a label using privateKey to encrypt assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-1 and no label no encrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-256 and no label no encrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-384 and no label no encrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-512 and no label no encrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and no label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-1 and empty label no encrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-256 and empty label no encrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-384 and empty label no encrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-512 and empty label no encrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and empty label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-1 and a label no encrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-1 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-256 and a label no encrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-256 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-384 and a label no encrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-384 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+FAIL importVectorKeys step: RSA-OAEP with SHA-512 and a label no encrypt usage assert_unreached: importVectorKeys failed for RSA-OAEP with SHA-512 and a label. Message: ''The operation is not supported.'' Reached unreachable code
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cWebCryptoAPIidlharnessexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/WebCryptoAPI/idlharness-expected.txt (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/WebCryptoAPI/idlharness-expected.txt        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/LayoutTests/imported/w3c/WebCryptoAPI/idlharness-expected.txt        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -43,8 +43,8 @@
</span><span class="cx"> FAIL SubtleCrypto interface: operation unwrapKey(KeyFormat,BufferSource,CryptoKey,AlgorithmIdentifier,AlgorithmIdentifier,boolean,[object Object]) assert_own_property: self does not have own property &quot;SubtleCrypto&quot; expected property &quot;SubtleCrypto&quot; missing
</span><span class="cx"> FAIL SubtleCrypto must be primary interface of crypto.subtle assert_own_property: self does not have own property &quot;SubtleCrypto&quot; expected property &quot;SubtleCrypto&quot; missing
</span><span class="cx"> PASS Stringification of crypto.subtle 
</span><del>-FAIL SubtleCrypto interface: crypto.subtle must inherit property &quot;encrypt&quot; with the proper type (0) assert_inherits: property &quot;encrypt&quot; not found in prototype chain
-FAIL SubtleCrypto interface: calling encrypt(AlgorithmIdentifier,CryptoKey,BufferSource) on crypto.subtle with too few arguments must throw TypeError assert_inherits: property &quot;encrypt&quot; not found in prototype chain
</del><ins>+PASS SubtleCrypto interface: crypto.subtle must inherit property &quot;encrypt&quot; with the proper type (0) 
+PASS SubtleCrypto interface: calling encrypt(AlgorithmIdentifier,CryptoKey,BufferSource) on crypto.subtle with too few arguments must throw TypeError 
</ins><span class="cx"> FAIL SubtleCrypto interface: crypto.subtle must inherit property &quot;decrypt&quot; with the proper type (1) assert_inherits: property &quot;decrypt&quot; not found in prototype chain
</span><span class="cx"> FAIL SubtleCrypto interface: calling decrypt(AlgorithmIdentifier,CryptoKey,BufferSource) on crypto.subtle with too few arguments must throw TypeError assert_inherits: property &quot;decrypt&quot; not found in prototype chain
</span><span class="cx"> FAIL SubtleCrypto interface: crypto.subtle must inherit property &quot;sign&quot; with the proper type (2) assert_inherits: property &quot;sign&quot; not found in prototype chain
</span></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/CMakeLists.txt        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -333,11 +333,13 @@
</span><span class="cx">     crypto/SubtleCrypto.idl
</span><span class="cx">     crypto/WebKitSubtleCrypto.idl
</span><span class="cx"> 
</span><ins>+    crypto/parameters/AesCbcParams.idl
</ins><span class="cx">     crypto/parameters/AesKeyGenParams.idl
</span><span class="cx">     crypto/parameters/HmacKeyParams.idl
</span><span class="cx">     crypto/parameters/RsaHashedImportParams.idl
</span><span class="cx">     crypto/parameters/RsaHashedKeyGenParams.idl
</span><span class="cx">     crypto/parameters/RsaKeyGenParams.idl
</span><ins>+    crypto/parameters/RsaOaepParams.idl
</ins><span class="cx"> 
</span><span class="cx">     css/CSSFontFaceLoadEvent.idl
</span><span class="cx">     css/CSSFontFaceRule.idl
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/ChangeLog        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -1,3 +1,115 @@
</span><ins>+2016-11-17  Jiewen Tan  &lt;jiewen_tan@apple.com&gt;
+
+        Update SubtleCrypto::encrypt to match the latest spec
+        https://bugs.webkit.org/show_bug.cgi?id=164738
+        &lt;rdar://problem/29257812&gt;
+
+        Reviewed by Brent Fulgham.
+
+        This patch does following few things:
+        1. It updates the SubtleCrypto::encrypt method to match the latest spec:
+           https://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-method-encrypt.
+           It also refers to the latest Editor's Draft to a certain degree:
+           https://w3c.github.io/webcrypto/Overview.html#SubtleCrypto-method-encrypt.
+        2. It implements encrypt operations of the following algorithms: AES-CBC,
+           RSAES-PKCS1-V1_5, and RSA-OAEP.
+        3. It addes ASSERT(parameters) for every method that accepts a
+           std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp; type parameter.
+        4. It changes RefPtr&lt;CryptoKey&gt;&amp;&amp; to Ref&lt;CryptoKey&gt;&amp;&amp; for every method that
+           accepts a CryptoKey.
+
+        Tests: crypto/subtle/aes-cbc-encrypt-malformed-parameters.html
+               crypto/subtle/aes-cbc-import-key-encrypt.html
+               crypto/subtle/encrypt-malformed-parameters.html
+               crypto/subtle/rsa-oaep-encrypt-malformed-parameters.html
+               crypto/subtle/rsa-oaep-import-key-encrypt-label.html
+               crypto/subtle/rsa-oaep-import-key-encrypt.html
+               crypto/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html
+               crypto/workers/subtle/aes-cbc-import-key-encrypt.html
+               crypto/workers/subtle/rsa-oaep-import-key-encrypt.html
+               crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/BufferSource.h:
+        (WebCore::BufferSource::BufferSource):
+        Add a default constructor for initializing an empty BufferSource object.
+        * bindings/js/JSSubtleCryptoCustom.cpp:
+        (WebCore::normalizeCryptoAlgorithmParameters):
+        (WebCore::jsSubtleCryptoFunctionEncryptPromise):
+        (WebCore::JSSubtleCrypto::encrypt):
+        * crypto/CryptoAlgorithm.cpp:
+        (WebCore::CryptoAlgorithm::encrypt):
+        (WebCore::CryptoAlgorithm::exportKey):
+        * crypto/CryptoAlgorithm.h:
+        * crypto/CryptoAlgorithmParameters.h:
+        * crypto/CryptoKey.h:
+        * crypto/SubtleCrypto.cpp:
+        (WebCore::SubtleCrypto::SubtleCrypto):
+        * crypto/SubtleCrypto.h:
+        (WebCore::SubtleCrypto::workQueue):
+        * crypto/SubtleCrypto.idl:
+        * crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp:
+        (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
+        * crypto/gnutls/CryptoAlgorithmRSAES_PKCS1_v1_5GnuTLS.cpp:
+        (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
+        * crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp:
+        (WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
+        * crypto/gnutls/CryptoKeyRSAGnuTLS.cpp:
+        (WebCore::CryptoKeyRSA::generatePair):
+        * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
+        (WebCore::CryptoAlgorithmAES_CBC::encrypt):
+        (WebCore::CryptoAlgorithmAES_CBC::generateKey):
+        (WebCore::CryptoAlgorithmAES_CBC::importKey):
+        (WebCore::CryptoAlgorithmAES_CBC::exportKey):
+        * crypto/algorithms/CryptoAlgorithmAES_CBC.h:
+        * crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
+        (WebCore::CryptoAlgorithmAES_KW::generateKey):
+        (WebCore::CryptoAlgorithmAES_KW::importKey):
+        (WebCore::CryptoAlgorithmAES_KW::exportKey):
+        * crypto/algorithms/CryptoAlgorithmAES_KW.h:
+        * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
+        (WebCore::CryptoAlgorithmHMAC::generateKey):
+        (WebCore::CryptoAlgorithmHMAC::importKey):
+        (WebCore::CryptoAlgorithmHMAC::exportKey):
+        * crypto/algorithms/CryptoAlgorithmHMAC.h:
+        * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
+        (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::encrypt):
+        (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey):
+        (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):
+        (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::exportKey):
+        * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h:
+        * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
+        (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):
+        (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
+        (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::exportKey):
+        * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
+        * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
+        (WebCore::CryptoAlgorithmRSA_OAEP::encrypt):
+        (WebCore::CryptoAlgorithmRSA_OAEP::generateKey):
+        (WebCore::CryptoAlgorithmRSA_OAEP::importKey):
+        (WebCore::CryptoAlgorithmRSA_OAEP::exportKey):
+        * crypto/algorithms/CryptoAlgorithmRSA_OAEP.h:
+        * crypto/keys/CryptoKeyRSA.h:
+        * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
+        (WebCore::transformAES_CBC):
+        (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
+        (WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
+        * crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:
+        (WebCore::encryptRSAES_PKCS1_v1_5):
+        (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
+        * crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:
+        (WebCore::encryptRSA_OAEP):
+        (WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
+        * crypto/mac/CryptoKeyRSAMac.cpp:
+        (WebCore::CryptoKeyRSA::generatePair):
+        * crypto/parameters/AesCbcParams.idl: Added.
+        * crypto/parameters/CryptoAlgorithmAesCbcParams.h: Added.
+        * crypto/parameters/CryptoAlgorithmAesCbcParamsDeprecated.h:
+        * crypto/parameters/CryptoAlgorithmRsaOaepParams.h: Added.
+        * crypto/parameters/RsaOaepParams.idl: Added.
+
</ins><span class="cx"> 2016-11-18  Ryan Haddad  &lt;ryanhaddad@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Attempt to fix iOS build again.
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/DerivedSources.make        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -254,11 +254,13 @@
</span><span class="cx">     $(WebCore)/crypto/CryptoKeyPair.idl \
</span><span class="cx">     $(WebCore)/crypto/CryptoKeyUsage.idl \
</span><span class="cx">     $(WebCore)/crypto/JsonWebKey.idl \
</span><ins>+    $(WebCore)/crypto/parameters/AesCbcParams.idl \
</ins><span class="cx">     $(WebCore)/crypto/parameters/AesKeyGenParams.idl \
</span><span class="cx">     $(WebCore)/crypto/parameters/HmacKeyParams.idl \
</span><span class="cx">     $(WebCore)/crypto/parameters/RsaHashedImportParams.idl \
</span><span class="cx">     $(WebCore)/crypto/parameters/RsaHashedKeyGenParams.idl \
</span><span class="cx">     $(WebCore)/crypto/parameters/RsaKeyGenParams.idl \
</span><ins>+    $(WebCore)/crypto/parameters/RsaOaepParams.idl \
</ins><span class="cx">     $(WebCore)/crypto/RsaOtherPrimesInfo.idl \
</span><span class="cx">     $(WebCore)/crypto/SubtleCrypto.idl \
</span><span class="cx">     $(WebCore)/crypto/WebKitSubtleCrypto.idl \
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -2353,6 +2353,9 @@
</span><span class="cx">                 5597F8271D91C3130066BC21 /* ImageFrameCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 5597F8251D91C3130066BC21 /* ImageFrameCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 55A336F71D8209F40022C4C7 /* NativeImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 55A336F61D8209F40022C4C7 /* NativeImage.h */; };
</span><span class="cx">                 55A336F91D821E3C0022C4C7 /* ImageBackingStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 55A336F81D821E3C0022C4C7 /* ImageBackingStore.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                5706A6961DDE5C9500A03B14 /* CryptoAlgorithmRsaOaepParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 5706A6951DDE5C9500A03B14 /* CryptoAlgorithmRsaOaepParams.h */; };
+                5706A6981DDE5E4600A03B14 /* JSRsaOaepParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 5706A6971DDE5E4600A03B14 /* JSRsaOaepParams.h */; };
+                5706A69A1DDE5E8500A03B14 /* JSRsaOaepParams.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5706A6991DDE5E8500A03B14 /* JSRsaOaepParams.cpp */; };
</ins><span class="cx">                 5709E8CD1D413D47003244AC /* WebKitSubtleCrypto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5709E8CA1D413CE3003244AC /* WebKitSubtleCrypto.cpp */; };
</span><span class="cx">                 5709E8CE1D413D5B003244AC /* JSWebKitSubtleCryptoCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1FF8F661807460800132674 /* JSWebKitSubtleCryptoCustom.cpp */; };
</span><span class="cx">                 5709E8CF1D413D9A003244AC /* WebKitSubtleCrypto.h in Headers */ = {isa = PBXBuildFile; fileRef = 5709E8CB1D413CE3003244AC /* WebKitSubtleCrypto.h */; };
</span><span class="lines">@@ -2360,6 +2363,9 @@
</span><span class="cx">                 570A99DB1D41A2F3004EC630 /* JSWebKitSubtleCrypto.h in Headers */ = {isa = PBXBuildFile; fileRef = E1FF8F63180745D800132674 /* JSWebKitSubtleCrypto.h */; };
</span><span class="cx">                 571F21891DA57C54005C9EFD /* JSSubtleCrypto.h in Headers */ = {isa = PBXBuildFile; fileRef = 571F21881DA57C54005C9EFD /* JSSubtleCrypto.h */; };
</span><span class="cx">                 571F218B1DA57C7B005C9EFD /* JSSubtleCrypto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 571F218A1DA57C7A005C9EFD /* JSSubtleCrypto.cpp */; };
</span><ins>+                572093D31DDCEB9A00310AB0 /* CryptoAlgorithmAesCbcParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 572093D21DDCEB9A00310AB0 /* CryptoAlgorithmAesCbcParams.h */; };
+                572093D51DDCED8E00310AB0 /* JSAesCbcParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 572093D41DDCED8E00310AB0 /* JSAesCbcParams.h */; };
+                572093D71DDCEDA700310AB0 /* JSAesCbcParams.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 572093D61DDCEDA700310AB0 /* JSAesCbcParams.cpp */; };
</ins><span class="cx">                 572A7F211C6E5719009C6149 /* SimulatedClick.h in Headers */ = {isa = PBXBuildFile; fileRef = 572A7F201C6E5719009C6149 /* SimulatedClick.h */; };
</span><span class="cx">                 572A7F231C6E5A66009C6149 /* SimulatedClick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 572A7F221C6E5A66009C6149 /* SimulatedClick.cpp */; };
</span><span class="cx">                 573489391DAC6B6E00DC0667 /* CryptoAlgorithmParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 573489381DAC6B6D00DC0667 /* CryptoAlgorithmParameters.h */; };
</span><span class="lines">@@ -9584,11 +9590,19 @@
</span><span class="cx">                 55A336F61D8209F40022C4C7 /* NativeImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeImage.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 55A336F81D821E3C0022C4C7 /* ImageBackingStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageBackingStore.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 55D408F71A7C631800C78450 /* SVGImageClients.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImageClients.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                5706A6941DDE5BF800A03B14 /* RsaOaepParams.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = RsaOaepParams.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5706A6951DDE5C9500A03B14 /* CryptoAlgorithmRsaOaepParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptoAlgorithmRsaOaepParams.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5706A6971DDE5E4600A03B14 /* JSRsaOaepParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRsaOaepParams.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5706A6991DDE5E8500A03B14 /* JSRsaOaepParams.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRsaOaepParams.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 5709E8CA1D413CE3003244AC /* WebKitSubtleCrypto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebKitSubtleCrypto.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5709E8CB1D413CE3003244AC /* WebKitSubtleCrypto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitSubtleCrypto.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5709E8CC1D413CE3003244AC /* WebKitSubtleCrypto.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebKitSubtleCrypto.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 571F21881DA57C54005C9EFD /* JSSubtleCrypto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSubtleCrypto.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 571F218A1DA57C7A005C9EFD /* JSSubtleCrypto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSubtleCrypto.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                572093D11DDCEA4B00310AB0 /* AesCbcParams.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = AesCbcParams.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                572093D21DDCEB9A00310AB0 /* CryptoAlgorithmAesCbcParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptoAlgorithmAesCbcParams.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                572093D41DDCED8E00310AB0 /* JSAesCbcParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAesCbcParams.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                572093D61DDCEDA700310AB0 /* JSAesCbcParams.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAesCbcParams.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 572A7F201C6E5719009C6149 /* SimulatedClick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimulatedClick.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 572A7F221C6E5A66009C6149 /* SimulatedClick.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SimulatedClick.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 573489381DAC6B6D00DC0667 /* CryptoAlgorithmParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptoAlgorithmParameters.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -22957,7 +22971,9 @@
</span><span class="cx">                 E1C657141816015F00256CDD /* parameters */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                572093D11DDCEA4B00310AB0 /* AesCbcParams.idl */,
</ins><span class="cx">                                 577483101DADC49900716EF9 /* AesKeyGenParams.idl */,
</span><ins>+                                572093D21DDCEB9A00310AB0 /* CryptoAlgorithmAesCbcParams.h */,
</ins><span class="cx">                                 E125F8391824104800D84CD9 /* CryptoAlgorithmAesCbcParamsDeprecated.h */,
</span><span class="cx">                                 577483111DADC55D00716EF9 /* CryptoAlgorithmAesKeyGenParams.h */,
</span><span class="cx">                                 E19AC3F61824E5D100349426 /* CryptoAlgorithmAesKeyGenParamsDeprecated.h */,
</span><span class="lines">@@ -22969,6 +22985,7 @@
</span><span class="cx">                                 57FEDD3E1DB6D59200EB96F5 /* CryptoAlgorithmRsaKeyGenParams.h */,
</span><span class="cx">                                 E1BD331D182D8F4200C05D9F /* CryptoAlgorithmRsaKeyGenParamsDeprecated.h */,
</span><span class="cx">                                 E1C266DA18319935003F8B33 /* CryptoAlgorithmRsaKeyParamsWithHashDeprecated.h */,
</span><ins>+                                5706A6951DDE5C9500A03B14 /* CryptoAlgorithmRsaOaepParams.h */,
</ins><span class="cx">                                 E1FE1376184D1E3300892F13 /* CryptoAlgorithmRsaOaepParamsDeprecated.h */,
</span><span class="cx">                                 E1BD331B182D8EE900C05D9F /* CryptoAlgorithmRsaSsaParamsDeprecated.h */,
</span><span class="cx">                                 577483171DB1FE8900716EF9 /* HmacKeyParams.idl */,
</span><span class="lines">@@ -22975,6 +22992,7 @@
</span><span class="cx">                                 57E2336C1DCD437000F28D01 /* RsaHashedImportParams.idl */,
</span><span class="cx">                                 57F827391DB72C22009D2BF4 /* RsaHashedKeyGenParams.idl */,
</span><span class="cx">                                 57FEDD3D1DB6D47F00EB96F5 /* RsaKeyGenParams.idl */,
</span><ins>+                                5706A6941DDE5BF800A03B14 /* RsaOaepParams.idl */,
</ins><span class="cx">                         );
</span><span class="cx">                         path = parameters;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -23129,6 +23147,8 @@
</span><span class="cx">                 E1FF8F61180745C600132674 /* Crypto */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                572093D61DDCEDA700310AB0 /* JSAesCbcParams.cpp */,
+                                572093D41DDCED8E00310AB0 /* JSAesCbcParams.h */,
</ins><span class="cx">                                 577483151DAEC32200716EF9 /* JSAesKeyGenParams.cpp */,
</span><span class="cx">                                 577483131DAEC2EA00716EF9 /* JSAesKeyGenParams.h */,
</span><span class="cx">                                 5739E1301DAC7FD100E14383 /* JSCryptoAlgorithmParameters.cpp */,
</span><span class="lines">@@ -23149,6 +23169,8 @@
</span><span class="cx">                                 5768E4331DB7524500D0A4F7 /* JSRsaHashedKeyGenParams.h */,
</span><span class="cx">                                 57FEDD421DB6D76000EB96F5 /* JSRsaKeyGenParams.cpp */,
</span><span class="cx">                                 57FEDD401DB6D73A00EB96F5 /* JSRsaKeyGenParams.h */,
</span><ins>+                                5706A6991DDE5E8500A03B14 /* JSRsaOaepParams.cpp */,
+                                5706A6971DDE5E4600A03B14 /* JSRsaOaepParams.h */,
</ins><span class="cx">                                 57E233601DC7D6AA00F28D01 /* JSRsaOtherPrimesInfo.cpp */,
</span><span class="cx">                                 57E2335C1DC7D60800F28D01 /* JSRsaOtherPrimesInfo.h */,
</span><span class="cx">                                 571F218A1DA57C7A005C9EFD /* JSSubtleCrypto.cpp */,
</span><span class="lines">@@ -25018,6 +25040,7 @@
</span><span class="cx">                                 5CDFA6C81AA4F2DA00EA8746 /* ContentExtensionActions.h in Headers */,
</span><span class="cx">                                 7C93F34E1AA6BF0700A98BAB /* ContentExtensionCompiler.h in Headers */,
</span><span class="cx">                                 7CFDC57D1AC1D80500E24A57 /* ContentExtensionError.h in Headers */,
</span><ins>+                                572093D31DDCEB9A00310AB0 /* CryptoAlgorithmAesCbcParams.h in Headers */,
</ins><span class="cx">                                 26F0C8981A2E724B002794F8 /* ContentExtensionParser.h in Headers */,
</span><span class="cx">                                 26F0C89C1A2EC110002794F8 /* ContentExtensionRule.h in Headers */,
</span><span class="cx">                                 26F0C8A01A2EC3BE002794F8 /* ContentExtensionsBackend.h in Headers */,
</span><span class="lines">@@ -25343,6 +25366,7 @@
</span><span class="cx">                                 E35802B61DC8435D00A9773C /* DOMJITIDLTypeFilter.h in Headers */,
</span><span class="cx">                                 A9C6E4E40D745E05006442E9 /* DOMMimeType.h in Headers */,
</span><span class="cx">                                 A9C6E4E80D745E18006442E9 /* DOMMimeTypeArray.h in Headers */,
</span><ins>+                                5706A6961DDE5C9500A03B14 /* CryptoAlgorithmRsaOaepParams.h in Headers */,
</ins><span class="cx">                                 52B6C9C315E3F4DF00690B05 /* DOMNamedFlowCollection.h in Headers */,
</span><span class="cx">                                 1ACE53E80A8D18E70022947D /* DOMParser.h in Headers */,
</span><span class="cx">                                 7A54881714E432A1006AE05A /* DOMPatchSupport.h in Headers */,
</span><span class="lines">@@ -26138,7 +26162,9 @@
</span><span class="cx">                                 1AE2AB2A0A1CE63B00B42B25 /* JSHTMLModElement.h in Headers */,
</span><span class="cx">                                 BC305C7A0C076BB300CD20F0 /* JSHTMLObjectElement.h in Headers */,
</span><span class="cx">                                 1A85B1EB0A1B240500D8C87C /* JSHTMLOListElement.h in Headers */,
</span><ins>+                                5706A6981DDE5E4600A03B14 /* JSRsaOaepParams.h in Headers */,
</ins><span class="cx">                                 A80E7E9B0A1A83E3007FB8C5 /* JSHTMLOptGroupElement.h in Headers */,
</span><ins>+                                572093D51DDCED8E00310AB0 /* JSAesCbcParams.h in Headers */,
</ins><span class="cx">                                 A80E7E990A1A83E3007FB8C5 /* JSHTMLOptionElement.h in Headers */,
</span><span class="cx">                                 448A29BF0A46D9CB0030759F /* JSHTMLOptionsCollection.h in Headers */,
</span><span class="cx">                                 4AD0173D127E82860015035F /* JSHTMLOutputElement.h in Headers */,
</span><span class="lines">@@ -28590,6 +28616,8 @@
</span><span class="cx">                         isa = PBXSourcesBuildPhase;
</span><span class="cx">                         buildActionMask = 2147483647;
</span><span class="cx">                         files = (
</span><ins>+                                5706A69A1DDE5E8500A03B14 /* JSRsaOaepParams.cpp in Sources */,
+                                572093D71DDCEDA700310AB0 /* JSAesCbcParams.cpp in Sources */,
</ins><span class="cx">                                 57D0018F1DD5415300ED19D9 /* JSCryptoKeyUsage.cpp in Sources */,
</span><span class="cx">                                 41E1B1D00FF5986900576B3B /* AbstractWorker.cpp in Sources */,
</span><span class="cx">                                 37F57AB91A50726900876F98 /* AccessibilityARIAGrid.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsBufferSourceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/BufferSource.h (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/BufferSource.h        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/bindings/js/BufferSource.h        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -36,6 +36,7 @@
</span><span class="cx"> public:
</span><span class="cx">     using VariantType = WTF::Variant&lt;RefPtr&lt;JSC::ArrayBufferView&gt;, RefPtr&lt;JSC::ArrayBuffer&gt;&gt;;
</span><span class="cx"> 
</span><ins>+    BufferSource() { }
</ins><span class="cx">     BufferSource(VariantType&amp;&amp; variant)
</span><span class="cx">         : m_variant(WTFMove(variant))
</span><span class="cx">     { }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSSubtleCryptoCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;CryptoAlgorithm.h&quot;
</span><span class="cx"> #include &quot;CryptoAlgorithmRegistry.h&quot;
</span><ins>+#include &quot;JSAesCbcParams.h&quot;
</ins><span class="cx"> #include &quot;JSAesKeyGenParams.h&quot;
</span><span class="cx"> #include &quot;JSCryptoAlgorithmParameters.h&quot;
</span><span class="cx"> #include &quot;JSCryptoKey.h&quot;
</span><span class="lines">@@ -40,6 +41,7 @@
</span><span class="cx"> #include &quot;JSRsaHashedImportParams.h&quot;
</span><span class="cx"> #include &quot;JSRsaHashedKeyGenParams.h&quot;
</span><span class="cx"> #include &quot;JSRsaKeyGenParams.h&quot;
</span><ins>+#include &quot;JSRsaOaepParams.h&quot;
</ins><span class="cx"> #include &quot;ScriptState.h&quot;
</span><span class="cx"> #include &lt;runtime/Error.h&gt;
</span><span class="cx"> #include &lt;runtime/IteratorOperations.h&gt;
</span><span class="lines">@@ -50,6 +52,7 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> enum class Operations {
</span><ins>+    Encrypt,
</ins><span class="cx">     Digest,
</span><span class="cx">     GenerateKey,
</span><span class="cx">     ImportKey,
</span><span class="lines">@@ -90,6 +93,28 @@
</span><span class="cx"> 
</span><span class="cx">         std::unique_ptr&lt;CryptoAlgorithmParameters&gt; result;
</span><span class="cx">         switch (operation) {
</span><ins>+        case Operations::Encrypt:
+            switch (*identifier) {
+            case CryptoAlgorithmIdentifier::RSAES_PKCS1_v1_5:
+                result = std::make_unique&lt;CryptoAlgorithmParameters&gt;(params);
+                break;
+            case CryptoAlgorithmIdentifier::RSA_OAEP: {
+                auto params = convertDictionary&lt;CryptoAlgorithmRsaOaepParams&gt;(state, value);
+                RETURN_IF_EXCEPTION(scope, nullptr);
+                result = std::make_unique&lt;CryptoAlgorithmRsaOaepParams&gt;(params);
+                break;
+            }
+            case CryptoAlgorithmIdentifier::AES_CBC: {
+                auto params = convertDictionary&lt;CryptoAlgorithmAesCbcParams&gt;(state, value);
+                RETURN_IF_EXCEPTION(scope, nullptr);
+                result = std::make_unique&lt;CryptoAlgorithmAesCbcParams&gt;(params);
+                break;
+            }
+            default:
+                setDOMException(&amp;state, NOT_SUPPORTED_ERR);
+                return nullptr;
+            }
+            break;
</ins><span class="cx">         case Operations::Digest:
</span><span class="cx">             switch (*identifier) {
</span><span class="cx">             case CryptoAlgorithmIdentifier::SHA_1:
</span><span class="lines">@@ -363,6 +388,56 @@
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static void jsSubtleCryptoFunctionEncryptPromise(ExecState&amp; state, Ref&lt;DeferredPromise&gt;&amp;&amp; promise)
+{
+    VM&amp; vm = state.vm();
+    auto scope = DECLARE_THROW_SCOPE(vm);
+
+    if (UNLIKELY(state.argumentCount() &lt; 3)) {
+        promise-&gt;reject&lt;JSValue&gt;(createNotEnoughArgumentsError(&amp;state));
+        return;
+    }
+
+    auto params = normalizeCryptoAlgorithmParameters(state, state.uncheckedArgument(0), Operations::Encrypt);
+    RETURN_IF_EXCEPTION(scope, void());
+
+    RefPtr&lt;CryptoKey&gt; key = JSCryptoKey::toWrapped(state.uncheckedArgument(1));
+    if (!key) {
+        promise-&gt;reject(TypeError, ASCIILiteral(&quot;Invalid CryptoKey&quot;));
+        return;
+    }
+
+    BufferSource data = convert&lt;IDLBufferSource&gt;(state, state.uncheckedArgument(2));
+    RETURN_IF_EXCEPTION(scope, void());
+    Vector&lt;uint8_t&gt; dataVector;
+    dataVector.append(data.data(), data.length());
+
+    if (params-&gt;identifier != key-&gt;algorithmIdentifier()) {
+        promise-&gt;reject(INVALID_ACCESS_ERR, ASCIILiteral(&quot;CryptoKey doesn't match AlgorithmIdentifier&quot;));
+        return;
+    }
+
+    if (!key-&gt;allows(CryptoKeyUsageEncrypt)) {
+        promise-&gt;reject(INVALID_ACCESS_ERR, ASCIILiteral(&quot;CryptoKey doesn't support encryption&quot;));
+        return;
+    }
+
+    auto algorithm = createAlgorithm(state, key-&gt;algorithmIdentifier());
+    RETURN_IF_EXCEPTION(scope, void());
+
+    auto callback = [capturedPromise = promise.copyRef()](const Vector&lt;uint8_t&gt;&amp; cipherText) mutable {
+        fulfillPromiseWithArrayBuffer(WTFMove(capturedPromise), cipherText.data(), cipherText.size());
+        return;
+    };
+    auto exceptionCallback = [capturedPromise = promise.copyRef()](ExceptionCode ec) mutable {
+        rejectWithException(WTFMove(capturedPromise), ec);
+    };
+
+    JSSubtleCrypto* subtle = jsDynamicDowncast&lt;JSSubtleCrypto*&gt;(state.thisValue());
+    ASSERT(subtle);
+    algorithm-&gt;encrypt(WTFMove(params), key.releaseNonNull(), WTFMove(dataVector), WTFMove(callback), WTFMove(exceptionCallback), *scriptExecutionContextFromExecState(&amp;state), subtle-&gt;wrapped().workQueue());
+}
+
</ins><span class="cx"> static void jsSubtleCryptoFunctionGenerateKeyPromise(ExecState&amp; state, Ref&lt;DeferredPromise&gt;&amp;&amp; promise)
</span><span class="cx"> {
</span><span class="cx">     VM&amp; vm = state.vm();
</span><span class="lines">@@ -524,9 +599,14 @@
</span><span class="cx">     // The 11 December 2014 version of the specification suggests we should perform the following task asynchronously:
</span><span class="cx">     // https://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-method-exportKey
</span><span class="cx">     // It is not beneficial for less time consuming operations. Therefore, we perform it synchronously.
</span><del>-    algorithm-&gt;exportKey(format, WTFMove(key), WTFMove(callback), WTFMove(exceptionCallback));
</del><ins>+    algorithm-&gt;exportKey(format, key.releaseNonNull(), WTFMove(callback), WTFMove(exceptionCallback));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSValue JSSubtleCrypto::encrypt(ExecState&amp; state)
+{
+    return callPromiseFunction&lt;jsSubtleCryptoFunctionEncryptPromise, PromiseExecutionScope::WindowOrWorker&gt;(state);
+}
+
</ins><span class="cx"> JSValue JSSubtleCrypto::generateKey(ExecState&amp; state)
</span><span class="cx"> {
</span><span class="cx">     return callPromiseFunction&lt;jsSubtleCryptoFunctionGenerateKeyPromise, PromiseExecutionScope::WindowOrWorker&gt;(state);
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoCryptoAlgorithmcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/CryptoAlgorithm.cpp (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/CryptoAlgorithm.cpp        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/crypto/CryptoAlgorithm.cpp        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -32,6 +32,11 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+void CryptoAlgorithm::encrypt(std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, Ref&lt;CryptoKey&gt;&amp;&amp;, Vector&lt;uint8_t&gt;&amp;&amp;, VectorCallback&amp;&amp;, ExceptionCallback&amp;&amp; exceptionCallback, ScriptExecutionContext&amp;, WorkQueue&amp;)
+{
+    exceptionCallback(NOT_SUPPORTED_ERR);
+}
+
</ins><span class="cx"> void CryptoAlgorithm::generateKey(const std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, bool, CryptoKeyUsageBitmap, KeyOrKeyPairCallback&amp;&amp;, ExceptionCallback&amp;&amp; exceptionCallback, ScriptExecutionContext&amp;)
</span><span class="cx"> {
</span><span class="cx">     exceptionCallback(NOT_SUPPORTED_ERR);
</span><span class="lines">@@ -42,7 +47,7 @@
</span><span class="cx">     exceptionCallback(NOT_SUPPORTED_ERR);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CryptoAlgorithm::exportKey(SubtleCrypto::KeyFormat, RefPtr&lt;WebCore::CryptoKey&gt;&amp;&amp;, KeyDataCallback&amp;&amp;, ExceptionCallback&amp;&amp; exceptionCallback)
</del><ins>+void CryptoAlgorithm::exportKey(SubtleCrypto::KeyFormat, Ref&lt;CryptoKey&gt;&amp;&amp;, KeyDataCallback&amp;&amp;, ExceptionCallback&amp;&amp; exceptionCallback)
</ins><span class="cx"> {
</span><span class="cx">     exceptionCallback(NOT_SUPPORTED_ERR);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoCryptoAlgorithmh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/CryptoAlgorithm.h (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/CryptoAlgorithm.h        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/crypto/CryptoAlgorithm.h        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include &quot;SubtleCrypto.h&quot;
</span><span class="cx"> #include &lt;wtf/Function.h&gt;
</span><span class="cx"> #include &lt;wtf/Vector.h&gt;
</span><ins>+#include &lt;wtf/WorkQueue.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(SUBTLE_CRYPTO)
</span><span class="cx"> 
</span><span class="lines">@@ -63,9 +64,10 @@
</span><span class="cx">     using ExceptionCallback = WTF::Function&lt;void(ExceptionCode)&gt;;
</span><span class="cx">     using KeyDataCallback = WTF::Function&lt;void(SubtleCrypto::KeyFormat, KeyData&amp;&amp;)&gt;;
</span><span class="cx"> 
</span><ins>+    virtual void encrypt(std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, Ref&lt;CryptoKey&gt;&amp;&amp;, Vector&lt;uint8_t&gt;&amp;&amp;, VectorCallback&amp;&amp;, ExceptionCallback&amp;&amp;, ScriptExecutionContext&amp;, WorkQueue&amp;);
</ins><span class="cx">     virtual void generateKey(const std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, bool extractable, CryptoKeyUsageBitmap, KeyOrKeyPairCallback&amp;&amp;, ExceptionCallback&amp;&amp;, ScriptExecutionContext&amp;);
</span><span class="cx">     virtual void importKey(SubtleCrypto::KeyFormat, KeyData&amp;&amp;, const std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, bool extractable, CryptoKeyUsageBitmap, KeyCallback&amp;&amp;, ExceptionCallback&amp;&amp;);
</span><del>-    virtual void exportKey(SubtleCrypto::KeyFormat, RefPtr&lt;CryptoKey&gt;&amp;&amp;, KeyDataCallback&amp;&amp;, ExceptionCallback&amp;&amp;);
</del><ins>+    virtual void exportKey(SubtleCrypto::KeyFormat, Ref&lt;CryptoKey&gt;&amp;&amp;, KeyDataCallback&amp;&amp;, ExceptionCallback&amp;&amp;);
</ins><span class="cx"> 
</span><span class="cx">     // The following will be deprecated.
</span><span class="cx">     virtual ExceptionOr&lt;void&gt; encrypt(const CryptoAlgorithmParametersDeprecated&amp;, const CryptoKey&amp;, const CryptoOperationData&amp;, VectorCallback&amp;&amp;, VoidCallback&amp;&amp; failureCallback);
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoCryptoAlgorithmParametersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/CryptoAlgorithmParameters.h (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/CryptoAlgorithmParameters.h        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/crypto/CryptoAlgorithmParameters.h        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -37,11 +37,13 @@
</span><span class="cx"> public:
</span><span class="cx">     enum class Class {
</span><span class="cx">         None,
</span><ins>+        AesCbcParams,
</ins><span class="cx">         AesKeyGenParams,
</span><span class="cx">         HmacKeyParams,
</span><span class="cx">         RsaHashedKeyGenParams,
</span><span class="cx">         RsaHashedImportParams,
</span><span class="cx">         RsaKeyGenParams,
</span><ins>+        RsaOaepParams,
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     // FIXME: Consider merging name and identifier.
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoCryptoKeyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/CryptoKey.h (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/CryptoKey.h        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/crypto/CryptoKey.h        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx"> #include &quot;CryptoKeyType.h&quot;
</span><span class="cx"> #include &quot;CryptoKeyUsage.h&quot;
</span><span class="cx"> #include &lt;wtf/Forward.h&gt;
</span><del>-#include &lt;wtf/RefCounted.h&gt;
</del><ins>+#include &lt;wtf/ThreadSafeRefCounted.h&gt;
</ins><span class="cx"> #include &lt;wtf/TypeCasts.h&gt;
</span><span class="cx"> #include &lt;wtf/Vector.h&gt;
</span><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</span><span class="lines">@@ -74,7 +74,7 @@
</span><span class="cx">     String m_name;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-class CryptoKey : public RefCounted&lt;CryptoKey&gt; {
</del><ins>+class CryptoKey : public ThreadSafeRefCounted&lt;CryptoKey&gt; {
</ins><span class="cx"> public:
</span><span class="cx">     using Type = CryptoKeyType;
</span><span class="cx">     CryptoKey(CryptoAlgorithmIdentifier, Type, bool extractable, CryptoKeyUsageBitmap);
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoSubtleCryptocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/SubtleCrypto.cpp (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/SubtleCrypto.cpp        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/crypto/SubtleCrypto.cpp        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> 
</span><span class="cx"> SubtleCrypto::SubtleCrypto(ScriptExecutionContext&amp; context)
</span><span class="cx">     : ContextDestructionObserver(&amp;context)
</span><ins>+    , m_workQueue(WorkQueue::create(&quot;com.apple.WebKit.CryptoQueue&quot;))
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoSubtleCryptoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/SubtleCrypto.h (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/SubtleCrypto.h        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/crypto/SubtleCrypto.h        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> #include &quot;ContextDestructionObserver.h&quot;
</span><span class="cx"> #include &lt;wtf/Ref.h&gt;
</span><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><ins>+#include &lt;wtf/WorkQueue.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(SUBTLE_CRYPTO)
</span><span class="cx"> 
</span><span class="lines">@@ -39,8 +40,12 @@
</span><span class="cx"> 
</span><span class="cx">     static Ref&lt;SubtleCrypto&gt; create(ScriptExecutionContext&amp; context) { return adoptRef(*new SubtleCrypto(context)); }
</span><span class="cx"> 
</span><ins>+    WorkQueue&amp; workQueue() { return m_workQueue.get(); };
+
</ins><span class="cx"> private:
</span><span class="cx">     SubtleCrypto(ScriptExecutionContext&amp;);
</span><ins>+
+    Ref&lt;WorkQueue&gt; m_workQueue;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoSubtleCryptoidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/SubtleCrypto.idl (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/SubtleCrypto.idl        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/crypto/SubtleCrypto.idl        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx">     GenerateIsReachable=ImplScriptExecutionContext,
</span><span class="cx">     NoInterfaceObject,
</span><span class="cx"> ] interface SubtleCrypto {
</span><ins>+    [Custom] Promise&lt;any&gt; encrypt(AlgorithmIdentifier algorithm, CryptoKey key, BufferSource data);
</ins><span class="cx">     // FIXME: Should this return a Promise&lt;(CryptoKey or CryptoKeyPair)&gt;?
</span><span class="cx">     [Custom] Promise&lt;any&gt; generateKey(AlgorithmIdentifier algorithm, boolean extractable, sequence&lt;CryptoKeyUsage&gt; keyUsages);
</span><span class="cx">     [Custom] Promise&lt;CryptoKey&gt; importKey(KeyFormat format, (BufferSource or JsonWebKey) keyData, AlgorithmIdentifier algorithm, boolen extractable, sequence&lt;CryptoKeyUsage&gt; keyUsages);
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmAES_CBCcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CBC.cpp (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CBC.cpp        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CBC.cpp        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(SUBTLE_CRYPTO)
</span><span class="cx"> 
</span><ins>+#include &quot;CryptoAlgorithmAesCbcParams.h&quot;
</ins><span class="cx"> #include &quot;CryptoAlgorithmAesCbcParamsDeprecated.h&quot;
</span><span class="cx"> #include &quot;CryptoAlgorithmAesKeyGenParams.h&quot;
</span><span class="cx"> #include &quot;CryptoAlgorithmAesKeyGenParamsDeprecated.h&quot;
</span><span class="lines">@@ -40,6 +41,7 @@
</span><span class="cx"> static const char* const ALG128 = &quot;A128CBC&quot;;
</span><span class="cx"> static const char* const ALG192 = &quot;A192CBC&quot;;
</span><span class="cx"> static const char* const ALG256 = &quot;A256CBC&quot;;
</span><ins>+static const size_t IVSIZE = 16;
</ins><span class="cx"> 
</span><span class="cx"> static inline bool usagesAreInvalidForCryptoAlgorithmAES_CBC(CryptoKeyUsageBitmap usages)
</span><span class="cx"> {
</span><span class="lines">@@ -64,8 +66,20 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void CryptoAlgorithmAES_CBC::encrypt(std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp; parameters, Ref&lt;CryptoKey&gt;&amp;&amp; key, Vector&lt;uint8_t&gt;&amp;&amp; plainText, VectorCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback, ScriptExecutionContext&amp; context, WorkQueue&amp; workQueue)
+{
+    ASSERT(parameters);
+    auto&amp; aesParameters = downcast&lt;CryptoAlgorithmAesCbcParams&gt;(*parameters);
+    if (aesParameters.ivVector().size() != IVSIZE) {
+        exceptionCallback(OperationError);
+        return;
+    }
+    platformEncrypt(WTFMove(parameters), WTFMove(key), WTFMove(plainText), WTFMove(callback), WTFMove(exceptionCallback), context, workQueue);
+}
+
</ins><span class="cx"> void CryptoAlgorithmAES_CBC::generateKey(const std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp; parameters, bool extractable, CryptoKeyUsageBitmap usages, KeyOrKeyPairCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback, ScriptExecutionContext&amp;)
</span><span class="cx"> {
</span><ins>+    ASSERT(parameters);
</ins><span class="cx">     auto&amp; aesParameters = downcast&lt;CryptoAlgorithmAesKeyGenParams&gt;(*parameters);
</span><span class="cx"> 
</span><span class="cx">     if (usagesAreInvalidForCryptoAlgorithmAES_CBC(usages)) {
</span><span class="lines">@@ -84,6 +98,7 @@
</span><span class="cx"> 
</span><span class="cx"> void CryptoAlgorithmAES_CBC::importKey(SubtleCrypto::KeyFormat format, KeyData&amp;&amp; data, const std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp; parameters, bool extractable, CryptoKeyUsageBitmap usages, KeyCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback)
</span><span class="cx"> {
</span><ins>+    ASSERT(parameters);
</ins><span class="cx">     if (usagesAreInvalidForCryptoAlgorithmAES_CBC(usages)) {
</span><span class="cx">         exceptionCallback(SYNTAX_ERR);
</span><span class="cx">         return;
</span><span class="lines">@@ -121,9 +136,9 @@
</span><span class="cx">     callback(*result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CryptoAlgorithmAES_CBC::exportKey(SubtleCrypto::KeyFormat format, RefPtr&lt;CryptoKey&gt;&amp;&amp; key, KeyDataCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback)
</del><ins>+void CryptoAlgorithmAES_CBC::exportKey(SubtleCrypto::KeyFormat format, Ref&lt;CryptoKey&gt;&amp;&amp; key, KeyDataCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback)
</ins><span class="cx"> {
</span><del>-    const auto&amp; aesKey = downcast&lt;CryptoKeyAES&gt;(*key);
</del><ins>+    const auto&amp; aesKey = downcast&lt;CryptoKeyAES&gt;(key.get());
</ins><span class="cx"> 
</span><span class="cx">     if (aesKey.key().isEmpty()) {
</span><span class="cx">         exceptionCallback(OperationError);
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmAES_CBCh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CBC.h (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CBC.h        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CBC.h        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -44,9 +44,10 @@
</span><span class="cx">     CryptoAlgorithmAES_CBC() = default;
</span><span class="cx">     CryptoAlgorithmIdentifier identifier() const final;
</span><span class="cx"> 
</span><ins>+    void encrypt(std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, Ref&lt;CryptoKey&gt;&amp;&amp;, Vector&lt;uint8_t&gt;&amp;&amp;, VectorCallback&amp;&amp;, ExceptionCallback&amp;&amp;, ScriptExecutionContext&amp;, WorkQueue&amp;) final;
</ins><span class="cx">     void generateKey(const std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, bool extractable, CryptoKeyUsageBitmap, KeyOrKeyPairCallback&amp;&amp;, ExceptionCallback&amp;&amp;, ScriptExecutionContext&amp;) final;
</span><span class="cx">     void importKey(SubtleCrypto::KeyFormat, KeyData&amp;&amp;, const std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, bool extractable, CryptoKeyUsageBitmap, KeyCallback&amp;&amp;, ExceptionCallback&amp;&amp;) final;
</span><del>-    void exportKey(SubtleCrypto::KeyFormat, RefPtr&lt;CryptoKey&gt;&amp;&amp;, KeyDataCallback&amp;&amp;, ExceptionCallback&amp;&amp;) final;
</del><ins>+    void exportKey(SubtleCrypto::KeyFormat, Ref&lt;CryptoKey&gt;&amp;&amp;, KeyDataCallback&amp;&amp;, ExceptionCallback&amp;&amp;) final;
</ins><span class="cx"> 
</span><span class="cx">     ExceptionOr&lt;void&gt; encrypt(const CryptoAlgorithmParametersDeprecated&amp;, const CryptoKey&amp;, const CryptoOperationData&amp;, VectorCallback&amp;&amp;, VoidCallback&amp;&amp; failureCallback) final;
</span><span class="cx">     ExceptionOr&lt;void&gt; decrypt(const CryptoAlgorithmParametersDeprecated&amp;, const CryptoKey&amp;, const CryptoOperationData&amp;, VectorCallback&amp;&amp;, VoidCallback&amp;&amp; failureCallback) final;
</span><span class="lines">@@ -54,6 +55,7 @@
</span><span class="cx">     ExceptionOr&lt;void&gt; importKey(const CryptoAlgorithmParametersDeprecated&amp;, const CryptoKeyData&amp;, bool extractable, CryptoKeyUsageBitmap, KeyCallback&amp;&amp;, VoidCallback&amp;&amp; failureCallback) final;
</span><span class="cx"> 
</span><span class="cx">     bool keyAlgorithmMatches(const CryptoAlgorithmAesCbcParamsDeprecated&amp; algorithmParameters, const CryptoKey&amp;) const;
</span><ins>+    void platformEncrypt(std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, Ref&lt;CryptoKey&gt;&amp;&amp;, Vector&lt;uint8_t&gt;&amp;&amp;, VectorCallback&amp;&amp;, ExceptionCallback&amp;&amp;, ScriptExecutionContext&amp;, WorkQueue&amp;);
</ins><span class="cx">     ExceptionOr&lt;void&gt; platformEncrypt(const CryptoAlgorithmAesCbcParamsDeprecated&amp;, const CryptoKeyAES&amp;, const CryptoOperationData&amp;, VectorCallback&amp;&amp;, VoidCallback&amp;&amp; failureCallback);
</span><span class="cx">     ExceptionOr&lt;void&gt; platformDecrypt(const CryptoAlgorithmAesCbcParamsDeprecated&amp;, const CryptoKeyAES&amp;, const CryptoOperationData&amp;, VectorCallback&amp;&amp;, VoidCallback&amp;&amp; failureCallback);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmAES_KWcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_KW.cpp (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_KW.cpp        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_KW.cpp        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -65,6 +65,7 @@
</span><span class="cx"> 
</span><span class="cx"> void CryptoAlgorithmAES_KW::generateKey(const std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp; parameters, bool extractable, CryptoKeyUsageBitmap usages, KeyOrKeyPairCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback, ScriptExecutionContext&amp;)
</span><span class="cx"> {
</span><ins>+    ASSERT(parameters);
</ins><span class="cx">     if (usagesAreInvalidForCryptoAlgorithmAES_KW(usages)) {
</span><span class="cx">         exceptionCallback(SYNTAX_ERR);
</span><span class="cx">         return;
</span><span class="lines">@@ -81,6 +82,7 @@
</span><span class="cx"> 
</span><span class="cx"> void CryptoAlgorithmAES_KW::importKey(SubtleCrypto::KeyFormat format, KeyData&amp;&amp; data, const std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp; parameters, bool extractable, CryptoKeyUsageBitmap usages, KeyCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback)
</span><span class="cx"> {
</span><ins>+    ASSERT(parameters);
</ins><span class="cx">     if (usagesAreInvalidForCryptoAlgorithmAES_KW(usages)) {
</span><span class="cx">         exceptionCallback(SYNTAX_ERR);
</span><span class="cx">         return;
</span><span class="lines">@@ -117,9 +119,9 @@
</span><span class="cx">     callback(*result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CryptoAlgorithmAES_KW::exportKey(SubtleCrypto::KeyFormat format, RefPtr&lt;CryptoKey&gt;&amp;&amp; key, KeyDataCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback)
</del><ins>+void CryptoAlgorithmAES_KW::exportKey(SubtleCrypto::KeyFormat format, Ref&lt;CryptoKey&gt;&amp;&amp; key, KeyDataCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback)
</ins><span class="cx"> {
</span><del>-    const auto&amp; aesKey = downcast&lt;CryptoKeyAES&gt;(*key);
</del><ins>+    const auto&amp; aesKey = downcast&lt;CryptoKeyAES&gt;(key.get());
</ins><span class="cx"> 
</span><span class="cx">     if (aesKey.key().isEmpty()) {
</span><span class="cx">         exceptionCallback(OperationError);
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmAES_KWh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_KW.h (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_KW.h        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_KW.h        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx"> 
</span><span class="cx">     void generateKey(const std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, bool extractable, CryptoKeyUsageBitmap, KeyOrKeyPairCallback&amp;&amp;, ExceptionCallback&amp;&amp;, ScriptExecutionContext&amp;) final;
</span><span class="cx">     void importKey(SubtleCrypto::KeyFormat, KeyData&amp;&amp;, const std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, bool extractable, CryptoKeyUsageBitmap, KeyCallback&amp;&amp;, ExceptionCallback&amp;&amp;) final;
</span><del>-    void exportKey(SubtleCrypto::KeyFormat, RefPtr&lt;CryptoKey&gt;&amp;&amp;, KeyDataCallback&amp;&amp;, ExceptionCallback&amp;&amp;) final;
</del><ins>+    void exportKey(SubtleCrypto::KeyFormat, Ref&lt;CryptoKey&gt;&amp;&amp;, KeyDataCallback&amp;&amp;, ExceptionCallback&amp;&amp;) final;
</ins><span class="cx"> 
</span><span class="cx">     ExceptionOr&lt;void&gt; encryptForWrapKey(const CryptoAlgorithmParametersDeprecated&amp;, const CryptoKey&amp;, const CryptoOperationData&amp;, VectorCallback&amp;&amp;, VoidCallback&amp;&amp; failureCallback) final;
</span><span class="cx">     ExceptionOr&lt;void&gt; decryptForUnwrapKey(const CryptoAlgorithmParametersDeprecated&amp;, const CryptoKey&amp;, const CryptoOperationData&amp;, VectorCallback&amp;&amp;, VoidCallback&amp;&amp; failureCallback) final;
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmHMACcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmHMAC.cpp (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmHMAC.cpp        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmHMAC.cpp        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -71,6 +71,7 @@
</span><span class="cx"> 
</span><span class="cx"> void CryptoAlgorithmHMAC::generateKey(const std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp; parameters, bool extractable, CryptoKeyUsageBitmap usages, KeyOrKeyPairCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback, ScriptExecutionContext&amp;)
</span><span class="cx"> {
</span><ins>+    ASSERT(parameters);
</ins><span class="cx">     const auto&amp; hmacParameters = downcast&lt;CryptoAlgorithmHmacKeyParams&gt;(*parameters);
</span><span class="cx"> 
</span><span class="cx">     if (usagesAreInvalidForCryptoAlgorithmHMAC(usages)) {
</span><span class="lines">@@ -94,6 +95,7 @@
</span><span class="cx"> 
</span><span class="cx"> void CryptoAlgorithmHMAC::importKey(SubtleCrypto::KeyFormat format, KeyData&amp;&amp; data, const std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp; parameters, bool extractable, CryptoKeyUsageBitmap usages, KeyCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback)
</span><span class="cx"> {
</span><ins>+    ASSERT(parameters);
</ins><span class="cx">     const auto&amp; hmacParameters = downcast&lt;CryptoAlgorithmHmacKeyParams&gt;(*parameters);
</span><span class="cx"> 
</span><span class="cx">     if (usagesAreInvalidForCryptoAlgorithmHMAC(usages)) {
</span><span class="lines">@@ -139,9 +141,9 @@
</span><span class="cx">     callback(*result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CryptoAlgorithmHMAC::exportKey(SubtleCrypto::KeyFormat format, RefPtr&lt;CryptoKey&gt;&amp;&amp; key, KeyDataCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback)
</del><ins>+void CryptoAlgorithmHMAC::exportKey(SubtleCrypto::KeyFormat format, Ref&lt;CryptoKey&gt;&amp;&amp; key, KeyDataCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback)
</ins><span class="cx"> {
</span><del>-    const auto&amp; hmacKey = downcast&lt;CryptoKeyHMAC&gt;(*key);
</del><ins>+    const auto&amp; hmacKey = downcast&lt;CryptoKeyHMAC&gt;(key.get());
</ins><span class="cx"> 
</span><span class="cx">     if (hmacKey.key().isEmpty()) {
</span><span class="cx">         exceptionCallback(OperationError);
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmHMACh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmHMAC.h (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmHMAC.h        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmHMAC.h        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> 
</span><span class="cx">     void generateKey(const std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, bool extractable, CryptoKeyUsageBitmap, KeyOrKeyPairCallback&amp;&amp;, ExceptionCallback&amp;&amp;, ScriptExecutionContext&amp;) final;
</span><span class="cx">     void importKey(SubtleCrypto::KeyFormat, KeyData&amp;&amp;, const std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, bool extractable, CryptoKeyUsageBitmap, KeyCallback&amp;&amp;, ExceptionCallback&amp;&amp;) final;
</span><del>-    void exportKey(SubtleCrypto::KeyFormat, RefPtr&lt;CryptoKey&gt;&amp;&amp;, KeyDataCallback&amp;&amp;, ExceptionCallback&amp;&amp;) final;
</del><ins>+    void exportKey(SubtleCrypto::KeyFormat, Ref&lt;CryptoKey&gt;&amp;&amp;, KeyDataCallback&amp;&amp;, ExceptionCallback&amp;&amp;) final;
</ins><span class="cx"> 
</span><span class="cx">     // The following will be deprecated.
</span><span class="cx">     ExceptionOr&lt;void&gt; sign(const CryptoAlgorithmParametersDeprecated&amp;, const CryptoKey&amp;, const CryptoOperationData&amp;, VectorCallback&amp;&amp;, VoidCallback&amp;&amp; failureCallback) final;
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmRSAES_PKCS1_v1_5cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -59,8 +59,18 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void CryptoAlgorithmRSAES_PKCS1_v1_5::encrypt(std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, Ref&lt;CryptoKey&gt;&amp;&amp; key, Vector&lt;uint8_t&gt;&amp;&amp; plainText, VectorCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback, ScriptExecutionContext&amp; context, WorkQueue&amp; workQueue)
+{
+    if (key-&gt;type() != CryptoKeyType::Public) {
+        exceptionCallback(INVALID_ACCESS_ERR);
+        return;
+    }
+    platformEncrypt(WTFMove(key), WTFMove(plainText), WTFMove(callback), WTFMove(exceptionCallback), context, workQueue);
+}
+
</ins><span class="cx"> void CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey(const std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp; parameters, bool extractable, CryptoKeyUsageBitmap usages, KeyOrKeyPairCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback, ScriptExecutionContext&amp; context)
</span><span class="cx"> {
</span><ins>+    ASSERT(parameters);
</ins><span class="cx">     const auto&amp; rsaParameters = downcast&lt;CryptoAlgorithmRsaKeyGenParams&gt;(*parameters);
</span><span class="cx"> 
</span><span class="cx">     if (usages &amp; (CryptoKeyUsageSign | CryptoKeyUsageVerify | CryptoKeyUsageDeriveKey | CryptoKeyUsageDeriveBits | CryptoKeyUsageWrapKey | CryptoKeyUsageUnwrapKey)) {
</span><span class="lines">@@ -82,6 +92,7 @@
</span><span class="cx"> 
</span><span class="cx"> void CryptoAlgorithmRSAES_PKCS1_v1_5::importKey(SubtleCrypto::KeyFormat format, KeyData&amp;&amp; data, const std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp; parameters, bool extractable, CryptoKeyUsageBitmap usages, KeyCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback)
</span><span class="cx"> {
</span><ins>+    ASSERT(parameters);
</ins><span class="cx">     RefPtr&lt;CryptoKeyRSA&gt; result;
</span><span class="cx">     switch (format) {
</span><span class="cx">     case SubtleCrypto::KeyFormat::Jwk: {
</span><span class="lines">@@ -113,9 +124,9 @@
</span><span class="cx">     callback(*result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CryptoAlgorithmRSAES_PKCS1_v1_5::exportKey(SubtleCrypto::KeyFormat format, RefPtr&lt;CryptoKey&gt;&amp;&amp; key, KeyDataCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback)
</del><ins>+void CryptoAlgorithmRSAES_PKCS1_v1_5::exportKey(SubtleCrypto::KeyFormat format, Ref&lt;CryptoKey&gt;&amp;&amp; key, KeyDataCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback)
</ins><span class="cx"> {
</span><del>-    const auto&amp; rsaKey = downcast&lt;CryptoKeyRSA&gt;(*key);
</del><ins>+    const auto&amp; rsaKey = downcast&lt;CryptoKeyRSA&gt;(key.get());
</ins><span class="cx"> 
</span><span class="cx">     if (!rsaKey.keySizeInBits()) {
</span><span class="cx">         exceptionCallback(OperationError);
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmRSAES_PKCS1_v1_5h"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -44,11 +44,11 @@
</span><span class="cx">     CryptoAlgorithmRSAES_PKCS1_v1_5() = default;
</span><span class="cx">     CryptoAlgorithmIdentifier identifier() const final;
</span><span class="cx"> 
</span><ins>+    void encrypt(std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, Ref&lt;CryptoKey&gt;&amp;&amp;, Vector&lt;uint8_t&gt;&amp;&amp;, VectorCallback&amp;&amp;, ExceptionCallback&amp;&amp;, ScriptExecutionContext&amp;, WorkQueue&amp;) final;
</ins><span class="cx">     void generateKey(const std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, bool extractable, CryptoKeyUsageBitmap, KeyOrKeyPairCallback&amp;&amp;, ExceptionCallback&amp;&amp;, ScriptExecutionContext&amp;) final;
</span><span class="cx">     void importKey(SubtleCrypto::KeyFormat, KeyData&amp;&amp;, const std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, bool extractable, CryptoKeyUsageBitmap, KeyCallback&amp;&amp;, ExceptionCallback&amp;&amp;) final;
</span><del>-    void exportKey(SubtleCrypto::KeyFormat, RefPtr&lt;CryptoKey&gt;&amp;&amp;, KeyDataCallback&amp;&amp;, ExceptionCallback&amp;&amp;) final;
</del><ins>+    void exportKey(SubtleCrypto::KeyFormat, Ref&lt;CryptoKey&gt;&amp;&amp;, KeyDataCallback&amp;&amp;, ExceptionCallback&amp;&amp;) final;
</ins><span class="cx"> 
</span><del>-    // The following will be deprecated.
</del><span class="cx">     ExceptionOr&lt;void&gt; encrypt(const CryptoAlgorithmParametersDeprecated&amp;, const CryptoKey&amp;, const CryptoOperationData&amp;, VectorCallback&amp;&amp;, VoidCallback&amp;&amp; failureCallback) final;
</span><span class="cx">     ExceptionOr&lt;void&gt; decrypt(const CryptoAlgorithmParametersDeprecated&amp;, const CryptoKey&amp;, const CryptoOperationData&amp;, VectorCallback&amp;&amp;, VoidCallback&amp;&amp; failureCallback) final;
</span><span class="cx">     ExceptionOr&lt;void&gt; generateKey(const CryptoAlgorithmParametersDeprecated&amp;, bool extractable, CryptoKeyUsageBitmap, KeyOrKeyPairCallback&amp;&amp;, VoidCallback&amp;&amp; failureCallback, ScriptExecutionContext&amp;) final;
</span><span class="lines">@@ -55,6 +55,7 @@
</span><span class="cx">     ExceptionOr&lt;void&gt; importKey(const CryptoAlgorithmParametersDeprecated&amp;, const CryptoKeyData&amp;, bool extractable, CryptoKeyUsageBitmap, KeyCallback&amp;&amp;, VoidCallback&amp;&amp; failureCallback) final;
</span><span class="cx"> 
</span><span class="cx">     bool keyAlgorithmMatches(const CryptoKey&amp;) const;
</span><ins>+    void platformEncrypt(Ref&lt;CryptoKey&gt;&amp;&amp;, Vector&lt;uint8_t&gt;&amp;&amp;, VectorCallback&amp;&amp;, ExceptionCallback&amp;&amp;, ScriptExecutionContext&amp;, WorkQueue&amp;);
</ins><span class="cx">     ExceptionOr&lt;void&gt; platformEncrypt(const CryptoKeyRSA&amp;, const CryptoOperationData&amp;, VectorCallback&amp;&amp;, VoidCallback&amp;&amp; failureCallback);
</span><span class="cx">     ExceptionOr&lt;void&gt; platformDecrypt(const CryptoKeyRSA&amp;, const CryptoOperationData&amp;, VectorCallback&amp;&amp;, VoidCallback&amp;&amp; failureCallback);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmRSASSA_PKCS1_v1_5cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -70,6 +70,7 @@
</span><span class="cx"> 
</span><span class="cx"> void CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey(const std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp; parameters, bool extractable, CryptoKeyUsageBitmap usages, KeyOrKeyPairCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback, ScriptExecutionContext&amp; context)
</span><span class="cx"> {
</span><ins>+    ASSERT(parameters);
</ins><span class="cx">     const auto&amp; rsaParameters = downcast&lt;CryptoAlgorithmRsaHashedKeyGenParams&gt;(*parameters);
</span><span class="cx"> 
</span><span class="cx">     if (usages &amp; (CryptoKeyUsageDecrypt | CryptoKeyUsageEncrypt | CryptoKeyUsageDeriveKey | CryptoKeyUsageDeriveBits | CryptoKeyUsageWrapKey | CryptoKeyUsageUnwrapKey)) {
</span><span class="lines">@@ -90,6 +91,7 @@
</span><span class="cx"> 
</span><span class="cx"> void CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey(SubtleCrypto::KeyFormat format, KeyData&amp;&amp; data, const std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp; parameters, bool extractable, CryptoKeyUsageBitmap usages, KeyCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback)
</span><span class="cx"> {
</span><ins>+    ASSERT(parameters);
</ins><span class="cx">     const auto&amp; rsaParameters = downcast&lt;CryptoAlgorithmRsaHashedImportParams&gt;(*parameters);
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;CryptoKeyRSA&gt; result;
</span><span class="lines">@@ -146,9 +148,9 @@
</span><span class="cx">     callback(*result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CryptoAlgorithmRSASSA_PKCS1_v1_5::exportKey(SubtleCrypto::KeyFormat format, RefPtr&lt;CryptoKey&gt;&amp;&amp; key, KeyDataCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback)
</del><ins>+void CryptoAlgorithmRSASSA_PKCS1_v1_5::exportKey(SubtleCrypto::KeyFormat format, Ref&lt;CryptoKey&gt;&amp;&amp; key, KeyDataCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback)
</ins><span class="cx"> {
</span><del>-    const auto&amp; rsaKey = downcast&lt;CryptoKeyRSA&gt;(*key);
</del><ins>+    const auto&amp; rsaKey = downcast&lt;CryptoKeyRSA&gt;(key.get());
</ins><span class="cx"> 
</span><span class="cx">     if (!rsaKey.keySizeInBits()) {
</span><span class="cx">         exceptionCallback(OperationError);
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmRSASSA_PKCS1_v1_5h"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> 
</span><span class="cx">     void generateKey(const std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, bool extractable, CryptoKeyUsageBitmap, KeyOrKeyPairCallback&amp;&amp;, ExceptionCallback&amp;&amp;, ScriptExecutionContext&amp;) final;
</span><span class="cx">     void importKey(SubtleCrypto::KeyFormat, KeyData&amp;&amp;, const std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, bool extractable, CryptoKeyUsageBitmap, KeyCallback&amp;&amp;, ExceptionCallback&amp;&amp;) final;
</span><del>-    void exportKey(SubtleCrypto::KeyFormat, RefPtr&lt;CryptoKey&gt;&amp;&amp;, KeyDataCallback&amp;&amp;, ExceptionCallback&amp;&amp;) final;
</del><ins>+    void exportKey(SubtleCrypto::KeyFormat, Ref&lt;CryptoKey&gt;&amp;&amp;, KeyDataCallback&amp;&amp;, ExceptionCallback&amp;&amp;) final;
</ins><span class="cx"> 
</span><span class="cx">     ExceptionOr&lt;void&gt; sign(const CryptoAlgorithmParametersDeprecated&amp;, const CryptoKey&amp;, const CryptoOperationData&amp;, VectorCallback&amp;&amp;, VoidCallback&amp;&amp; failureCallback) final;
</span><span class="cx">     ExceptionOr&lt;void&gt; verify(const CryptoAlgorithmParametersDeprecated&amp;, const CryptoKey&amp;, const CryptoOperationData&amp; signature, const CryptoOperationData&amp;, BoolCallback&amp;&amp;, VoidCallback&amp;&amp; failureCallback) final;
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmRSA_OAEPcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -68,8 +68,20 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void CryptoAlgorithmRSA_OAEP::encrypt(std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp; parameters, Ref&lt;CryptoKey&gt;&amp;&amp; key, Vector&lt;uint8_t&gt;&amp;&amp; plainText, VectorCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback, ScriptExecutionContext&amp; context, WorkQueue&amp; workQueue)
+{
+    ASSERT(parameters);
+    if (key-&gt;type() != CryptoKeyType::Public) {
+        exceptionCallback(INVALID_ACCESS_ERR);
+        return;
+    }
+    platformEncrypt(WTFMove(parameters), WTFMove(key), WTFMove(plainText), WTFMove(callback), WTFMove(exceptionCallback), context, workQueue);
+}
+
+
</ins><span class="cx"> void CryptoAlgorithmRSA_OAEP::generateKey(const std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp; parameters, bool extractable, CryptoKeyUsageBitmap usages, KeyOrKeyPairCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback, ScriptExecutionContext&amp; context)
</span><span class="cx"> {
</span><ins>+    ASSERT(parameters);
</ins><span class="cx">     const auto&amp; rsaParameters = downcast&lt;CryptoAlgorithmRsaHashedKeyGenParams&gt;(*parameters);
</span><span class="cx"> 
</span><span class="cx">     if (usages &amp; (CryptoKeyUsageSign | CryptoKeyUsageVerify | CryptoKeyUsageDeriveKey | CryptoKeyUsageDeriveBits)) {
</span><span class="lines">@@ -90,6 +102,7 @@
</span><span class="cx"> 
</span><span class="cx"> void CryptoAlgorithmRSA_OAEP::importKey(SubtleCrypto::KeyFormat format, KeyData&amp;&amp; data, const std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp; parameters, bool extractable, CryptoKeyUsageBitmap usages, KeyCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback)
</span><span class="cx"> {
</span><ins>+    ASSERT(parameters);
</ins><span class="cx">     const auto&amp; rsaParameters = downcast&lt;CryptoAlgorithmRsaHashedImportParams&gt;(*parameters);
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;CryptoKeyRSA&gt; result;
</span><span class="lines">@@ -157,9 +170,9 @@
</span><span class="cx">     callback(*result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CryptoAlgorithmRSA_OAEP::exportKey(SubtleCrypto::KeyFormat format, RefPtr&lt;CryptoKey&gt;&amp;&amp; key, KeyDataCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback)
</del><ins>+void CryptoAlgorithmRSA_OAEP::exportKey(SubtleCrypto::KeyFormat format, Ref&lt;CryptoKey&gt;&amp;&amp; key, KeyDataCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback)
</ins><span class="cx"> {
</span><del>-    const auto&amp; rsaKey = downcast&lt;CryptoKeyRSA&gt;(*key);
</del><ins>+    const auto&amp; rsaKey = downcast&lt;CryptoKeyRSA&gt;(key.get());
</ins><span class="cx"> 
</span><span class="cx">     if (!rsaKey.keySizeInBits()) {
</span><span class="cx">         exceptionCallback(OperationError);
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmRSA_OAEPh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_OAEP.h (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_OAEP.h        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_OAEP.h        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -44,9 +44,10 @@
</span><span class="cx">     CryptoAlgorithmRSA_OAEP() = default;
</span><span class="cx">     CryptoAlgorithmIdentifier identifier() const final;
</span><span class="cx"> 
</span><ins>+    void encrypt(std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, Ref&lt;CryptoKey&gt;&amp;&amp;, Vector&lt;uint8_t&gt;&amp;&amp;, VectorCallback&amp;&amp;, ExceptionCallback&amp;&amp;, ScriptExecutionContext&amp;, WorkQueue&amp;) final;
</ins><span class="cx">     void generateKey(const std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, bool extractable, CryptoKeyUsageBitmap, KeyOrKeyPairCallback&amp;&amp;, ExceptionCallback&amp;&amp;, ScriptExecutionContext&amp;) final;
</span><span class="cx">     void importKey(SubtleCrypto::KeyFormat, KeyData&amp;&amp;, const std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, bool extractable, CryptoKeyUsageBitmap, KeyCallback&amp;&amp;, ExceptionCallback&amp;&amp;) final;
</span><del>-    void exportKey(SubtleCrypto::KeyFormat, RefPtr&lt;CryptoKey&gt;&amp;&amp;, KeyDataCallback&amp;&amp;, ExceptionCallback&amp;&amp;) final;
</del><ins>+    void exportKey(SubtleCrypto::KeyFormat, Ref&lt;CryptoKey&gt;&amp;&amp;, KeyDataCallback&amp;&amp;, ExceptionCallback&amp;&amp;) final;
</ins><span class="cx"> 
</span><span class="cx">     ExceptionOr&lt;void&gt; encrypt(const CryptoAlgorithmParametersDeprecated&amp;, const CryptoKey&amp;, const CryptoOperationData&amp;, VectorCallback&amp;&amp;, VoidCallback&amp;&amp; failureCallback) final;
</span><span class="cx">     ExceptionOr&lt;void&gt; decrypt(const CryptoAlgorithmParametersDeprecated&amp;, const CryptoKey&amp;, const CryptoOperationData&amp;, VectorCallback&amp;&amp;, VoidCallback&amp;&amp; failureCallback) final;
</span><span class="lines">@@ -54,6 +55,7 @@
</span><span class="cx">     ExceptionOr&lt;void&gt; importKey(const CryptoAlgorithmParametersDeprecated&amp;, const CryptoKeyData&amp;, bool extractable, CryptoKeyUsageBitmap, KeyCallback&amp;&amp;, VoidCallback&amp;&amp; failureCallback) final;
</span><span class="cx"> 
</span><span class="cx">     bool keyAlgorithmMatches(const CryptoAlgorithmRsaOaepParamsDeprecated&amp; algorithmParameters, const CryptoKey&amp;) const;
</span><ins>+    void platformEncrypt(std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, Ref&lt;CryptoKey&gt;&amp;&amp;, Vector&lt;uint8_t&gt;&amp;&amp;, VectorCallback&amp;&amp;, ExceptionCallback&amp;&amp;, ScriptExecutionContext&amp;, WorkQueue&amp;);
</ins><span class="cx">     ExceptionOr&lt;void&gt; platformEncrypt(const CryptoAlgorithmRsaOaepParamsDeprecated&amp;, const CryptoKeyRSA&amp;, const CryptoOperationData&amp;, VectorCallback&amp;&amp;, VoidCallback&amp;&amp; failureCallback);
</span><span class="cx">     ExceptionOr&lt;void&gt; platformDecrypt(const CryptoAlgorithmRsaOaepParamsDeprecated&amp;, const CryptoKeyRSA&amp;, const CryptoOperationData&amp;, VectorCallback&amp;&amp;, VoidCallback&amp;&amp; failureCallback);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorecryptognutlsCryptoAlgorithmAES_CBCGnuTLScpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -33,6 +33,11 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+void CryptoAlgorithmAES_CBC::platformEncrypt(std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, Ref&lt;CryptoKey&gt;&amp;&amp;, Vector&lt;uint8_t&gt;&amp;&amp;, VectorCallback&amp;&amp;, ExceptionCallback&amp;&amp;, ScriptExecutionContext&amp;, WorkQueue&amp;)
+{
+    notImplemented();
+}
+
</ins><span class="cx"> ExceptionOr&lt;void&gt; CryptoAlgorithmAES_CBC::platformEncrypt(const CryptoAlgorithmAesCbcParamsDeprecated&amp;, const CryptoKeyAES&amp;, const CryptoOperationData&amp;, VectorCallback&amp;&amp;, VoidCallback&amp;&amp;)
</span><span class="cx"> {
</span><span class="cx">     notImplemented();
</span></span></pre></div>
<a id="trunkSourceWebCorecryptognutlsCryptoAlgorithmRSAES_PKCS1_v1_5GnuTLScpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/gnutls/CryptoAlgorithmRSAES_PKCS1_v1_5GnuTLS.cpp (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/gnutls/CryptoAlgorithmRSAES_PKCS1_v1_5GnuTLS.cpp        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/crypto/gnutls/CryptoAlgorithmRSAES_PKCS1_v1_5GnuTLS.cpp        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -34,6 +34,11 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+void CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt(Ref&lt;CryptoKey&gt;&amp;&amp;, Vector&lt;uint8_t&gt;&amp;&amp;, VectorCallback&amp;&amp;, ExceptionCallback&amp;&amp;, ScriptExecutionContext&amp;, WorkQueue&amp;)
+{
+    notImplemented();
+}
+
</ins><span class="cx"> ExceptionOr&lt;void&gt; CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt(const CryptoKeyRSA&amp;, const CryptoOperationData&amp;, VectorCallback&amp;&amp;, VoidCallback&amp;&amp;)
</span><span class="cx"> {
</span><span class="cx">     notImplemented();
</span></span></pre></div>
<a id="trunkSourceWebCorecryptognutlsCryptoAlgorithmRSA_OAEPGnuTLScpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -33,6 +33,11 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+void CryptoAlgorithmRSA_OAEP::platformEncrypt(std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, Ref&lt;CryptoKey&gt;&amp;&amp;, Vector&lt;uint8_t&gt;&amp;&amp;, VectorCallback&amp;&amp;, ExceptionCallback&amp;&amp;, ScriptExecutionContext&amp;, WorkQueue&amp;)
+{
+    notImplemented();
+}
+
</ins><span class="cx"> ExceptionOr&lt;void&gt; CryptoAlgorithmRSA_OAEP::platformEncrypt(const CryptoAlgorithmRsaOaepParamsDeprecated&amp;, const CryptoKeyRSA&amp;, const CryptoOperationData&amp;, VectorCallback&amp;&amp;, VoidCallback&amp;&amp;)
</span><span class="cx"> {
</span><span class="cx">     notImplemented();
</span></span></pre></div>
<a id="trunkSourceWebCorecryptognutlsCryptoKeyRSAGnuTLScpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/gnutls/CryptoKeyRSAGnuTLS.cpp (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/gnutls/CryptoKeyRSAGnuTLS.cpp        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/crypto/gnutls/CryptoKeyRSAGnuTLS.cpp        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -95,7 +95,7 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CryptoKeyRSA::generatePair(CryptoAlgorithmIdentifier algorithm, CryptoAlgorithmIdentifier hash, bool hasHash, unsigned modulusLength, const Vector&lt;uint8_t&gt;&amp; publicExponent, bool extractable, CryptoKeyUsageBitmap usage, KeyPairCallback callback, VoidCallback failureCallback, ScriptExecutionContext* context)
</del><ins>+void CryptoKeyRSA::generatePair(CryptoAlgorithmIdentifier algorithm, CryptoAlgorithmIdentifier hash, bool hasHash, unsigned modulusLength, const Vector&lt;uint8_t&gt;&amp; publicExponent, bool extractable, CryptoKeyUsageBitmap usage, KeyPairCallback&amp;&amp; callback, VoidCallback&amp;&amp; failureCallback, ScriptExecutionContext* context)
</ins><span class="cx"> {
</span><span class="cx">     notImplemented();
</span><span class="cx">     failureCallback();
</span></span></pre></div>
<a id="trunkSourceWebCorecryptokeysCryptoKeyRSAh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/keys/CryptoKeyRSA.h (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/keys/CryptoKeyRSA.h        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/crypto/keys/CryptoKeyRSA.h        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -99,7 +99,7 @@
</span><span class="cx"> 
</span><span class="cx">     using KeyPairCallback = WTF::Function&lt;void(CryptoKeyPair&amp;)&gt;;
</span><span class="cx">     using VoidCallback = WTF::Function&lt;void()&gt;;
</span><del>-    static void generatePair(CryptoAlgorithmIdentifier, CryptoAlgorithmIdentifier hash, bool hasHash, unsigned modulusLength, const Vector&lt;uint8_t&gt;&amp; publicExponent, bool extractable, CryptoKeyUsageBitmap, KeyPairCallback, VoidCallback failureCallback, ScriptExecutionContext*);
</del><ins>+    static void generatePair(CryptoAlgorithmIdentifier, CryptoAlgorithmIdentifier hash, bool hasHash, unsigned modulusLength, const Vector&lt;uint8_t&gt;&amp; publicExponent, bool extractable, CryptoKeyUsageBitmap, KeyPairCallback&amp;&amp;, VoidCallback&amp;&amp; failureCallback, ScriptExecutionContext*);
</ins><span class="cx">     static RefPtr&lt;CryptoKeyRSA&gt; importJwk(CryptoAlgorithmIdentifier, Optional&lt;CryptoAlgorithmIdentifier&gt; hash, JsonWebKey&amp;&amp;, bool extractable, CryptoKeyUsageBitmap);
</span><span class="cx"> 
</span><span class="cx">     PlatformRSAKey platformKey() const { return m_platformKey; }
</span></span></pre></div>
<a id="trunkSourceWebCorecryptomacCryptoAlgorithmAES_CBCMaccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/mac/CryptoAlgorithmAES_CBCMac.cpp (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/mac/CryptoAlgorithmAES_CBCMac.cpp        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/crypto/mac/CryptoAlgorithmAES_CBCMac.cpp        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -28,22 +28,20 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(SUBTLE_CRYPTO)
</span><span class="cx"> 
</span><ins>+#include &quot;CryptoAlgorithmAesCbcParams.h&quot;
</ins><span class="cx"> #include &quot;CryptoAlgorithmAesCbcParamsDeprecated.h&quot;
</span><span class="cx"> #include &quot;CryptoKeyAES.h&quot;
</span><ins>+#include &quot;ExceptionCode.h&quot;
+#include &quot;ScriptExecutionContext.h&quot;
</ins><span class="cx"> #include &lt;CommonCrypto/CommonCrypto.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-static void transformAES_CBC(CCOperation operation, const CryptoAlgorithmAesCbcParamsDeprecated&amp; parameters, const CryptoKeyAES&amp; key, const CryptoOperationData&amp; data, CryptoAlgorithm::VectorCallback&amp;&amp; callback, CryptoAlgorithm::VoidCallback&amp;&amp; failureCallback)
</del><ins>+// FIXME: We should change iv and data to Vector&lt;uint8_t&gt; type once WebKitSubtleCrypto is deprecated.
+// https://bugs.webkit.org/show_bug.cgi?id=164939
+static ExceptionOr&lt;Vector&lt;uint8_t&gt;&gt; transformAES_CBC(CCOperation operation, const uint8_t* iv, const Vector&lt;uint8_t&gt;&amp; key, const uint8_t* data, size_t dataLength)
</ins><span class="cx"> {
</span><del>-    static_assert(sizeof(parameters.iv) == kCCBlockSizeAES128, &quot;Initialization vector size must be the same as algorithm block size&quot;);
-
-    size_t keyLengthInBytes = key.key().size();
-    if (keyLengthInBytes != 16 &amp;&amp; keyLengthInBytes != 24 &amp;&amp; keyLengthInBytes != 32) {
-        failureCallback();
-        return;
-    }
-
</del><ins>+    size_t keyLengthInBytes = key.size();
</ins><span class="cx">     CCCryptorRef cryptor;
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx">     CCAlgorithm aesAlgorithm = kCCAlgorithmAES;
</span><span class="lines">@@ -50,28 +48,22 @@
</span><span class="cx"> #else
</span><span class="cx">     CCAlgorithm aesAlgorithm = kCCAlgorithmAES128;
</span><span class="cx"> #endif
</span><del>-    CCCryptorStatus status = CCCryptorCreate(operation, aesAlgorithm, kCCOptionPKCS7Padding, key.key().data(), keyLengthInBytes, parameters.iv.data(), &amp;cryptor);
-    if (status) {
-        failureCallback();
-        return;
-    }
</del><ins>+    CCCryptorStatus status = CCCryptorCreate(operation, aesAlgorithm, kCCOptionPKCS7Padding, key.data(), keyLengthInBytes, iv, &amp;cryptor);
+    if (status)
+        return Exception { OperationError };
</ins><span class="cx"> 
</span><del>-    Vector&lt;uint8_t&gt; result(CCCryptorGetOutputLength(cryptor, data.second, true));
</del><ins>+    Vector&lt;uint8_t&gt; result(CCCryptorGetOutputLength(cryptor, dataLength, true));
</ins><span class="cx"> 
</span><span class="cx">     size_t bytesWritten;
</span><del>-    status = CCCryptorUpdate(cryptor, data.first, data.second, result.data(), result.size(), &amp;bytesWritten);
-    if (status) {
-        failureCallback();
-        return;
-    }
</del><ins>+    status = CCCryptorUpdate(cryptor, data, dataLength, result.data(), result.size(), &amp;bytesWritten);
+    if (status)
+        return Exception { OperationError };
</ins><span class="cx"> 
</span><span class="cx">     uint8_t* p = result.data() + bytesWritten;
</span><span class="cx">     status = CCCryptorFinal(cryptor, p, result.end() - p, &amp;bytesWritten);
</span><span class="cx">     p += bytesWritten;
</span><del>-    if (status) {
-        failureCallback();
-        return;
-    }
</del><ins>+    if (status)
+        return Exception { OperationError };
</ins><span class="cx"> 
</span><span class="cx">     ASSERT(p &lt;= result.end());
</span><span class="cx">     result.shrink(p - result.begin());
</span><span class="lines">@@ -78,18 +70,52 @@
</span><span class="cx"> 
</span><span class="cx">     CCCryptorRelease(cryptor);
</span><span class="cx"> 
</span><del>-    callback(result);
</del><ins>+    return WTFMove(result);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void CryptoAlgorithmAES_CBC::platformEncrypt(std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp; parameters, Ref&lt;CryptoKey&gt;&amp;&amp; key, Vector&lt;uint8_t&gt;&amp;&amp; plainText, VectorCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback, ScriptExecutionContext&amp; context, WorkQueue&amp; workQueue)
+{
+    context.ref();
+    workQueue.dispatch([parameters = WTFMove(parameters), key = WTFMove(key), plainText = WTFMove(plainText), callback = WTFMove(callback), exceptionCallback = WTFMove(exceptionCallback), &amp;context]() mutable {
+        auto&amp; aesParameters = downcast&lt;CryptoAlgorithmAesCbcParams&gt;(*parameters);
+        auto&amp; aesKey = downcast&lt;CryptoKeyAES&gt;(key.get());
+        ASSERT(aesParameters.ivVector().size() == kCCBlockSizeAES128);
+        auto result = transformAES_CBC(kCCEncrypt, aesParameters.ivVector().data(), aesKey.key(), plainText.data(), plainText.size());
+        if (result.hasException()) {
+            context.postTask([exceptionCallback = WTFMove(exceptionCallback), ec = result.releaseException().code()](ScriptExecutionContext&amp; context) {
+                exceptionCallback(ec);
+                context.deref();
+            });
+            return;
+        }
+        context.postTask([callback = WTFMove(callback), result = result.releaseReturnValue()](ScriptExecutionContext&amp; context) {
+            callback(result);
+            context.deref();
+        });
+    });
+}
+
</ins><span class="cx"> ExceptionOr&lt;void&gt; CryptoAlgorithmAES_CBC::platformEncrypt(const CryptoAlgorithmAesCbcParamsDeprecated&amp; parameters, const CryptoKeyAES&amp; key, const CryptoOperationData&amp; data, VectorCallback&amp;&amp; callback, VoidCallback&amp;&amp; failureCallback)
</span><span class="cx"> {
</span><del>-    transformAES_CBC(kCCEncrypt, parameters, key, data, WTFMove(callback), WTFMove(failureCallback));
</del><ins>+    ASSERT(sizeof(parameters.iv) == kCCBlockSizeAES128);
+    auto result = transformAES_CBC(kCCEncrypt, parameters.iv.data(), key.key(), data.first, data.second);
+    if (result.hasException()) {
+        failureCallback();
+        return { };
+    }
+    callback(result.releaseReturnValue());
</ins><span class="cx">     return { };
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ExceptionOr&lt;void&gt; CryptoAlgorithmAES_CBC::platformDecrypt(const CryptoAlgorithmAesCbcParamsDeprecated&amp; parameters, const CryptoKeyAES&amp; key, const CryptoOperationData&amp; data, VectorCallback&amp;&amp; callback, VoidCallback&amp;&amp; failureCallback)
</span><span class="cx"> {
</span><del>-    transformAES_CBC(kCCDecrypt, parameters, key, data, WTFMove(callback), WTFMove(failureCallback));
</del><ins>+    ASSERT(sizeof(parameters.iv) == kCCBlockSizeAES128);
+    auto result = transformAES_CBC(kCCDecrypt, parameters.iv.data(), key.key(), data.first, data.second);
+    if (result.hasException()) {
+        failureCallback();
+        return { };
+    }
+    callback(result.releaseReturnValue());
</ins><span class="cx">     return { };
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecryptomacCryptoAlgorithmRSAES_PKCS1_v1_5Maccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -30,24 +30,55 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;CommonCryptoUtilities.h&quot;
</span><span class="cx"> #include &quot;CryptoKeyRSA.h&quot;
</span><ins>+#include &quot;ExceptionCode.h&quot;
+#include &quot;ScriptExecutionContext.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+// FIXME: We should change data to Vector&lt;uint8_t&gt; type once WebKitSubtleCrypto is deprecated.
+// https://bugs.webkit.org/show_bug.cgi?id=164939
+static ExceptionOr&lt;Vector&lt;uint8_t&gt;&gt; encryptRSAES_PKCS1_v1_5(const PlatformRSAKey key, size_t keyLength, const uint8_t* data, size_t dataLength)
+{
+    Vector&lt;uint8_t&gt; cipherText(keyLength / 8); // Per Step 3.c of https://tools.ietf.org/html/rfc3447#section-7.2.1
+    size_t cipherTextLength = cipherText.size();
+    if (CCRSACryptorEncrypt(key, ccPKCS1Padding, data, dataLength, cipherText.data(), &amp;cipherTextLength, 0, 0, kCCDigestNone))
+        return Exception { OperationError };
+
+    return WTFMove(cipherText);
+}
+
+void CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt(Ref&lt;CryptoKey&gt;&amp;&amp; key, Vector&lt;uint8_t&gt;&amp;&amp; plainText, VectorCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback, ScriptExecutionContext&amp; context, WorkQueue&amp; workQueue)
+{
+    context.ref();
+    workQueue.dispatch([key = WTFMove(key), plainText = WTFMove(plainText), callback = WTFMove(callback), exceptionCallback = WTFMove(exceptionCallback), &amp;context]() mutable {
+        auto&amp; rsaKey = downcast&lt;CryptoKeyRSA&gt;(key.get());
+        auto result = encryptRSAES_PKCS1_v1_5(rsaKey.platformKey(), rsaKey.keySizeInBits(), plainText.data(), plainText.size());
+        if (result.hasException()) {
+            context.postTask([exceptionCallback = WTFMove(exceptionCallback), ec = result.releaseException().code()](ScriptExecutionContext&amp; context) {
+                exceptionCallback(ec);
+                context.deref();
+            });
+            return;
+        }
+        context.postTask([callback = WTFMove(callback), result = result.releaseReturnValue()](ScriptExecutionContext&amp; context) {
+            callback(result);
+            context.deref();
+        });
+    });
+}
+
</ins><span class="cx"> ExceptionOr&lt;void&gt; CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt(const CryptoKeyRSA&amp; key, const CryptoOperationData&amp; data, VectorCallback&amp;&amp; callback, VoidCallback&amp;&amp; failureCallback)
</span><span class="cx"> {
</span><del>-    Vector&lt;uint8_t&gt; cipherText(1024);
-    size_t cipherTextLength = cipherText.size();
-    CCCryptorStatus status = CCRSACryptorEncrypt(key.platformKey(), ccPKCS1Padding, data.first, data.second, cipherText.data(), &amp;cipherTextLength, 0, 0, kCCDigestNone);
-    if (status) {
</del><ins>+    auto result = encryptRSAES_PKCS1_v1_5(key.platformKey(), key.keySizeInBits(), data.first, data.second);
+    if (result.hasException()) {
</ins><span class="cx">         failureCallback();
</span><span class="cx">         return { };
</span><span class="cx">     }
</span><del>-
-    cipherText.resize(cipherTextLength);
-    callback(cipherText);
</del><ins>+    callback(result.releaseReturnValue());
</ins><span class="cx">     return { };
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+// FIXME: We should get rid of the magic number 1024. It only makes sense when key length &lt; 8192 bits
</ins><span class="cx"> ExceptionOr&lt;void&gt; CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt(const CryptoKeyRSA&amp; key, const CryptoOperationData&amp; data, VectorCallback&amp;&amp; callback, VoidCallback&amp;&amp; failureCallback)
</span><span class="cx"> {
</span><span class="cx">     Vector&lt;uint8_t&gt; plainText(1024);
</span></span></pre></div>
<a id="trunkSourceWebCorecryptomacCryptoAlgorithmRSA_OAEPMaccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -29,32 +29,64 @@
</span><span class="cx"> #if ENABLE(SUBTLE_CRYPTO)
</span><span class="cx"> 
</span><span class="cx"> #include &quot;CommonCryptoUtilities.h&quot;
</span><ins>+#include &quot;CryptoAlgorithmRsaOaepParams.h&quot;
</ins><span class="cx"> #include &quot;CryptoAlgorithmRsaOaepParamsDeprecated.h&quot;
</span><span class="cx"> #include &quot;CryptoKeyRSA.h&quot;
</span><span class="cx"> #include &quot;ExceptionCode.h&quot;
</span><ins>+#include &quot;ScriptExecutionContext.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-ExceptionOr&lt;void&gt; CryptoAlgorithmRSA_OAEP::platformEncrypt(const CryptoAlgorithmRsaOaepParamsDeprecated&amp; parameters, const CryptoKeyRSA&amp; key, const CryptoOperationData&amp; data, VectorCallback&amp;&amp; callback, VoidCallback&amp;&amp; failureCallback)
</del><ins>+// FIXME: We should change data to Vector&lt;uint8_t&gt; type once WebKitSubtleCrypto is deprecated.
+// https://bugs.webkit.org/show_bug.cgi?id=164939
+static ExceptionOr&lt;Vector&lt;uint8_t&gt;&gt; encryptRSA_OAEP(CryptoAlgorithmIdentifier hash, const Vector&lt;uint8_t&gt;&amp; label, const PlatformRSAKey key, size_t keyLength, const uint8_t* data, size_t dataLength)
</ins><span class="cx"> {
</span><span class="cx">     CCDigestAlgorithm digestAlgorithm;
</span><del>-    if (!getCommonCryptoDigestAlgorithm(parameters.hash, digestAlgorithm))
-        return Exception { NOT_SUPPORTED_ERR };
</del><ins>+    if (!getCommonCryptoDigestAlgorithm(hash, digestAlgorithm))
+        return Exception { OperationError };
</ins><span class="cx"> 
</span><del>-    Vector&lt;uint8_t&gt; cipherText(1024);
</del><ins>+    Vector&lt;uint8_t&gt; cipherText(keyLength / 8); // Per Step 3.c of https://tools.ietf.org/html/rfc3447#section-7.1.1
</ins><span class="cx">     size_t cipherTextLength = cipherText.size();
</span><ins>+    if (CCRSACryptorEncrypt(key, ccOAEPPadding, data, dataLength, cipherText.data(), &amp;cipherTextLength, label.data(), label.size(), digestAlgorithm))
+        return Exception { OperationError };
+
+    return WTFMove(cipherText);
+}
+
+void CryptoAlgorithmRSA_OAEP::platformEncrypt(std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp; parameters, Ref&lt;CryptoKey&gt;&amp;&amp; key, Vector&lt;uint8_t&gt;&amp;&amp; plainText, VectorCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback, ScriptExecutionContext&amp; context, WorkQueue&amp; workQueue)
+{
+    context.ref();
+    workQueue.dispatch([parameters = WTFMove(parameters), key = WTFMove(key), plainText = WTFMove(plainText), callback = WTFMove(callback), exceptionCallback = WTFMove(exceptionCallback), &amp;context]() mutable {
+        auto&amp; rsaParameters = downcast&lt;CryptoAlgorithmRsaOaepParams&gt;(*parameters);
+        auto&amp; rsaKey = downcast&lt;CryptoKeyRSA&gt;(key.get());
+        auto result = encryptRSA_OAEP(rsaKey.hashAlgorithmIdentifier(), rsaParameters.labelVector(), rsaKey.platformKey(), rsaKey.keySizeInBits(), plainText.data(), plainText.size());
+        if (result.hasException()) {
+            context.postTask([exceptionCallback = WTFMove(exceptionCallback), ec = result.releaseException().code()](ScriptExecutionContext&amp; context) {
+                exceptionCallback(ec);
+                context.deref();
+            });
+            return;
+        }
+        context.postTask([callback = WTFMove(callback), result = result.releaseReturnValue()](ScriptExecutionContext&amp; context) {
+            callback(result);
+            context.deref();
+        });
+    });
+}
+
+ExceptionOr&lt;void&gt; CryptoAlgorithmRSA_OAEP::platformEncrypt(const CryptoAlgorithmRsaOaepParamsDeprecated&amp; parameters, const CryptoKeyRSA&amp; key, const CryptoOperationData&amp; data, VectorCallback&amp;&amp; callback, VoidCallback&amp;&amp; failureCallback)
+{
</ins><span class="cx">     ASSERT(parameters.hasLabel || parameters.label.isEmpty());
</span><del>-    CCCryptorStatus status = CCRSACryptorEncrypt(key.platformKey(), ccOAEPPadding, data.first, data.second, cipherText.data(), &amp;cipherTextLength, parameters.label.data(), parameters.label.size(), digestAlgorithm);
-    if (status) {
</del><ins>+    auto result = encryptRSA_OAEP(parameters.hash, parameters.label, key.platformKey(), key.keySizeInBits(), data.first, data.second);
+    if (result.hasException()) {
</ins><span class="cx">         failureCallback();
</span><span class="cx">         return { };
</span><span class="cx">     }
</span><del>-
-    cipherText.resize(cipherTextLength);
-    callback(cipherText);
</del><ins>+    callback(result.releaseReturnValue());
</ins><span class="cx">     return { };
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+// FIXME: We should get rid of the magic number 1024. It only makes sense when key length &lt; 8192 bits
</ins><span class="cx"> ExceptionOr&lt;void&gt; CryptoAlgorithmRSA_OAEP::platformDecrypt(const CryptoAlgorithmRsaOaepParamsDeprecated&amp; parameters, const CryptoKeyRSA&amp; key, const CryptoOperationData&amp; data, VectorCallback&amp;&amp; callback, VoidCallback&amp;&amp; failureCallback)
</span><span class="cx"> {
</span><span class="cx">     CCDigestAlgorithm digestAlgorithm;
</span></span></pre></div>
<a id="trunkSourceWebCorecryptomacCryptoKeyRSAMaccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/mac/CryptoKeyRSAMac.cpp (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/mac/CryptoKeyRSAMac.cpp        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/crypto/mac/CryptoKeyRSAMac.cpp        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -37,6 +37,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+// FIXME: We should get rid of magic number 16384. It assumes that the length of provided key will not exceed 16KB.
+// https://bugs.webkit.org/show_bug.cgi?id=164942
</ins><span class="cx"> static CCCryptorStatus getPublicKeyComponents(CCRSACryptorRef rsaKey, Vector&lt;uint8_t&gt;&amp; modulus, Vector&lt;uint8_t&gt;&amp; publicExponent)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(CCRSAGetKeyType(rsaKey) == ccRSAKeyPublic || CCRSAGetKeyType(rsaKey) == ccRSAKeyPrivate);
</span><span class="lines">@@ -233,7 +235,9 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CryptoKeyRSA::generatePair(CryptoAlgorithmIdentifier algorithm, CryptoAlgorithmIdentifier hash, bool hasHash, unsigned modulusLength, const Vector&lt;uint8_t&gt;&amp; publicExponent, bool extractable, CryptoKeyUsageBitmap usage, KeyPairCallback callback, VoidCallback failureCallback, ScriptExecutionContext* context)
</del><ins>+// FIXME: We should use WorkQueue here instead of dispatch_async once WebKitSubtleCrypto is deprecated.
+// https://bugs.webkit.org/show_bug.cgi?id=164943
+void CryptoKeyRSA::generatePair(CryptoAlgorithmIdentifier algorithm, CryptoAlgorithmIdentifier hash, bool hasHash, unsigned modulusLength, const Vector&lt;uint8_t&gt;&amp; publicExponent, bool extractable, CryptoKeyUsageBitmap usage, KeyPairCallback&amp;&amp; callback, VoidCallback&amp;&amp; failureCallback, ScriptExecutionContext* context)
</ins><span class="cx"> {
</span><span class="cx">     uint32_t e;
</span><span class="cx">     if (!bigIntegerToUInt32(publicExponent, e)) {
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoparametersAesCbcParamsidlfromrev208890trunkSourceWebCorecryptoSubtleCryptocpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/crypto/parameters/AesCbcParams.idl (from rev 208890, trunk/Source/WebCore/crypto/SubtleCrypto.cpp) (0 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/parameters/AesCbcParams.idl                                (rev 0)
+++ trunk/Source/WebCore/crypto/parameters/AesCbcParams.idl        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+    Conditional=SUBTLE_CRYPTO,
+    ImplementedAs=CryptoAlgorithmAesCbcParams
+] dictionary AesCbcParams : CryptoAlgorithmParameters {
+    // The initialization vector. MUST be 16 bytes.
+    required BufferSource iv;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCorecryptoparametersCryptoAlgorithmAesCbcParamshfromrev208890trunkSourceWebCorecryptoSubtleCryptoh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmAesCbcParams.h (from rev 208890, trunk/Source/WebCore/crypto/SubtleCrypto.h) (0 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmAesCbcParams.h                                (rev 0)
+++ trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmAesCbcParams.h        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;BufferSource.h&quot;
+#include &quot;CryptoAlgorithmParameters.h&quot;
+#include &lt;wtf/Vector.h&gt;
+
+#if ENABLE(SUBTLE_CRYPTO)
+
+namespace WebCore {
+
+class CryptoAlgorithmAesCbcParams final : public CryptoAlgorithmParameters {
+public:
+    BufferSource iv;
+
+    Class parametersClass() const final { return Class::AesCbcParams; }
+
+    const Vector&lt;uint8_t&gt;&amp; ivVector()
+    {
+        if (!m_ivVector.isEmpty() || !iv.length())
+            return m_ivVector;
+
+        m_ivVector.append(iv.data(), iv.length());
+        return m_ivVector;
+    }
+
+private:
+    Vector&lt;uint8_t&gt; m_ivVector;
+};
+
+} // namespace WebCore
+
+SPECIALIZE_TYPE_TRAITS_CRYPTO_ALGORITHM_PARAMETERS(AesCbcParams)
+
+#endif // ENABLE(SUBTLE_CRYPTO)
</ins></span></pre></div>
<a id="trunkSourceWebCorecryptoparametersCryptoAlgorithmAesCbcParamsDeprecatedh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmAesCbcParamsDeprecated.h (208890 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmAesCbcParamsDeprecated.h        2016-11-18 21:23:41 UTC (rev 208890)
+++ trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmAesCbcParamsDeprecated.h        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> class CryptoAlgorithmAesCbcParamsDeprecated final : public CryptoAlgorithmParametersDeprecated {
</span><span class="cx"> public:
</span><span class="cx">     // The initialization vector. MUST be 16 bytes.
</span><del>-    std::array&lt;char, 16&gt; iv;
</del><ins>+    std::array&lt;uint8_t, 16&gt; iv;
</ins><span class="cx"> 
</span><span class="cx">     Class parametersClass() const override { return Class::AesCbcParams; }
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoparametersCryptoAlgorithmRsaOaepParamshfromrev208890trunkSourceWebCorecryptoCryptoAlgorithmParametersh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmRsaOaepParams.h (from rev 208890, trunk/Source/WebCore/crypto/CryptoAlgorithmParameters.h) (0 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmRsaOaepParams.h                                (rev 0)
+++ trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmRsaOaepParams.h        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -0,0 +1,66 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;BufferSource.h&quot;
+#include &quot;CryptoAlgorithmParameters.h&quot;
+#include &lt;wtf/Vector.h&gt;
+
+#if ENABLE(SUBTLE_CRYPTO)
+
+namespace WebCore {
+
+class CryptoAlgorithmRsaOaepParams final : public CryptoAlgorithmParameters {
+public:
+    // Use labelVector() instead of label. The label will be gone once labelVector() is called.
+    Optional&lt;BufferSource::VariantType&gt; label;
+
+    Class parametersClass() const final { return Class::RsaOaepParams; }
+
+    const Vector&lt;uint8_t&gt;&amp; labelVector()
+    {
+        if (!m_labelVector.isEmpty() || !label)
+            return m_labelVector;
+
+        m_labelBuffer = WTFMove(*label);
+        label = Nullopt;
+        if (!m_labelBuffer.length())
+            return m_labelVector;
+
+        m_labelVector.append(m_labelBuffer.data(), m_labelBuffer.length());
+        return m_labelVector;
+    }
+
+private:
+    Vector&lt;uint8_t&gt; m_labelVector;
+    BufferSource m_labelBuffer;
+};
+
+} // namespace WebCore
+
+SPECIALIZE_TYPE_TRAITS_CRYPTO_ALGORITHM_PARAMETERS(RsaOaepParams)
+
+#endif // ENABLE(SUBTLE_CRYPTO)
</ins></span></pre></div>
<a id="trunkSourceWebCorecryptoparametersRsaOaepParamsidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/crypto/parameters/RsaOaepParams.idl (0 => 208891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/parameters/RsaOaepParams.idl                                (rev 0)
+++ trunk/Source/WebCore/crypto/parameters/RsaOaepParams.idl        2016-11-18 21:31:42 UTC (rev 208891)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+/*
+* Copyright (C) 2016 Apple Inc. All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+* 1. Redistributions of source code must retain the above copyright
+*    notice, this list of conditions and the following disclaimer.
+* 2. Redistributions in binary form must reproduce the above copyright
+*    notice, this list of conditions and the following disclaimer in the
+*    documentation and/or other materials provided with the distribution.
+*
+* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+* THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+[
+    Conditional=SUBTLE_CRYPTO,
+    ImplementedAs=CryptoAlgorithmRsaOaepParams
+] dictionary RsaOaepParams : CryptoAlgorithmParameters {
+    // The optional label/application data to associate with the message
+    BufferSource label;
+};
</ins></span></pre>
</div>
</div>

</body>
</html>