Add tests for serialization for Ed25519 private and public key. - #1350
Conversation
| } | ||
|
|
||
| @Test | ||
| public void deserializeInvalidPrivateKey_fails() throws Exception { |
There was a problem hiding this comment.
I don't know if it's worth to add tests where we just check that the Java library does the right thing; here this is clearly an invalid stream, so it would only worth to test this if we somehow completely parse it ourselves. I think in such a case I would rather add this test before I refactor the implementation. (Anyhow, of course let's leave the test for now and you can always disagree and add more tests).
There was a problem hiding this comment.
My plan is to add a check to the private key implementation that will change the behaviour in this test: instead of failing in "initSign", already "readObject" will fail. Adding this test now will make this much clearer in the next change, I think. So I'd prefer to keep it.
No description provided.