01: /*
02: * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
03: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
04: *
05: * This code is free software; you can redistribute it and/or modify it
06: * under the terms of the GNU General Public License version 2 only, as
07: * published by the Free Software Foundation. Sun designates this
08: * particular file as subject to the "Classpath" exception as provided
09: * by Sun in the LICENSE file that accompanied this code.
10: *
11: * This code is distributed in the hope that it will be useful, but WITHOUT
12: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14: * version 2 for more details (a copy is included in the LICENSE file that
15: * accompanied this code).
16: *
17: * You should have received a copy of the GNU General Public License version
18: * 2 along with this work; if not, write to the Free Software Foundation,
19: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20: *
21: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22: * CA 95054 USA or visit www.sun.com if you need additional information or
23: * have any questions.
24: */
25:
26: /*
27: * @(#)KeyUsage.java 1.10 07/05/05
28: */
29:
30: package sun.security.krb5.internal.crypto;
31:
32: /**
33: * Key usages used for key derivation in Kerberos.
34: */
35: public class KeyUsage {
36:
37: private KeyUsage() {
38: }
39:
40: public static final int KU_UNKNOWN = 0; // Cannot be 0
41:
42: // Defined in draft-yu-krb-wg-kerberos-extensions-00.txt, Appendix A
43: public static final int KU_PA_ENC_TS = 1; // KrbAsReq
44: public static final int KU_TICKET = 2; // KrbApReq (ticket)
45: public static final int KU_ENC_AS_REP_PART = 3; // KrbAsRep
46: public static final int KU_TGS_REQ_AUTH_DATA_SESSKEY = 4; // KrbTgsReq
47: public static final int KU_TGS_REQ_AUTH_DATA_SUBKEY = 5; // KrbTgsReq
48: public static final int KU_PA_TGS_REQ_CKSUM = 6; // KrbTgsReq
49: public static final int KU_PA_TGS_REQ_AUTHENTICATOR = 7; // KrbApReq
50: public static final int KU_ENC_TGS_REP_PART_SESSKEY = 8; // KrbTgsRep
51: public static final int KU_ENC_TGS_REP_PART_SUBKEY = 9; // KrbTgsRep
52: public static final int KU_AUTHENTICATOR_CKSUM = 10;
53: public static final int KU_AP_REQ_AUTHENTICATOR = 11; // KrbApReq
54: public static final int KU_ENC_AP_REP_PART = 12; // KrbApRep
55: public static final int KU_ENC_KRB_PRIV_PART = 13; // KrbPriv
56: public static final int KU_ENC_KRB_CRED_PART = 14; // KrbCred
57: public static final int KU_KRB_SAFE_CKSUM = 15; // KrbSafe
58: public static final int KU_AD_KDC_ISSUED_CKSUM = 19;
59:
60: public static final boolean isValid(int usage) {
61: return usage >= 0;
62: }
63: }
|