Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decrypting ticket on initiator/client side #529

Open
bodgit opened this issue Sep 30, 2023 · 0 comments
Open

Decrypting ticket on initiator/client side #529

bodgit opened this issue Sep 30, 2023 · 0 comments

Comments

@bodgit
Copy link
Contributor

bodgit commented Sep 30, 2023

Assuming I have the following code:

ticket, skey, err := cl.GetServiceTicket(spn)
if err != nil {
        panic(err)
}

...

Is there a way to decrypt the ticket on the initiator/client side? I tried perhaps naively using ticket.Decrypt(skey) however that returns error decrypting Ticket EncPart: error decrypting: integrity verification failed so perhaps that's not the correct key to use.

Specifically, I'd like to get at the ticket timing fields on the initiator/client side which don't seem to be exported in an obvious way. For now, I can calculate an approximate end time with time.Now().Add(cl.Config.LibDefaults.TicketLifetime) but that's slightly inaccurate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant