author | michaelm |
Tue, 06 Mar 2012 20:34:38 +0000 | |
changeset 12047 | 320a714614e9 |
parent 7183 | d8ccc1c73358 |
child 12423 | a69d7fadb9f8 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
5974
f0531b7dfebe
6844907: krb5 etype order should be from strong to weak
weijun
parents:
5802
diff
changeset
|
2 |
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. |
2 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
2 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
2 | 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 |
* |
|
5506 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
2 | 24 |
*/ |
25 |
||
26 |
/* |
|
27 |
* |
|
28 |
* (C) Copyright IBM Corp. 1999 All Rights Reserved. |
|
29 |
* Copyright 1997 The Open Group Research Institute. All rights reserved. |
|
30 |
*/ |
|
31 |
||
32 |
package sun.security.krb5; |
|
33 |
||
34 |
import sun.security.krb5.internal.*; |
|
35 |
import sun.security.krb5.internal.ccache.CredentialsCache; |
|
36 |
import sun.security.krb5.internal.crypto.EType; |
|
37 |
import java.io.IOException; |
|
38 |
import java.util.Date; |
|
6122
16fa7ed7ff1b
6867345: Turkish regional options cause NPE in sun.security.x509.AlgorithmId.algOID
xuelei
parents:
5974
diff
changeset
|
39 |
import java.util.Locale; |
2 | 40 |
import java.net.InetAddress; |
41 |
||
42 |
/** |
|
43 |
* This class encapsulates the concept of a Kerberos service |
|
44 |
* credential. That includes a Kerberos ticket and an associated |
|
45 |
* session key. |
|
46 |
*/ |
|
47 |
public class Credentials { |
|
48 |
||
49 |
Ticket ticket; |
|
50 |
PrincipalName client; |
|
51 |
PrincipalName server; |
|
52 |
EncryptionKey key; |
|
53 |
TicketFlags flags; |
|
54 |
KerberosTime authTime; |
|
55 |
KerberosTime startTime; |
|
56 |
KerberosTime endTime; |
|
57 |
KerberosTime renewTill; |
|
58 |
HostAddresses cAddr; |
|
59 |
EncryptionKey serviceKey; |
|
3483
a16fce1820ef
6821190: more InquireType values for ExtendedGSSContext
weijun
parents:
2
diff
changeset
|
60 |
AuthorizationData authzData; |
2 | 61 |
private static boolean DEBUG = Krb5.DEBUG; |
62 |
private static CredentialsCache cache; |
|
63 |
static boolean alreadyLoaded = false; |
|
64 |
private static boolean alreadyTried = false; |
|
65 |
private static native Credentials acquireDefaultNativeCreds(); |
|
66 |
||
67 |
public Credentials(Ticket new_ticket, |
|
68 |
PrincipalName new_client, |
|
69 |
PrincipalName new_server, |
|
70 |
EncryptionKey new_key, |
|
71 |
TicketFlags new_flags, |
|
72 |
KerberosTime authTime, |
|
73 |
KerberosTime new_startTime, |
|
74 |
KerberosTime new_endTime, |
|
75 |
KerberosTime renewTill, |
|
3483
a16fce1820ef
6821190: more InquireType values for ExtendedGSSContext
weijun
parents:
2
diff
changeset
|
76 |
HostAddresses cAddr, |
a16fce1820ef
6821190: more InquireType values for ExtendedGSSContext
weijun
parents:
2
diff
changeset
|
77 |
AuthorizationData authzData) { |
a16fce1820ef
6821190: more InquireType values for ExtendedGSSContext
weijun
parents:
2
diff
changeset
|
78 |
this(new_ticket, new_client, new_server, new_key, new_flags, |
a16fce1820ef
6821190: more InquireType values for ExtendedGSSContext
weijun
parents:
2
diff
changeset
|
79 |
authTime, new_startTime, new_endTime, renewTill, cAddr); |
a16fce1820ef
6821190: more InquireType values for ExtendedGSSContext
weijun
parents:
2
diff
changeset
|
80 |
this.authzData = authzData; |
a16fce1820ef
6821190: more InquireType values for ExtendedGSSContext
weijun
parents:
2
diff
changeset
|
81 |
} |
a16fce1820ef
6821190: more InquireType values for ExtendedGSSContext
weijun
parents:
2
diff
changeset
|
82 |
|
a16fce1820ef
6821190: more InquireType values for ExtendedGSSContext
weijun
parents:
2
diff
changeset
|
83 |
public Credentials(Ticket new_ticket, |
a16fce1820ef
6821190: more InquireType values for ExtendedGSSContext
weijun
parents:
2
diff
changeset
|
84 |
PrincipalName new_client, |
a16fce1820ef
6821190: more InquireType values for ExtendedGSSContext
weijun
parents:
2
diff
changeset
|
85 |
PrincipalName new_server, |
a16fce1820ef
6821190: more InquireType values for ExtendedGSSContext
weijun
parents:
2
diff
changeset
|
86 |
EncryptionKey new_key, |
a16fce1820ef
6821190: more InquireType values for ExtendedGSSContext
weijun
parents:
2
diff
changeset
|
87 |
TicketFlags new_flags, |
a16fce1820ef
6821190: more InquireType values for ExtendedGSSContext
weijun
parents:
2
diff
changeset
|
88 |
KerberosTime authTime, |
a16fce1820ef
6821190: more InquireType values for ExtendedGSSContext
weijun
parents:
2
diff
changeset
|
89 |
KerberosTime new_startTime, |
a16fce1820ef
6821190: more InquireType values for ExtendedGSSContext
weijun
parents:
2
diff
changeset
|
90 |
KerberosTime new_endTime, |
a16fce1820ef
6821190: more InquireType values for ExtendedGSSContext
weijun
parents:
2
diff
changeset
|
91 |
KerberosTime renewTill, |
2 | 92 |
HostAddresses cAddr) { |
93 |
ticket = new_ticket; |
|
94 |
client = new_client; |
|
95 |
server = new_server; |
|
96 |
key = new_key; |
|
97 |
flags = new_flags; |
|
98 |
this.authTime = authTime; |
|
99 |
startTime = new_startTime; |
|
100 |
endTime = new_endTime; |
|
101 |
this.renewTill = renewTill; |
|
102 |
this.cAddr = cAddr; |
|
103 |
} |
|
104 |
||
105 |
public Credentials(byte[] encoding, |
|
106 |
String client, |
|
107 |
String server, |
|
108 |
byte[] keyBytes, |
|
109 |
int keyType, |
|
110 |
boolean[] flags, |
|
111 |
Date authTime, |
|
112 |
Date startTime, |
|
113 |
Date endTime, |
|
114 |
Date renewTill, |
|
115 |
InetAddress[] cAddrs) throws KrbException, IOException { |
|
116 |
this(new Ticket(encoding), |
|
117 |
new PrincipalName(client, PrincipalName.KRB_NT_PRINCIPAL), |
|
118 |
new PrincipalName(server, PrincipalName.KRB_NT_SRV_INST), |
|
119 |
new EncryptionKey(keyType, keyBytes), |
|
120 |
(flags == null? null: new TicketFlags(flags)), |
|
121 |
(authTime == null? null: new KerberosTime(authTime)), |
|
122 |
(startTime == null? null: new KerberosTime(startTime)), |
|
123 |
(endTime == null? null: new KerberosTime(endTime)), |
|
124 |
(renewTill == null? null: new KerberosTime(renewTill)), |
|
125 |
null); // caddrs are in the encoding at this point |
|
126 |
} |
|
127 |
||
128 |
/** |
|
129 |
* Acquires a service ticket for the specified service |
|
130 |
* principal. If the service ticket is not already available, it |
|
131 |
* obtains a new one from the KDC. |
|
132 |
*/ |
|
133 |
/* |
|
134 |
public Credentials(Credentials tgt, PrincipalName service) |
|
135 |
throws KrbException { |
|
136 |
} |
|
137 |
*/ |
|
138 |
||
139 |
public final PrincipalName getClient() { |
|
140 |
return client; |
|
141 |
} |
|
142 |
||
143 |
public final PrincipalName getServer() { |
|
144 |
return server; |
|
145 |
} |
|
146 |
||
147 |
public final EncryptionKey getSessionKey() { |
|
148 |
return key; |
|
149 |
} |
|
150 |
||
151 |
public final Date getAuthTime() { |
|
152 |
if (authTime != null) { |
|
153 |
return authTime.toDate(); |
|
154 |
} else { |
|
155 |
return null; |
|
156 |
} |
|
157 |
} |
|
158 |
||
159 |
public final Date getStartTime() { |
|
160 |
if (startTime != null) |
|
161 |
{ |
|
162 |
return startTime.toDate(); |
|
163 |
} |
|
164 |
return null; |
|
165 |
} |
|
166 |
||
167 |
public final Date getEndTime() { |
|
168 |
if (endTime != null) |
|
169 |
{ |
|
170 |
return endTime.toDate(); |
|
171 |
} |
|
172 |
return null; |
|
173 |
} |
|
174 |
||
175 |
public final Date getRenewTill() { |
|
176 |
if (renewTill != null) |
|
177 |
{ |
|
178 |
return renewTill.toDate(); |
|
179 |
} |
|
180 |
return null; |
|
181 |
} |
|
182 |
||
183 |
public final boolean[] getFlags() { |
|
184 |
if (flags == null) // Can be in a KRB-CRED |
|
185 |
return null; |
|
186 |
return flags.toBooleanArray(); |
|
187 |
} |
|
188 |
||
189 |
public final InetAddress[] getClientAddresses() { |
|
190 |
||
191 |
if (cAddr == null) |
|
192 |
return null; |
|
193 |
||
194 |
return cAddr.getInetAddresses(); |
|
195 |
} |
|
196 |
||
197 |
public final byte[] getEncoded() { |
|
198 |
byte[] retVal = null; |
|
199 |
try { |
|
200 |
retVal = ticket.asn1Encode(); |
|
201 |
} catch (Asn1Exception e) { |
|
202 |
if (DEBUG) |
|
203 |
System.out.println(e); |
|
204 |
} catch (IOException ioe) { |
|
205 |
if (DEBUG) |
|
206 |
System.out.println(ioe); |
|
207 |
} |
|
208 |
return retVal; |
|
209 |
} |
|
210 |
||
211 |
public boolean isForwardable() { |
|
212 |
return flags.get(Krb5.TKT_OPTS_FORWARDABLE); |
|
213 |
} |
|
214 |
||
215 |
public boolean isRenewable() { |
|
216 |
return flags.get(Krb5.TKT_OPTS_RENEWABLE); |
|
217 |
} |
|
218 |
||
219 |
public Ticket getTicket() { |
|
220 |
return ticket; |
|
221 |
} |
|
222 |
||
223 |
public TicketFlags getTicketFlags() { |
|
224 |
return flags; |
|
225 |
} |
|
226 |
||
3483
a16fce1820ef
6821190: more InquireType values for ExtendedGSSContext
weijun
parents:
2
diff
changeset
|
227 |
public AuthorizationData getAuthzData() { |
a16fce1820ef
6821190: more InquireType values for ExtendedGSSContext
weijun
parents:
2
diff
changeset
|
228 |
return authzData; |
a16fce1820ef
6821190: more InquireType values for ExtendedGSSContext
weijun
parents:
2
diff
changeset
|
229 |
} |
2 | 230 |
/** |
231 |
* Checks if the service ticket returned by the KDC has the OK-AS-DELEGATE |
|
232 |
* flag set |
|
233 |
* @return true if OK-AS_DELEGATE flag is set, otherwise, return false. |
|
234 |
*/ |
|
235 |
public boolean checkDelegate() { |
|
4336 | 236 |
return flags.get(Krb5.TKT_OPTS_DELEGATE); |
237 |
} |
|
238 |
||
239 |
/** |
|
240 |
* Reset TKT_OPTS_DELEGATE to false, called at credentials acquirement |
|
241 |
* when one of the cross-realm TGTs does not have the OK-AS-DELEGATE |
|
242 |
* flag set. This info must be preservable and restorable through |
|
243 |
* the Krb5Util.credsToTicket/ticketToCreds() methods so that even if |
|
244 |
* the service ticket is cached it still remembers the cross-realm |
|
245 |
* authentication result. |
|
246 |
*/ |
|
247 |
public void resetDelegate() { |
|
248 |
flags.set(Krb5.TKT_OPTS_DELEGATE, false); |
|
2 | 249 |
} |
250 |
||
251 |
public Credentials renew() throws KrbException, IOException { |
|
252 |
KDCOptions options = new KDCOptions(); |
|
253 |
options.set(KDCOptions.RENEW, true); |
|
254 |
/* |
|
255 |
* Added here to pass KrbKdcRep.check:73 |
|
256 |
*/ |
|
257 |
options.set(KDCOptions.RENEWABLE, true); |
|
258 |
||
259 |
return new KrbTgsReq(options, |
|
260 |
this, |
|
261 |
server, |
|
262 |
null, // from |
|
263 |
null, // till |
|
264 |
null, // rtime |
|
265 |
null, // eTypes |
|
266 |
cAddr, |
|
267 |
null, |
|
268 |
null, |
|
269 |
null).sendAndGetCreds(); |
|
270 |
} |
|
271 |
||
272 |
/** |
|
273 |
* Returns a TGT for the given client principal from a ticket cache. |
|
274 |
* |
|
275 |
* @param princ the client principal. A value of null means that the |
|
276 |
* default principal name in the credentials cache will be used. |
|
277 |
* @param ticketCache the path to the tickets file. A value |
|
278 |
* of null will be accepted to indicate that the default |
|
279 |
* path should be searched |
|
280 |
* @returns the TGT credentials or null if none were found. If the tgt |
|
281 |
* expired, it is the responsibility of the caller to determine this. |
|
282 |
*/ |
|
283 |
public static Credentials acquireTGTFromCache(PrincipalName princ, |
|
284 |
String ticketCache) |
|
285 |
throws KrbException, IOException { |
|
286 |
||
287 |
if (ticketCache == null) { |
|
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
7183
diff
changeset
|
288 |
// The default ticket cache on Windows and Mac is not a file. |
2 | 289 |
String os = java.security.AccessController.doPrivileged( |
290 |
new sun.security.action.GetPropertyAction("os.name")); |
|
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
7183
diff
changeset
|
291 |
if (os.toUpperCase(Locale.ENGLISH).startsWith("WINDOWS") || |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
7183
diff
changeset
|
292 |
os.toUpperCase(Locale.ENGLISH).startsWith("MAC")) { |
2 | 293 |
Credentials creds = acquireDefaultCreds(); |
294 |
if (creds == null) { |
|
295 |
if (DEBUG) { |
|
296 |
System.out.println(">>> Found no TGT's in LSA"); |
|
297 |
} |
|
298 |
return null; |
|
299 |
} |
|
300 |
if (princ != null) { |
|
301 |
if (creds.getClient().equals(princ)) { |
|
302 |
if (DEBUG) { |
|
303 |
System.out.println(">>> Obtained TGT from LSA: " |
|
304 |
+ creds); |
|
305 |
} |
|
306 |
return creds; |
|
307 |
} else { |
|
308 |
if (DEBUG) { |
|
309 |
System.out.println(">>> LSA contains TGT for " |
|
310 |
+ creds.getClient() |
|
311 |
+ " not " |
|
312 |
+ princ); |
|
313 |
} |
|
314 |
return null; |
|
315 |
} |
|
316 |
} else { |
|
317 |
if (DEBUG) { |
|
318 |
System.out.println(">>> Obtained TGT from LSA: " |
|
319 |
+ creds); |
|
320 |
} |
|
321 |
return creds; |
|
322 |
} |
|
323 |
} |
|
324 |
} |
|
325 |
||
326 |
/* |
|
327 |
* Returns the appropriate cache. If ticketCache is null, it is the |
|
328 |
* default cache otherwise it is the cache filename contained in it. |
|
329 |
*/ |
|
330 |
CredentialsCache ccache = |
|
331 |
CredentialsCache.getInstance(princ, ticketCache); |
|
332 |
||
333 |
if (ccache == null) |
|
334 |
return null; |
|
335 |
||
336 |
sun.security.krb5.internal.ccache.Credentials tgtCred = |
|
337 |
ccache.getDefaultCreds(); |
|
338 |
||
339 |
if (EType.isSupported(tgtCred.getEType())) { |
|
340 |
return tgtCred.setKrbCreds(); |
|
341 |
} else { |
|
342 |
if (DEBUG) { |
|
343 |
System.out.println( |
|
344 |
">>> unsupported key type found the default TGT: " + |
|
345 |
tgtCred.getEType()); |
|
346 |
} |
|
347 |
return null; |
|
348 |
} |
|
349 |
} |
|
350 |
||
351 |
/** |
|
352 |
* Acquires default credentials. |
|
353 |
* <br>The possible locations for default credentials cache is searched in |
|
354 |
* the following order: |
|
355 |
* <ol> |
|
356 |
* <li> The directory and cache file name specified by "KRB5CCNAME" system. |
|
357 |
* property. |
|
358 |
* <li> The directory and cache file name specified by "KRB5CCNAME" |
|
359 |
* environment variable. |
|
360 |
* <li> A cache file named krb5cc_{user.name} at {user.home} directory. |
|
361 |
* </ol> |
|
362 |
* @return a <code>KrbCreds</code> object if the credential is found, |
|
363 |
* otherwise return null. |
|
364 |
*/ |
|
365 |
||
366 |
// this method is intentionally changed to not check if the caller's |
|
367 |
// principal name matches cache file's principal name. |
|
368 |
// It assumes that the GSS call has |
|
369 |
// the privilege to access the default cache file. |
|
370 |
||
371 |
public static synchronized Credentials acquireDefaultCreds() { |
|
372 |
Credentials result = null; |
|
373 |
||
374 |
if (cache == null) { |
|
375 |
cache = CredentialsCache.getInstance(); |
|
376 |
} |
|
377 |
if (cache != null) { |
|
378 |
if (DEBUG) { |
|
379 |
System.out.println(">>> KrbCreds found the default ticket " + |
|
380 |
"granting ticket in credential cache."); |
|
381 |
} |
|
382 |
sun.security.krb5.internal.ccache.Credentials temp = |
|
383 |
cache.getDefaultCreds(); |
|
384 |
if (EType.isSupported(temp.getEType())) { |
|
385 |
result = temp.setKrbCreds(); |
|
386 |
} else { |
|
387 |
if (DEBUG) { |
|
388 |
System.out.println( |
|
389 |
">>> unsupported key type found the default TGT: " + |
|
390 |
temp.getEType()); |
|
391 |
} |
|
392 |
} |
|
393 |
} |
|
394 |
if (result == null) { |
|
395 |
// Doesn't seem to be a default cache on this system or |
|
396 |
// TGT has unsupported encryption type |
|
397 |
||
398 |
if (!alreadyTried) { |
|
399 |
// See if there's any native code to load |
|
400 |
try { |
|
401 |
ensureLoaded(); |
|
402 |
} catch (Exception e) { |
|
403 |
if (DEBUG) { |
|
404 |
System.out.println("Can not load credentials cache"); |
|
405 |
e.printStackTrace(); |
|
406 |
} |
|
407 |
alreadyTried = true; |
|
408 |
} |
|
409 |
} |
|
410 |
if (alreadyLoaded) { |
|
411 |
// There is some native code |
|
412 |
if (DEBUG) |
|
413 |
System.out.println(">> Acquire default native Credentials"); |
|
414 |
result = acquireDefaultNativeCreds(); |
|
415 |
// only TGT with DES key will be returned by native method |
|
416 |
} |
|
417 |
} |
|
418 |
return result; |
|
419 |
} |
|
420 |
||
421 |
/** |
|
422 |
* Acquires credentials for a specified service using initial credential. |
|
423 |
* When the service has a different realm |
|
424 |
* from the initial credential, we do cross-realm authentication |
|
425 |
* - first, we use the current credential to get |
|
426 |
* a cross-realm credential from the local KDC, then use that |
|
427 |
* cross-realm credential to request service credential |
|
428 |
* from the foreigh KDC. |
|
429 |
* |
|
430 |
* @param service the name of service principal using format |
|
431 |
* components@realm |
|
432 |
* @param ccreds client's initial credential. |
|
433 |
* @exception IOException if an error occurs in reading the credentials |
|
434 |
* cache |
|
435 |
* @exception KrbException if an error occurs specific to Kerberos |
|
436 |
* @return a <code>Credentials</code> object. |
|
437 |
*/ |
|
438 |
||
439 |
public static Credentials acquireServiceCreds(String service, |
|
440 |
Credentials ccreds) |
|
441 |
throws KrbException, IOException { |
|
442 |
return CredentialsUtil.acquireServiceCreds(service, ccreds); |
|
443 |
} |
|
444 |
||
445 |
public CredentialsCache getCache() { |
|
446 |
return cache; |
|
447 |
} |
|
448 |
||
449 |
public EncryptionKey getServiceKey() { |
|
450 |
return serviceKey; |
|
451 |
} |
|
452 |
||
453 |
/* |
|
454 |
* Prints out debug info. |
|
455 |
*/ |
|
456 |
public static void printDebug(Credentials c) { |
|
457 |
System.out.println(">>> DEBUG: ----Credentials----"); |
|
458 |
System.out.println("\tclient: " + c.client.toString()); |
|
459 |
System.out.println("\tserver: " + c.server.toString()); |
|
460 |
System.out.println("\tticket: realm: " + c.ticket.realm.toString()); |
|
461 |
System.out.println("\t sname: " + c.ticket.sname.toString()); |
|
462 |
if (c.startTime != null) { |
|
463 |
System.out.println("\tstartTime: " + c.startTime.getTime()); |
|
464 |
} |
|
465 |
System.out.println("\tendTime: " + c.endTime.getTime()); |
|
466 |
System.out.println(" ----Credentials end----"); |
|
467 |
} |
|
468 |
||
469 |
||
470 |
static void ensureLoaded() { |
|
471 |
java.security.AccessController.doPrivileged( |
|
472 |
new java.security.PrivilegedAction<Void> () { |
|
473 |
public Void run() { |
|
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
7183
diff
changeset
|
474 |
if (System.getProperty("os.name").startsWith("Mac")) { |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
7183
diff
changeset
|
475 |
System.loadLibrary("osxkrb5"); |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
7183
diff
changeset
|
476 |
} else { |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
7183
diff
changeset
|
477 |
System.loadLibrary("w2k_lsa_auth"); |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
7183
diff
changeset
|
478 |
} |
2 | 479 |
return null; |
480 |
} |
|
481 |
}); |
|
482 |
alreadyLoaded = true; |
|
483 |
} |
|
484 |
||
485 |
public String toString() { |
|
486 |
StringBuffer buffer = new StringBuffer("Credentials:"); |
|
487 |
buffer.append("\nclient=").append(client); |
|
488 |
buffer.append("\nserver=").append(server); |
|
489 |
if (authTime != null) { |
|
490 |
buffer.append("\nauthTime=").append(authTime); |
|
491 |
} |
|
492 |
if (startTime != null) { |
|
493 |
buffer.append("\nstartTime=").append(startTime); |
|
494 |
} |
|
495 |
buffer.append("\nendTime=").append(endTime); |
|
496 |
buffer.append("\nrenewTill=").append(renewTill); |
|
497 |
buffer.append("\nflags: ").append(flags); |
|
498 |
buffer.append("\nEType (int): ").append(key.getEType()); |
|
499 |
return buffer.toString(); |
|
500 |
} |
|
501 |
||
502 |
} |