(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).
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -40,18 +40,16 @@ OM_uint32 gss_indicate_mechs
|
||||
gss_OID_set * mech_set
|
||||
)
|
||||
{
|
||||
*mech_set = malloc(sizeof(**mech_set));
|
||||
if (*mech_set == NULL) {
|
||||
*minor_status = ENOMEM;
|
||||
return GSS_S_FAILURE;
|
||||
}
|
||||
(*mech_set)->count = 1;
|
||||
(*mech_set)->elements = malloc((*mech_set)->count * sizeof(gss_OID_desc));
|
||||
if ((*mech_set)->elements == NULL) {
|
||||
free (*mech_set);
|
||||
*minor_status = ENOMEM;
|
||||
return GSS_S_FAILURE;
|
||||
}
|
||||
(*mech_set)->elements[0] = *GSS_KRB5_MECHANISM;
|
||||
OM_uint32 ret;
|
||||
|
||||
ret = gss_create_empty_oid_set(minor_status, mech_set);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = gss_add_oid_set_member(minor_status, GSS_KRB5_MECHANISM, mech_set);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
*minor_status = 0;
|
||||
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).
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -40,18 +40,16 @@ OM_uint32 gss_indicate_mechs
|
||||
gss_OID_set * mech_set
|
||||
)
|
||||
{
|
||||
*mech_set = malloc(sizeof(**mech_set));
|
||||
if (*mech_set == NULL) {
|
||||
*minor_status = ENOMEM;
|
||||
return GSS_S_FAILURE;
|
||||
}
|
||||
(*mech_set)->count = 1;
|
||||
(*mech_set)->elements = malloc((*mech_set)->count * sizeof(gss_OID_desc));
|
||||
if ((*mech_set)->elements == NULL) {
|
||||
free (*mech_set);
|
||||
*minor_status = ENOMEM;
|
||||
return GSS_S_FAILURE;
|
||||
}
|
||||
(*mech_set)->elements[0] = *GSS_KRB5_MECHANISM;
|
||||
OM_uint32 ret;
|
||||
|
||||
ret = gss_create_empty_oid_set(minor_status, mech_set);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = gss_add_oid_set_member(minor_status, GSS_KRB5_MECHANISM, mech_set);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
*minor_status = 0;
|
||||
return GSS_S_COMPLETE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user