#include "mech_locl.h"
/**
- * Add a oid to the oid set, function does not make a copy of the oid,
- * so the pointer to member_oid needs to be stable for the whole time
- * oid_set is used.
+ * Add a oid to the oid set.
*
* If there is a duplicate member of the oid, the new member is not
* added to to the set.
const gss_OID member_oid,
gss_OID_set * oid_set)
{
- gss_OID tmp;
+ gss_OID tmp, interned_oid;
size_t n;
OM_uint32 res;
int present;
return GSS_S_FAILURE;
}
(*oid_set)->elements = tmp;
+
+ res = _gss_intern_oid(minor_status, member_oid, &interned_oid);
+ if (res != GSS_S_COMPLETE)
+ return res;
+
(*oid_set)->count = n;
- (*oid_set)->elements[n-1] = *member_oid;
+ (*oid_set)->elements[n-1] = *interned_oid;
*minor_status = 0;
return GSS_S_COMPLETE;
}