Subject: acquire_cred/add_cred with name

From: Martin Rex <[email-masked]>
Date: Wed, 3 Dec 1997 20:33:48 +0100 (MEZ)

The following paragraphs sound abiguous, maybe even slightly wrong:

   7.2.  gss_acquire_cred

   If desired_name is GSS_C_NO_NAME, the call is interpreted as a request
   for a credential handle that will invoke default behavior when passed to
   gss_init_sec_context() (if cred_usage is GSS_C_INITIATE or GSS_C_BOTH)
   or gss_accept_sec_context() (if cred_usage is GSS_C_ACCEPT or
   GSS_C_BOTH).

   7.3.  gss_add_cred

   If desired_name is GSS_C_NO_NAME, the call is interpreted as a request
   to add a credential element that will invoke default behavior when
   passed to gss_init_sec_context() (if cred_usage is GSS_C_INITIATE or
   GSS_C_BOTH) or gss_accept_sec_context() (if cred_usage is GSS_C_ACCEPT
   or GSS_C_BOTH).

In one of my previous mails I requested that credentials and security
context should not be allowed to change their exposed characteristics
as soon as they're handed over to the application with an explicit
handle.

The "default" behaviour when passing GSS_C_NO_CREDENTIAL to either
gss_accept_sec_context() or (more likely) gss_init_sec_context()
may choose different credentials when done multiple times -- for
example when the user can "replace" the default credentials via
some external login tool.  The two paragraphs may be interpreted in a
way that this behaviour is being replicated for an explicit credential
handle when created with GSS_C_NO_NAME.  I'm clearly opposed to that.

In general, the following two sequences should both work should both
create credential with equivalent characteristics with respect to
identity "name":

1)  cred = acquire_cred( GSS_C_NO_NAME )
    name = inquire_cred( cred )

2)  cred = acquire_cred( GSS_C_NO_NAME )
    name = inquire_cred( cred )
    release_cred(cred)
    cred = acquire_cred( name ) 

-Martin