Bug 24774 - fix RSA SSA sample code by moving hash from sign call to generate call
--- a/spec/Overview-WebCryptoAPI.xml Thu Feb 27 16:46:37 2014 -0800
+++ b/spec/Overview-WebCryptoAPI.xml Thu Feb 27 16:53:34 2014 -0800
@@ -10381,17 +10381,16 @@
<span class="comment">// Algorithm Object</span>
var algorithmKeyGen = {
name: "RSASSA-PKCS1-v1_5",
- <span class="comment">// <a href="#dfn-RsaKeyGenParams">RsaKeyGenParams</a></span>
+ <span class="comment">// <a href="#dfn-RsaHashedKeyGenParams">RsaHashedKeyGenParams</a></span>
modulusLength: 2048,
publicExponent: new Uint8Array([0x01, 0x00, 0x01]), <span class="comment">// Equivalent to 65537</span>
+ hash: {
+ name: "SHA-256",
+ }
};
var algorithmSign = {
- name: "RSASSA-PKCS1-v1_5",
- <span class="comment">// <a href="#dfn-RsaSsaParams">RsaSsaParams</a></span>
- hash: {
- name: "SHA-256",
- }
+ name: "RSASSA-PKCS1-v1_5"
};
window.crypto.subtle.generateKey(algorithmKeyGen, false, ["sign"]).then(
--- a/spec/Overview.html Thu Feb 27 16:46:37 2014 -0800
+++ b/spec/Overview.html Thu Feb 27 16:53:34 2014 -0800
@@ -10373,17 +10373,16 @@
<span class="comment">// Algorithm Object</span>
var algorithmKeyGen = {
name: "RSASSA-PKCS1-v1_5",
- <span class="comment">// <a href="#dfn-RsaKeyGenParams">RsaKeyGenParams</a></span>
+ <span class="comment">// <a href="#dfn-RsaHashedKeyGenParams">RsaHashedKeyGenParams</a></span>
modulusLength: 2048,
publicExponent: new Uint8Array([0x01, 0x00, 0x01]), <span class="comment">// Equivalent to 65537</span>
+ hash: {
+ name: "SHA-256",
+ }
};
var algorithmSign = {
- name: "RSASSA-PKCS1-v1_5",
- <span class="comment">// <a href="#dfn-RsaSsaParams">RsaSsaParams</a></span>
- hash: {
- name: "SHA-256",
- }
+ name: "RSASSA-PKCS1-v1_5"
};
window.crypto.subtle.generateKey(algorithmKeyGen, false, ["sign"]).then(