}
/* port to mutt from msmtp's tls.c */
-static int hostname_match (const char *hostname, const char *certname)
+static bool hostname_match (const char *hostname, const char *certname)
{
const char *cmp1 = NULL, *cmp2 = NULL;
cmp2 = strchr(hostname, '.');
if (!cmp2)
{
- return 0;
+ return false;
}
else
{
if (*cmp1 == '\0' || *cmp2 == '\0')
{
- return 0;
+ return false;
}
if (strcasecmp(cmp1, cmp2) != 0)
{
- return 0;
+ return false;
}
- return 1;
+ return true;
}
/*
int subj_alt_names_count;
GENERAL_NAME *subj_alt_name = NULL;
/* did we find a name matching hostname? */
- int match_found;
+ bool match_found;
/* Check if 'hostname' matches the one of the subjectAltName extensions of
* type DNS or the Common Name (CN). */