improve crypto test coverage

This commit is contained in:
Lucas Clemente
2016-05-30 10:16:25 +02:00
parent 576253ba71
commit b0bc84c5aa
7 changed files with 76 additions and 9 deletions

View File

@@ -17,4 +17,11 @@ var _ = Describe("ProofRsa", func() {
Expect(err).ToNot(HaveOccurred())
Expect(sA).To(Equal(sB))
})
It("rejects short public keys", func() {
a, err := NewCurve25519KEX()
Expect(err).ToNot(HaveOccurred())
_, err = a.CalculateSharedKey(nil)
Expect(err).To(MatchError("Curve25519: expected public key of 32 byte"))
})
})