-
Notifications
You must be signed in to change notification settings - Fork 185
Expand file tree
/
Copy patherrors.go
More file actions
86 lines (82 loc) · 3.2 KB
/
errors.go
File metadata and controls
86 lines (82 loc) · 3.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
// SPDX-FileCopyrightText: 2026 The Pion community <https://pion.ly>
// SPDX-License-Identifier: MIT
package extension
import (
"errors"
"github.com/pion/dtls/v3/pkg/protocol"
)
var (
// ErrALPNInvalidFormat is raised when the ALPN format is invalid.
ErrALPNInvalidFormat = &protocol.FatalError{
Err: errors.New("invalid alpn format"), //nolint:err113
}
errALPNNoAppProto = &protocol.FatalError{
Err: errors.New("no application protocol"), //nolint:err113
}
errBufferTooSmall = &protocol.TemporaryError{
Err: errors.New("buffer is too small"), //nolint:err113
}
errInvalidExtensionType = &protocol.FatalError{
Err: errors.New("invalid extension type"), //nolint:err113
}
errInvalidSNIFormat = &protocol.FatalError{
Err: errors.New("invalid server name format"), //nolint:err113
}
errInvalidCIDFormat = &protocol.FatalError{
Err: errors.New("invalid connection ID format"), //nolint:err113
}
errLengthMismatch = &protocol.InternalError{
Err: errors.New("data length and declared length do not match"), //nolint:err113
}
errMasterKeyIdentifierTooLarge = &protocol.FatalError{
Err: errors.New("master key identifier is over 255 bytes"), //nolint:err113
}
errUseSRTPDataTooLarge = &protocol.FatalError{
Err: errors.New("use_srtp extension data exceeds uint16 length"), //nolint:err113
}
errPointFormatsTooLarge = &protocol.FatalError{
Err: errors.New("point formats must not be longer than 255 "), //nolint:err113
}
errPreSharedKeyFormat = &protocol.FatalError{
Err: errors.New("invalid Pre-Shared Key extension format"), //nolint:err113
}
errPskKeyExchangeModesFormat = &protocol.FatalError{
Err: errors.New("invalid Pre-Shared Key Exchange Modes extension format"), //nolint:err113
}
errNoPskKeyExchangeMode = &protocol.InternalError{
Err: errors.New("no mode set for the Pre-Shared Key Exchange Modes extension"), //nolint:err113
}
errCookieExtFormat = &protocol.FatalError{
Err: errors.New("invalid cookie format"), //nolint:err113
}
errInvalidKeyShareFormat = &protocol.FatalError{
Err: errors.New("invalid key_share format"), //nolint:err113
}
errDuplicateKeyShare = &protocol.FatalError{
Err: errors.New("duplicate key_share group"), //nolint:err113
}
errInvalidSupportedVersionsFormat = &protocol.FatalError{
Err: errors.New("invalid supported_versions format"), //nolint:err113
}
errInvalidDTLSVersion = &protocol.InternalError{
Err: errors.New("invalid dtls version was provided"), //nolint:err113
}
errEarlyDataIndicationFormat = &protocol.FatalError{
Err: errors.New("invalid Early Data Indication extension format"), //nolint:err113
}
errInvalidPostHandshakeAuthFormat = &protocol.FatalError{
Err: errors.New("invalid Post-Handshake Client Authentication extension format"), //nolint:err113
}
errInvalidCertificateAuthFormat = &protocol.FatalError{
Err: errors.New("invalid Certificate Authorities extension format"), //nolint:err113
}
errEmptyOIDFilter = &protocol.InternalError{
Err: errors.New("no oid set for a OID filter"), //nolint:err113
}
errOIDFiltersFormat = &protocol.FatalError{
Err: errors.New("invalid OID filters extension format"), //nolint:err113
}
errDuplicateOID = &protocol.FatalError{
Err: errors.New("duplicate OID filters"), //nolint:err113
}
)