blob: ac5a93f0f06ae57ea02f6971b30ace75c4f8b7d7 [file] [log] [blame]
Test that importing P-521 EC keys for the ECDH algorithm through PKCS#8 fails in case of incorrect curve identifier or public key used in the ECPrivateKey structure
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
ECDH: importing P-521 key that uses matching curve identifiers and valid public key in ECParameters structures in PKCS#8 ...
PASS Successfully imported a P-521 key.
ECDH: importing P-521 key whose curve identifiers in ECParameters structures in PKCS#8 don't match ...
PASS importKey(pkcs8P521KeyMismatchedCurveIdentifiers) rejected promise with DataError: Data provided to an operation does not meet requirements.
ECDH: importing P-521 key that has a public key in PKCS#8 of invalid length ...
PASS importKey(pkcs8P521KeyInvalidPublicKeyLength) rejected promise with DataError: Data provided to an operation does not meet requirements.
ECDH: importing P-521 key that has a public key in PKCS#8 of invalid EC point format ...
PASS importKey(pkcs8P521KeyInvalidPublicKeyECPointFormat) rejected promise with DataError: Data provided to an operation does not meet requirements.
ECDH: importing P-521 key that has an invalid public key in PKCS#8 ...
PASS importKey(pkcs8P521KeyInvalidPublicKey) rejected promise with DataError: Data provided to an operation does not meet requirements.
PASS successfullyParsed is true
TEST COMPLETE