blob: 5b80b3a2d92a1ce4b082098febf77f38ed8f7a8a [file] [log] [blame]
This test tries to test whether the JWK format exporting/importing methods work as expected.To do so, it first generates an EC Key Pair, then exports them into JWKs, then imports them back, and finally uses them to do signature verification.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Generating a key pair...
Exporting the private key in Jwk format...
PASS jwkPrivateKey.x is defined.
PASS jwkPrivateKey.y is defined.
PASS jwkPrivateKey.d is defined.
Importing the JWK private key...
Signing the data...
PASS signature.byteLength is 64
Exporting the public key in Jwk format...
PASS jwkPublicKey.x is defined.
PASS jwkPublicKey.y is defined.
Importing the JWK public key...
Verifying the signature...
PASS verified is true
PASS successfullyParsed is true
TEST COMPLETE