[38313] in Kerberos

home help back first fref pref prev next nref lref last post

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

daemon@ATHENA.MIT.EDU (Chris Hecker)
Sat Aug 25 06:48:56 2018

To: Santosh Kumar <santoshjeergi@gmail.com>, kerberos@mit.edu
From: Chris Hecker <checker@d6.com>
Message-ID: <11209057-d4f9-60b7-f68e-f3436870feec@d6.com>
Date: Sat, 25 Aug 2018 03:48:35 -0700
MIME-Version: 1.0
In-Reply-To: <CAFnsFFexDTGB-uLHrAw5+Px3KoV35MjJQkBBgLFRn+zA-9np6A@mail.gmail.com>
Content-Language: en-US
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: kerberos-bounces@mit.edu


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           Kerberos@mit.edu
> https://mailman.mit.edu/mailman/listinfo/kerberos

________________________________________________
Kerberos mailing list           Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos

home help back first fref pref prev next nref lref last post