GSS_C_NO_OID matches nothing, not even it-self, document function
This commit is contained in:
@@ -33,10 +33,24 @@
|
|||||||
|
|
||||||
#include "mech_locl.h"
|
#include "mech_locl.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compare two GSS-API OIDs with each other.
|
||||||
|
*
|
||||||
|
* GSS_C_NO_OID matches nothing, not even it-self.
|
||||||
|
*
|
||||||
|
* @param a first oid to compare
|
||||||
|
* @param b second oid to compare
|
||||||
|
*
|
||||||
|
* @return zero when both oid are the same OID, non-zero when they are
|
||||||
|
* not the same.
|
||||||
|
*
|
||||||
|
* @ingroup gssapi
|
||||||
|
*/
|
||||||
|
|
||||||
int GSSAPI_LIB_FUNCTION
|
int GSSAPI_LIB_FUNCTION
|
||||||
gss_oid_equal(const gss_OID a, const gss_OID b)
|
gss_oid_equal(const gss_OID a, const gss_OID b)
|
||||||
{
|
{
|
||||||
if (a == b)
|
if (a == b && a != GSS_C_NO_OID)
|
||||||
return 1;
|
return 1;
|
||||||
if (a == GSS_C_NO_OID || b == GSS_C_NO_OID || a->length != b->length)
|
if (a == GSS_C_NO_OID || b == GSS_C_NO_OID || a->length != b->length)
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user