Rename symbols for namespace purity
authorTom Yu <tlyu@mit.edu>
Fri, 10 Mar 2006 20:05:28 +0000 (20:05 +0000)
committerTom Yu <tlyu@mit.edu>
Fri, 10 Mar 2006 20:05:28 +0000 (20:05 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/users/tlyu/branches/mechglue@17727 dc483132-0cff-0310-8789-dd5450dbe970

38 files changed:
src/lib/gssapi/krb5/ChangeLog
src/lib/gssapi/krb5/krb5_gss_glue.c
src/lib/gssapi/mechglue/ChangeLog
src/lib/gssapi/mechglue/g_accept_sec_context.c
src/lib/gssapi/mechglue/g_acquire_cred.c
src/lib/gssapi/mechglue/g_canon_name.c
src/lib/gssapi/mechglue/g_compare_name.c
src/lib/gssapi/mechglue/g_context_time.c
src/lib/gssapi/mechglue/g_delete_sec_context.c
src/lib/gssapi/mechglue/g_dsp_name.c
src/lib/gssapi/mechglue/g_dsp_status.c
src/lib/gssapi/mechglue/g_dup_name.c
src/lib/gssapi/mechglue/g_exp_sec_context.c
src/lib/gssapi/mechglue/g_export_name.c
src/lib/gssapi/mechglue/g_glue.c
src/lib/gssapi/mechglue/g_imp_name.c
src/lib/gssapi/mechglue/g_imp_sec_context.c
src/lib/gssapi/mechglue/g_indicate_mechs.c
src/lib/gssapi/mechglue/g_init_sec_context.c
src/lib/gssapi/mechglue/g_initialize.c
src/lib/gssapi/mechglue/g_inq_context.c
src/lib/gssapi/mechglue/g_inq_cred.c
src/lib/gssapi/mechglue/g_inq_names.c
src/lib/gssapi/mechglue/g_oid_ops.c
src/lib/gssapi/mechglue/g_process_context.c
src/lib/gssapi/mechglue/g_rel_cred.c
src/lib/gssapi/mechglue/g_rel_name.c
src/lib/gssapi/mechglue/g_seal.c
src/lib/gssapi/mechglue/g_sign.c
src/lib/gssapi/mechglue/g_store_cred.c
src/lib/gssapi/mechglue/g_unseal.c
src/lib/gssapi/mechglue/g_userok.c
src/lib/gssapi/mechglue/g_utils.c
src/lib/gssapi/mechglue/g_verify.c
src/lib/gssapi/mechglue/gssd_pname_to_uid.c
src/lib/gssapi/mechglue/mglueP.h
src/lib/gssapi/spnego/ChangeLog [new file with mode: 0644]
src/lib/gssapi/spnego/spnego_mech.c

index 0e6c3a4718b8b97ee522a9bbccc924ee4a3845c7..bd8285b4cea2cc12eae9842df4558afbf146db6d 100644 (file)
@@ -1,3 +1,7 @@
+2006-03-10  Tom Yu  <tlyu@mit.edu>
+
+       * krb5_gss_glue.c: Rename symbols for namespace purity.
+
 2005-11-14  Jeffrey Altman <jaltman@mit.edu>
 
        * gssapi_krb5.hin: include k5-int.h instead of krb5.h
index e4a9618ba342141bfec6034f5f313e60f8c4c92c..40925d1823dc376355a800e5bce055ee223e94c6 100644 (file)
@@ -1014,7 +1014,7 @@ gss_krb5_copy_ccache(
     gss_cred_id_t mcred;
 
     ucred = (gss_union_cred_t)cred_handle;
-    mcred = __gss_get_mechanism_cred(ucred, &krb5_mechanism.mech_type);
+    mcred = gssint_get_mechanism_cred(ucred, &krb5_mechanism.mech_type);
     if (mcred == NULL)
        return GSS_S_DEFECTIVE_CREDENTIAL;
     return gss_krb5int_copy_ccache(minor_status, mcred, out_ccache);
@@ -1049,7 +1049,7 @@ gss_krb5_set_allowable_enctypes(
     gss_cred_id_t mcred;
 
     ucred = (gss_union_cred_t)cred;
-    mcred = __gss_get_mechanism_cred(ucred, &krb5_mechanism.mech_type);
+    mcred = gssint_get_mechanism_cred(ucred, &krb5_mechanism.mech_type);
     if (mcred == NULL)
        return GSS_S_DEFECTIVE_CREDENTIAL;
     return gss_krb5int_set_allowable_enctypes(minor_status, mcred,
index 10f07ee6d79e927abfb0e227258956c556ef7a6b..22a6f461db37da117aa448c1c93fc87131fe2cb5 100644 (file)
@@ -1,3 +1,16 @@
+2006-03-10  Tom Yu  <tlyu@mit.edu>
+
+       * g_accept_sec_context.c, g_acquire_cred.c, g_compare_name.c,
+       * g_canon_name.c, g_context_time.c, g_delete_sec_context.c:
+       * g_dsp_name.c, g_dsp_status.c, g_dup_name.c, g_exp_sec_context.c:
+       * g_export_name.c, g_glue.c, g_imp_name.c, g_imp_sec_context.c:
+       * g_indicate_mechs.c, g_init_sec_context.c, g_initialize.c:
+       * g_inq_context.c, g_inq_cred.c, g_inq_names.c, g_oid_ops.c:
+       * g_process_context.c, g_rel_cred.c, g_rel_name.c, g_seal.c:
+       * g_sign.c, g_store_cred.c, g_unseal.c, g_userok.c, g_utils.c:
+       * g_verify.c, gssd_pname_to_uid.c, mglueP.h: Rename symbols for
+       namespace purity.
+
 2006-03-06  Tom Yu  <tlyu@mit.edu>
 
        * g_acquire_cred.c (gss_add_cred): Maintain old default-cred
index b2a21e6def5e10dc001c7569580108ef3b3cf6d2..e0be150937ab73145358573bf584cb4cc9ba3fb7 100644 (file)
@@ -102,7 +102,7 @@ gss_cred_id_t *             d_cred;
            return (GSS_S_CALL_INACCESSIBLE_READ);
 
        /* Get the token mech type */
-       status = __gss_get_mech_type(token_mech_type, input_token_buffer);
+       status = gssint_get_mech_type(token_mech_type, input_token_buffer);
        if (status)
            return status;
 
@@ -134,14 +134,14 @@ gss_cred_id_t *           d_cred;
      * use the default credential.
      */
     union_cred = (gss_union_cred_t) verifier_cred_handle;
-    input_cred_handle = __gss_get_mechanism_cred(union_cred, token_mech_type);
+    input_cred_handle = gssint_get_mechanism_cred(union_cred, token_mech_type);
     
     /*
      * now select the approprate underlying mechanism routine and
      * call it.
      */
     
-    mech = __gss_get_mechanism (token_mech_type);
+    mech = gssint_get_mechanism (token_mech_type);
     if (mech && mech->gss_accept_sec_context) {
 
            status = mech->gss_accept_sec_context(
@@ -174,7 +174,7 @@ gss_cred_id_t *             d_cred;
             * the union name struct cast to src_name
             */
            if (internal_name != NULL) {
-               temp_status = __gss_convert_name_to_union_name(
+               temp_status = gssint_convert_name_to_union_name(
                       &temp_minor_status, mech,
                       internal_name, &tmp_src_name);
                if (temp_status != GSS_S_COMPLETE) {
@@ -251,7 +251,7 @@ gss_cred_id_t *             d_cred;
                }
 
                if (internal_name != NULL) {
-                   temp_status = __gss_convert_name_to_union_name(
+                   temp_status = gssint_convert_name_to_union_name(
                        &temp_minor_status, mech,
                        internal_name, &tmp_src_name);
                    if (temp_status != GSS_S_COMPLETE) {
index be3c105fee3b3e24c4e2b7d3fdcf69766d85b7b0..ca30607911b911e5328527c5d684a6a91f89eb15 100644 (file)
@@ -125,7 +125,7 @@ OM_uint32 *         time_rec;
      * statics thus needs not be freed
      */
     if(desired_mechs == GSS_C_NULL_OID_SET) {
-       mech = __gss_get_mechanism(NULL);
+       mech = gssint_get_mechanism(NULL);
        if (mech == NULL)
            return (GSS_S_BAD_MECH);
        
@@ -257,7 +257,7 @@ gss_add_cred(minor_status, input_cred_handle,
     if (initiator_time_rec)
        *initiator_time_rec = 0;
 
-    mech = __gss_get_mechanism(desired_mech);
+    mech = gssint_get_mechanism(desired_mech);
     if (!mech)
        return GSS_S_BAD_MECH;
     else if (!mech->gss_acquire_cred)
@@ -274,7 +274,7 @@ gss_add_cred(minor_status, input_cred_handle,
        internal_name = GSS_C_NO_NAME;
     } else {
        union_cred = (gss_union_cred_t)input_cred_handle;
-       if (__gss_get_mechanism_cred(union_cred, desired_mech) !=
+       if (gssint_get_mechanism_cred(union_cred, desired_mech) !=
            GSS_C_NO_CREDENTIAL)
            return (GSS_S_DUPLICATE_ELEMENT);
 
@@ -286,7 +286,7 @@ gss_add_cred(minor_status, input_cred_handle,
                            &mech->mech_type))
                internal_name = union_name->mech_name;
            else {
-               if (__gss_import_internal_name(minor_status,
+               if (gssint_import_internal_name(minor_status,
                                               &mech->mech_type, union_name,
                                               &allocated_name) != GSS_S_COMPLETE)
                    return (GSS_S_BAD_NAME);
@@ -409,7 +409,7 @@ gss_add_cred(minor_status, input_cred_handle,
     /* We're done with the internal name. Free it if we allocated it. */
 
     if (allocated_name)
-       (void) __gss_release_internal_name(&temp_minor_status,
+       (void) gssint_release_internal_name(&temp_minor_status,
                                           &mech->mech_type,
                                           &allocated_name);
 
@@ -426,7 +426,7 @@ errout:
                               &temp_minor_status, &cred);
 
     if (allocated_name)
-       (void) __gss_release_internal_name(&temp_minor_status,
+       (void) gssint_release_internal_name(&temp_minor_status,
                                           &mech->mech_type,
                                           &allocated_name);
 
index c786d4d045508fd262d6ef77be46c180e8c40dc7..ff166da681d9fde4e9040f95f5675fb745d7f12c 100644 (file)
@@ -72,7 +72,7 @@ gss_name_t *output_name;
                out_union->external_name = 0;
 
                /* Allocate the buffer for the user specified representation */
-               if (__gss_create_copy_buffer(in_union->external_name,
+               if (gssint_create_copy_buffer(in_union->external_name,
                                &out_union->external_name, 1))
                        goto allocation_failure;
 
@@ -90,7 +90,7 @@ gss_name_t *output_name;
         */
        if (!output_name) {
                if (in_union->mech_type) {
-                       (void) __gss_release_internal_name(minor_status,
+                       (void) gssint_release_internal_name(minor_status,
                                                        in_union->mech_type,
                                                        &in_union->mech_name);
                        (void) gss_release_oid(minor_status,
@@ -107,7 +107,7 @@ gss_name_t *output_name;
                goto allocation_failure;
 
        if (major_status =
-               __gss_import_internal_name(minor_status, mech_type,
+               gssint_import_internal_name(minor_status, mech_type,
                                                dest_union,
                                                &dest_union->mech_name))
                goto allocation_failure;
@@ -139,7 +139,7 @@ allocation_failure:
         */
 
        if (dest_union->mech_name) {
-               (void) __gss_release_internal_name(minor_status,
+               (void) gssint_release_internal_name(minor_status,
                                                dest_union->mech_type,
                                                &dest_union->mech_name);
        }
index 9cd50d9debb0e79c644a8ab6c5fa6d4ff7ac5e1d..0a6db1c16bd242dbabbc6dd7c2b30958ee1c46b2 100644 (file)
@@ -76,7 +76,7 @@ int *                 name_equal;
      * information.
      */
     if (union_name1->mech_type) {
-       mech = __gss_get_mechanism (union_name1->mech_type);
+       mech = gssint_get_mechanism (union_name1->mech_type);
        if (!mech)
            return (GSS_S_BAD_MECH);
        if (!mech->gss_compare_name)
@@ -160,7 +160,7 @@ int *                       name_equal;
        union_name1 = (gss_union_name_t) name2;
        union_name2 = (gss_union_name_t) name1;
     }
-    major_status = __gss_import_internal_name(minor_status,
+    major_status = gssint_import_internal_name(minor_status,
                                              union_name1->mech_type,
                                              union_name2,
                                              &internal_name);
@@ -170,7 +170,7 @@ int *                       name_equal;
     major_status = mech->gss_compare_name(mech->context, minor_status,
                                          union_name1->mech_name,
                                          internal_name, name_equal);
-    __gss_release_internal_name(&temp_minor, union_name1->mech_type,
+    gssint_release_internal_name(&temp_minor, union_name1->mech_type,
                                &internal_name);
     return (major_status);
     
index 82262a06e1de5abcd66a7133d29c170b46d5120f..5ce6b56d86bf1c0741fcc0b12674640caacb0b04 100644 (file)
@@ -58,7 +58,7 @@ OM_uint32 *           time_rec;
      */
     
     ctx = (gss_union_ctx_id_t) context_handle;
-    mech = __gss_get_mechanism (ctx->mech_type);
+    mech = gssint_get_mechanism (ctx->mech_type);
     
     if (mech) {
 
index 9678bd08377abe52e7637b3d203f0b480452b622..de70b8fb79e61a5d898ea1b09a6dc5a333689423 100644 (file)
@@ -64,7 +64,7 @@ gss_buffer_t          output_token;
      */
     
     ctx = (gss_union_ctx_id_t) *context_handle;
-    mech = __gss_get_mechanism (ctx->mech_type);
+    mech = gssint_get_mechanism (ctx->mech_type);
     
     if (mech) {
 
index f90c8766958fc6c980338e2db636bcf77638f4d8..161b2707e37d986911496e9e33cae1962a5e4cf1 100644 (file)
@@ -68,7 +68,7 @@ gss_OID *             output_name_type;
        /*
         * OK, we have a mechanism-specific name; let's use it!
         */
-       return (__gss_display_internal_name(minor_status,
+       return (gssint_display_internal_name(minor_status,
                                            union_name->mech_type,
                                            union_name->mech_name,
                                            output_name_buffer,
index 51d552e56f586cb7940bb0394834f7a28971dbf6..83583035fcaa07f865204f2d695855bcdf46962b 100644 (file)
@@ -77,7 +77,7 @@ gss_buffer_t          status_string;
      * call it.
      */
 
-    mech = __gss_get_mechanism (mech_type);
+    mech = gssint_get_mechanism (mech_type);
 
     if (mech && mech->gss_display_status) {
        if (mech_type == GSS_C_NULL_OID)
index d8508202ce0330a2574195ad4a73ad9a26736383..8bd813d282f1c74baa5839d2152fd8a5f901033a 100644 (file)
@@ -61,7 +61,7 @@ gss_name_t *dest_name;
        dest_union->external_name = 0;
 
        /* Now copy the external representaion */
-       if (__gss_create_copy_buffer(src_union->external_name,
+       if (gssint_create_copy_buffer(src_union->external_name,
                                &dest_union->external_name, 0))
                goto allocation_failure;
 
@@ -83,7 +83,7 @@ gss_name_t *dest_name;
                if (major_status != GSS_S_COMPLETE)
                        goto allocation_failure;
 
-               major_status = __gss_import_internal_name(minor_status,
+               major_status = gssint_import_internal_name(minor_status,
                                                        dest_union->mech_type,
                                                        dest_union,
                                                        &dest_union->mech_name);
@@ -106,7 +106,7 @@ allocation_failure:
                        (void) generic_gss_release_oid(minor_status,
                                                        &dest_union->name_type);
                if (dest_union->mech_name)
-                       (void) __gss_release_internal_name(minor_status,
+                       (void) gssint_release_internal_name(minor_status,
                                                dest_union->mech_type,
                                                &dest_union->mech_name);
                if (dest_union->mech_type)
index a9a2443667060fbfb2b20b6a173f97400e6e4169..539920b49b0225d1a392f938f0706dabb9328881 100644 (file)
@@ -67,7 +67,7 @@ gss_buffer_t          interprocess_token;
      */
     
     ctx = (gss_union_ctx_id_t) *context_handle;
-    mech = __gss_get_mechanism (ctx->mech_type);
+    mech = gssint_get_mechanism (ctx->mech_type);
     if (!mech)
        return GSS_S_BAD_MECH;
     if (!mech->gss_export_sec_context)
index 6b5780c2ae49cc3b93e82f860608a816a83825db..778cfdeecb3c3f63921c508c6607552b0475fdce 100644 (file)
@@ -50,6 +50,6 @@ gss_buffer_t          exported_name;
        if (!union_name->mech_type)
                return (GSS_S_NAME_NOT_MN);
 
-       return __gss_export_internal_name(minor_status, union_name->mech_type,
+       return gssint_export_internal_name(minor_status, union_name->mech_type,
                                        union_name->mech_name, exported_name);
 }
index d807ff070d8e8572c700b6e64878d3ed97fb52be..030fbfdfa571cdb06422d804f76ea2ba9aefa0e2 100644 (file)
@@ -32,7 +32,7 @@
 
 #define        MSO_BIT (8*(sizeof (int) - 1))  /* Most significant octet bit */
 
-extern gss_mechanism *__gss_mechs_array;
+extern gss_mechanism *gssint_mechs_array;
 
 /*
  * This file contains the support routines for the glue layer.
@@ -46,7 +46,7 @@ extern gss_mechanism *__gss_mechs_array;
  * by the buffer. Note we return -1 on error.
  */
 int
-get_der_length(unsigned char **buf, unsigned int buf_len, unsigned int *bytes)
+gssint_get_der_length(unsigned char **buf, unsigned int buf_len, unsigned int *bytes)
 {
     /* p points to the beginning of the buffer */
     unsigned char *p = *buf;
@@ -100,7 +100,7 @@ get_der_length(unsigned char **buf, unsigned int buf_len, unsigned int *bytes)
  * der_length_size: Return the number of bytes to encode a given length.
  */
 unsigned int
-der_length_size(unsigned int len)
+gssint_der_length_size(unsigned int len)
 {
     int i;
 
@@ -122,7 +122,7 @@ der_length_size(unsigned int len)
  * be encoded in max_len characters.
  */
 int
-put_der_length(unsigned int length, unsigned char **buf, unsigned int max_len)
+gssint_put_der_length(unsigned int length, unsigned char **buf, unsigned int max_len)
 {
     unsigned char *s = *buf, *p;
     unsigned int buf_len = 0;
@@ -182,7 +182,7 @@ put_der_length(unsigned int length, unsigned char **buf, unsigned int max_len)
  *
  */
 
-OM_uint32 __gss_get_mech_type(OID, token)
+OM_uint32 gssint_get_mech_type(OID, token)
     gss_OID            OID;
     gss_buffer_t       token;
 {
@@ -251,7 +251,7 @@ OM_uint32 __gss_get_mech_type(OID, token)
 
 #include "mglueP.h"
 
-OM_uint32 __gss_import_internal_name (minor_status, mech_type, union_name, 
+OM_uint32 gssint_import_internal_name (minor_status, mech_type, union_name, 
                                internal_name)
 OM_uint32      *minor_status;
 gss_OID                mech_type;
@@ -261,7 +261,7 @@ gss_name_t  *internal_name;
     OM_uint32          status;
     gss_mechanism      mech;
 
-    mech = __gss_get_mechanism (mech_type);
+    mech = gssint_get_mechanism (mech_type);
     if (mech) {
        if (mech->gss_import_name)
            status = mech->gss_import_name (
@@ -279,7 +279,7 @@ gss_name_t  *internal_name;
     return (GSS_S_BAD_MECH);
 }
 
-OM_uint32 __gss_export_internal_name(minor_status, mech_type,
+OM_uint32 gssint_export_internal_name(minor_status, mech_type,
                                     internal_name, name_buf)
     OM_uint32          *minor_status;
     const gss_OID              mech_type;
@@ -297,7 +297,7 @@ OM_uint32 __gss_export_internal_name(minor_status, mech_type,
     int mechOidDERLen = 0;
     int mechOidLen = 0;
 
-    mech = __gss_get_mechanism(mech_type);
+    mech = gssint_get_mechanism(mech_type);
     if (!mech)
        return (GSS_S_BAD_MECH);
 
@@ -343,7 +343,7 @@ OM_uint32 __gss_export_internal_name(minor_status, mech_type,
        return (status);
 
     /* determine the size of the buffer needed */
-    mechOidDERLen = der_length_size(mech_type->length);
+    mechOidDERLen = gssint_der_length_size(mech_type->length);
     name_buf->length = tokIdLen + mechOidLenLen +
        mechOidTagLen + mechOidDERLen +
        mech_type->length +
@@ -371,7 +371,7 @@ OM_uint32 __gss_export_internal_name(minor_status, mech_type,
      * mech OID value
      */
     *buf++ = 0x06;
-    if (put_der_length(mech_type->length, &buf,
+    if (gssint_put_der_length(mech_type->length, &buf,
                       (name_buf->length - tokIdLen -2)) != 0) {
        name_buf->length = 0;
        free(name_buf->value);
@@ -394,9 +394,9 @@ OM_uint32 __gss_export_internal_name(minor_status, mech_type,
     /* release the buffer obtained from gss_display_name */
     (void) gss_release_buffer(minor_status, &dispName);
     return (GSS_S_COMPLETE);
-} /*  __gss_export_internal_name */
+} /*  gssint_export_internal_name */
 
-OM_uint32 __gss_display_internal_name (minor_status, mech_type, internal_name, 
+OM_uint32 gssint_display_internal_name (minor_status, mech_type, internal_name, 
                                 external_name, name_type)
 OM_uint32      *minor_status;
 gss_OID                mech_type;
@@ -407,7 +407,7 @@ gss_OID             *name_type;
     OM_uint32          status;
     gss_mechanism      mech;
 
-    mech = __gss_get_mechanism (mech_type);
+    mech = gssint_get_mechanism (mech_type);
     if (mech) {
        if (mech->gss_display_name)
            status = mech->gss_display_name (
@@ -425,7 +425,7 @@ gss_OID             *name_type;
     return (GSS_S_BAD_MECH);
 }
 
-OM_uint32 __gss_release_internal_name (minor_status, mech_type, internal_name)
+OM_uint32 gssint_release_internal_name (minor_status, mech_type, internal_name)
 OM_uint32      *minor_status;
 gss_OID                mech_type;
 gss_name_t     *internal_name;
@@ -433,7 +433,7 @@ gss_name_t  *internal_name;
     OM_uint32          status;
     gss_mechanism      mech;
 
-    mech = __gss_get_mechanism (mech_type);
+    mech = gssint_get_mechanism (mech_type);
     if (mech) {
        if (mech->gss_release_name)
            status = mech->gss_release_name (
@@ -455,7 +455,7 @@ gss_name_t  *internal_name;
  * name.  Note that internal_name should be considered "consumed" by
  * this call, whether or not we return an error.
  */
-OM_uint32 __gss_convert_name_to_union_name(minor_status, mech,
+OM_uint32 gssint_convert_name_to_union_name(minor_status, mech,
                                           internal_name, external_name)
     OM_uint32 *minor_status;
     gss_mechanism      mech;
@@ -513,7 +513,7 @@ allocation_failure:
      * internal_name, we must clean it up
      */
     if (internal_name)
-       (void) __gss_release_internal_name(&tmp, &mech->mech_type,
+       (void) gssint_release_internal_name(&tmp, &mech->mech_type,
                                           &internal_name);
     return (major_status);
 }
@@ -523,7 +523,7 @@ allocation_failure:
  * external union credential.
  */
 gss_cred_id_t
-__gss_get_mechanism_cred(union_cred, mech_type)
+gssint_get_mechanism_cred(union_cred, mech_type)
     gss_union_cred_t   union_cred;
     gss_OID            mech_type;
 {
@@ -544,7 +544,7 @@ __gss_get_mechanism_cred(union_cred, mech_type)
  * Both space for the structure and the data is allocated.
  */
 OM_uint32
-__gss_create_copy_buffer(srcBuf, destBuf, addNullChar)
+gssint_create_copy_buffer(srcBuf, destBuf, addNullChar)
     const gss_buffer_t srcBuf;
     gss_buffer_t               *destBuf;
     int                        addNullChar;
@@ -581,4 +581,4 @@ __gss_create_copy_buffer(srcBuf, destBuf, addNullChar)
        ((char *)aBuf->value)[aBuf->length] = '\0';
 
     return (GSS_S_COMPLETE);
-} /* ****** __gss_create_copy_buffer  ****** */
+} /* ****** gssint_create_copy_buffer  ****** */
index e68b3e24ef25e38de68082a6c2867a86711e61a7..b1a64fd2d34eefdb3aba8a181eb8bc3448c60a13 100644 (file)
@@ -90,7 +90,7 @@ gss_name_t *          output_name;
      * rule is when the name of GSS_C_NT_EXPORT_NAME type.  If that is
      * the case, then we make it MN in this call.
      */
-    major_status = __gss_create_copy_buffer(input_name_buffer,
+    major_status = gssint_create_copy_buffer(input_name_buffer,
                                            &union_name->external_name, 0);
     if (major_status != GSS_S_COMPLETE) {
        free(union_name);
@@ -134,7 +134,7 @@ allocation_failure:
        if (union_name->name_type)
            generic_gss_release_oid(&tmp, &union_name->name_type);
        if (union_name->mech_name)
-           __gss_release_internal_name(minor_status, union_name->mech_type,
+           gssint_release_internal_name(minor_status, union_name->mech_type,
                                        &union_name->mech_name);
        if (union_name->mech_type)
            generic_gss_release_oid(&tmp, &union_name->mech_type);
@@ -197,7 +197,7 @@ importExportName(minor, unionName)
      * We verify both lengths.
      */
 
-    mechOid.length = get_der_length(&buf,
+    mechOid.length = gssint_get_der_length(&buf,
                                    (expName.length - curLength), &bytes);
     mechOid.elements = (void *)buf;
 
@@ -209,7 +209,7 @@ importExportName(minor, unionName)
        return (GSS_S_DEFECTIVE_TOKEN);
 
     buf += mechOid.length;
-    if ((mech = __gss_get_mechanism(&mechOid)) == NULL)
+    if ((mech = gssint_get_mechanism(&mechOid)) == NULL)
        return (GSS_S_BAD_MECH);
 
     if (mech->gss_import_name == NULL)
@@ -236,13 +236,13 @@ importExportName(minor, unionName)
      * we must have exported the name - so we now need to reconstruct it
      * and call the mechanism to create it
      *
-     * WARNING:        Older versions of __gss_export_internal_name() did
+     * WARNING:        Older versions of gssint_export_internal_name() did
      *         not export names correctly, but now it does.  In
      *         order to stay compatible with existing exported
      *         names we must support names exported the broken
      *         way.
      *
-     * Specifically, __gss_export_internal_name() used to include
+     * Specifically, gssint_export_internal_name() used to include
      * the name type OID in the encoding of the exported MN.
      * Additionally, the Kerberos V mech used to make display names
      * that included a null terminator which was counted in the
index fd3a3af4348e583591093d9a3f2a653be1da9dd2..533b0175c0f66a43be9621aa6b1cf268d63c1ca5 100644 (file)
@@ -104,7 +104,7 @@ gss_ctx_id_t *              context_handle;
      * call it.
      */
     
-    mech = __gss_get_mechanism (ctx->mech_type);
+    mech = gssint_get_mechanism (ctx->mech_type);
     if (!mech) {
        status = GSS_S_BAD_MECH;
        goto error_out;
index 334f7c1b940acb5b7a5125b7f0e26e53f588db29..e2c8d414fea16668df77755517af99fe86d36018 100644 (file)
@@ -33,7 +33,7 @@
 #endif
 #include <string.h>
 
-extern gss_mechanism *__gss_mechs_array;
+extern gss_mechanism *gssint_mechs_array;
 
 static gss_OID_set_desc        supported_mechs_desc; 
 static gss_OID_set supported_mechs = NULL;
@@ -65,7 +65,7 @@ gss_OID_set *         mech_set;
 
        /* Build the mech_set from the OIDs in mechs_array. */
 
-       for(i=0; __gss_mechs_array[i]->mech_type.length != 0; i++) 
+       for(i=0; gssint_mechs_array[i]->mech_type.length != 0; i++) 
            supported_mechs->count++;
 
        supported_mechs->elements =
@@ -74,12 +74,12 @@ gss_OID_set *               mech_set;
 
        for(i=0; i < supported_mechs->count; i++) {
            supported_mechs->elements[i].length =
-               __gss_mechs_array[i]->mech_type.length;
+               gssint_mechs_array[i]->mech_type.length;
            supported_mechs->elements[i].elements = (void *)
-               malloc(__gss_mechs_array[i]->mech_type.length);
+               malloc(gssint_mechs_array[i]->mech_type.length);
            memcpy(supported_mechs->elements[i].elements,
-                  __gss_mechs_array[i]->mech_type.elements,
-                  __gss_mechs_array[i]->mech_type.length);
+                  gssint_mechs_array[i]->mech_type.elements,
+                  gssint_mechs_array[i]->mech_type.length);
        }
     }
     
index 78e0553d8afc574327e8820e4de34640d57281b1..1824b634979eb90c79465a6d9590d92e82051ad7 100644 (file)
@@ -105,7 +105,7 @@ OM_uint32 *         time_rec;
      * mechanism.  If mech_type is NULL, set it to the resultant
      * mechanism
      */
-    mech = __gss_get_mechanism (mech_type);
+    mech = gssint_get_mechanism (mech_type);
     if (mech == NULL)
        return (GSS_S_BAD_MECH);
 
@@ -124,7 +124,7 @@ OM_uint32 *         time_rec;
        g_OID_equal(union_name->mech_type, mech_type)) {
        internal_name = union_name->mech_name;
     } else {
-       if ((status = __gss_import_internal_name(minor_status, mech_type,
+       if ((status = gssint_import_internal_name(minor_status, mech_type,
                                                 union_name,
                                                 &internal_name)) != GSS_S_COMPLETE)
            return (status);
@@ -164,7 +164,7 @@ OM_uint32 *         time_rec;
      * use the default credential.
      */
     union_cred = (gss_union_cred_t) claimant_cred_handle;
-    input_cred_handle = __gss_get_mechanism_cred(union_cred, mech_type);
+    input_cred_handle = gssint_get_mechanism_cred(union_cred, mech_type);
     
     /*
      * now call the approprate underlying mechanism routine 
@@ -204,7 +204,7 @@ OM_uint32 *         time_rec;
 end:
     if (union_name->mech_name == NULL ||
        union_name->mech_name != internal_name) {
-       (void) __gss_release_internal_name(&temp_minor_status,
+       (void) gssint_release_internal_name(&temp_minor_status,
                                           mech_type, &internal_name);
     }
 
index 41bbb78aca9e360a01f72eb57184b3d0a57783df..e3984221b736a96b2f141526d9b89f6a531e4bdc 100644 (file)
@@ -63,7 +63,7 @@ static int _gss_initialized = 0;
 static struct gss_config null_mech = {
   {0,NULL}};
 
-gss_mechanism *__gss_mechs_array = NULL;
+gss_mechanism *gssint_mechs_array = NULL;
 
 /* Local functions */
 static gss_mech_info searchMechList(const gss_OID);
@@ -198,7 +198,7 @@ gss_OID_set *mechSet;
                 * this checks for the case when we need to re-construct the
                 * g_mechSet structure, but the mechanism list is upto date
                 * (because it has been read by someone calling
-                * __gss_get_mechanism)
+                * gssint_get_mechanism)
                 */
                if (fileInfo.st_mtime > g_confFileModTime)
                {
@@ -343,7 +343,7 @@ gss_OID_set *mechSet;
  * caller is responsible for freeing the memory
  */
 char *
-__gss_get_modOptions(oid)
+gssint_get_modOptions(oid)
 const gss_OID oid;
 {
        gss_mech_info aMech;
@@ -370,13 +370,13 @@ const gss_OID oid;
        (void) k5_mutex_unlock(&g_mechListLock);
 
        return (modOptions);
-} /* __gss_get_modOptions */
+} /* gssint_get_modOptions */
 
 /*
  * given a mechanism string return the mechanism oid
  */
 OM_uint32
-__gss_mech_to_oid(const char *mechStr, gss_OID* oid)
+gssint_mech_to_oid(const char *mechStr, gss_OID* oid)
 {
        gss_mech_info aMech;
 
@@ -406,7 +406,7 @@ __gss_mech_to_oid(const char *mechStr, gss_OID* oid)
                aMech = aMech->next;
        }
        return (GSS_S_FAILURE);
-} /* __gss_mech_to_oid */
+} /* gssint_mech_to_oid */
 
 
 /*
@@ -415,7 +415,7 @@ __gss_mech_to_oid(const char *mechStr, gss_OID* oid)
  * (/etc/gss/mech).
  */
 const char *
-__gss_oid_to_mech(const gss_OID oid)
+gssint_oid_to_mech(const gss_OID oid)
 {
        gss_mech_info aMech;
 
@@ -431,7 +431,7 @@ __gss_oid_to_mech(const gss_OID oid)
                return (NULL);
 
        return (aMech->mechNameStr);
-} /* __gss_oid_to_mech */
+} /* gssint_oid_to_mech */
 
 
 /*
@@ -439,7 +439,7 @@ __gss_oid_to_mech(const gss_OID oid)
  * upon return the array is terminated with a NULL entry
  */
 OM_uint32
-__gss_get_mechanisms(char *mechArray[], int arrayLen)
+gssint_get_mechanisms(char *mechArray[], int arrayLen)
 {
        gss_mech_info aMech;
        int i;
@@ -522,7 +522,7 @@ init_hardcoded(void)
  * module if it has not been already loaded.
  */
 gss_mechanism
-__gss_get_mechanism(oid)
+gssint_get_mechanism(oid)
 const gss_OID oid;
 {
        gss_mech_info aMech;
@@ -596,10 +596,10 @@ const gss_OID oid;
 
        (void) k5_mutex_unlock(&g_mechListLock);
        return (aMech->mech);
-} /* __gss_get_mechanism */
+} /* gssint_get_mechanism */
 
 gss_mechanism_ext
-__gss_get_mechanism_ext(oid)
+gssint_get_mechanism_ext(oid)
 const gss_OID oid;
 {
        gss_mech_info aMech;
@@ -609,7 +609,7 @@ const gss_OID oid;
        if ((aMech = searchMechList(oid)) != NULL && aMech->mech_ext != NULL)
                return (aMech->mech_ext);
 
-       if (__gss_get_mechanism(oid) == NULL)
+       if (gssint_get_mechanism(oid) == NULL)
                return (NULL);
 
        if (aMech->dl_handle == NULL)
@@ -648,7 +648,7 @@ const gss_OID oid;
 
        return (aMech->mech_ext);
 
-} /* __gss_get_mechanism_ext */
+} /* gssint_get_mechanism_ext */
 
 
 /*
index ec1ace62be14b52941ec951f7a325b64286b1fc7..e717aa3473b5c93fcb0c6469c482b8a9a9992c6f 100644 (file)
@@ -86,7 +86,7 @@ int *         open;
      */
     
     ctx = (gss_union_ctx_id_t) context_handle;
-    mech = __gss_get_mechanism (ctx->mech_type);
+    mech = gssint_get_mechanism (ctx->mech_type);
     
     if (!mech || !mech->gss_inquire_context || !mech->gss_display_name ||
        !mech->gss_release_name) {
@@ -112,7 +112,7 @@ int *               open;
     /* need to convert names */
 
     if (src_name) {
-           status = __gss_convert_name_to_union_name(minor_status, mech,
+           status = gssint_convert_name_to_union_name(minor_status, mech,
                                                      localSourceName, src_name);
 
            if (status != GSS_S_COMPLETE) {
@@ -125,7 +125,7 @@ int *               open;
     }
 
     if (targ_name) {
-           status = __gss_convert_name_to_union_name(minor_status, mech,
+           status = gssint_convert_name_to_union_name(minor_status, mech,
                                                      localTargName, targ_name);
 
            if (status != GSS_S_COMPLETE) {
index 812fd9dab5e343c1ee5af9ff0b3bfca3358b6c95..3afbd94d8807dd5f6455c37e7f728bf8b0ed6347 100644 (file)
@@ -76,7 +76,7 @@ gss_OID_set *         mechanisms;
         * array, which becomes the default mechanism.
         */
 
-       if ((mech = __gss_get_mechanism(GSS_C_NULL_OID)) == NULL)
+       if ((mech = gssint_get_mechanism(GSS_C_NULL_OID)) == NULL)
            return (GSS_S_DEFECTIVE_CREDENTIAL);
 
        if (!mech->gss_inquire_cred)
@@ -94,7 +94,7 @@ gss_OID_set *         mechanisms;
            /*
             * Convert internal_name into a union_name equivalent.
             */
-           status = __gss_convert_name_to_union_name(&temp_minor_status,
+           status = gssint_convert_name_to_union_name(&temp_minor_status,
                                                      mech, internal_name,
                                                      name);
            if (status != GSS_S_COMPLETE) {
@@ -217,14 +217,14 @@ gss_inquire_cred_by_mech(minor_status, cred_handle, mech_type, name,
     gss_name_t         internal_name;
 
 
-    mech = __gss_get_mechanism (mech_type);
+    mech = gssint_get_mechanism (mech_type);
     if (!mech)
        return (GSS_S_BAD_MECH);
     if (!mech->gss_inquire_cred_by_mech)
        return (GSS_S_BAD_BINDINGS);
      
     union_cred = (gss_union_cred_t) cred_handle;
-    mech_cred = __gss_get_mechanism_cred(union_cred, mech_type);
+    mech_cred = gssint_get_mechanism_cred(union_cred, mech_type);
     if (mech_cred == NULL)
        return (GSS_S_DEFECTIVE_CREDENTIAL);
 
@@ -241,7 +241,7 @@ gss_inquire_cred_by_mech(minor_status, cred_handle, mech_type, name,
        /*
         * Convert internal_name into a union_name equivalent.
         */
-       status = __gss_convert_name_to_union_name(
+       status = gssint_convert_name_to_union_name(
            &temp_minor_status, mech,
            internal_name, name);
        if (status != GSS_S_COMPLETE) {
index b1592bd4494e22ef8d04da74a00a549f6cb1841c..a6e214f250cc579c62f1a451f19cbc7b03649bcb 100644 (file)
@@ -54,7 +54,7 @@ gss_OID_set * name_types;
      * call it.
      */
     
-    mech = __gss_get_mechanism (mechanism);
+    mech = gssint_get_mechanism (mechanism);
     
     if (mech) {
 
@@ -101,12 +101,12 @@ gss_inquire_mechs_for_name(minor_status, input_name, mech_set)
     if (status != GSS_S_COMPLETE)
        return (status);
     *mech_list = NULL;
-    status = __gss_get_mechanisms(mech_list, MAX_MECH_OID_PAIRS+1);
+    status = gssint_get_mechanisms(mech_list, MAX_MECH_OID_PAIRS+1);
     if (status != GSS_S_COMPLETE)
        return (status);
     for (i = 0; i < MAX_MECH_OID_PAIRS && mech_list[i] != NULL; i++) {
        mechanism = mech_list[i];
-       if (__gss_mech_to_oid(mechanism, &mechOid) == GSS_S_COMPLETE) {
+       if (gssint_mech_to_oid(mechanism, &mechOid) == GSS_S_COMPLETE) {
            status = gss_inquire_names_for_mech(
                minor_status,
                mechOid,
index a036d87630448b99dfd837746378568c3cfd2487..86e57972d2a6f810265df9d5e86c41ae9c42c29a 100644 (file)
@@ -33,7 +33,7 @@
 #include "mglueP.h"
 /* should include to get protos #include "../generic/gssapiP_generic.h" */
 
-extern gss_mechanism *__gss_mechs_array;
+extern gss_mechanism *gssint_mechs_array;
 
 /*
  * gss_release_oid has been moved to g_initialize, becasue it requires access
index 83687df3e5826026e3ad95ace529a9e129392f5c..beb65a141dc1cdc5b3838530405910b3e67c97de 100644 (file)
@@ -58,7 +58,7 @@ gss_buffer_t          token_buffer;
      */
     
     ctx = (gss_union_ctx_id_t) context_handle;
-    mech = __gss_get_mechanism (ctx->mech_type);
+    mech = gssint_get_mechanism (ctx->mech_type);
 
     if (mech) {
 
index e289f591c158c1a1ce52cdc17fde0a4c53faea64..ffcce2d7e1a74144fe8db2e35eded720c2f273df 100644 (file)
@@ -69,7 +69,7 @@ gss_cred_id_t *               cred_handle;
     
     for(j=0; j < union_cred->count; j++) {
 
-       mech = __gss_get_mechanism (&union_cred->mechs_array[j]);
+       mech = gssint_get_mechanism (&union_cred->mechs_array[j]);
 
        if (union_cred->mechs_array[j].elements)
                free(union_cred->mechs_array[j].elements);
index ffa678c2624ffd32d9701b477a99f91b526bfa8a..ff3c4a10a60cc8ed9221ce52bd551da5186a7dbd 100644 (file)
@@ -70,7 +70,7 @@ gss_name_t *          input_name;
     free(union_name->external_name);
 
     if (union_name->mech_type) {
-           __gss_release_internal_name(minor_status, union_name->mech_type,
+           gssint_release_internal_name(minor_status, union_name->mech_type,
                                        &union_name->mech_name);
            gss_release_oid(minor_status, &union_name->mech_type);
     }
index c68a6b0312ae691ab0cfb3f9b453f43418d1ffca..2bc809621354b7a6d7828f0620b0c9212de10285 100644 (file)
@@ -70,7 +70,7 @@ gss_buffer_t          output_message_buffer;
      */
     
     ctx = (gss_union_ctx_id_t) context_handle;
-    mech = __gss_get_mechanism (ctx->mech_type);
+    mech = gssint_get_mechanism (ctx->mech_type);
     
     if (mech) {
        if (mech->gss_seal)
@@ -149,7 +149,7 @@ gss_wrap_size_limit(minor_status, context_handle, conf_req_flag,
      */
     
     ctx = (gss_union_ctx_id_t) context_handle;
-    mech = __gss_get_mechanism (ctx->mech_type);
+    mech = gssint_get_mechanism (ctx->mech_type);
 
     if (!mech)
        return (GSS_S_BAD_MECH);
index f1f883f52fb7e54ef8b29ef5834ff03dff48d393..72e0ce742c77951d7ecf8e7dbd3584d4c83eb920 100644 (file)
@@ -67,7 +67,7 @@ gss_buffer_t          msg_token;
      */
 
     ctx = (gss_union_ctx_id_t) context_handle;
-    mech = __gss_get_mechanism (ctx->mech_type);
+    mech = gssint_get_mechanism (ctx->mech_type);
 
     if (mech) {
        if (mech->gss_sign)
index 7ccbfcd7e036d65301b10576fe29d93f4fdf027c..92581be851e42cb7932c22f9c1b1c2eaef853164 100644 (file)
@@ -55,14 +55,14 @@ gss_cred_usage_t    *cred_usage_stored;
 
        /* desired_mech != GSS_C_NULL_OID -> store one element */
        if (desired_mech != GSS_C_NULL_OID) {
-               mech = __gss_get_mechanism(desired_mech);
+               mech = gssint_get_mechanism(desired_mech);
                if (mech == NULL)
                        return (GSS_S_BAD_MECH);
 
                if (mech->gss_store_cred == NULL)
                        return (major_status);
 
-               mech_cred = __gss_get_mechanism_cred(union_cred, desired_mech);
+               mech_cred = gssint_get_mechanism_cred(union_cred, desired_mech);
                if (mech_cred == GSS_C_NO_CREDENTIAL)
                        return (GSS_S_NO_CRED);
 
@@ -84,14 +84,14 @@ gss_cred_usage_t    *cred_usage_stored;
        for (i = 0; i < union_cred->count; i++) {
                /* Get mech and cred element */
                dmech = &union_cred->mechs_array[i];
-               mech = __gss_get_mechanism(dmech);
+               mech = gssint_get_mechanism(dmech);
                if (mech == NULL)
                        continue;
 
                if (mech->gss_store_cred == NULL)
                        continue;
 
-               mech_cred = __gss_get_mechanism_cred(union_cred, dmech);
+               mech_cred = gssint_get_mechanism_cred(union_cred, dmech);
                if (mech_cred == GSS_C_NO_CREDENTIAL)
                        continue; /* can't happen, but safe to ignore */
 
index 8e975827f6824bb2adbb2113c64ed6cb5c0b55b6..c70c59beb0f14a9ade48ed37be449654e6b9bacd 100644 (file)
@@ -71,7 +71,7 @@ int *                 qop_state;
      */
 
     ctx = (gss_union_ctx_id_t) context_handle;
-    mech = __gss_get_mechanism (ctx->mech_type);
+    mech = gssint_get_mechanism (ctx->mech_type);
 
     if (mech) {
        if (mech->gss_unseal) 
index eaf376ea87b108ef58d15ff0b078843f97f2f9a8..ecd822430759ed4b63ccc76aa053eeaabf41d69a 100644 (file)
@@ -69,7 +69,7 @@ out:
 
 
 OM_uint32
-__gss_userok(OM_uint32 *minor,
+gssint_userok(OM_uint32 *minor,
            const gss_name_t name,
            const char *user,
            int *user_ok)
@@ -91,7 +91,7 @@ __gss_userok(OM_uint32 *minor,
 
        intName = (gss_union_name_t)name;
 
-       mech = __gss_get_mechanism(intName->mech_type);
+       mech = gssint_get_mechanism(intName->mech_type);
        if (mech == NULL)
                return (GSS_S_UNAVAILABLE);
 
@@ -101,8 +101,8 @@ __gss_userok(OM_uint32 *minor,
        } else
                mechName = intName->mech_name;
 
-       if (mech->__gss_userok)
-               major = mech->__gss_userok(mech->context,  minor, mechName,
+       if (mech->gssint_userok)
+               major = mech->gssint_userok(mech->context,  minor, mechName,
                                user, user_ok);
        else
                major = compare_names(minor, intName->mech_type,
index 875e159f7fcab871f1fabe7cd312b9ae1155c828..b26335382548918bd56a15e6d0edf589378e27bf 100644 (file)
@@ -24,7 +24,7 @@ static const char    QOP_NUM_FILE[] = "/etc/gss/qop";
 static qop_num qop_num_pairs[MAX_QOP_NUM_PAIRS+1];
 static mutex_t qopfile_lock = DEFAULTMUTEX;
 
-static OM_uint32 __gss_read_qop_file(void);
+static OM_uint32 gssint_read_qop_file(void);
 
 /*
  * This routine fetches qop and num from "/etc/gss/qop".
@@ -35,7 +35,7 @@ static OM_uint32 __gss_read_qop_file(void);
  * we don't expect the qop file to be changed and reread often.
  */
 static OM_uint32
-__gss_read_qop_file(void)
+gssint_read_qop_file(void)
 {
        char    buf[BUFLEN];    /* one line from the file */
        char    *name, *next;
@@ -141,7 +141,7 @@ done:
 }
 
 OM_uint32
-__gss_qop_to_num(
+gssint_qop_to_num(
        char            *qop,
        char            *mech,
        OM_uint32       *num
@@ -159,7 +159,7 @@ __gss_qop_to_num(
                return (GSS_S_COMPLETE);
        }
 
-       if ((major = __gss_read_qop_file()) != GSS_S_COMPLETE)
+       if ((major = gssint_read_qop_file()) != GSS_S_COMPLETE)
                return (major);
 
        for (i = 0; i < qop_num_pair_cnt; i++) {
@@ -174,7 +174,7 @@ __gss_qop_to_num(
 }
 
 OM_uint32
-__gss_num_to_qop(
+gssint_num_to_qop(
        char            *mech,
        OM_uint32       num,
        char            **qop
@@ -195,7 +195,7 @@ __gss_num_to_qop(
        if (mech == NULL)
                return (GSS_S_CALL_INACCESSIBLE_READ);
 
-       if ((major = __gss_read_qop_file()) != GSS_S_COMPLETE)
+       if ((major = gssint_read_qop_file()) != GSS_S_COMPLETE)
                return (major);
 
        for (i = 0; i < qop_num_pair_cnt; i++) {
@@ -213,7 +213,7 @@ __gss_num_to_qop(
  * of size MAX_QOPS_PER_MECH+1.
  */
 OM_uint32
-__gss_get_mech_info(
+gssint_get_mech_info(
        char            *mech,
        char            **qops
 )
@@ -228,7 +228,7 @@ __gss_get_mech_info(
        if (!mech)
                return (GSS_S_CALL_INACCESSIBLE_READ);
 
-       if ((major = __gss_read_qop_file()) != GSS_S_COMPLETE)
+       if ((major = gssint_read_qop_file()) != GSS_S_COMPLETE)
                return (major);
 
        for (i = 0; i < qop_num_pair_cnt; i++) {
@@ -248,7 +248,7 @@ __gss_get_mech_info(
  * buffer of size MAX_QOPS_PER_MECH provided by the caller.
  */
 OM_uint32
-__gss_mech_qops(
+gssint_mech_qops(
        char *mech,
        qop_num *mechqops,
        int *numqop
@@ -265,7 +265,7 @@ __gss_mech_qops(
        if (!mech)
                return (GSS_S_CALL_INACCESSIBLE_READ);
 
-       if ((major = __gss_read_qop_file()) != GSS_S_COMPLETE)
+       if ((major = gssint_read_qop_file()) != GSS_S_COMPLETE)
                return (major);
 
        for (i = 0; i < qop_num_pair_cnt; i++) {
index 4f24155660cba0c5582884a5f20fc3c6faa61b95..e6a01282ab4fd707d150b5f38637be27f64f3021 100644 (file)
@@ -63,7 +63,7 @@ int *                 qop_state;
      */
 
     ctx = (gss_union_ctx_id_t) context_handle;
-    mech = __gss_get_mechanism (ctx->mech_type);
+    mech = gssint_get_mechanism (ctx->mech_type);
 
     if (mech) {
        if (mech->gss_verify)
index 036ae904f1be11e78d9bf58215365edc2bb5679c..f15b16c5db17cdc797ea31bd796e3bc6e6b63da5 100644 (file)
@@ -47,7 +47,7 @@ uid_t * uid;
      * call it.
      */
 
-    mech = __gss_get_mechanism (mech_type);
+    mech = gssint_get_mechanism (mech_type);
 
     if (mech) {
        if (mech_type == GSS_C_NULL_OID)
index 20f5ea655a1033efe0424372db768cd0a14495bc..704c22d5041c20cf053ef20f9af0293bd5eff5fd 100644 (file)
@@ -360,7 +360,7 @@ typedef struct gss_config {
                    gss_OID,            /* mech type */
                    uid_t *             /* uid */
                    );
-       OM_uint32               (*__gss_userok)
+       OM_uint32               (*gssint_userok)
        (
                    void *,             /* context */
                    OM_uint32 *,        /* minor_status */
@@ -419,31 +419,31 @@ typedef struct gss_mech_config {
 int gssint_mechglue_init(void);
 void gssint_mechglue_fini(void);
 
-gss_mechanism __gss_get_mechanism (gss_OID);
-gss_mechanism_ext __gss_get_mechanism_ext(const gss_OID);
-OM_uint32 __gss_get_mech_type (gss_OID, gss_buffer_t);
-char *__gss_get_kmodName(const gss_OID);
-char *__gss_get_modOptions(const gss_OID);
-OM_uint32 __gss_import_internal_name (OM_uint32 *, gss_OID, gss_union_name_t,
+gss_mechanism gssint_get_mechanism (gss_OID);
+gss_mechanism_ext gssint_get_mechanism_ext(const gss_OID);
+OM_uint32 gssint_get_mech_type (gss_OID, gss_buffer_t);
+char *gssint_get_kmodName(const gss_OID);
+char *gssint_get_modOptions(const gss_OID);
+OM_uint32 gssint_import_internal_name (OM_uint32 *, gss_OID, gss_union_name_t,
                                      gss_name_t *);
-OM_uint32 __gss_export_internal_name(OM_uint32 *, const gss_OID,
+OM_uint32 gssint_export_internal_name(OM_uint32 *, const gss_OID,
        const gss_name_t, gss_buffer_t);
-OM_uint32 __gss_display_internal_name (OM_uint32 *, gss_OID, gss_name_t,
+OM_uint32 gssint_display_internal_name (OM_uint32 *, gss_OID, gss_name_t,
                                       gss_buffer_t, gss_OID *);
-OM_uint32 __gss_release_internal_name (OM_uint32 *, gss_OID, gss_name_t *);
+OM_uint32 gssint_release_internal_name (OM_uint32 *, gss_OID, gss_name_t *);
 
-OM_uint32 __gss_convert_name_to_union_name
+OM_uint32 gssint_convert_name_to_union_name
          (OM_uint32 *,         /* minor_status */
           gss_mechanism,       /* mech */
           gss_name_t,          /* internal_name */
           gss_name_t *         /* external_name */
           );
-gss_cred_id_t __gss_get_mechanism_cred
+gss_cred_id_t gssint_get_mechanism_cred
          (gss_union_cred_t,    /* union_cred */
           gss_OID              /* mech_type */
           );
 
-OM_uint32 __gss_create_copy_buffer(
+OM_uint32 gssint_create_copy_buffer(
        const gss_buffer_t,     /* src buffer */
        gss_buffer_t *,         /* destination buffer */
        int                     /* NULL terminate buffer ? */
@@ -509,24 +509,24 @@ OM_uint32 gss_add_mech_name_type
  */
 
 OM_uint32
-__gss_mech_to_oid(
+gssint_mech_to_oid(
        const char *mech,               /* mechanism string name */
        gss_OID *oid                    /* mechanism oid */
 );
 
 const char *
-__gss_oid_to_mech(
+gssint_oid_to_mech(
        const gss_OID oid               /* mechanism oid */
 );
 
 OM_uint32
-__gss_get_mechanisms(
+gssint_get_mechanisms(
        char *mechArray[],              /* array to populate with mechs */
        int arrayLen                    /* length of passed in array */
 );
 
 OM_uint32
-__gss_userok(
+gssint_userok(
        OM_uint32 *,            /* minor */
        const gss_name_t,       /* name */
        const char *,           /* user */
@@ -546,17 +546,17 @@ gss_store_cred(
 );
 
 int
-get_der_length(
+gssint_get_der_length(
        unsigned char **,       /* buf */
        unsigned int,           /* buf_len */
        unsigned int *          /* bytes */
 );
 
 unsigned int
-der_length_size(unsigned int /* len */);
+gssint_der_length_size(unsigned int /* len */);
 
 int
-put_der_length(
+gssint_put_der_length(
        unsigned int,           /* length */
        unsigned char **,       /* buf */
        unsigned int            /* max_len */
diff --git a/src/lib/gssapi/spnego/ChangeLog b/src/lib/gssapi/spnego/ChangeLog
new file mode 100644 (file)
index 0000000..25da0b2
--- /dev/null
@@ -0,0 +1,4 @@
+2006-03-10  Tom Yu  <tlyu@mit.edu>
+
+       * gssapiP_spnego.h, spnego_mech.c: Rename symbols for namespace
+       purity.
index 0f165ee5efb8ee0e5d867d1586b939d95c88c1aa..17433312f661ed31f1b5c3683e50699954a05ce2 100644 (file)
 
 #include       <stdio.h>
 #include       <stdlib.h>
+#include       <krb5.h>
 #include       "gssapiP_spnego.h"
 #include       <mglueP.h>
 #include       <gssapi_err_generic.h>
-#include       <rpc/types.h>
-#include       <libintl.h>
 
 /* der routines defined in libgss */
-extern unsigned int der_length_size(OM_uint32);
-extern int get_der_length(uchar_t **, OM_uint32, OM_uint32*);
-extern int put_der_length(OM_uint32, uchar_t **, OM_uint32);
+extern unsigned int gssint_der_length_size(OM_uint32);
+extern int gssint_get_der_length(uchar_t **, OM_uint32, OM_uint32*);
+extern int gssint_put_der_length(OM_uint32, uchar_t **, OM_uint32);
 
 
 /* private routines for spnego_mechanism */
@@ -49,7 +48,7 @@ static int put_negResult(uchar_t **, OM_uint32, int);
 
 static gss_OID
 negotiate_mech_type(OM_uint32 *, gss_OID_set, gss_OID_set,
-               OM_uint32 *, bool_t *);
+               OM_uint32 *, krb5_boolean *);
 static int
 g_get_tag_and_length(unsigned char **, uchar_t, int, int *);
 
@@ -99,7 +98,7 @@ static struct gss_config spnego_mechanism =
        NULL,                           /* gss_internal_release_oid */
        spnego_gss_wrap_size_limit,     /* gss_wrap_size_limit */
        NULL,                           /* gss_pname_to_uid */
-       NULL,                           /* __gss_userok */
+       NULL,                           /* gssint_userok */
        NULL,                           /* gss_export_name */
 /* EXPORT DELETE START */
 /* CRYPT DELETE START */
@@ -212,7 +211,7 @@ spnego_gss_release_cred(void *ctx,
 static void
 check_spnego_options(spnego_gss_ctx_id_t spnego_ctx)
 {
-       spnego_ctx->optionStr = __gss_get_modOptions(
+       spnego_ctx->optionStr = gssint_get_modOptions(
                (const gss_OID)&spnego_oids[0]);
        if (spnego_ctx->optionStr != NULL &&
                strstr(spnego_ctx->optionStr, "msinterop")) {
@@ -700,8 +699,8 @@ spnego_gss_accept_sec_context(void *ct,
        OM_uint32 mechsetlen;
        gss_qop_t qop_state;
        send_token_flag return_token =  NO_TOKEN_SEND;
-       bool_t firstMech;
-       bool_t Need_Cred = FALSE;
+       krb5_boolean firstMech;
+       krb5_boolean Need_Cred = FALSE;
        OM_uint32 local_ret_flags = 0;
        uchar_t *buf, *tmp;
 
@@ -1112,23 +1111,23 @@ spnego_gss_display_status(void *ctx,
        switch (status_value) {
            case ERR_SPNEGO_NO_MECHS_AVAILABLE:
                /* CSTYLED */
-               *status_string = make_err_msg(gettext("SPNEGO cannot find mechanisms to negotiate"));
+               *status_string = make_err_msg("SPNEGO cannot find mechanisms to negotiate");
                break;
            case ERR_SPNEGO_NO_CREDS_ACQUIRED:
                /* CSTYLED */
-               *status_string = make_err_msg(gettext("SPNEGO failed to acquire creds"));
+               *status_string = make_err_msg("SPNEGO failed to acquire creds");
                break;
            case ERR_SPNEGO_NO_MECH_FROM_ACCEPTOR:
                /* CSTYLED */
-               *status_string = make_err_msg(gettext("SPNEGO acceptor did not select a mechanism"));
+               *status_string = make_err_msg("SPNEGO acceptor did not select a mechanism");
                break;
            case ERR_SPNEGO_NEGOTIATION_FAILED:
                /* CSTYLED */
-               *status_string = make_err_msg(gettext("SPNEGO failed to negotiate a mechanism"));
+               *status_string = make_err_msg("SPNEGO failed to negotiate a mechanism");
                break;
            case ERR_SPNEGO_NO_TOKEN_FROM_ACCEPTOR:
                /* CSTYLED */
-               *status_string = make_err_msg(gettext("SPNEGO acceptor did not return a valid token"));
+               *status_string = make_err_msg("SPNEGO acceptor did not return a valid token");
                break;
            default:
                status_string->length = 0;
@@ -1627,7 +1626,7 @@ get_input_token(unsigned char **buff_in, int buff_length)
        if (input_token == NULL)
                return (NULL);
 
-       input_token->length = get_der_length(buff_in, buff_length, &bytes);
+       input_token->length = gssint_get_der_length(buff_in, buff_length, &bytes);
        if ((int)input_token->length == -1) {
                free(input_token);
                return (NULL);
@@ -1664,7 +1663,7 @@ put_input_token(unsigned char **buf_out, gss_buffer_t input_token,
                return (-1);
 
        *(*buf_out)++ = OCTET_STRING;
-       if ((ret = put_der_length(input_token->length, buf_out,
+       if ((ret = gssint_put_der_length(input_token->length, buf_out,
                            input_token->length)))
                return (ret);
        TWRITE_STR(*buf_out, input_token->value, ((int)input_token->length));
@@ -1694,7 +1693,7 @@ get_mech_set(OM_uint32 *minor_status, unsigned char **buff_in, int buff_length)
        start = *buff_in;
        (*buff_in)++;
 
-       length = get_der_length(buff_in, buff_length, &bytes);
+       length = gssint_get_der_length(buff_in, buff_length, &bytes);
 
        major_status = gss_create_empty_oid_set(minor_status,
                                                &returned_mechSet);
@@ -1741,13 +1740,13 @@ put_mech_set(uchar_t **buf_out, gss_OID_set mechSet, int buflen)
                 * 1 = 0x06, 1 for length of OID
                 * typically, less than 128, so only 1 byte needed.
                 */
-               length += 1 + der_length_size(mechSet->elements[i].length) +
+               length += 1 + gssint_der_length_size(mechSet->elements[i].length) +
                        mechSet->elements[i].length;
        }
        if (length > (buflen-1))
                return (-1);
 
-       if (put_der_length(length, buf_out, buflen-1) < 0)
+       if (gssint_put_der_length(length, buf_out, buflen-1) < 0)
                return (-1);
 
        for (i = 0; i < mechSet->count; i++) {
@@ -1803,7 +1802,7 @@ put_req_flags(unsigned char **buf_out, OM_uint32 req_flags, int buflen)
                return (-1);
 
        *(*buf_out)++ = CONTEXT | 0x01;
-       if ((ret = put_der_length(4, buf_out, buflen-1)) != 0)
+       if ((ret = gssint_put_der_length(4, buf_out, buflen-1)) != 0)
                return (ret);
 
        *(*buf_out)++ = BIT_STRING;
@@ -1832,7 +1831,7 @@ get_negResult(unsigned char **buff_in, int bodysize)
                return (ACCEPT_DEFECTIVE_TOKEN);
 
        if (*(*buff_in)++ == SEQUENCE) {
-               if ((len = get_der_length(buff_in,
+               if ((len = gssint_get_der_length(buff_in,
                                bodysize - (*buff_in - iptr),
                                &bytes)) < 0)
                        return (ACCEPT_DEFECTIVE_TOKEN);
@@ -1846,7 +1845,7 @@ get_negResult(unsigned char **buff_in, int bodysize)
         * Anything else unexpected, we reject.
         */
        if (*(*buff_in)++ == CONTEXT) {
-               if ((len = get_der_length(buff_in, bodysize -
+               if ((len = gssint_get_der_length(buff_in, bodysize -
                                (*buff_in - iptr), &bytes)) < 0)
                        return (ACCEPT_DEFECTIVE_TOKEN);
        } else {
@@ -1907,7 +1906,7 @@ negotiate_mech_type(OM_uint32 *minor_status,
                gss_OID_set supported_mechSet,
                gss_OID_set mechset,
                OM_uint32 *negResult,
-               bool_t *firstMech)
+               krb5_boolean *firstMech)
 {
        gss_OID returned_mech;
        OM_uint32 status;
@@ -2026,11 +2025,11 @@ make_spnego_tokenInit_msg(spnego_gss_ctx_id_t spnego_ctx,
                 */
                for (i = 0; i < mechSet->count; i++)
                        MechSetLen += 1 +
-                               der_length_size(mechSet->elements[i].length) +
+                               gssint_der_length_size(mechSet->elements[i].length) +
                                mechSet->elements[i].length;
 
-               MechSetLen += 1 + der_length_size(MechSetLen);
-               dataLen += 1 + der_length_size(MechSetLen) + MechSetLen;
+               MechSetLen += 1 + gssint_der_length_size(MechSetLen);
+               dataLen += 1 + gssint_der_length_size(MechSetLen) + MechSetLen;
 
                MechListPtr = (uchar_t *)malloc(dataLen);
                ptr = (uchar_t *)MechListPtr;
@@ -2079,10 +2078,10 @@ make_spnego_tokenInit_msg(spnego_gss_ctx_id_t spnego_ctx,
                                 * 0xa3 [DER LEN] 0x04 [DER LEN] [DATA]
                                 *      --s--   -------tlen------------
                                 */
-                               tlen = 1 + der_length_size(MICbuff.length) +
+                               tlen = 1 + gssint_der_length_size(MICbuff.length) +
                                        MICbuff.length;
 
-                               dataLen += 1 + der_length_size(tlen) + tlen;
+                               dataLen += 1 + gssint_der_length_size(tlen) + tlen;
                        }
                }
 
@@ -2105,9 +2104,9 @@ make_spnego_tokenInit_msg(spnego_gss_ctx_id_t spnego_ctx,
                 * 0xa2 [DER LEN] 0x04 [DER LEN] [DATA]
                 * -----s--------|--------s2----------
                 */
-               tlen = 1 + der_length_size(data->length) + data->length;
+               tlen = 1 + gssint_der_length_size(data->length) + data->length;
 
-               dataLen += 1 + der_length_size(tlen) + tlen;
+               dataLen += 1 + gssint_der_length_size(tlen) + tlen;
        }
 
        /*
@@ -2116,7 +2115,7 @@ make_spnego_tokenInit_msg(spnego_gss_ctx_id_t spnego_ctx,
         *   0x30 [DER_LEN] [data]
         *
         */
-       dataLen += 1 + der_length_size(dataLen);
+       dataLen += 1 + gssint_der_length_size(dataLen);
 
        /*
         * negTokenInitSize indicates the bytes needed to
@@ -2129,7 +2128,7 @@ make_spnego_tokenInit_msg(spnego_gss_ctx_id_t spnego_ctx,
 
        tlen = g_token_size((gss_OID)gss_mech_spnego,
                            negTokenInitSize + 1 +
-                           der_length_size(negTokenInitSize));
+                           gssint_der_length_size(negTokenInitSize));
 
        t = (unsigned char *) malloc(tlen);
 
@@ -2142,22 +2141,22 @@ make_spnego_tokenInit_msg(spnego_gss_ctx_id_t spnego_ctx,
        /* create the message */
        if ((ret = g_make_token_header((gss_OID)gss_mech_spnego,
                            1 + negTokenInitSize +
-                           der_length_size(negTokenInitSize),
+                           gssint_der_length_size(negTokenInitSize),
                            &ptr, tlen)))
                goto errout;
 
        if (sendtoken == INIT_TOKEN_SEND) {
                *ptr++ = CONTEXT; /* NegotiationToken identifier */
-               if ((ret = put_der_length(negTokenInitSize, &ptr, tlen)))
+               if ((ret = gssint_put_der_length(negTokenInitSize, &ptr, tlen)))
                        goto errout;
 
                *ptr++ = SEQUENCE;
-               if ((ret = put_der_length(negTokenInitSize - 4, &ptr,
+               if ((ret = gssint_put_der_length(negTokenInitSize - 4, &ptr,
                            tlen - (int)(ptr-t))))
                        goto errout;
 
                *ptr++ = CONTEXT; /* MechTypeList identifier */
-               if ((ret = put_der_length(spnego_ctx->DER_mechTypes.length,
+               if ((ret = gssint_put_der_length(spnego_ctx->DER_mechTypes.length,
                        &ptr, tlen - (int)(ptr-t))))
                        goto errout;
 
@@ -2176,7 +2175,7 @@ make_spnego_tokenInit_msg(spnego_gss_ctx_id_t spnego_ctx,
 
        if (data != NULL) {
                *ptr++ = CONTEXT | 0x02;
-               if ((ret = put_der_length(data->length + 4,
+               if ((ret = gssint_put_der_length(data->length + 4,
                                &ptr, tlen - (int)(ptr - t))))
                        goto errout;
 
@@ -2194,7 +2193,7 @@ make_spnego_tokenInit_msg(spnego_gss_ctx_id_t spnego_ctx,
        if (!spnego_ctx->MS_Interop && MICbuff.length > 0) {
                /* We already calculated the MechListMIC above */
                *ptr++ = CONTEXT | 0x03;
-               if ((ret = put_der_length(MICbuff.length,
+               if ((ret = gssint_put_der_length(MICbuff.length,
                                &ptr, tlen - (int)(ptr - t))))
                        goto errout;
 
@@ -2271,7 +2270,7 @@ make_spnego_tokenTarg_msg(OM_uint32 status, gss_OID mech_wanted,
                         * Plus the rest... (OID Length, OID value)
                         */
                        mechlistTokenSize = 3 + mech_wanted->length +
-                               der_length_size(mech_wanted->length);
+                               gssint_der_length_size(mech_wanted->length);
 
                        dataLen = negresultTokenSize + mechlistTokenSize;
                }
@@ -2285,27 +2284,27 @@ make_spnego_tokenTarg_msg(OM_uint32 status, gss_OID mech_wanted,
        }
        if (data != NULL && data->length > 0) {
                /* Length of the inner token */
-               rspTokenSize = 1 + der_length_size(data->length) +
+               rspTokenSize = 1 + gssint_der_length_size(data->length) +
                        data->length;
 
                dataLen += rspTokenSize;
 
                /* Length of the outer token */
-               dataLen += 1 + der_length_size(rspTokenSize);
+               dataLen += 1 + gssint_der_length_size(rspTokenSize);
        }
        if (mechListMIC != NULL) {
 
                /* Length of the inner token */
-               micTokenSize = 1 + der_length_size(mechListMIC->length) +
+               micTokenSize = 1 + gssint_der_length_size(mechListMIC->length) +
                        mechListMIC->length;
 
                dataLen += micTokenSize;
 
                /* Length of the outer token */
-               dataLen += 1 + der_length_size(micTokenSize);
+               dataLen += 1 + gssint_der_length_size(micTokenSize);
        } else if (data != NULL && data->length > 0 && MS_Flag) {
                dataLen += rspTokenSize;
-               dataLen += 1 + der_length_size(rspTokenSize);
+               dataLen += 1 + gssint_der_length_size(rspTokenSize);
        }
 
        /*
@@ -2323,7 +2322,7 @@ make_spnego_tokenTarg_msg(OM_uint32 status, gss_OID mech_wanted,
         *      Result Length + ASN.1 overhead
         */
        NegTokenTargSize = dataLen;
-       dataLen += 1 + der_length_size(NegTokenTargSize);
+       dataLen += 1 + gssint_der_length_size(NegTokenTargSize);
 
        /*
         * NegotiationToken [ CHOICE ]{
@@ -2331,7 +2330,7 @@ make_spnego_tokenTarg_msg(OM_uint32 status, gss_OID mech_wanted,
         *    negTokenTarg  [1]  NegTokenTarg }
         */
        NegTokenSize = dataLen;
-       dataLen += 1 + der_length_size(NegTokenSize);
+       dataLen += 1 + gssint_der_length_size(NegTokenSize);
 
        tlen = dataLen;
        t = (unsigned char *) malloc(tlen);
@@ -2350,13 +2349,13 @@ make_spnego_tokenTarg_msg(OM_uint32 status, gss_OID mech_wanted,
                 * (NegTokenTarg)
                 */
                *ptr++ = CONTEXT | 0x01;
-               if ((ret = put_der_length(NegTokenSize, &ptr, dataLen))) {
+               if ((ret = gssint_put_der_length(NegTokenSize, &ptr, dataLen))) {
                        ret = GSS_S_DEFECTIVE_TOKEN;
                        goto errout;
                }
 
                *ptr++ = SEQUENCE;
-               if ((ret = put_der_length(NegTokenTargSize, &ptr,
+               if ((ret = gssint_put_der_length(NegTokenTargSize, &ptr,
                            tlen - (int)(ptr-t)))) {
                        ret = GSS_S_DEFECTIVE_TOKEN;
                        goto errout;
@@ -2367,7 +2366,7 @@ make_spnego_tokenTarg_msg(OM_uint32 status, gss_OID mech_wanted,
                 * is the ENUMERATED NegResult.
                 */
                *ptr++ = CONTEXT;
-               if ((ret = put_der_length(3, &ptr,
+               if ((ret = gssint_put_der_length(3, &ptr,
                        tlen - (int)(ptr-t)))) {
                        ret = GSS_S_DEFECTIVE_TOKEN;
                        goto errout;
@@ -2383,7 +2382,7 @@ make_spnego_tokenTarg_msg(OM_uint32 status, gss_OID mech_wanted,
                         * Next, is the Supported MechType
                         */
                        *ptr++ = CONTEXT | 0x01;
-                       if ((ret = put_der_length(mech_wanted->length + 2,
+                       if ((ret = gssint_put_der_length(mech_wanted->length + 2,
                                &ptr, tlen - (int)(ptr - t)))) {
                                ret = GSS_S_DEFECTIVE_TOKEN;
                                goto errout;
@@ -2398,7 +2397,7 @@ make_spnego_tokenTarg_msg(OM_uint32 status, gss_OID mech_wanted,
 
        if (data != NULL && data->length > 0) {
                *ptr++ = CONTEXT | 0x02;
-               if ((ret = put_der_length(rspTokenSize, &ptr,
+               if ((ret = gssint_put_der_length(rspTokenSize, &ptr,
                            tlen - (int)(ptr - t)))) {
                        ret = GSS_S_DEFECTIVE_TOKEN;
                        goto errout;
@@ -2411,7 +2410,7 @@ make_spnego_tokenTarg_msg(OM_uint32 status, gss_OID mech_wanted,
        }
        if (mechListMIC != NULL) {
                *ptr++ = CONTEXT | 0x03;
-               if ((ret = put_der_length(micTokenSize, &ptr,
+               if ((ret = gssint_put_der_length(micTokenSize, &ptr,
                            tlen - (int)(ptr - t)))) {
                        ret = GSS_S_DEFECTIVE_TOKEN;
                        goto errout;
@@ -2423,7 +2422,7 @@ make_spnego_tokenTarg_msg(OM_uint32 status, gss_OID mech_wanted,
                }
        } else if (data != NULL && data->length > 0 && MS_Flag) {
                *ptr++ = CONTEXT | 0x03;
-               if ((ret = put_der_length(rspTokenSize, &ptr,
+               if ((ret = gssint_put_der_length(rspTokenSize, &ptr,
                            tlen - (int)(ptr - t)))) {
                        ret = GSS_S_DEFECTIVE_TOKEN;
                        goto errout;
@@ -2458,14 +2457,14 @@ g_token_size(gss_OID mech, unsigned int body_size)
         *
         * 0x06 [MECHLENFIELD] MECHDATA
         */
-       hdrsize = 1 + der_length_size(mech->length) + mech->length;
+       hdrsize = 1 + gssint_der_length_size(mech->length) + mech->length;
 
        /*
         * Now add the bytes needed for the initial header
         * token bytes:
         * 0x60 + [DER_LEN] + HDRSIZE
         */
-       hdrsize += 1 + der_length_size(body_size + hdrsize);
+       hdrsize += 1 + gssint_der_length_size(body_size + hdrsize);
 
        return (hdrsize + body_size);
 }
@@ -2486,14 +2485,14 @@ g_make_token_header(gss_OID mech,
        int hdrsize, ret = 0;
        unsigned char *p = *buf;
 
-       hdrsize = 1 + der_length_size(mech->length) + mech->length;
+       hdrsize = 1 + gssint_der_length_size(mech->length) + mech->length;
 
        *(*buf)++ = HEADER_ID;
-       if ((ret = put_der_length(hdrsize + body_size, buf, totallen)))
+       if ((ret = gssint_put_der_length(hdrsize + body_size, buf, totallen)))
                return (ret);
 
        *(*buf)++ = MECH_OID;
-       if ((ret = put_der_length(mech->length, buf,
+       if ((ret = gssint_put_der_length(mech->length, buf,
                            totallen - (int)(p - *buf))))
                return (ret);
        TWRITE_STR(*buf, mech->elements, ((int)mech->length));
@@ -2509,7 +2508,7 @@ g_get_tag_and_length(unsigned char **buf, uchar_t tag, int buflen, int *outlen)
 
        if (buflen > 0 && *ptr == tag) {
                ptr++;
-               *outlen = get_der_length(&ptr, buflen, &encoded_len);
+               *outlen = gssint_get_der_length(&ptr, buflen, &encoded_len);
                if (*outlen < 0)
                        ret = *outlen;
                if ((ptr + *outlen) > (*buf + buflen))
@@ -2546,7 +2545,7 @@ g_verify_neg_token_init(unsigned char **buf_in, int cur_size)
         * a strucure of type NegTokenInit.
         */
        if (*buf++ == SEQUENCE) {
-               if ((seqsize = get_der_length(&buf, cur_size, &bytes)) < 0)
+               if ((seqsize = gssint_get_der_length(&buf, cur_size, &bytes)) < 0)
                        return (G_BAD_TOK_HEADER);
                /*
                 * Make sure we have the entire buffer as described
@@ -2563,7 +2562,7 @@ g_verify_neg_token_init(unsigned char **buf_in, int cur_size)
         * Verify that the first blob is a sequence of mechTypes
         */
        if (*buf++ == CONTEXT) {
-               if ((seqsize = get_der_length(&buf, cur_size, &bytes)) < 0)
+               if ((seqsize = gssint_get_der_length(&buf, cur_size, &bytes)) < 0)
                        return (G_BAD_TOK_HEADER);
                /*
                 * Make sure we have the entire buffer as described
@@ -2604,7 +2603,7 @@ g_verify_token_header(gss_OID mech,
        if (*buf++ != HEADER_ID)
                return (G_BAD_TOK_HEADER);
 
-       if ((seqsize = get_der_length(&buf, toksize, &bytes)) < 0)
+       if ((seqsize = gssint_get_der_length(&buf, toksize, &bytes)) < 0)
                return (G_BAD_TOK_HEADER);
 
        if ((seqsize + bytes) != toksize)