(gss_indicate_mechs): use gss_create_empty_oid_set and gss_add_oid_set_member
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11738 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997 - 2001 Kungliga Tekniska H<>gskolan
|
* Copyright (c) 1997 - 2001, 2003 Kungliga Tekniska H<>gskolan
|
||||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -40,18 +40,16 @@ OM_uint32 gss_indicate_mechs
|
|||||||
gss_OID_set * mech_set
|
gss_OID_set * mech_set
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
*mech_set = malloc(sizeof(**mech_set));
|
OM_uint32 ret;
|
||||||
if (*mech_set == NULL) {
|
|
||||||
*minor_status = ENOMEM;
|
ret = gss_create_empty_oid_set(minor_status, mech_set);
|
||||||
return GSS_S_FAILURE;
|
if (ret)
|
||||||
}
|
return ret;
|
||||||
(*mech_set)->count = 1;
|
|
||||||
(*mech_set)->elements = malloc((*mech_set)->count * sizeof(gss_OID_desc));
|
ret = gss_add_oid_set_member(minor_status, GSS_KRB5_MECHANISM, mech_set);
|
||||||
if ((*mech_set)->elements == NULL) {
|
if (ret)
|
||||||
free (*mech_set);
|
return ret;
|
||||||
*minor_status = ENOMEM;
|
|
||||||
return GSS_S_FAILURE;
|
*minor_status = 0;
|
||||||
}
|
|
||||||
(*mech_set)->elements[0] = *GSS_KRB5_MECHANISM;
|
|
||||||
return GSS_S_COMPLETE;
|
return GSS_S_COMPLETE;
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997 - 2001 Kungliga Tekniska H<>gskolan
|
* Copyright (c) 1997 - 2001, 2003 Kungliga Tekniska H<>gskolan
|
||||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -40,18 +40,16 @@ OM_uint32 gss_indicate_mechs
|
|||||||
gss_OID_set * mech_set
|
gss_OID_set * mech_set
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
*mech_set = malloc(sizeof(**mech_set));
|
OM_uint32 ret;
|
||||||
if (*mech_set == NULL) {
|
|
||||||
*minor_status = ENOMEM;
|
ret = gss_create_empty_oid_set(minor_status, mech_set);
|
||||||
return GSS_S_FAILURE;
|
if (ret)
|
||||||
}
|
return ret;
|
||||||
(*mech_set)->count = 1;
|
|
||||||
(*mech_set)->elements = malloc((*mech_set)->count * sizeof(gss_OID_desc));
|
ret = gss_add_oid_set_member(minor_status, GSS_KRB5_MECHANISM, mech_set);
|
||||||
if ((*mech_set)->elements == NULL) {
|
if (ret)
|
||||||
free (*mech_set);
|
return ret;
|
||||||
*minor_status = ENOMEM;
|
|
||||||
return GSS_S_FAILURE;
|
*minor_status = 0;
|
||||||
}
|
|
||||||
(*mech_set)->elements[0] = *GSS_KRB5_MECHANISM;
|
|
||||||
return GSS_S_COMPLETE;
|
return GSS_S_COMPLETE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user