Re: KITTEN: IETF 75 - 76
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: KITTEN: IETF 75 - 76
On Tue, Sep 01, 2009 at 01:12:02PM -0400, Michael B Allen wrote:
> On Tue, 18 Aug 2009 00:13:28 +0200
> Leif Johansson <leifj at mnt.se> wrote:
>
> > > > 2. listing/iterating credentials
> > > > 3. exporting/importing credentials
> > >
> > > I think Leif has expressed interest in (3) before.
> >
> > That was exporting unfinished contexts actually - slightly different.
> >
> > >
> > > > 4. error message reporting
> > > > 5. asynchronous calls
> > >
> > > The last 2 are generally required for use by modern applications.
> >
> > hmm, is asynchronous calls related to exportable contexts perhaps...?
>
> Exactly they are. To implement async (properly) you would need to be
> able to serialize a context at any step.
Internally, maybe, but as far as the application goes: no.
To me async means a pair of functions called, say,
gss_init_sec_context_async() and gss_accept_sec_context_async() that do
not block, but may return an indication that the call did not complete,
and which provide some way for event notification so that the
application can call them again when they are ready to be called again.
Here's one illustration based on event notification:
major = gss_init_sec_context_async_event(&minor,
cred, &ctx, target, mech, req_flags,
GSS_C_INDEFINITE, cb, &input_token, &output_token,
&ret_flags, NULL, &event_notification);
if (major == GSS_S_CONTINUE_NEEDED &&
output_token.length == 0) {
/*
* hook event notification and contextual args
* to gss_init_sec_context_async() into our event loop
* and return. when the event fires we'll get here
* again and call gss_init_sec_context_async() to make
* progress.
*/
queue_up(&event_notification, cred, &ctx, target, mech,
...);
}
Here's another based on background threads and a completion callback
instead of an event notification:
major = gss_init_sec_context_async_cb(&minor,
cred, &ctx, target, mech, req_flags,
GSS_C_INDEFINITE, cb, &input_token, &output_token,
&ret_flags, NULL, cb_func, &cb_data);
if (major == GSS_S_CONTINUE_NEEDED &&
output_token.length == 0) {
/*
* Our callback will get called when
* gss_init_sec_context_async_cb() completes its work.
* The callback will arrange to get us called again.
*/
return (...);
}
No context serialization needed.
The problem with the event notification variant is that event
notification is very OS-specific, and even library specific (think
kqueues, event ports, poll(), select(), /dev/poll, libevent, ...). On
Unix and Unix-like systems we can probably make the event_notification
be just an array of file descriptors.
The problem with the callback variant is that it implies a threaded
process model (which I don't mind, but which won't be feasible for some
implementors).
Nico
--
Note: Messages sent to this list are the opinions of the senders and do not imply endorsement by the IETF.