Query: Need help for storing the krb5_creds(ticket) as blob format.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Query: Need help for storing the krb5_creds(ticket) as blob format.

Santosh Kumar
All,

Could you please help with information how can i store the tickets as blob:

 I'm searching if there is MIT kerberos API's similar to below heimdal
API's which helps to store as blob. could you suggest option,

   krb5_creds* tkt = getTkt();  //obtained krbtgt

  * krb5_storage* sp = krb5_storage_emem();*
*    krb5_store_creds(sp, (krb5_creds*)tkt);*
*    krb5_data sp_data;*
*    memset(&sp_data, 0, sizeof(sp_data));*
*    krb5_storage_to_data(sp, &sp_data);*
    //Blob* blob = new Blob((char*)sp_data.data,  sp_data.length)
*    krb5_storage_free(sp);*


Thanks much
Santosh
________________________________________________
Kerberos mailing list           [hidden email]
https://mailman.mit.edu/mailman/listinfo/kerberos
Reply | Threaded
Open this post in threaded view
|

Re: Query: Need help for storing the krb5_creds(ticket) as blob format.

Chris Hecker

If you've got a krb5_creds* tkt then tkt->ticket is a krb5_data, which
means tkt->ticket.data and tkt->ticket.length are available...you can
just use them directly to store the ticket somewhere (or send it for u2u
or whatever).

Chris


On 2018-08-25 01:43, Santosh Kumar wrote:

> All,
>
> Could you please help with information how can i store the tickets as blob:
>
>  I'm searching if there is MIT kerberos API's similar to below heimdal
> API's which helps to store as blob. could you suggest option,
>
>    krb5_creds* tkt = getTkt();  //obtained krbtgt
>
>   * krb5_storage* sp = krb5_storage_emem();*
> *    krb5_store_creds(sp, (krb5_creds*)tkt);*
> *    krb5_data sp_data;*
> *    memset(&sp_data, 0, sizeof(sp_data));*
> *    krb5_storage_to_data(sp, &sp_data);*
>     //Blob* blob = new Blob((char*)sp_data.data,  sp_data.length)
> *    krb5_storage_free(sp);*
>
>
> Thanks much
> Santosh
> ________________________________________________
> Kerberos mailing list           [hidden email]
> https://mailman.mit.edu/mailman/listinfo/kerberos

________________________________________________
Kerberos mailing list           [hidden email]
https://mailman.mit.edu/mailman/listinfo/kerberos