1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.directory.shared.kerberos.exceptions;
21
22
23 import java.util.Arrays;
24 import java.util.Collections;
25 import java.util.List;
26
27
28
29
30
31
32
33 public final class ErrorType implements Comparable<ErrorType>
34 {
35
36
37
38
39
40
41
42 public static final ErrorTypeberos/exceptions/ErrorType.html#ErrorType">ErrorType KDC_ERR_NONE = new ErrorType( 0, "No error" );
43
44
45
46
47 public static final ErrorTypes/exceptions/ErrorType.html#ErrorType">ErrorType KDC_ERR_NAME_EXP = new ErrorType( 1, "Client's entry in database has expired" );
48
49
50
51
52 public static final ErrorTypexceptions/ErrorType.html#ErrorType">ErrorType KDC_ERR_SERVICE_EXP = new ErrorType( 2, "Server's entry in database has expired" );
53
54
55
56
57 public static final ErrorTypes/exceptions/ErrorType.html#ErrorType">ErrorType KDC_ERR_BAD_PVNO = new ErrorType( 3,
58 "Requested protocol version number not supported" );
59
60
61
62
63 public static final ErrorTypetions/ErrorType.html#ErrorType">ErrorType KDC_ERR_C_OLD_MAST_KVNO = new ErrorType( 4,
64 "Client's key encrypted in old master key" );
65
66
67
68
69 public static final ErrorTypetions/ErrorType.html#ErrorType">ErrorType KDC_ERR_S_OLD_MAST_KVNO = new ErrorType( 5,
70 "Server's key encrypted in old master key" );
71
72
73
74
75 public static final ErrorTypes/ErrorType.html#ErrorType">ErrorType KDC_ERR_C_PRINCIPAL_UNKNOWN = new ErrorType( 6,
76 "Client not found in Kerberos database" );
77
78
79
80
81 public static final ErrorTypes/ErrorType.html#ErrorType">ErrorType KDC_ERR_S_PRINCIPAL_UNKNOWN = new ErrorType( 7,
82 "Server not found in Kerberos database" );
83
84
85
86
87 public static final ErrorType/ErrorType.html#ErrorType">ErrorType KDC_ERR_PRINCIPAL_NOT_UNIQUE = new ErrorType( 8,
88 "Multiple principal entries in database" );
89
90
91
92
93 public static final ErrorTypes/exceptions/ErrorType.html#ErrorType">ErrorType KDC_ERR_NULL_KEY = new ErrorType( 9, "The client or server has a null key" );
94
95
96
97
98 public static final ErrorTypetions/ErrorType.html#ErrorType">ErrorType KDC_ERR_CANNOT_POSTDATE = new ErrorType( 10, "Ticket not eligible for postdating" );
99
100
101
102
103 public static final ErrorTypexceptions/ErrorType.html#ErrorType">ErrorType KDC_ERR_NEVER_VALID = new ErrorType( 11,
104 "Requested start time is later than end time" );
105
106
107
108
109 public static final ErrorTyperos/exceptions/ErrorType.html#ErrorType">ErrorType KDC_ERR_POLICY = new ErrorType( 12, "KDC policy rejects request" );
110
111
112
113
114 public static final ErrorType/exceptions/ErrorType.html#ErrorType">ErrorType KDC_ERR_BADOPTION = new ErrorType( 13, "KDC cannot accommodate requested option" );
115
116
117
118
119 public static final ErrorTypeceptions/ErrorType.html#ErrorType">ErrorType KDC_ERR_ETYPE_NOSUPP = new ErrorType( 14, "KDC has no support for encryption type" );
120
121
122
123
124 public static final ErrorTypeptions/ErrorType.html#ErrorType">ErrorType KDC_ERR_SUMTYPE_NOSUPP = new ErrorType( 15, "KDC has no support for checksum type" );
125
126
127
128
129 public static final ErrorTypens/ErrorType.html#ErrorType">ErrorType KDC_ERR_PADATA_TYPE_NOSUPP = new ErrorType( 16, "KDC has no support for padata type" );
130
131
132
133
134 public static final ErrorTypeeptions/ErrorType.html#ErrorType">ErrorType KDC_ERR_TRTYPE_NOSUPP = new ErrorType( 17, "KDC has no support for transited type" );
135
136
137
138
139 public static final ErrorTypeptions/ErrorType.html#ErrorType">ErrorType KDC_ERR_CLIENT_REVOKED = new ErrorType( 18, "Clients credentials have been revoked" );
140
141
142
143
144 public static final ErrorTypetions/ErrorType.html#ErrorType">ErrorType KDC_ERR_SERVICE_REVOKED = new ErrorType( 19,
145 "Credentials for server have been revoked" );
146
147
148
149
150 public static final ErrorTypexceptions/ErrorType.html#ErrorType">ErrorType KDC_ERR_TGT_REVOKED = new ErrorType( 20, "TGT has been revoked" );
151
152
153
154
155 public static final ErrorTypeeptions/ErrorType.html#ErrorType">ErrorType KDC_ERR_CLIENT_NOTYET = new ErrorType( 21, "Client not yet valid; try again later" );
156
157
158
159
160 public static final ErrorTypeptions/ErrorType.html#ErrorType">ErrorType KDC_ERR_SERVICE_NOTYET = new ErrorType( 22, "Server not yet valid; try again later" );
161
162
163
164
165 public static final ErrorTypexceptions/ErrorType.html#ErrorType">ErrorType KDC_ERR_KEY_EXPIRED = new ErrorType( 23,
166 "Password has expired; change password to reset" );
167
168
169
170
171 public static final ErrorTypeptions/ErrorType.html#ErrorType">ErrorType KDC_ERR_PREAUTH_FAILED = new ErrorType( 24,
172 "Pre-authentication information was invalid" );
173
174
175
176
177 public static final ErrorTypeions/ErrorType.html#ErrorType">ErrorType KDC_ERR_PREAUTH_REQUIRED = new ErrorType( 25,
178 "Additional pre-authentication required" );
179
180
181
182
183 public static final ErrorTypeptions/ErrorType.html#ErrorType">ErrorType KDC_ERR_SERVER_NOMATCH = new ErrorType( 26, "Requested server and ticket don't match" );
184
185
186
187
188 public static final ErrorTypens/ErrorType.html#ErrorType">ErrorType KDC_ERR_MUST_USE_USER2USER = new ErrorType( 27, "Server valid for user2user only" );
189
190
191
192
193 public static final ErrorTypeons/ErrorType.html#ErrorType">ErrorType KDC_ERR_PATH_NOT_ACCEPTED = new ErrorType( 28, "KDC Policy rejects transited path" );
194
195
196
197
198 public static final ErrorTypetions/ErrorType.html#ErrorType">ErrorType KDC_ERR_SVC_UNAVAILABLE = new ErrorType( 29, "A service is not available" );
199
200
201
202
203 public static final ErrorTypeions/ErrorType.html#ErrorType">ErrorType KRB_AP_ERR_BAD_INTEGRITY = new ErrorType( 31,
204 "Integrity check on decrypted field failed" );
205
206
207
208
209 public static final ErrorTypeptions/ErrorType.html#ErrorType">ErrorType KRB_AP_ERR_TKT_EXPIRED = new ErrorType( 32, "Ticket expired" );
210
211
212
213
214 public static final ErrorTypeexceptions/ErrorType.html#ErrorType">ErrorType KRB_AP_ERR_TKT_NYV = new ErrorType( 33, "Ticket not yet valid" );
215
216
217
218
219 public static final ErrorType/exceptions/ErrorType.html#ErrorType">ErrorType KRB_AP_ERR_REPEAT = new ErrorType( 34, "Request is a replay" );
220
221
222
223
224 public static final ErrorType/exceptions/ErrorType.html#ErrorType">ErrorType KRB_AP_ERR_NOT_US = new ErrorType( 35, "The ticket isn't for us" );
225
226
227
228
229 public static final ErrorTypexceptions/ErrorType.html#ErrorType">ErrorType KRB_AP_ERR_BADMATCH = new ErrorType( 36, "Ticket and authenticator don't match" );
230
231
232
233
234 public static final ErrorTypeos/exceptions/ErrorType.html#ErrorType">ErrorType KRB_AP_ERR_SKEW = new ErrorType( 37, "Clock skew too great" );
235
236
237
238
239 public static final ErrorTypeexceptions/ErrorType.html#ErrorType">ErrorType KRB_AP_ERR_BADADDR = new ErrorType( 38, "Incorrect net address" );
240
241
242
243
244 public static final ErrorTypeeptions/ErrorType.html#ErrorType">ErrorType KRB_AP_ERR_BADVERSION = new ErrorType( 39, "Protocol version mismatch" );
245
246
247
248
249 public static final ErrorTypexceptions/ErrorType.html#ErrorType">ErrorType KRB_AP_ERR_MSG_TYPE = new ErrorType( 40, "Invalid msg type" );
250
251
252
253
254 public static final ErrorTypexceptions/ErrorType.html#ErrorType">ErrorType KRB_AP_ERR_MODIFIED = new ErrorType( 41, "Message stream modified" );
255
256
257
258
259 public static final ErrorTypexceptions/ErrorType.html#ErrorType">ErrorType KRB_AP_ERR_BADORDER = new ErrorType( 42, "Message out of order" );
260
261
262
263
264 public static final ErrorTypeceptions/ErrorType.html#ErrorType">ErrorType KRB_AP_ERR_BADKEYVER = new ErrorType( 44, "Specified version of key is not available" );
265
266
267
268
269 public static final ErrorTypes/exceptions/ErrorType.html#ErrorType">ErrorType KRB_AP_ERR_NOKEY = new ErrorType( 45, "Service key not available" );
270
271
272
273
274 public static final ErrorTypexceptions/ErrorType.html#ErrorType">ErrorType KRB_AP_ERR_MUT_FAIL = new ErrorType( 46, "Mutual authentication failed" );
275
276
277
278
279 public static final ErrorTypetions/ErrorType.html#ErrorType">ErrorType KRB_AP_ERR_BADDIRECTION = new ErrorType( 47, "Incorrect message direction" );
280
281
282
283
284 public static final ErrorType/exceptions/ErrorType.html#ErrorType">ErrorType KRB_AP_ERR_METHOD = new ErrorType( 48, "Alternative authentication method required" );
285
286
287
288
289 public static final ErrorType/exceptions/ErrorType.html#ErrorType">ErrorType KRB_AP_ERR_BADSEQ = new ErrorType( 49, "Incorrect sequence number in message" );
290
291
292
293
294 public static final ErrorTypeptions/ErrorType.html#ErrorType">ErrorType KRB_AP_ERR_INAPP_CKSUM = new ErrorType( 50,
295 "Inappropriate type of checksum in message" );
296
297
298
299
300 public static final ErrorTypeions/ErrorType.html#ErrorType">ErrorType KRB_AP_PATH_NOT_ACCEPTED = new ErrorType( 51, "Policy rejects transited path" );
301
302
303
304
305 public static final ErrorTypeions/ErrorType.html#ErrorType">ErrorType KRB_ERR_RESPONSE_TOO_BIG = new ErrorType( 52,
306 "Response too big for UDP; retry with TCP" );
307
308
309
310
311 public static final ErrorTypeos/exceptions/ErrorType.html#ErrorType">ErrorType KRB_ERR_GENERIC = new ErrorType( 60, "Generic error (description in e-text)" );
312
313
314
315
316 public static final ErrorTypeeptions/ErrorType.html#ErrorType">ErrorType KRB_ERR_FIELD_TOOLONG = new ErrorType( 61,
317 "Field is too long for this implementation" );
318
319
320
321
322 public static final ErrorTypens/ErrorType.html#ErrorType">ErrorType KDC_ERR_CLIENT_NOT_TRUSTED = new ErrorType( 62, "Client is not trusted" );
323
324
325
326
327 public static final ErrorTypetions/ErrorType.html#ErrorType">ErrorType KRB_ERR_KDC_NOT_TRUSTED = new ErrorType( 63, "KDC is not trusted" );
328
329
330
331
332 public static final ErrorTypexceptions/ErrorType.html#ErrorType">ErrorType KDC_ERR_INVALID_SIG = new ErrorType( 64, "Signature is invalid" );
333
334
335
336
337 public static final ErrorType.html#ErrorType">ErrorType KDC_ERR_DH_KEY_PARAMETERS_NOT_ACCEPTED = new ErrorType( 65,
338 "Diffie-Hellman (DH) key parameters not accepted." );
339
340
341
342
343 public static final ErrorType/ErrorType.html#ErrorType">ErrorType KRB_ERR_CERTIFICATE_MISMATCH = new ErrorType( 66, "Certificates do not match" );
344
345
346
347
348 public static final ErrorType/exceptions/ErrorType.html#ErrorType">ErrorType KRB_AP_ERR_NO_TGT = new ErrorType( 67, "No TGT available to validate USER-TO-USER" );
349
350
351
352
353 public static final ErrorTypexceptions/ErrorType.html#ErrorType">ErrorType KRB_ERR_WRONG_REALM = new ErrorType( 68, "Wrong realm" );
354
355
356
357
358 public static final ErrorTypeorType.html#ErrorType">ErrorType KRB_AP_ERR_USER_TO_USER_REQUIRED = new ErrorType( 69,
359 "Ticket must be for USER-TO-USER" );
360
361
362
363
364 public static final ErrorTyperorType.html#ErrorType">ErrorType KDC_ERR_CANT_VERIFY_CERTIFICATE = new ErrorType( 70, "Can't verify certificate" );
365
366
367
368
369 public static final ErrorTypes/ErrorType.html#ErrorType">ErrorType KDC_ERR_INVALID_CERTIFICATE = new ErrorType( 71, "Invalid certificate" );
370
371
372
373
374 public static final ErrorTypes/ErrorType.html#ErrorType">ErrorType KDC_ERR_REVOKED_CERTIFICATE = new ErrorType( 72, "Revoked certificate" );
375
376
377
378
379 public static final ErrorTyperType.html#ErrorType">ErrorType KDC_ERR_REVOCATION_STATUS_UNKNOWN = new ErrorType( 73, "Revocation status unknown" );
380
381
382
383
384 public static final ErrorTypee.html#ErrorType">ErrorType KRB_ERR_REVOCATION_STATUS_UNAVAILABLE = new ErrorType( 74,
385 "Revocation status unavailable" );
386
387
388
389
390 public static final ErrorType/ErrorType.html#ErrorType">ErrorType KDC_ERR_CLIENT_NAME_MISMATCH = new ErrorType( 75, "Client names do not match" );
391
392
393
394
395 public static final ErrorTypeons/ErrorType.html#ErrorType">ErrorType KRB_ERR_KDC_NAME_MISMATCH = new ErrorType( 76, "KDC names do not match" );
396
397
398
399
400 public static final ErrorTypeorType.html#ErrorType">ErrorType KDC_ERR_INCONSISTENT_KEY_PURPOSE = new ErrorType( 77, "Inconsistent key purpose" );
401
402
403
404
405 public static final ErrorTypeype.html#ErrorType">ErrorType KDC_ERR_DIGEST_IN_CERT_NOT_ACCEPTED = new ErrorType( 78,
406 "Digest in certificate not accepted" );
407
408
409
410
411 public static final ErrorTypepe.html#ErrorType">ErrorType KDC_ERR_PA_CHECKSUM_MUST_BE_INCLUDED = new ErrorType( 79,
412 "PA checksum must be included" );
413
414
415
416
417 public static final ErrorTypel#ErrorType">ErrorType KDC_ERR_DIGEST_IN_SIGNED_DATA_NOT_ACCEPTED = new ErrorType( 80,
418 "Digest in signed data not accepted" );
419
420
421
422
423 public static final ErrorType#ErrorType">ErrorType KDC_ERR_PUBLIC_KEY_ENCRYPTION_NOT_SUPPORTED = new ErrorType( 81,
424 "Public key encryption not supported" );
425
426
427
428
429 private static final ErrorType[] values =
430 { KDC_ERR_NONE, KDC_ERR_NAME_EXP, KDC_ERR_SERVICE_EXP, KDC_ERR_BAD_PVNO, KDC_ERR_C_OLD_MAST_KVNO,
431 KDC_ERR_S_OLD_MAST_KVNO, KDC_ERR_C_PRINCIPAL_UNKNOWN, KDC_ERR_S_PRINCIPAL_UNKNOWN,
432 KDC_ERR_PRINCIPAL_NOT_UNIQUE, KDC_ERR_NULL_KEY, KDC_ERR_CANNOT_POSTDATE, KDC_ERR_NEVER_VALID,
433 KDC_ERR_POLICY, KDC_ERR_BADOPTION, KDC_ERR_ETYPE_NOSUPP, KDC_ERR_SUMTYPE_NOSUPP,
434 KDC_ERR_PADATA_TYPE_NOSUPP, KDC_ERR_TRTYPE_NOSUPP, KDC_ERR_CLIENT_REVOKED, KDC_ERR_SERVICE_REVOKED,
435 KDC_ERR_TGT_REVOKED, KDC_ERR_CLIENT_NOTYET, KDC_ERR_SERVICE_NOTYET, KDC_ERR_KEY_EXPIRED,
436 KDC_ERR_PREAUTH_FAILED, KDC_ERR_PREAUTH_REQUIRED, KDC_ERR_SERVER_NOMATCH, KDC_ERR_MUST_USE_USER2USER,
437 KDC_ERR_PATH_NOT_ACCEPTED, KDC_ERR_SVC_UNAVAILABLE, KRB_AP_ERR_BAD_INTEGRITY, KRB_AP_ERR_TKT_EXPIRED,
438 KRB_AP_ERR_TKT_NYV, KRB_AP_ERR_REPEAT, KRB_AP_ERR_NOT_US, KRB_AP_ERR_BADMATCH, KRB_AP_ERR_SKEW,
439 KRB_AP_ERR_BADADDR, KRB_AP_ERR_BADVERSION, KRB_AP_ERR_MSG_TYPE, KRB_AP_ERR_MODIFIED, KRB_AP_ERR_BADORDER,
440 KRB_AP_ERR_BADKEYVER, KRB_AP_ERR_NOKEY, KRB_AP_ERR_MUT_FAIL, KRB_AP_ERR_BADDIRECTION, KRB_AP_ERR_METHOD,
441 KRB_AP_ERR_BADSEQ, KRB_AP_ERR_INAPP_CKSUM, KRB_AP_PATH_NOT_ACCEPTED, KRB_ERR_RESPONSE_TOO_BIG,
442 KRB_ERR_GENERIC, KRB_ERR_FIELD_TOOLONG, KDC_ERR_CLIENT_NOT_TRUSTED, KRB_ERR_KDC_NOT_TRUSTED,
443 KDC_ERR_INVALID_SIG, KDC_ERR_DH_KEY_PARAMETERS_NOT_ACCEPTED, KRB_ERR_CERTIFICATE_MISMATCH,
444 KRB_AP_ERR_NO_TGT, KRB_ERR_WRONG_REALM, KRB_AP_ERR_USER_TO_USER_REQUIRED, KDC_ERR_CANT_VERIFY_CERTIFICATE,
445 KDC_ERR_INVALID_CERTIFICATE, KDC_ERR_REVOKED_CERTIFICATE, KDC_ERR_REVOCATION_STATUS_UNKNOWN,
446 KRB_ERR_REVOCATION_STATUS_UNAVAILABLE, KDC_ERR_CLIENT_NAME_MISMATCH, KRB_ERR_KDC_NAME_MISMATCH,
447 KDC_ERR_INCONSISTENT_KEY_PURPOSE, KDC_ERR_DIGEST_IN_CERT_NOT_ACCEPTED,
448 KDC_ERR_PA_CHECKSUM_MUST_BE_INCLUDED, KDC_ERR_DIGEST_IN_SIGNED_DATA_NOT_ACCEPTED,
449 KDC_ERR_PUBLIC_KEY_ENCRYPTION_NOT_SUPPORTED };
450
451
452
453
454 public static final List<ErrorType> VALUES = Collections.unmodifiableList( Arrays.asList( values ) );
455
456
457
458
459 private final String name;
460
461
462
463
464 private final int value;
465
466
467
468
469
470 private ErrorType( int value, String name )
471 {
472 this.value = value;
473 this.name = name;
474 }
475
476
477
478
479
480
481
482 public String getMessage()
483 {
484 return name;
485 }
486
487
488
489
490
491
492
493 public String toString()
494 {
495 return name;
496 }
497
498
499
500
501
502
503
504
505
506 public int compareTo( ErrorType that )
507 {
508 return value - that.value;
509 }
510
511
512
513
514
515
516
517
518 public static ErrorType getTypeByValue( int ordinal )
519 {
520 for ( int ii = 0; ii < values.length; ii++ )
521 {
522 if ( values[ii].value == ordinal )
523 {
524 return values[ii];
525 }
526 }
527
528 return KRB_ERR_GENERIC;
529 }
530
531
532
533
534
535
536
537 public int getValue()
538 {
539 return value;
540 }
541 }