chromium/third_party/blink/web_tests/crypto/subtle/ecdh/deriveBits-failures-expected.txt

Tests bad inputs to ECDH's deriveBits()

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


deriveBits() without algorithm name or public key...
error is: TypeError: Failed to execute 'deriveBits' on 'SubtleCrypto': Algorithm: name: Missing or not a string

deriveBits() without public key...
error is: TypeError: Failed to execute 'deriveBits' on 'SubtleCrypto': EcdhKeyDeriveParams: public: Missing required property

deriveBits() with algorithm that is null...
error is: NotSupportedError: Failed to execute 'deriveBits' on 'SubtleCrypto': Algorithm: Unrecognized name

deriveBits() with algorithm that is -1...
error is: NotSupportedError: Failed to execute 'deriveBits' on 'SubtleCrypto': Algorithm: Unrecognized name

deriveBits() with public key that is null...
error is: TypeError: Failed to execute 'deriveBits' on 'SubtleCrypto': EcdhKeyDeriveParams: public: Must be a CryptoKey

deriveBits() with public key that is -1...
error is: TypeError: Failed to execute 'deriveBits' on 'SubtleCrypto': EcdhKeyDeriveParams: public: Must be a CryptoKey

deriveBits() with public key that is a string...
error is: TypeError: Failed to execute 'deriveBits' on 'SubtleCrypto': EcdhKeyDeriveParams: public: Must be a CryptoKey

deriveBits() with wrong curve public key...
error is: InvalidAccessError: The public parameter for ECDH key derivation is for a different named curve

deriveBits() with a private key as the 'public' parameter
error is: InvalidAccessError: The public parameter for ECDH key derivation is not a public EC key

deriveBits() with public key that is for ECDSA...
error is: InvalidAccessError: The public parameter for ECDH key derivation must be for ECDH
PASS successfullyParsed is true

TEST COMPLETE