Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #28: Require a secure origin using [SecureContext] annotation #131

Merged
merged 2 commits into from
Sep 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions spec/Overview-WebCryptoAPI.xml
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ WorkerGlobalScope implements GlobalCrypto;

[Exposed=(Window,Worker)]
interface <dfn id="dfn-Crypto">Crypto</dfn> {
readonly attribute <a href="#dfn-SubtleCrypto">SubtleCrypto</a> subtle;
[SecureContext] readonly attribute <a href="#dfn-SubtleCrypto">SubtleCrypto</a> subtle;
ArrayBufferView <a href="#dfn-Crypto-method-getRandomValues">getRandomValues</a>(ArrayBufferView array);
};
</x:codeblock>
Expand Down Expand Up @@ -1019,7 +1019,7 @@ enum <a href="#dfn-KeyType">KeyType</a> { "public", "private", "secret" };

enum <a href="#dfn-KeyUsage">KeyUsage</a> { "encrypt", "decrypt", "sign", "verify", "deriveKey", "deriveBits", "wrapKey", "unwrapKey" };

[Exposed=(Window,Worker)]
[SecureContext,Exposed=(Window,Worker)]
interface <dfn id="dfn-CryptoKey">CryptoKey</dfn> {
readonly attribute <a href="#dfn-KeyType">KeyType</a> <a href="#dfn-CryptoKey-type">type</a>;
readonly attribute boolean <a href="#dfn-CryptoKey-extractable">extractable</a>;
Expand Down Expand Up @@ -1187,7 +1187,7 @@ interface <dfn id="dfn-CryptoKey">CryptoKey</dfn> {
<x:codeblock language="idl">
enum <a href="#dfn-KeyFormat"><code>KeyFormat</code></a> { "raw", "spki", "pkcs8", "jwk" };

[Exposed=(Window,Worker)]
[SecureContext,Exposed=(Window,Worker)]
interface <dfn id="dfn-SubtleCrypto">SubtleCrypto</dfn> {
Promise&lt;any&gt; <a href="#dfn-SubtleCrypto-method-encrypt">encrypt</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
<a href="#dfn-CryptoKey">CryptoKey</a> key,
Expand Down
6 changes: 3 additions & 3 deletions spec/Overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ <h2>10. Crypto interface</h2>

[Exposed=(Window,Worker)]
interface <dfn id="dfn-Crypto">Crypto</dfn> {
readonly attribute <a href="#dfn-SubtleCrypto">SubtleCrypto</a> subtle;
[SecureContext] readonly attribute <a href="#dfn-SubtleCrypto">SubtleCrypto</a> subtle;
ArrayBufferView <a href="#dfn-Crypto-method-getRandomValues">getRandomValues</a>(ArrayBufferView array);
};
</code></pre></div></div>
Expand Down Expand Up @@ -1032,7 +1032,7 @@ <h2>13. CryptoKey interface</h2>

enum <a href="#dfn-KeyUsage">KeyUsage</a> { "encrypt", "decrypt", "sign", "verify", "deriveKey", "deriveBits", "wrapKey", "unwrapKey" };

[Exposed=(Window,Worker)]
[SecureContext,Exposed=(Window,Worker)]
interface <dfn id="dfn-CryptoKey">CryptoKey</dfn> {
readonly attribute <a href="#dfn-KeyType">KeyType</a> <a href="#dfn-CryptoKey-type">type</a>;
readonly attribute boolean <a href="#dfn-CryptoKey-extractable">extractable</a>;
Expand Down Expand Up @@ -1196,7 +1196,7 @@ <h2>14. SubtleCrypto interface</h2>
<div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
enum <a href="#dfn-KeyFormat"><code>KeyFormat</code></a> { "raw", "spki", "pkcs8", "jwk" };

[Exposed=(Window,Worker)]
[SecureContext,Exposed=(Window,Worker)]
interface <dfn id="dfn-SubtleCrypto">SubtleCrypto</dfn> {
Promise&lt;any&gt; <a href="#dfn-SubtleCrypto-method-encrypt">encrypt</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
<a href="#dfn-CryptoKey">CryptoKey</a> key,
Expand Down