}
} else PORT_SetError(SSL_ERROR_BAD_CERT_DOMAIN);
CERT_VerifyCertName(CERTCertificate *cert, const char *hn){    char *    cn;    SECStatus rv;    CERTOKDomainName *domainOK;    if (!hn || !strlen(hn)) {    	PORT_SetError(SEC_ERROR_INVALID_ARGS);	return SECFailure;    }    /* if the name is one that the user has already approved, it's OK. */    for (domainOK = cert->domainOK; domainOK; domainOK = domainOK->next) {	if (0 == PORT_Strcasecmp(hn, domainOK->name)) {	    return SECSuccess;    	}    }    /* test the cert's Subject Alternative Name extension, if any */    rv = cert_VerifySubjectAltName(cert, hn);    if (rv == SECSuccess || PORT_GetError() != SSL_ERROR_BAD_CERT_DOMAIN)    	return rv;    /* try the cert extension first, then the common name */    cn = CERT_FindNSStringExtension(cert, SEC_OID_NS_CERT_EXT_SSL_SERVER_NAME);    if ( !cn ) {	cn = CERT_GetCommonName(&cert->subject);    }    if ( cn ) {	rv = cert_TestHostName(cn, hn);	PORT_Free(cn);    }    return rv;}