jiewen_tan@apple.com | 83b6301 | 2016-11-18 21:31:42 +0000 | [diff] [blame] | 1 | Test encrypting using RSA-OAEP with malformed parameters |
| 2 | |
| 3 | On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| 4 | |
| 5 | |
| 6 | PASS crypto.subtle.encrypt({name: "RSA-OAEP", label: true}, key, plainText) rejected promise with TypeError: Type error. |
| 7 | PASS crypto.subtle.encrypt({name: "RSA-OAEP", label: 1}, key, plainText) rejected promise with TypeError: Type error. |
| 8 | PASS crypto.subtle.encrypt({name: "RSA-OAEP", label: null}, key, plainText) rejected promise with TypeError: Type error. |
| 9 | PASS crypto.subtle.encrypt({name: "RSA-OAEP", label: Symbol()}, key, plainText) rejected promise with TypeError: Type error. |
| 10 | PASS crypto.subtle.encrypt({name: "RSA-OAEP", label: { }}, key, plainText) rejected promise with TypeError: Type error. |
| 11 | PASS crypto.subtle.encrypt({name: "RSA-OAEP", label: "foo"}, key, plainText) rejected promise with TypeError: Type error. |
| 12 | PASS successfullyParsed is true |
| 13 | |
| 14 | TEST COMPLETE |
| 15 | |