int verify_host_key(char *hostname, int port, char *keytype, char *key)
int verify_host_key(const char *hostname, int port, const char *keytype, const char *key)
int verify_host_key(char *hostname, int port, char *keytype, char *key){    FILE *fp;    char filename[FILENAME_MAX];    char *line;    int ret;    make_filename(filename, INDEX_HOSTKEYS);    fp = fopen(filename, "r");    if (!fp)	return 1;		       /* key does not exist */    ret = 1;    while ( (line = fgetline(fp)) ) {	int i;	char *p = line;	char porttext[20];	line[strcspn(line, "\n")] = '\0';   /* strip trailing newline */	i = strlen(keytype);	if (strncmp(p, keytype, i))	    goto done;	p += i;	if (*p != '@')	    goto done;	p++;	sprintf(porttext, "%d", port);	i = strlen(porttext);	if (strncmp(p, porttext, i))	    goto done;	p += i;	if (*p != ':')	    goto done;	p++;	i = strlen(hostname);	if (strncmp(p, hostname, i))	    goto done;	p += i;	if (*p != ' ')	    goto done;	p++;	/*	 * Found the key. Now just work out whether it's the right	 * one or not.	 */	if (!strcmp(p, key))	    ret = 0;		       /* key matched OK */	else	    ret = 2;		       /* key mismatch */	done:	sfree(line);	if (ret != 1)	    break;    }    return ret;}