241 kerbTicket.getRenewTill(), |
241 kerbTicket.getRenewTill(), |
242 kerbTicket.getClientAddresses()); |
242 kerbTicket.getClientAddresses()); |
243 } |
243 } |
244 |
244 |
245 /** |
245 /** |
|
246 * A helper method to get a sun..KeyTab from a javax..KeyTab |
|
247 * @param ktab the javax..KeyTab object |
|
248 * @return the sun..KeyTab object |
|
249 */ |
|
250 public static sun.security.krb5.internal.ktab.KeyTab |
|
251 snapshotFromJavaxKeyTab(KeyTab ktab) { |
|
252 return KerberosSecrets.getJavaxSecurityAuthKerberosAccess() |
|
253 .keyTabTakeSnapshot(ktab); |
|
254 } |
|
255 |
|
256 /** |
246 * A helper method to get EncryptionKeys from a javax..KeyTab |
257 * A helper method to get EncryptionKeys from a javax..KeyTab |
247 * @param ktab the javax..KeyTab class |
258 * @param ktab the javax..KeyTab object |
248 * @param cname the PrincipalName |
259 * @param cname the PrincipalName |
249 * @return the EKeys, never null, might be empty |
260 * @return the EKeys, never null, might be empty |
250 */ |
261 */ |
251 public static EncryptionKey[] keysFromJavaxKeyTab( |
262 public static EncryptionKey[] keysFromJavaxKeyTab( |
252 KeyTab ktab, PrincipalName cname) { |
263 KeyTab ktab, PrincipalName cname) { |
253 return KerberosSecrets.getJavaxSecurityAuthKerberosAccess(). |
264 return snapshotFromJavaxKeyTab(ktab).readServiceKeys(cname); |
254 keyTabGetEncryptionKeys(ktab, cname); |
|
255 } |
265 } |
256 } |
266 } |