Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/crypto/dist/heimdal/lib/gssapi Pull up revision 1.2 via...



details:   https://anonhg.NetBSD.org/src/rev/798a8e3a6bf4
branches:  netbsd-1-5
changeset: 490491:798a8e3a6bf4
user:      jhawk <jhawk%NetBSD.org@localhost>
date:      Thu Jan 25 16:06:18 2001 +0000

description:
Pull up revision 1.2 via patch (requested by fvdl):
  Make gss_acquire_cred() work for cases other than GSS_C_NO_CREDENTIAL
  (i.e 'get current, default credentials').  This is needed to support
  things like gss-api authentication with IKE, as currently implemented
  in racoon.

diffstat:

 crypto/dist/heimdal/lib/gssapi/gssapi.h           |   3 ++-
 crypto/dist/heimdal/lib/gssapi/init_sec_context.c |  17 ++++++++++-------
 2 files changed, 12 insertions(+), 8 deletions(-)

diffs (54 lines):

diff -r 85fcb514e7c0 -r 798a8e3a6bf4 crypto/dist/heimdal/lib/gssapi/gssapi.h
--- a/crypto/dist/heimdal/lib/gssapi/gssapi.h   Thu Jan 25 16:06:15 2001 +0000
+++ b/crypto/dist/heimdal/lib/gssapi/gssapi.h   Thu Jan 25 16:06:18 2001 +0000
@@ -31,7 +31,7 @@
  * SUCH DAMAGE. 
  */
 
-/* $Id: gssapi.h,v 1.1.1.1.2.2 2001/01/25 13:55:58 jhawk Exp $ */
+/* $Id: gssapi.h,v 1.1.1.1.2.3 2001/01/25 16:06:18 jhawk Exp $ */
 
 #ifndef GSSAPI_H_
 #define GSSAPI_H_
@@ -90,6 +90,7 @@
 struct krb5_keytab_data;
 
 typedef int gss_cred_usage_t;
+struct krb5_ccache_data;
 
 typedef struct gss_cred_id_t_desc_struct {
   gss_name_t principal;
diff -r 85fcb514e7c0 -r 798a8e3a6bf4 crypto/dist/heimdal/lib/gssapi/init_sec_context.c
--- a/crypto/dist/heimdal/lib/gssapi/init_sec_context.c Thu Jan 25 16:06:15 2001 +0000
+++ b/crypto/dist/heimdal/lib/gssapi/init_sec_context.c Thu Jan 25 16:06:18 2001 +0000
@@ -33,7 +33,7 @@
 
 #include "gssapi_locl.h"
 
-RCSID("$Id: init_sec_context.c,v 1.1.1.1.2.2 2001/01/25 13:55:58 jhawk Exp $");
+RCSID("$Id: init_sec_context.c,v 1.1.1.1.2.3 2001/01/25 16:06:21 jhawk Exp $");
 
 static OM_uint32
 init_auth
@@ -132,12 +132,15 @@
     (*context_handle)->flags = flags;
     (*context_handle)->more_flags = LOCAL;
 
-    kret = krb5_cc_default (gssapi_krb5_context, &ccache);
-    if (kret) {
-       *minor_status = kret;
-       ret = GSS_S_FAILURE;
-       goto failure;
-    }
+    if (initiator_cred_handle == GSS_C_NO_CREDENTIAL) {
+        kret = krb5_cc_default (gssapi_krb5_context, &ccache);
+        if (kret) {
+           *minor_status = kret;
+           ret = GSS_S_FAILURE;
+           goto failure;
+       }
+    } else
+       ccache = initiator_cred_handle->ccache;
 
     kret = krb5_cc_get_principal (gssapi_krb5_context,
                                  ccache,



Home | Main Index | Thread Index | Old Index