use the string representation of the TLS alert for crypto errors

This commit is contained in:
Marten Seemann
2019-03-07 11:28:30 +09:00
parent e5303df419
commit f9a21275a4
5 changed files with 20 additions and 9 deletions

View File

@@ -27,7 +27,7 @@ var _ = Describe("QUIC Transport Errors", func() {
It("has a string representation for crypto errors", func() {
err := CryptoError(42)
Expect(err.Error()).To(Equal("CRYPTO_ERROR 42"))
Expect(err.Error()).To(Equal("CRYPTO_ERROR: tls: bad certificate"))
})
Context("ErrorCode", func() {
@@ -38,7 +38,7 @@ var _ = Describe("QUIC Transport Errors", func() {
It("recognizes crypto errors", func() {
err := ErrorCode(0x100 + 42)
Expect(err.Error()).To(Equal("CRYPTO_ERROR 42"))
Expect(err.Error()).To(Equal("CRYPTO_ERROR: tls: bad certificate"))
})
})