forked from quic-go/quic-go
handshake: generate CRYPTO_ERRORs for internal_error TLS alerts (#4601)
* handshake: generate CRYPTO_ERRORs for internal_error TLS alerts * remove stray comment
This commit is contained in:
@@ -624,8 +624,7 @@ func (h *cryptoSetup) ConnectionState() ConnectionState {
|
||||
}
|
||||
|
||||
func wrapError(err error) error {
|
||||
// alert 80 is an internal error
|
||||
if alertErr := tls.AlertError(0); errors.As(err, &alertErr) && alertErr != 80 {
|
||||
if alertErr := tls.AlertError(0); errors.As(err, &alertErr) {
|
||||
return qerr.NewLocalCryptoError(uint8(alertErr), err)
|
||||
}
|
||||
return &qerr.TransportError{ErrorCode: qerr.InternalError, ErrorMessage: err.Error()}
|
||||
|
||||
Reference in New Issue
Block a user