private EncryptionKey decryptTicket(Ticket ticket, Subject svrSub)
throws Exception {
// Get the private key that matches the encryption type of the ticket.
EncryptionKey key = getPrivateKey(svrSub, ticket.encPart.getEType());
// Decrypt the service ticket and get the cleartext bytes.
byte[] ticketBytes = ticket.encPart.decrypt(key, KeyUsage.KU_TICKET);
if (ticketBytes.length <= 0) {
throw new Exception("Key is empty.");
}