haikuwebkit/LayoutTests/crypto/subtle/ecdh-import-raw-key-p521-ex...

17 lines
428 B
Plaintext
Raw Permalink Normal View History

[WebCrypto] Add layout tests covering EC P-521 https://bugs.webkit.org/show_bug.cgi?id=175659 Reviewed by Jiewen Tan. Add layout tests that cover operations with 521-bit elliptic curves. The newly-introduced tests are skipped on all platforms for now since no implementation provides support just yet. The already-existing tests are modified in a way that only tests the EC P-521 capability optionally, if e.g. P-521 key imports are successful, without affecting the tests for P-256 and P-384 operations. The newly-introduced tests are mirros of existing P-256 and P-384 tests, but they specifically test the P-521 capabilities and use appropriate curve information (X and Y coordinates for the EC public key, D for the EC private key) for that type of elliptic curve. * crypto/subtle/ec-import-pkcs8-key-export-pkcs8-key-p521-expected.txt: Added. * crypto/subtle/ec-import-pkcs8-key-export-pkcs8-key-p521.html: Added. * crypto/subtle/ec-import-spki-key-export-spki-key-p521-expected.txt: Added. * crypto/subtle/ec-import-spki-key-export-spki-key-p521.html: Added. * crypto/subtle/ecdh-derive-bits-length-limits-expected.txt: * crypto/subtle/ecdh-derive-bits-length-limits.html: * crypto/subtle/ecdh-generate-export-jwk-key-p521-expected.txt: Added. * crypto/subtle/ecdh-generate-export-jwk-key-p521.html: Added. * crypto/subtle/ecdh-generate-export-key-pkcs8-p521-expected.txt: Added. * crypto/subtle/ecdh-generate-export-key-pkcs8-p521.html: Added. * crypto/subtle/ecdh-generate-export-key-raw-p521-expected.txt: Added. * crypto/subtle/ecdh-generate-export-key-raw-p521.html: Added. * crypto/subtle/ecdh-generate-export-key-spki-p521-expected.txt: Added. * crypto/subtle/ecdh-generate-export-key-spki-p521.html: Added. * crypto/subtle/ecdh-generate-key-p521-expected.txt: Added. * crypto/subtle/ecdh-generate-key-p521.html: Added. * crypto/subtle/ecdh-import-jwk-private-key-p521-expected.txt: Added. * crypto/subtle/ecdh-import-jwk-private-key-p521.html: Added. * crypto/subtle/ecdh-import-jwk-public-key-p521-expected.txt: Added. * crypto/subtle/ecdh-import-jwk-public-key-p521.html: Added. * crypto/subtle/ecdh-import-pkcs8-key-p521-expected.txt: Added. * crypto/subtle/ecdh-import-pkcs8-key-p521-validate-ecprivatekey-parameters-publickey-expected.txt: Added. * crypto/subtle/ecdh-import-pkcs8-key-p521-validate-ecprivatekey-parameters-publickey.html: Added. * crypto/subtle/ecdh-import-pkcs8-key-p521.html: Added. * crypto/subtle/ecdh-import-raw-key-p521-expected.txt: Added. * crypto/subtle/ecdh-import-raw-key-p521.html: Added. * crypto/subtle/ecdh-import-spki-key-ecdh-identifier-expected.txt: * crypto/subtle/ecdh-import-spki-key-ecdh-identifier.html: * crypto/subtle/ecdh-import-spki-key-p521-expected.txt: Added. * crypto/subtle/ecdh-import-spki-key-p521.html: Added. * crypto/subtle/ecdsa-generate-key-sign-verify-p521-expected.txt: Added. * crypto/subtle/ecdsa-generate-key-sign-verify-p521.html: Added. * crypto/subtle/ecdsa-import-jwk-public-key-alg-521-expected.txt: Added. * crypto/subtle/ecdsa-import-jwk-public-key-alg-521.html: Added. * crypto/subtle/ecdsa-import-key-sign-p521-expected.txt: Added. * crypto/subtle/ecdsa-import-key-sign-p521.html: Added. * crypto/subtle/ecdsa-import-key-verify-p521-expected.txt: Added. * crypto/subtle/ecdsa-import-key-verify-p521.html: Added. * crypto/subtle/ecdsa-import-pkcs8-key-p521-validate-ecprivatekey-parameters-publickey-expected.txt: Added. * crypto/subtle/ecdsa-import-pkcs8-key-p521-validate-ecprivatekey-parameters-publickey.html: Added. * platform/gtk/TestExpectations: * platform/ios/TestExpectations: * platform/mac/TestExpectations: * platform/wpe/TestExpectations: Canonical link: https://commits.webkit.org/192772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221345 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-30 07:31:32 +00:00
Test importing an ECDH raw key with P-521
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Importing a key...
PASS publicKey.toString() is '[object CryptoKey]'
PASS publicKey.type is 'public'
PASS publicKey.extractable is true
PASS publicKey.algorithm.name is 'ECDH'
PASS publicKey.algorithm.namedCurve is 'P-521'
PASS publicKey.usages is [ ]
PASS successfullyParsed is true
TEST COMPLETE