X-Git-Url: http://www.project-moonshot.org/gitweb/?p=mech_eap.git;a=blobdiff_plain;f=mech_eap%2Futil_oid.c;h=7a24f5abe5ca7ee85483bd6f89ea78e388b0134f;hp=096c9f806a8b196e0c0ebff49b9a751393a92237;hb=HEAD;hpb=a1e95d663ffdd950ced493e84f8bf5453c858bd8 diff --git a/mech_eap/util_oid.c b/mech_eap/util_oid.c index 096c9f8..7a24f5a 100644 --- a/mech_eap/util_oid.c +++ b/mech_eap/util_oid.c @@ -204,3 +204,15 @@ duplicateOidSet(OM_uint32 *minor, return major; } + +int +oidEqual(const gss_OID_desc *o1, const gss_OID_desc *o2) +{ + if (o1 == GSS_C_NO_OID) + return (o2 == GSS_C_NO_OID); + else if (o2 == GSS_C_NO_OID) + return (o1 == GSS_C_NO_OID); + else + return (o1->length == o2->length && + memcmp(o1->elements, o2->elements, o1->length) == 0); +}