OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions are |
6 * are met: | 6 * met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * * Redistributions in binary form must reproduce the above |
11 * notice, this list of conditions and the following disclaimer in the | 11 * copyright notice, this list of conditions and the following disclaimer |
12 * documentation and/or other materials provided with the distribution. | 12 * in the documentation and/or other materials provided with the |
13 * 3. Neither the name of Google, Inc. ("Google") nor the names of | 13 * distribution. |
14 * its contributors may be used to endorse or promote products derived | 14 * * Neither the name of Google Inc. nor the names of its |
15 * from this software without specific prior written permission. | 15 * contributors may be used to endorse or promote products derived from |
| 16 * this software without specific prior written permission. |
16 * | 17 * |
17 * THIS SOFTWARE IS PROVIDED BY GOOGLE AND ITS CONTRIBUTORS "AS IS" AND ANY | 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
18 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
19 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
20 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY | 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 */ | 29 */ |
28 | 30 |
29 #include "config.h" | 31 #include "config.h" |
30 #include "modules/crypto/SubtleCrypto.h" | 32 #include "modules/crypto/SubtleCrypto.h" |
31 | 33 |
32 #include "bindings/v8/ExceptionState.h" | 34 #include "bindings/v8/ExceptionState.h" |
33 #include "modules/crypto/CryptoOperation.h" | 35 #include "modules/crypto/CryptoOperation.h" |
34 #include "modules/crypto/NormalizeAlgorithm.h" | 36 #include "modules/crypto/NormalizeAlgorithm.h" |
35 #include "public/platform/WebArrayBuffer.h" // FIXME: temporary | 37 #include "public/platform/WebArrayBuffer.h" // FIXME: temporary |
36 #include "public/platform/WebCrypto.h" | 38 #include "public/platform/WebCrypto.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 return 0; | 136 return 0; |
135 | 137 |
136 // FIXME: Create the WebCryptoImplementation by calling out to | 138 // FIXME: Create the WebCryptoImplementation by calling out to |
137 // Platform::crypto() instead. | 139 // Platform::crypto() instead. |
138 WebKit::WebCryptoOperation* operationImpl = algorithm.id() == WebKit::WebCry
ptoAlgorithmIdSha1 ? new MockSha1Operation : new DummyOperation; | 140 WebKit::WebCryptoOperation* operationImpl = algorithm.id() == WebKit::WebCry
ptoAlgorithmIdSha1 ? new MockSha1Operation : new DummyOperation; |
139 | 141 |
140 return CryptoOperation::create(algorithm, operationImpl); | 142 return CryptoOperation::create(algorithm, operationImpl); |
141 } | 143 } |
142 | 144 |
143 } // namespace WebCore | 145 } // namespace WebCore |
OLD | NEW |