This function returns 1 if rdn contains a RDN that matches the given type, or 0 if there is no match.