remove trailing whitespace
This commit is contained in:
@@ -34,17 +34,17 @@ parse_header(const gss_buffer_t input_token, gss_OID mech_oid)
|
||||
unsigned char *p = input_token->value;
|
||||
size_t len = input_token->length;
|
||||
size_t a, b;
|
||||
|
||||
|
||||
/*
|
||||
* Token must start with [APPLICATION 0] SEQUENCE.
|
||||
* But if it doesn't assume it is DCE-STYLE Kerberos!
|
||||
*/
|
||||
if (len == 0)
|
||||
return (GSS_S_DEFECTIVE_TOKEN);
|
||||
|
||||
|
||||
p++;
|
||||
len--;
|
||||
|
||||
|
||||
/*
|
||||
* Decode the length and make sure it agrees with the
|
||||
* token length.
|
||||
@@ -71,7 +71,7 @@ parse_header(const gss_buffer_t input_token, gss_OID mech_oid)
|
||||
}
|
||||
if (a != len)
|
||||
return (GSS_S_DEFECTIVE_TOKEN);
|
||||
|
||||
|
||||
/*
|
||||
* Decode the OID for the mechanism. Simplify life by
|
||||
* assuming that the OID length is less than 128 bytes.
|
||||
@@ -84,9 +84,9 @@ parse_header(const gss_buffer_t input_token, gss_OID mech_oid)
|
||||
p += 2;
|
||||
len -= 2;
|
||||
mech_oid->elements = p;
|
||||
|
||||
|
||||
return GSS_S_COMPLETE;
|
||||
}
|
||||
}
|
||||
|
||||
static gss_OID_desc krb5_mechanism =
|
||||
{9, rk_UNCONST("\x2a\x86\x48\x86\xf7\x12\x01\x02\x02")};
|
||||
@@ -221,7 +221,7 @@ gss_accept_sec_context(OM_uint32 *minor_status,
|
||||
acceptor_mc = GSS_C_NO_CREDENTIAL;
|
||||
}
|
||||
delegated_mc = GSS_C_NO_CREDENTIAL;
|
||||
|
||||
|
||||
mech_ret_flags = 0;
|
||||
major_status = m->gm_accept_sec_context(minor_status,
|
||||
&ctx->gc_ctx,
|
||||
@@ -267,7 +267,7 @@ gss_accept_sec_context(OM_uint32 *minor_status,
|
||||
mech_ret_flags &=
|
||||
~(GSS_C_DELEG_FLAG|GSS_C_DELEG_POLICY_FLAG);
|
||||
} else if (gss_oid_equal(mech_ret_type, &m->gm_mech_oid) == 0) {
|
||||
/*
|
||||
/*
|
||||
* If the returned mech_type is not the same
|
||||
* as the mech, assume its pseudo mech type
|
||||
* and the returned type is already a
|
||||
|
@@ -47,7 +47,7 @@
|
||||
*
|
||||
* @returns a gss_error code, see gss_display_status() about printing
|
||||
* the error code.
|
||||
*
|
||||
*
|
||||
* @ingroup gssapi
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* AEAD support
|
||||
*/
|
||||
*/
|
||||
|
||||
#include "mech_locl.h"
|
||||
|
||||
@@ -90,7 +90,7 @@ gss_unwrap_iov(OM_uint32 *minor_status,
|
||||
int iov_count)
|
||||
{
|
||||
struct _gss_context *ctx = (struct _gss_context *) context_handle;
|
||||
gssapi_mech_interface m;
|
||||
gssapi_mech_interface m;
|
||||
|
||||
if (minor_status)
|
||||
*minor_status = 0;
|
||||
|
@@ -48,7 +48,7 @@
|
||||
*
|
||||
* @returns a gss_error code, see gss_display_status() about printing
|
||||
* the error code.
|
||||
*
|
||||
*
|
||||
* @ingroup gssapi
|
||||
*/
|
||||
|
||||
|
@@ -183,7 +183,7 @@ gss_import_cred(OM_uint32 * minor_status,
|
||||
buffer.value = data.data;
|
||||
buffer.length = data.length;
|
||||
|
||||
major = m->gm_import_cred(minor_status,
|
||||
major = m->gm_import_cred(minor_status,
|
||||
&buffer, &mcred);
|
||||
krb5_data_free(&data);
|
||||
if (major) {
|
||||
|
@@ -55,7 +55,7 @@ gss_decapsulate_token(gss_const_buffer_t input_token,
|
||||
if (ret) {
|
||||
der_free_oid(&o);
|
||||
return GSS_S_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
if (der_heim_oid_cmp(&ct.thisMech, &o) == 0) {
|
||||
status = GSS_S_COMPLETE;
|
||||
|
@@ -40,7 +40,7 @@ gss_delete_name_attribute(OM_uint32 *minor_status,
|
||||
OM_uint32 major_status = GSS_S_UNAVAILABLE;
|
||||
struct _gss_name *name = (struct _gss_name *) input_name;
|
||||
struct _gss_mechanism_name *mn;
|
||||
|
||||
|
||||
*minor_status = 0;
|
||||
|
||||
if (input_name == GSS_C_NO_NAME)
|
||||
|
@@ -41,9 +41,9 @@ gss_destroy_cred(void *status,
|
||||
return GSS_S_CALL_INACCESSIBLE_READ;
|
||||
if (*cred_handle == GSS_C_NO_CREDENTIAL)
|
||||
return GSS_S_COMPLETE;
|
||||
|
||||
|
||||
cred = (struct _gss_cred *)*cred_handle;
|
||||
|
||||
|
||||
while (HEIM_SLIST_FIRST(&cred->gc_mc)) {
|
||||
mc = HEIM_SLIST_FIRST(&cred->gc_mc);
|
||||
HEIM_SLIST_REMOVE_HEAD(&cred->gc_mc, gmc_link);
|
||||
|
@@ -41,7 +41,7 @@ gss_display_name_ext(OM_uint32 *minor_status,
|
||||
OM_uint32 major_status = GSS_S_UNAVAILABLE;
|
||||
struct _gss_name *name = (struct _gss_name *) input_name;
|
||||
struct _gss_mechanism_name *mn;
|
||||
|
||||
|
||||
*minor_status = 0;
|
||||
_mg_buffer_zero(display_name);
|
||||
|
||||
|
@@ -190,7 +190,7 @@ gss_display_status(OM_uint32 *minor_status,
|
||||
oid.value = rk_UNCONST("unknown");
|
||||
oid.length = 7;
|
||||
}
|
||||
|
||||
|
||||
e = asprintf (&buf, "unknown mech-code %lu for mech %.*s",
|
||||
(unsigned long)status_value,
|
||||
(int)oid.length, (char *)oid.value);
|
||||
|
@@ -52,7 +52,7 @@ gss_duplicate_name(OM_uint32 *minor_status,
|
||||
if (major_status != GSS_S_COMPLETE)
|
||||
return (major_status);
|
||||
new_name = (struct _gss_name *) *dest_name;
|
||||
|
||||
|
||||
HEIM_SLIST_FOREACH(mn, &name->gn_mn, gmn_link) {
|
||||
struct _gss_mechanism_name *mn2;
|
||||
_gss_find_mn(minor_status, new_name,
|
||||
@@ -67,10 +67,10 @@ gss_duplicate_name(OM_uint32 *minor_status,
|
||||
memset(new_name, 0, sizeof(struct _gss_name));
|
||||
HEIM_SLIST_INIT(&new_name->gn_mn);
|
||||
*dest_name = (gss_name_t) new_name;
|
||||
|
||||
|
||||
HEIM_SLIST_FOREACH(mn, &name->gn_mn, gmn_link) {
|
||||
struct _gss_mechanism_name *new_mn;
|
||||
|
||||
|
||||
new_mn = malloc(sizeof(*new_mn));
|
||||
if (!new_mn) {
|
||||
*minor_status = ENOMEM;
|
||||
@@ -78,7 +78,7 @@ gss_duplicate_name(OM_uint32 *minor_status,
|
||||
}
|
||||
new_mn->gmn_mech = mn->gmn_mech;
|
||||
new_mn->gmn_mech_oid = mn->gmn_mech_oid;
|
||||
|
||||
|
||||
major_status =
|
||||
mn->gmn_mech->gm_duplicate_name(minor_status,
|
||||
mn->gmn_name, &new_mn->gmn_name);
|
||||
|
@@ -58,7 +58,7 @@ gss_encapsulate_token(gss_const_buffer_t input_token,
|
||||
if (ret) {
|
||||
_mg_buffer_zero(output_token);
|
||||
return GSS_S_FAILURE;
|
||||
}
|
||||
}
|
||||
if (output_token->length != size)
|
||||
abort();
|
||||
|
||||
|
@@ -40,7 +40,7 @@ gss_export_name_composite(OM_uint32 *minor_status,
|
||||
OM_uint32 major_status = GSS_S_UNAVAILABLE;
|
||||
struct _gss_name *name = (struct _gss_name *) input_name;
|
||||
struct _gss_mechanism_name *mn;
|
||||
|
||||
|
||||
*minor_status = 0;
|
||||
_mg_buffer_zero(exp_composite_name);
|
||||
|
||||
|
@@ -42,7 +42,7 @@ gss_export_sec_context(OM_uint32 *minor_status,
|
||||
|
||||
major_status = m->gm_export_sec_context(minor_status,
|
||||
&ctx->gc_ctx, &buf);
|
||||
|
||||
|
||||
if (major_status == GSS_S_COMPLETE) {
|
||||
unsigned char *p;
|
||||
|
||||
|
@@ -45,7 +45,7 @@ gss_get_name_attribute(OM_uint32 *minor_status,
|
||||
OM_uint32 major_status = GSS_S_UNAVAILABLE;
|
||||
struct _gss_name *name = (struct _gss_name *) input_name;
|
||||
struct _gss_mechanism_name *mn;
|
||||
|
||||
|
||||
*minor_status = 0;
|
||||
if (authenticated != NULL)
|
||||
*authenticated = 0;
|
||||
|
@@ -169,7 +169,7 @@ _gss_import_export_name(OM_uint32 *minor_status,
|
||||
*
|
||||
* @returns a gss_error code, see gss_display_status() about printing
|
||||
* the error code.
|
||||
*
|
||||
*
|
||||
* @ingroup gssapi
|
||||
*/
|
||||
|
||||
@@ -241,7 +241,7 @@ gss_import_name(OM_uint32 *minor_status,
|
||||
HEIM_SLIST_FOREACH(m, &_gss_mechs, gm_link) {
|
||||
int present = 0;
|
||||
|
||||
major_status = gss_test_oid_set_member(minor_status,
|
||||
major_status = gss_test_oid_set_member(minor_status,
|
||||
name_type, m->gm_name_types, &present);
|
||||
|
||||
if (major_status || present == 0)
|
||||
|
@@ -58,7 +58,7 @@ gss_import_sec_context(OM_uint32 *minor_status,
|
||||
mech_oid.elements = p + 2;
|
||||
buf.length = len - 2 - mech_oid.length;
|
||||
buf.value = p + 2 + mech_oid.length;
|
||||
|
||||
|
||||
m = __gss_get_mechanism(&mech_oid);
|
||||
if (!m)
|
||||
return (GSS_S_DEFECTIVE_TOKEN);
|
||||
|
@@ -42,7 +42,7 @@ gss_indicate_mechs(OM_uint32 *minor_status,
|
||||
major_status = gss_create_empty_oid_set(minor_status, mech_set);
|
||||
if (major_status)
|
||||
return (major_status);
|
||||
|
||||
|
||||
HEIM_SLIST_FOREACH(m, &_gss_mechs, gm_link) {
|
||||
if (m->gm_mech.gm_indicate_mechs) {
|
||||
major_status = m->gm_mech.gm_indicate_mechs(
|
||||
|
@@ -99,7 +99,7 @@ _gss_mech_cred_find(gss_cred_id_t cred_handle, gss_OID mech_type)
|
||||
*
|
||||
* @returns a gss_error code, see gss_display_status() about printing
|
||||
* the error code.
|
||||
*
|
||||
*
|
||||
* @ingroup gssapi
|
||||
*/
|
||||
|
||||
|
@@ -42,7 +42,7 @@ gss_inquire_name(OM_uint32 *minor_status,
|
||||
OM_uint32 major_status = GSS_S_UNAVAILABLE;
|
||||
struct _gss_name *name = (struct _gss_name *) input_name;
|
||||
struct _gss_mechanism_name *mn;
|
||||
|
||||
|
||||
*minor_status = 0;
|
||||
if (name_is_MN != NULL)
|
||||
*name_is_MN = 0;
|
||||
|
@@ -62,7 +62,7 @@ _gss_string_to_oid(const char* s, gss_OID oid)
|
||||
if (q) q = q + 1;
|
||||
number_count++;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* The first two numbers are in the first byte and each
|
||||
* subsequent number is encoded in a variable byte sequence.
|
||||
@@ -126,7 +126,7 @@ _gss_string_to_oid(const char* s, gss_OID oid)
|
||||
while (bytes) {
|
||||
if (res) {
|
||||
int bit = 7*(bytes-1);
|
||||
|
||||
|
||||
*res = (number >> bit) & 0x7f;
|
||||
if (bytes != 1)
|
||||
*res |= 0x80;
|
||||
|
@@ -58,7 +58,7 @@ _gss_find_mn(OM_uint32 *minor_status, struct _gss_name *name, gss_OID mech,
|
||||
mn = malloc(sizeof(struct _gss_mechanism_name));
|
||||
if (!mn)
|
||||
return GSS_S_FAILURE;
|
||||
|
||||
|
||||
major_status = m->gm_import_name(minor_status,
|
||||
&name->gn_value,
|
||||
(name->gn_type.elements
|
||||
|
@@ -43,7 +43,7 @@
|
||||
*
|
||||
* @return non-zero when both oid are the same OID, zero when they are
|
||||
* not the same.
|
||||
*
|
||||
*
|
||||
* @ingroup gssapi
|
||||
*/
|
||||
|
||||
|
@@ -40,7 +40,7 @@
|
||||
*
|
||||
* @returns a gss_error code, see gss_display_status() about printing
|
||||
* the error code.
|
||||
*
|
||||
*
|
||||
* @ingroup gssapi
|
||||
*/
|
||||
GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
|
||||
|
@@ -93,13 +93,13 @@ gss_set_cred_option (OM_uint32 *minor_status,
|
||||
|
||||
HEIM_SLIST_FOREACH(mc, &cred->gc_mc, gmc_link) {
|
||||
m = mc->gmc_mech;
|
||||
|
||||
|
||||
if (m == NULL)
|
||||
return GSS_S_BAD_MECH;
|
||||
|
||||
|
||||
if (m->gm_set_cred_option == NULL)
|
||||
continue;
|
||||
|
||||
|
||||
major_status = m->gm_set_cred_option(minor_status,
|
||||
&mc->gmc_cred, object, value);
|
||||
if (major_status == GSS_S_COMPLETE)
|
||||
|
@@ -42,7 +42,7 @@ gss_set_name_attribute(OM_uint32 *minor_status,
|
||||
OM_uint32 major_status = GSS_S_UNAVAILABLE;
|
||||
struct _gss_name *name = (struct _gss_name *) input_name;
|
||||
struct _gss_mechanism_name *mn;
|
||||
|
||||
|
||||
*minor_status = 0;
|
||||
|
||||
if (input_name == GSS_C_NO_NAME)
|
||||
|
@@ -53,7 +53,7 @@ gss_store_cred(OM_uint32 *minor_status,
|
||||
*elements_stored = NULL;
|
||||
if (cred_usage_stored)
|
||||
*cred_usage_stored = 0;
|
||||
|
||||
|
||||
if (cred == NULL)
|
||||
return GSS_S_NO_CONTEXT;
|
||||
|
||||
|
@@ -38,7 +38,7 @@ gss_wrap_size_limit(OM_uint32 *minor_status,
|
||||
{
|
||||
struct _gss_context *ctx = (struct _gss_context *) context_handle;
|
||||
gssapi_mech_interface m;
|
||||
|
||||
|
||||
*max_input_size = 0;
|
||||
if (ctx == NULL) {
|
||||
*minor_status = 0;
|
||||
|
@@ -55,10 +55,10 @@ must be enclosed in brackets ([ ]) to differentiate them from the
|
||||
optional kernel module entry.
|
||||
.El
|
||||
.Pp
|
||||
The
|
||||
The
|
||||
.Pa "/etc/gss/qop"
|
||||
file contains a list of Quality of Protection values for use with
|
||||
GSS-API.
|
||||
GSS-API.
|
||||
Each line of the file either contains a comment if the first character
|
||||
is '#' or it contains three fields with the following meanings:
|
||||
.Bl -tag
|
||||
|
Reference in New Issue
Block a user