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
87
88
89
90
91
#[derive(Debug)]
pub enum KrbError {
// =========================================================================================
// IMPORTANT: Don't add variables to variants in this enum - it's a potential security risk
// as you can leak internal state in an error as these can end up in userfacing contexts!!!
//
// In other words, any extra information you add here is a potential CVE.
//
// If you want to debug the error, then use the error! macro at the error raise site to
// report relevant information.
//
// Lastly, the whole reason we have so many error variants is so that just from the error
// variant alone, we already have a large amount of anonymised detail about the potential
// cause the error.
// =========================================================================================
InvalidHmacSha1Key,
MessageAuthenticationFailed,
MessageEmpty,
InsufficientData,
PlaintextEmpty,
CtsCiphertextInvalid,
InsecurePassphrase,
UnsupportedEncryption,
UnsupportedChecksumType,
MissingPaData,
MissingServiceNameWithRealm,
MissingClientName,
MissingRealm,
DerDecodePaData,
DerDecodeEtypeInfo2,
DerEncodePaEncTsEnc,
DerDecodePaEncTsEnc,
DerDecodeEncKdcRepPart,
DerEncodeEncKdcRepPart,
DerEncodeOctetString,
DerEncodeEncTicketPart,
DerEncodeAny,
DerEncodeAuthenticator,
DerDecodeAuthenticator,
DerEncodeApReq,
DerEncodeKdcReqBody,
DerDecodeKdcReqBody,
DerEncodeKerberosString,
DerEncodeKerberosTime,
DerEncodeKrbErrorCode,
PreauthUnsupported,
PreauthMissingEtypeInfo2,
PreauthInvalidUnixTs,
PreauthInvalidS2KParams,
RequestTooLarge,
RequestIoRead,
TgsMissingPaApReq,
TgsInvalidPaApReq,
TgsAuthMissingChecksum,
TgsAuthChecksumFailure,
TgsNotForRealm,
TgsTicketIsNotTgt,
TgsKdcReqMissingServiceName,
TgsKdcMissingStartTime,
ApInappChecksum,
NameNotPrincipal,
NameNotServiceHost,
NameNumberOfComponents,
PrincipalNameInvalidComponents,
PrincipalNameInvalidType,
CredentialCacheError,
UnsupportedCredentialCacheType,
UnsupportedKeytabType,
KeytabFileError,
IoError,
BinRWError,
KeyutilsError,
InvalidMessageType,
InvalidMessageDirection,
InvalidPvno,
InvalidEncryptionKey,
LastRequestInvalidType,
/// No really, do you have a time machine? How did you go back to before 1970?
DoYouHaveATimeMachine,
}