Bug 25386: Change KeyUsage[] parameters to take sequence<KeyUsage>, and change the Usages attribute to expose an object, with prose specifying that its an Array
--- a/spec/Overview-WebCryptoAPI.xml Mon Jun 16 00:00:00 2014 -0700
+++ b/spec/Overview-WebCryptoAPI.xml Mon Jun 16 00:00:00 2014 -0700
@@ -915,7 +915,7 @@
readonly attribute <a href="#dfn-KeyType">KeyType</a> <a href="#dfn-Key-type">type</a>;
readonly attribute boolean <a href="#dfn-Key-extractable">extractable</a>;
readonly attribute <a href="#dfn-KeyAlgorithm">KeyAlgorithm</a> <a href="#dfn-Key-algorithm">algorithm</a>;
- readonly attribute <a href="#dfn-KeyUsage">KeyUsage</a>[] <a href="#dfn-Key-usages">usages</a>;
+ readonly attribute object <a href="#dfn-Key-usages">usages</a>;
};
</x:codeblock>
<div id="key-interface-description" class="section">
@@ -1070,12 +1070,12 @@
Promise<any> <a href="#dfn-SubtleCrypto-method-generateKey">generateKey</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
boolean extractable,
- <a href="#dfn-KeyUsage">KeyUsage</a>[] keyUsages );
+ sequence<<a href="#dfn-KeyUsage">KeyUsage</a>> keyUsages );
Promise<any> <a href="#dfn-SubtleCrypto-method-deriveKey">deriveKey</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
<a href="#dfn-Key">Key</a> baseKey,
<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> derivedKeyType,
boolean extractable,
- <a href="#dfn-KeyUsage">KeyUsage</a>[] keyUsages );
+ sequence<<a href="#dfn-KeyUsage">KeyUsage</a>> keyUsages );
Promise<any> <a href="#dfn-SubtleCrypto-method-deriveBits">deriveBits</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
<a href="#dfn-Key">Key</a> baseKey,
unsigned long length);
@@ -1085,7 +1085,7 @@
CryptoOperationData keyData,
<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
boolean extractable,
- <a href="#dfn-KeyUsage">KeyUsage</a>[] keyUsages );
+ sequence<<a href="#dfn-KeyUsage">KeyUsage</a>> keyUsages );
Promise<any> <a href="#dfn-SubtleCrypto-method-exportKey">exportKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format, <a href="#dfn-Key">Key</a> key);
<span class="comment">// Note: wrapKey and unwrapKey remain "Features at Risk"</span>
@@ -1099,7 +1099,7 @@
<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> unwrapAlgorithm,
<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> unwrappedKeyAlgorithm,
boolean extractable,
- <a href="#dfn-KeyUsage">KeyUsage</a>[] keyUsages );
+ sequence<<a href="#dfn-KeyUsage">KeyUsage</a>> keyUsages );
};
</x:codeblock>
<div class="ednote">
--- a/spec/Overview.html Mon Jun 16 00:00:00 2014 -0700
+++ b/spec/Overview.html Mon Jun 16 00:00:00 2014 -0700
@@ -923,7 +923,7 @@
readonly attribute <a href="#dfn-KeyType">KeyType</a> <a href="#dfn-Key-type">type</a>;
readonly attribute boolean <a href="#dfn-Key-extractable">extractable</a>;
readonly attribute <a href="#dfn-KeyAlgorithm">KeyAlgorithm</a> <a href="#dfn-Key-algorithm">algorithm</a>;
- readonly attribute <a href="#dfn-KeyUsage">KeyUsage</a>[] <a href="#dfn-Key-usages">usages</a>;
+ readonly attribute object <a href="#dfn-Key-usages">usages</a>;
};
</code></pre></div></div>
<div id="key-interface-description" class="section">
@@ -1078,12 +1078,12 @@
Promise<any> <a href="#dfn-SubtleCrypto-method-generateKey">generateKey</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
boolean extractable,
- <a href="#dfn-KeyUsage">KeyUsage</a>[] keyUsages );
+ sequence<<a href="#dfn-KeyUsage">KeyUsage</a>> keyUsages );
Promise<any> <a href="#dfn-SubtleCrypto-method-deriveKey">deriveKey</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
<a href="#dfn-Key">Key</a> baseKey,
<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> derivedKeyType,
boolean extractable,
- <a href="#dfn-KeyUsage">KeyUsage</a>[] keyUsages );
+ sequence<<a href="#dfn-KeyUsage">KeyUsage</a>> keyUsages );
Promise<any> <a href="#dfn-SubtleCrypto-method-deriveBits">deriveBits</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
<a href="#dfn-Key">Key</a> baseKey,
unsigned long length);
@@ -1093,7 +1093,7 @@
CryptoOperationData keyData,
<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
boolean extractable,
- <a href="#dfn-KeyUsage">KeyUsage</a>[] keyUsages );
+ sequence<<a href="#dfn-KeyUsage">KeyUsage</a>> keyUsages );
Promise<any> <a href="#dfn-SubtleCrypto-method-exportKey">exportKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format, <a href="#dfn-Key">Key</a> key);
<span class="comment">// Note: wrapKey and unwrapKey remain "Features at Risk"</span>
@@ -1107,7 +1107,7 @@
<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> unwrapAlgorithm,
<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> unwrappedKeyAlgorithm,
boolean extractable,
- <a href="#dfn-KeyUsage">KeyUsage</a>[] keyUsages );
+ sequence<<a href="#dfn-KeyUsage">KeyUsage</a>> keyUsages );
};
</code></pre></div></div>
<div class="ednote"><div class="ednoteHeader">Editorial note</div>