From 555b05207ce6093527dc281e4793245401e61f88 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Tue, 1 Apr 1997 02:24:18 +0000 Subject: [PATCH] Added V2 functions to the glue layer git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10041 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/gssapi/krb5/ChangeLog | 12 ++++++---- src/lib/gssapi/krb5/canon_name.c | 8 +++---- src/lib/gssapi/krb5/duplicate_name.c | 10 ++++---- src/lib/gssapi/krb5/export_name.c | 6 ++--- src/lib/gssapi/krb5/gssapiP_krb5.h | 19 +++++++++++++++ src/lib/gssapi/krb5/krb5_gss_glue.c | 36 ++++++++++++++++++++++++++++ 6 files changed, 74 insertions(+), 17 deletions(-) diff --git a/src/lib/gssapi/krb5/ChangeLog b/src/lib/gssapi/krb5/ChangeLog index 083d78c73..dd76dad6d 100644 --- a/src/lib/gssapi/krb5/ChangeLog +++ b/src/lib/gssapi/krb5/ChangeLog @@ -1,9 +1,13 @@ +Mon Mar 31 21:22:19 1997 Theodore Y. Ts'o + + * krb5_gss_glue.c: Add GSSAPI V2 calls to the glue layer. + Fri Mar 28 03:52:14 1997 Theodore Y. Ts'o * import_name.c (krb5_gss_import_name): Add support for importing the exported name call - * export_name.c (gss_export_name): Fix export_name emit the token + * export_name.c (krb5_gss_export_name): Fix export_name emit the token exactly as specified by RFC 2078. Thu Mar 27 15:52:04 1997 Theodore Ts'o @@ -11,11 +15,11 @@ Thu Mar 27 15:52:04 1997 Theodore Ts'o * Makefile.in: Add canon_name.c, duplicate_name.c, export_name.c to the GSSAPI library. - * canon_name.c (gss_canonicalize_name): New GSSAPI V2 function + * canon_name.c (krb5_gss_canonicalize_name): New GSSAPI V2 function - * duplicate_name.c (gss_duplicate_name): New GSSAPI V2 function + * duplicate_name.c (krb5_gss_duplicate_name): New GSSAPI V2 function - * export_name.c (gss_export_name): New GSSAPI V2 function + * export_name.c (krb5_gss_export_name): New GSSAPI V2 function * gssapiP_krb5.h (KG_IMPLFLAGS): Add support for GSS_C_PROT_STATE_READY and GSS_C_TRANS_FLAG diff --git a/src/lib/gssapi/krb5/canon_name.c b/src/lib/gssapi/krb5/canon_name.c index f057d2b05..652745c7b 100644 --- a/src/lib/gssapi/krb5/canon_name.c +++ b/src/lib/gssapi/krb5/canon_name.c @@ -26,10 +26,10 @@ /* This is trivial since we're a single mechanism implementation */ -OM_uint32 gss_canonicalize_name(OM_uint32 *minor_status, - const gss_name_t input_name, - const gss_OID mech_type, - gss_name_t *output_name) +OM_uint32 krb5_gss_canonicalize_name(OM_uint32 *minor_status, + const gss_name_t input_name, + const gss_OID mech_type, + gss_name_t *output_name) { if ((mech_type == GSS_C_NULL_OID) || !g_OID_equal(mech_type, gss_mech_krb5)) { diff --git a/src/lib/gssapi/krb5/duplicate_name.c b/src/lib/gssapi/krb5/duplicate_name.c index 176d6030d..93e950345 100644 --- a/src/lib/gssapi/krb5/duplicate_name.c +++ b/src/lib/gssapi/krb5/duplicate_name.c @@ -24,15 +24,13 @@ #include "gssapiP_krb5.h" -OM_uint32 gss_duplicate_name(OM_uint32 *minor_status, - const gss_name_t input_name, - gss_name_t *dest_name) +OM_uint32 krb5_gss_duplicate_name(OM_uint32 *minor_status, + const gss_name_t input_name, + gss_name_t *dest_name) { krb5_context context; krb5_error_code code; krb5_principal princ, outprinc; - int length; - char *str, *cp; if (GSS_ERROR(kg_get_context(minor_status, &context))) return(GSS_S_FAILURE); @@ -44,7 +42,7 @@ OM_uint32 gss_duplicate_name(OM_uint32 *minor_status, } princ = input_name; - if (code = krb5_copy_principal(context, princ, &outprinc)) { + if ((code = krb5_copy_principal(context, princ, &outprinc))) { *minor_status = code; return(GSS_S_FAILURE); } diff --git a/src/lib/gssapi/krb5/export_name.c b/src/lib/gssapi/krb5/export_name.c index 25c8976cb..1e2d68f0b 100644 --- a/src/lib/gssapi/krb5/export_name.c +++ b/src/lib/gssapi/krb5/export_name.c @@ -24,9 +24,9 @@ #include "gssapiP_krb5.h" -OM_uint32 gss_export_name(OM_uint32 *minor_status, - const gss_name_t input_name, - gss_buffer_t exported_name) +OM_uint32 krb5_gss_export_name(OM_uint32 *minor_status, + const gss_name_t input_name, + gss_buffer_t exported_name) { krb5_context context; krb5_error_code code; diff --git a/src/lib/gssapi/krb5/gssapiP_krb5.h b/src/lib/gssapi/krb5/gssapiP_krb5.h index 851047213..b09722db1 100644 --- a/src/lib/gssapi/krb5/gssapiP_krb5.h +++ b/src/lib/gssapi/krb5/gssapiP_krb5.h @@ -499,4 +499,23 @@ PROTOTYPE( (OM_uint32 *, /* minor_status */ gss_OID_set * /* name_types */ )); +OM_uint32 krb5_gss_canonicalize_name +PROTOTYPE( (OM_uint32 *, /* minor_status */ + const gss_name_t, /* input_name */ + const gss_OID, /* mech_type */ + gss_name_t * /* output_name */ + )); + +OM_uint32 krb5_gss_export_name +PROTOTYPE( (OM_uint32 *, /* minor_status */ + const gss_name_t, /* input_name */ + gss_buffer_t /* exported_name */ + )); + +OM_uint32 krb5_gss_duplicate_name +PROTOTYPE( (OM_uint32 *, /* minor_status */ + const gss_name_t, /* input_name */ + gss_name_t * /* dest_name */ + )); + #endif /* _GSSAPIP_KRB5_H_ */ diff --git a/src/lib/gssapi/krb5/krb5_gss_glue.c b/src/lib/gssapi/krb5/krb5_gss_glue.c index 8155d8577..5b7ad5957 100644 --- a/src/lib/gssapi/krb5/krb5_gss_glue.c +++ b/src/lib/gssapi/krb5/krb5_gss_glue.c @@ -534,3 +534,39 @@ gss_wrap_size_limit(minor_status, context_handle, conf_req_flag, conf_req_flag, qop_req, req_output_size, max_input_size)); } + +/* V2 interface */ +KRB5_DLLIMP OM_uint32 KRB5_CALLCONV +gss_canonicalize_name(minor_status, input_name, mech_type, output_name) + OM_uint32 *minor_status; + const gss_name_t input_name; + const gss_OID mech_type; + gss_name_t *output_name; +{ + return krb5_gss_canonicalize_name(minor_status, input_name, + mech_type, output_name); +} + + +/* V2 interface */ +KRB5_DLLIMP OM_uint32 KRB5_CALLCONV +gss_export_name(minor_status, input_name, exported_name) + OM_uint32 *minor_status; + const gss_name_t input_name; + gss_buffer_t exported_name; +{ + return krb5_gss_export_name(minor_status, input_name, exported_name); +} + +/* V2 interface */ +KRB5_DLLIMP OM_uint32 KRB5_CALLCONV +gss_duplicate_name(minor_status, input_name, dest_name) + OM_uint32 *minor_status; + const gss_name_t input_name; + gss_name_t *dest_name; +{ + return krb5_gss_duplicate_name(minor_status, input_name, dest_name); +} + + + -- 2.26.2