diff --git a/alert.go b/alert.go index 577cddc..a196135 100644 --- a/alert.go +++ b/alert.go @@ -12,6 +12,8 @@ import "strconv" // which wraps AlertError rather than sending a TLS alert. type AlertError uint8 +var _ error = AlertError(0) + func (e AlertError) Error() string { return alert(e).String() } diff --git a/tls.go b/tls.go index 970c99d..bdb0ed2 100644 --- a/tls.go +++ b/tls.go @@ -583,6 +583,8 @@ func Listen(network, laddr string, config *Config) (net.Listener, error) { type timeoutError struct{} +var _ error = timeoutError{} + func (timeoutError) Error() string { return "tls: DialWithDialer timed out" } func (timeoutError) Timeout() bool { return true } func (timeoutError) Temporary() bool { return true }